Example #1
0
void SettingGuiWireup::registerFriends(QComboBox *port_type_combobox,
                                       QListWidget *channel_list,
                                       ChannelFactory *channels)
{
    this->port_type_combobox = port_type_combobox;
    this->channel_list = channel_list;
    this->channels = channels;

    connect( port_type_combobox, SIGNAL(currentIndexChanged(QString)), this, SLOT(onPortTypeChange(QString)) );
    connect( channel_list, SIGNAL(currentTextChanged(QString)), this, SLOT(onChannelChange(QString)) );

    valid = true;
}
Example #2
0
                );

    foreach( auto builder, gui_builders ) {
        ui->portSettingsForm->registerPortType( builder );
    }

    connect( ui->channelList,
             SIGNAL(currentTextChanged(QString)),
             ui->portSettingsForm,
             SLOT(onChannelChange(QString))
             );

    connect( ui->portTypeComboBox,
             SIGNAL(currentTextChanged(QString)),
             ui->portSettingsForm,
             SLOT(onPortTypeChange(QString))
             );

    connect( ui->portSettingsForm,
             SIGNAL(storeSettings(PortSettingsPointer,int)),
             channel_factory,
             SLOT(storeSettings(PortSettingsPointer,int))
             );

    connect( ui->channelList,
             SIGNAL(currentTextChanged(QString)),
             this,
             SLOT(channelPortChanged(QString))
             );

    connect( ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(scrollData(int)));