// The 5 horizontal layouts
// The 5 combo boxes
cb_time_bias
->setSizeAdjustPolicy
(QComboBox::AdjustToContents);
cb_range_bias
->setSizeAdjustPolicy
(QComboBox::AdjustToContents);
cb_rangeGain_bias
->setSizeAdjustPolicy
(QComboBox::AdjustToContents);
cb_azimuth_bias
->setSizeAdjustPolicy
(QComboBox::AdjustToContents);
cb_eccentricity_bias
->setSizeAdjustPolicy
(QComboBox::AdjustToContents);
// The 5 labels
lbl_time_bias
= new QLabel("Set time for all radars");
// label1lbl_range_bias
= new QLabel("Set range for all radars");
// label2lbl_rangeGain_bias
= new QLabel("Set range gain for all radars");
// label3lbl_azimuth_bias
= new QLabel("Set azimuth for all radars");
// label4lbl_eccentricity_bias
= new QLabel("Set eccentricity for all radars");
// label5
timeBiasHBox->addWidget(cb_time_bias);
timeBiasHBox->addWidget(lbl_time_bias);
rangeBiasHBox->addWidget(cb_range_bias);
rangeBiasHBox->addWidget(lbl_range_bias);
rangeGainBiasHBox->addWidget(cb_rangeGain_bias);
rangeGainBiasHBox->addWidget(lbl_rangeGain_bias);
azimuthBiasHBox->addWidget(cb_azimuth_bias);
azimuthBiasHBox->addWidget(lbl_azimuth_bias);
eccentricityBiasHBox->addWidget(cb_eccentricity_bias);
eccentricityBiasHBox->addWidget(lbl_eccentricity_bias);
// Layout the items into the grid
grid->setHorizontalSpacing(50);
grid->addLayout(timeBiasHBox, 0, 0);
grid->addLayout(rangeBiasHBox, 0, 1);
grid->addLayout(rangeGainBiasHBox, 1, 0);
grid->addLayout(azimuthBiasHBox, 1, 1);
grid->addLayout(eccentricityBiasHBox, 2, 0, 2, 1, Qt::AlignLeft);
// Add the grid to the vertical layout
radarBiasVerticalLayout->addLayout(grid);
QVBoxLayout *radarBiasVerticalLayout = new QVBoxLayout(stackPageRadarBias_);
// The 5 horizontal layouts
QHBoxLayout *timeBiasHBox = new QHBoxLayout;
QHBoxLayout *rangeBiasHBox = new QHBoxLayout;
QHBoxLayout *rangeGainBiasHBox = new QHBoxLayout;
QHBoxLayout *azimuthBiasHBox = new QHBoxLayout;
QHBoxLayout *eccentricityBiasHBox = new QHBoxLayout;
// The 5 combo boxes
cb_time_bias = new QComboBox; // CB1
cb_time_bias->setSizeAdjustPolicy(QComboBox::AdjustToContents);
cb_range_bias = new QComboBox; // CB2
cb_range_bias->setSizeAdjustPolicy(QComboBox::AdjustToContents);
cb_rangeGain_bias = new QComboBox; // CB3
cb_rangeGain_bias->setSizeAdjustPolicy(QComboBox::AdjustToContents);
cb_azimuth_bias = new QComboBox; // CB4
cb_azimuth_bias->setSizeAdjustPolicy(QComboBox::AdjustToContents);
cb_eccentricity_bias = new QComboBox; // CB5
cb_eccentricity_bias->setSizeAdjustPolicy(QComboBox::AdjustToContents);
// The 5 labels
lbl_time_bias = new QLabel("Set time for all radars"); // label1
lbl_range_bias = new QLabel("Set range for all radars"); // label2
lbl_rangeGain_bias = new QLabel("Set range gain for all radars"); // label3
lbl_azimuth_bias = new QLabel("Set azimuth for all radars"); // label4
lbl_eccentricity_bias = new QLabel("Set eccentricity for all radars"); // label5
timeBiasHBox->addWidget(cb_time_bias);
timeBiasHBox->addWidget(lbl_time_bias);
rangeBiasHBox->addWidget(cb_range_bias);
rangeBiasHBox->addWidget(lbl_range_bias);
rangeGainBiasHBox->addWidget(cb_rangeGain_bias);
rangeGainBiasHBox->addWidget(lbl_rangeGain_bias);
azimuthBiasHBox->addWidget(cb_azimuth_bias);
azimuthBiasHBox->addWidget(lbl_azimuth_bias);
eccentricityBiasHBox->addWidget(cb_eccentricity_bias);
eccentricityBiasHBox->addWidget(lbl_eccentricity_bias);
// Layout the items into the grid
QGridLayout* grid = new QGridLayout;
grid->setHorizontalSpacing(50);
grid->addLayout(timeBiasHBox, 0, 0);
grid->addLayout(rangeBiasHBox, 0, 1);
grid->addLayout(rangeGainBiasHBox, 1, 0);
grid->addLayout(azimuthBiasHBox, 1, 1);
grid->addLayout(eccentricityBiasHBox, 2, 0, 2, 1, Qt::AlignLeft);
// Add the grid to the vertical layout
radarBiasVerticalLayout->addLayout(grid);
To copy to clipboard, switch view to plain text mode
Bookmarks