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

void GuiDisplayControlDialog::createCellMainPage (  )  [private]

create the cell main sub page

Cell page containing main items.

Definition at line 9076 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), cellDisplayModeComboBox, cellDistSpinBox, cellOpacityDoubleSpinBox, cellSizeSpinBox, cellSymbolOverrideComboBox, ColorFile::ColorStorage::getAllSymbolTypesAsStrings(), maxPointSize, pageCellsMain, pageCellsMainWidgetGroup, pageWidgetStack, readCellMainPage(), showCellsCheckBox, showCellsToggleSlot(), showCorrectHemisphereCellsCheckBox, showRaisedCellCheckBox, and showVolumeCellsCheckBox.

Referenced by showDisplayControlPage().

{
   showCellsCheckBox = new QCheckBox("Show Cells");
   QObject::connect(showCellsCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(showCellsToggleSlot(bool)));
   
   showVolumeCellsCheckBox = new QCheckBox("Show Volume Cells");
   QObject::connect(showVolumeCellsCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readCellMainPage()));
   
   showRaisedCellCheckBox = new QCheckBox("Show Raised Cells (flat surfaces only)");
   QObject::connect(showRaisedCellCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readCellMainPage()));
    
   showCorrectHemisphereCellsCheckBox = new QCheckBox("Show Cells on Correct Hemisphere Only");
   QObject::connect(showCorrectHemisphereCellsCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readCellMainPage()));
   
   cellDisplayModeComboBox = new QComboBox;
   cellDisplayModeComboBox->insertItem(DisplaySettingsCells::CELL_DISPLAY_MODE_SHOW_ALL,
                                       "Show Deep and Superficial Cells");
   cellDisplayModeComboBox->insertItem(DisplaySettingsCells::CELL_DISPLAY_MODE_SHOW_DEEP_ONLY,
                                       "Show Deep Cells Only");
   cellDisplayModeComboBox->insertItem(DisplaySettingsCells::CELL_DISPLAY_MODE_SHOW_SUPERFICIAL_ONLY,
                                       "Show Superficial Cells Only");
   cellDisplayModeComboBox->setFixedSize(cellDisplayModeComboBox->sizeHint());
   QObject::connect(cellDisplayModeComboBox, SIGNAL(activated(int)),
                    this, SLOT(readCellMainPage()));
                    
   QLabel* symbolLabel = new QLabel("Symbol Override ");
   cellSymbolOverrideComboBox = new QComboBox;
   std::vector<QString> cellOverrideLabels;
   ColorFile::ColorStorage::getAllSymbolTypesAsStrings(cellOverrideLabels);
   for (unsigned int i = 0; i < cellOverrideLabels.size(); i++) {
      cellSymbolOverrideComboBox->addItem(cellOverrideLabels[i]);
   }
   QObject::connect(cellSymbolOverrideComboBox, SIGNAL(activated(int)),
                    this, SLOT(readCellMainPage()));
   QHBoxLayout* symbolLayout = new QHBoxLayout;
   symbolLayout->addWidget(symbolLabel);
   symbolLayout->addWidget(cellSymbolOverrideComboBox);
   symbolLayout->addStretch();
   
   QLabel* opacityLabel = new QLabel("Opacity");
   cellOpacityDoubleSpinBox = new QDoubleSpinBox;
   cellOpacityDoubleSpinBox->setMinimum(0.0);
   cellOpacityDoubleSpinBox->setMaximum(1.0);
   cellOpacityDoubleSpinBox->setSingleStep(0.01);
   cellOpacityDoubleSpinBox->setDecimals(3);
   QObject::connect(cellOpacityDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readCellMainPage()));
   QHBoxLayout* opacityLayout = new QHBoxLayout;
   opacityLayout->addWidget(opacityLabel);
   opacityLayout->addWidget(cellOpacityDoubleSpinBox);
   opacityLayout->addStretch();
                    
   QLabel* spinLabel = new QLabel("Cell Size");
   cellSizeSpinBox = new QDoubleSpinBox;
   cellSizeSpinBox->setMinimum(0.001);
   cellSizeSpinBox->setMaximum(maxPointSize);
   cellSizeSpinBox->setSingleStep(0.5);
   cellSizeSpinBox->setDecimals(3);
   cellSizeSpinBox->setSizePolicy(QtUtilities::fixedSizePolicy());
   QObject::connect(cellSizeSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readCellMainPage()));
   QHBoxLayout* sizeLayout = new QHBoxLayout;
   sizeLayout->addWidget(spinLabel);
   sizeLayout->addWidget(cellSizeSpinBox);
   sizeLayout->addStretch();

   QLabel* distanceLabel = new QLabel("Distance");   
   cellDistSpinBox = new QDoubleSpinBox;
   cellDistSpinBox->setMinimum(0.0);
   cellDistSpinBox->setMaximum(1000.0);
   cellDistSpinBox->setSingleStep(10.0);
   cellDistSpinBox->setDecimals(1);
   cellDistSpinBox->setValue(1000.0);
   QObject::connect(cellDistSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readCellMainPage()));
   cellDistSpinBox->setToolTip("Cells whose distances to the surface are\n"
                                  "less than this value will be displayed.\n"
                                  "The cells must have been projected.");
   QHBoxLayout* distanceLayout = new QHBoxLayout;
   distanceLayout->addWidget(distanceLabel);
   distanceLayout->addWidget(cellDistSpinBox);
   distanceLayout->addStretch();
   
   //
   // Display color key button
   //
   QPushButton* colorKeyPushButton = new QPushButton("Display Color Key...");
   colorKeyPushButton->setFixedSize(colorKeyPushButton->sizeHint());
   colorKeyPushButton->setAutoDefault(false);
   QObject::connect(colorKeyPushButton, SIGNAL(clicked()),
                    theMainWindow, SLOT(displayCellColorKey()));
                    
   //
   // Vertical Box Layout for all cell items
   //
   pageCellsMain = new QWidget;
   QVBoxLayout* cellSubPageMainLayout = new QVBoxLayout(pageCellsMain);
   cellSubPageMainLayout->addWidget(showCellsCheckBox);
   cellSubPageMainLayout->addWidget(showVolumeCellsCheckBox);
   cellSubPageMainLayout->addWidget(showRaisedCellCheckBox);
   //cellSubPageMainLayout->addWidget(showLeftHemisphereCellCheckBox);
   //cellSubPageMainLayout->addWidget(showRightHemisphereCellCheckBox);
   cellSubPageMainLayout->addWidget(showCorrectHemisphereCellsCheckBox);
   cellSubPageMainLayout->addWidget(cellDisplayModeComboBox);
   cellSubPageMainLayout->addLayout(symbolLayout);
   cellSubPageMainLayout->addLayout(sizeLayout);
   cellSubPageMainLayout->addLayout(opacityLayout);
   cellSubPageMainLayout->addLayout(distanceLayout);
   cellSubPageMainLayout->addWidget(colorKeyPushButton);
   cellSubPageMainLayout->addStretch();

   pageWidgetStack->addWidget(pageCellsMain);
   
   pageCellsMainWidgetGroup = new WuQWidgetGroup(this);
   pageCellsMainWidgetGroup->addWidget(showCellsCheckBox);
   pageCellsMainWidgetGroup->addWidget(showVolumeCellsCheckBox);
   pageCellsMainWidgetGroup->addWidget(showRaisedCellCheckBox);
   pageCellsMainWidgetGroup->addWidget(showCorrectHemisphereCellsCheckBox);
   pageCellsMainWidgetGroup->addWidget(cellDisplayModeComboBox);
   pageCellsMainWidgetGroup->addWidget(cellSymbolOverrideComboBox);
   pageCellsMainWidgetGroup->addWidget(cellOpacityDoubleSpinBox);
   pageCellsMainWidgetGroup->addWidget(cellSizeSpinBox);
   pageCellsMainWidgetGroup->addWidget(cellDistSpinBox);
   pageCellsMainWidgetGroup->addWidget(colorKeyPushButton);
}


Generated by  Doxygen 1.6.0   Back to index