Logo Search packages:      
Sourcecode: caret version File versions  Download package

void GuiDisplayControlDialog::createRgbPaintMainPage (  )  [private]

create the rgb paint main page

Create the RGB Paint page

Definition at line 8800 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), pageRgbPaintMain, pageRgbPaintMainWidgetGroup, pageWidgetStack, readRgbPaintPageMain(), rgbBlueCheckBox, rgbBlueThreshDoubleSpinBox, rgbDisplayModeSelection(), rgbGreenCheckBox, rgbGreenThreshDoubleSpinBox, rgbNegativeOnlyRadioButton, rgbPositiveOnlyRadioButton, rgbRedCheckBox, and rgbRedThreshDoubleSpinBox.

Referenced by showDisplayControlPage().

{
   const int NAME_COLUMN    = 0;
   const int THRESH_COLUMN  = NAME_COLUMN + 1;
   
   const int TITLE_ROW = 0;
   const int RED_ROW   = TITLE_ROW + 1;
   const int GREEN_ROW = RED_ROW + 1;
   const int BLUE_ROW  = GREEN_ROW + 1;
   //const int NUM_ROWS  = BLUE_ROW + 1;
   
   //
   // Grid Layout for R/G/B items
   //
   QGridLayout* rgbGridLayout = new QGridLayout;
   
   //
   // Grid Column titles
   //
   rgbGridLayout->addWidget(new QLabel("Name"), TITLE_ROW, NAME_COLUMN, 
                            Qt::AlignLeft);
   rgbGridLayout->addWidget(new QLabel("Threshold"), TITLE_ROW, THRESH_COLUMN,  
                            Qt::AlignHCenter);
    
   //
   // Red row
   //
   rgbRedCheckBox = new QCheckBox("Red");
   rgbGridLayout->addWidget(rgbRedCheckBox, RED_ROW, NAME_COLUMN);
   QObject::connect(rgbRedCheckBox, SIGNAL(clicked()),
                    this, SLOT(readRgbPaintPageMain()));
   rgbRedThreshDoubleSpinBox = new QDoubleSpinBox;
   rgbRedThreshDoubleSpinBox->setMinimum(-99999999.0);
   rgbRedThreshDoubleSpinBox->setMaximum(999999999.0);
   rgbRedThreshDoubleSpinBox->setSingleStep(1.0);
   rgbRedThreshDoubleSpinBox->setDecimals(3);
   rgbGridLayout->addWidget(rgbRedThreshDoubleSpinBox, RED_ROW, THRESH_COLUMN);
   QObject::connect(rgbRedThreshDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readRgbPaintPageMain()));
   
   //
   // Green row
   //
   rgbGreenCheckBox = new QCheckBox("Green");
   rgbGridLayout->addWidget(rgbGreenCheckBox, GREEN_ROW, NAME_COLUMN);
   QObject::connect(rgbGreenCheckBox, SIGNAL(clicked()),
                    this, SLOT(readRgbPaintPageMain()));
   rgbGreenThreshDoubleSpinBox = new QDoubleSpinBox;
   rgbGreenThreshDoubleSpinBox->setMinimum(-99999999.0);
   rgbGreenThreshDoubleSpinBox->setMaximum(999999999.0);
   rgbGreenThreshDoubleSpinBox->setSingleStep(1.0);
   rgbGreenThreshDoubleSpinBox->setDecimals(3);
   rgbGridLayout->addWidget(rgbGreenThreshDoubleSpinBox, GREEN_ROW, THRESH_COLUMN);
   QObject::connect(rgbGreenThreshDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readRgbPaintPageMain()));
   
   //
   // Blue row
   //
   rgbBlueCheckBox = new QCheckBox("Blue");
   rgbGridLayout->addWidget(rgbBlueCheckBox, BLUE_ROW, NAME_COLUMN);
   QObject::connect(rgbBlueCheckBox, SIGNAL(clicked()),
                    this, SLOT(readRgbPaintPageMain()));
   rgbBlueThreshDoubleSpinBox = new QDoubleSpinBox;
   rgbBlueThreshDoubleSpinBox->setMinimum(-99999999.0);
   rgbBlueThreshDoubleSpinBox->setMaximum(999999999.0);
   rgbBlueThreshDoubleSpinBox->setSingleStep(1.0);
   rgbBlueThreshDoubleSpinBox->setDecimals(3);
   rgbGridLayout->addWidget(rgbBlueThreshDoubleSpinBox, BLUE_ROW, THRESH_COLUMN);
   QObject::connect(rgbBlueThreshDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readRgbPaintPageMain()));
   
   //
   // Button group for positive and negative only buttons
   //
   QButtonGroup* displayModeButtonGroup = new QButtonGroup(this);
   displayModeButtonGroup->setExclusive(true);
   QObject::connect(displayModeButtonGroup, SIGNAL(buttonClicked(int)),
                    this, SLOT(rgbDisplayModeSelection(int)));
                    
   //
   // Positive and Negative only buttons
   //
   rgbPositiveOnlyRadioButton = new QRadioButton("Positive Only");   
   displayModeButtonGroup->addButton(rgbPositiveOnlyRadioButton,
                                  DisplaySettingsRgbPaint::RGB_DISPLAY_MODE_POSITIVE);
   rgbNegativeOnlyRadioButton = new QRadioButton("Negative Only");   
   displayModeButtonGroup->addButton(rgbNegativeOnlyRadioButton,
                                  DisplaySettingsRgbPaint::RGB_DISPLAY_MODE_NEGATIVE);
   
   //
   // Group Box for RGB File selection and parameters (a QWidget is placed in it so that
   // a layout can be added).
   //
   QGroupBox* rgbFileGroupBox = new QGroupBox("RGB Color Control");
   QVBoxLayout* rgbFileLayout = new QVBoxLayout(rgbFileGroupBox);
   rgbFileLayout->addLayout(rgbGridLayout);
   
   //
   // Group Box for RGB display mode positive and negative only buttons.
   //
   QGroupBox* rgbDisplayModeGroupBox = new QGroupBox("Display Mode");
   QVBoxLayout* rgbDisplayModeLayout = new QVBoxLayout(rgbDisplayModeGroupBox);
   rgbDisplayModeLayout->addWidget(rgbPositiveOnlyRadioButton);
   rgbDisplayModeLayout->addWidget(rgbNegativeOnlyRadioButton);
   
   pageRgbPaintMainWidgetGroup = new WuQWidgetGroup(this);
   pageRgbPaintMainWidgetGroup->addWidget(rgbRedCheckBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbRedThreshDoubleSpinBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbGreenCheckBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbGreenThreshDoubleSpinBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbBlueCheckBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbBlueThreshDoubleSpinBox);
   pageRgbPaintMainWidgetGroup->addWidget(rgbPositiveOnlyRadioButton);
   pageRgbPaintMainWidgetGroup->addWidget(rgbNegativeOnlyRadioButton);
   
   //
   // widget for rgb paint items
   //
   pageRgbPaintMain = new QWidget;
   pageWidgetStack->addWidget(pageRgbPaintMain); //, PAGE_NAME_RGB_PAINT);   // adds to dialog

   //
   // Vertical Box Layout for all rgb paint items
   //
   QVBoxLayout* rgbLayout = new QVBoxLayout(pageRgbPaintMain);
   rgbLayout->addWidget(rgbFileGroupBox, 0, Qt::AlignLeft);
   rgbLayout->addWidget(rgbDisplayModeGroupBox, 0, Qt::AlignLeft);
   rgbLayout->addStretch();
}


Generated by  Doxygen 1.6.0   Back to index