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

void GuiDisplayControlDialog::createFociMainPage (  )  [private]

create the foci main sub page

Foci page containing main items.

Definition at line 13835 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), CellBase::CELL_COLOR_MODE_CLASS, CellBase::CELL_COLOR_MODE_NAME, fociColorModeComboBox, fociDistSpinBox, fociOpacityDoubleSpinBox, fociSizeSpinBox, fociSymbolOverrideComboBox, ColorFile::ColorStorage::getAllSymbolTypesAsStrings(), maxPointSize, pageFociMain, pageFociMainWidgetGroup, pageWidgetStack, readFociMainPage(), showCorrectHemisphereFociCheckBox, showFociCheckBox, showFociToggleSlot(), showPastedOnto3DFociCheckBox, showRaisedFociCheckBox, showVolumeFociCheckBox, and slotFociColorModeComboBox().

Referenced by showDisplayControlPage().

{
   showFociCheckBox = new QCheckBox("Show Foci");
   QObject::connect(showFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(showFociToggleSlot(bool)));
   
   showVolumeFociCheckBox = new QCheckBox("Show Volume Foci");
   QObject::connect(showVolumeFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readFociMainPage()));
                    
   showRaisedFociCheckBox = new QCheckBox("Show Raised Foci on Flat Surfaces");
   QObject::connect(showRaisedFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readFociMainPage()));
    
   showPastedOnto3DFociCheckBox = new QCheckBox("Show Foci Pasted Onto 3D Surfaces");
   QObject::connect(showPastedOnto3DFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readFociMainPage()));

   showCorrectHemisphereFociCheckBox = new QCheckBox("Show Foci on Correct Hemisphere Only");
   QObject::connect(showCorrectHemisphereFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readFociMainPage()));
   
   QLabel* symbolLabel = new QLabel("Symbol Override ");
   fociSymbolOverrideComboBox = new QComboBox;
   std::vector<QString> cellOverrideLabels;
   ColorFile::ColorStorage::getAllSymbolTypesAsStrings(cellOverrideLabels);
   for (unsigned int i = 0; i < cellOverrideLabels.size(); i++) {
      fociSymbolOverrideComboBox->addItem(cellOverrideLabels[i]);
   }
   QObject::connect(fociSymbolOverrideComboBox, SIGNAL(activated(int)),
                    this, SLOT(readFociMainPage()));
   QHBoxLayout* symbolLayout = new QHBoxLayout;
   symbolLayout->addWidget(symbolLabel);
   symbolLayout->addWidget(fociSymbolOverrideComboBox);
   symbolLayout->addStretch();
   
   QLabel* spinLabel = new QLabel("Foci Size");
   fociSizeSpinBox = new QDoubleSpinBox;
   fociSizeSpinBox->setMinimum(0.001);
   fociSizeSpinBox->setMaximum(maxPointSize);
   fociSizeSpinBox->setSingleStep(0.5);
   fociSizeSpinBox->setDecimals(3);
   QObject::connect(fociSizeSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readFociMainPage()));
   QHBoxLayout* sizeLayout = new QHBoxLayout;
   sizeLayout->addWidget(spinLabel);
   sizeLayout->addWidget(fociSizeSpinBox);
   sizeLayout->addStretch();

   QLabel* opacityLabel = new QLabel("Opacity");
   fociOpacityDoubleSpinBox = new QDoubleSpinBox;
   fociOpacityDoubleSpinBox->setMinimum(0.0);
   fociOpacityDoubleSpinBox->setMaximum(1.0);
   fociOpacityDoubleSpinBox->setSingleStep(0.01);
   fociOpacityDoubleSpinBox->setDecimals(3);
   QObject::connect(fociOpacityDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readFociMainPage()));
   QHBoxLayout* opacityLayout = new QHBoxLayout;
   opacityLayout->addWidget(opacityLabel);
   opacityLayout->addWidget(fociOpacityDoubleSpinBox);
   opacityLayout->addStretch();
                    
   QLabel* distanceLabel = new QLabel("Distance");   
   fociDistSpinBox = new QDoubleSpinBox;
   fociDistSpinBox->setMinimum(0.0);
   fociDistSpinBox->setMaximum(1000.0);
   fociDistSpinBox->setSingleStep(10.0);
   fociDistSpinBox->setDecimals(1);
   fociDistSpinBox->setValue(1000.0);
   QObject::connect(fociDistSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readFociMainPage()));
   fociDistSpinBox->setToolTip("Foci whose distances to the surface are\n"
                                  "less than this value will be displayed.\n"
                                  "The foci must have been projected.");
   QHBoxLayout* distanceLayout = new QHBoxLayout;
   distanceLayout->addWidget(distanceLabel);
   distanceLayout->addWidget(fociDistSpinBox);
   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(displayFociColorKey()));
          
   //
   // Color mode
   //
   QLabel* colorModeLabel = new QLabel("Coloring Mode");
   fociColorModeComboBox = new QComboBox;
   fociColorModeComboBox->insertItem(CellBase::CELL_COLOR_MODE_NAME, 
                                     "Focus Name",
                                     static_cast<int>(CellBase::CELL_COLOR_MODE_NAME));
   fociColorModeComboBox->insertItem(CellBase::CELL_COLOR_MODE_CLASS, 
                                     "Focus Class",
                                     static_cast<int>(CellBase::CELL_COLOR_MODE_CLASS));
   QObject::connect(fociColorModeComboBox, SIGNAL(activated(int)),
                    this, SLOT(slotFociColorModeComboBox(int)));
   QHBoxLayout* colorModeLayout = new QHBoxLayout;
   colorModeLayout->addWidget(colorModeLabel);
   colorModeLayout->addWidget(fociColorModeComboBox);
   colorModeLayout->addStretch();
   
   //
   // Widget to hold all foci main itmes
   //
   pageFociMain = new QWidget; 
   QVBoxLayout* fociSubPageMainLayout = new QVBoxLayout(pageFociMain);
   fociSubPageMainLayout->addWidget(showFociCheckBox);
   fociSubPageMainLayout->addWidget(showVolumeFociCheckBox);
   fociSubPageMainLayout->addWidget(showRaisedFociCheckBox);
   fociSubPageMainLayout->addWidget(showPastedOnto3DFociCheckBox);
   fociSubPageMainLayout->addWidget(showCorrectHemisphereFociCheckBox);
   fociSubPageMainLayout->addLayout(symbolLayout);
   fociSubPageMainLayout->addLayout(colorModeLayout);
   fociSubPageMainLayout->addLayout(sizeLayout);
   fociSubPageMainLayout->addLayout(opacityLayout);
   fociSubPageMainLayout->addLayout(distanceLayout);
   fociSubPageMainLayout->addWidget(colorKeyPushButton);
   fociSubPageMainLayout->addStretch();

   pageWidgetStack->addWidget(pageFociMain);
   
   //
   // Control signals
   //
   pageFociMainWidgetGroup = new WuQWidgetGroup(this);
   pageFociMainWidgetGroup->addWidget(showFociCheckBox);
   pageFociMainWidgetGroup->addWidget(showVolumeFociCheckBox);
   pageFociMainWidgetGroup->addWidget(showRaisedFociCheckBox);
   pageFociMainWidgetGroup->addWidget(showPastedOnto3DFociCheckBox);
   pageFociMainWidgetGroup->addWidget(showCorrectHemisphereFociCheckBox);
   pageFociMainWidgetGroup->addWidget(fociSymbolOverrideComboBox);
   pageFociMainWidgetGroup->addWidget(fociSizeSpinBox);
   pageFociMainWidgetGroup->addWidget(fociOpacityDoubleSpinBox);
   pageFociMainWidgetGroup->addWidget(fociDistSpinBox);
   pageFociMainWidgetGroup->addWidget(fociColorModeComboBox);
}


Generated by  Doxygen 1.6.0   Back to index