コード例 #1
0
Dialog_conf_views::Dialog_conf_views(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog_conf_views)
{
    ui->setupUi(this);
    ////////////////////////////////////////////////////////////////////////////////////////////
    //threshold slide
    ui->hslid_th_left->setRange(0,127);
    connect(ui->hslid_th_left,SIGNAL(sliderReleased()),this,SLOT(on_hslid_th_left_sliderReleased()));
    ui->hslid_th_right->setRange(0,127);
    connect(ui->hslid_th_right,SIGNAL(sliderReleased()),this,SLOT(on_hslid_th_right_sliderReleased()));
    //gain slide
    ui->hslid_gain_left->setRange(0,6);
    connect(ui->hslid_gain_left,SIGNAL(sliderReleased()),this,SLOT(on_hslid_gain_left_sliderReleased()));
    ui->hslid_gain_right->setRange(0,6);
    connect(ui->hslid_gain_right,SIGNAL(sliderReleased()),this,SLOT(on_hslid_gain_right_sliderReleased()));
    //combo view selector
    for (int i = 0; i <gDefinedViews_left->Number_of_defined_views; i++){
        ui->comboBox->addItem((QString::fromUtf8(gDefinedViews_left->view_vector.at(i).Name.c_str())));
    }
    connect(ui->comboBox,SIGNAL(activated(const QString &)),this,SLOT(on_comboBox_activated(const QString &)));
    for (int i = 0; i <gDefinedViews_right->Number_of_defined_views; i++){
        ui->comboBox_2->addItem((QString::fromUtf8(gDefinedViews_right->view_vector.at(i).Name.c_str())));
    }
    connect(ui->comboBox_2,SIGNAL(activated(const QString &)),this,SLOT(on_comboBox_2_activated(const QString &)));
    //doubled view check box
    connect(ui->chk_double_left,SIGNAL(clicked()),this,SLOT(on_chk_double_left_clicked()));
    connect(ui->chk_double_right,SIGNAL(clicked()),this,SLOT(on_chk_double_right_clicked()));
    //combo interpolation methods
    ui->cmb_double_left->addItem(QString::fromUtf8("Nearest Neighbour"));
    ui->cmb_double_left->addItem(QString::fromUtf8("Bilinear"));
    ui->cmb_double_left->addItem(QString::fromUtf8("Pixel area re-samp."));
    ui->cmb_double_left->addItem(QString::fromUtf8("Bicubic interpol."));
    connect(ui->cmb_double_left,SIGNAL(activated(const QString &)),this,SLOT(on_cmb_double_left_activated(const QString &)));

    ui->cmb_double_right->addItem(QString::fromUtf8("Nearest Neighbour"));
    ui->cmb_double_right->addItem(QString::fromUtf8("Bilinear"));
    ui->cmb_double_right->addItem(QString::fromUtf8("Pixel area re-samp."));
    ui->cmb_double_right->addItem(QString::fromUtf8("Bicubic interpol."));
    connect(ui->cmb_double_right,SIGNAL(activated(const QString &)),this,SLOT(on_cmb_double_right_activated(const QString &)));
    //view activation check box
    connect(ui->chk_View_left,SIGNAL(clicked()),this,SLOT(on_chk_View_left_clicked()));
    connect(ui->chk_View_right,SIGNAL(clicked()),this,SLOT(on_chk_View_right_clicked()));
    ui->chk_View_left->setChecked(gDefinedViews_left->isActive );
    ui->chk_View_right->setChecked(gDefinedViews_right->isActive );
    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    //select the first view in both the interface and update the UI
    ui->comboBox->setCurrentIndex(0);
    on_comboBox_activated(ui->comboBox->currentText());
    ui->comboBox->setCurrentIndex(0);
    on_comboBox_2_activated(ui->comboBox_2->currentText());
}
コード例 #2
0
void SubSkillPanel::SubSkillPanelInit(QString nameSkill) {
    subSkills.clear();
    subSkills = SubSkillList.values(nameSkill);
    ui->comboBox->addItems(subSkills);
    on_comboBox_activated(ui->comboBox->currentText());
}