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

void GuiDisplayControlDialog::createOverlayUnderlayVolumeSurfaceOutlinePage (  )  [private]

create the overlay underlay volume surface outline page

create the overlay underlay volume surface outline page.

Definition at line 2827 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), DisplaySettingsVolume::MAXIMUM_OVERLAY_SURFACES, pageVolumeSurfaceOutline, pageVolumeSurfaceOutlineWidgetGroup, pageWidgetStack, readVolumeSurfaceOutline(), volumeOverlaySurfaceOutlineColorComboBox, volumeOverlaySurfaceOutlineThicknessDoubleSpinBox, volumeOverlaySurfaceSelectionComboBox, and volumeShowOverlaySurfaceOutlineCheckBox.

Referenced by showDisplayControlPage().

{
   pageVolumeSurfaceOutlineWidgetGroup = new WuQWidgetGroup(this);
   
   //
   // outline for fiducial surface Color combo box
   //
   for (int i = 0; i < DisplaySettingsVolume::MAXIMUM_OVERLAY_SURFACES; i++) {
      volumeOverlaySurfaceOutlineColorComboBox[i] = new QComboBox;
      volumeOverlaySurfaceOutlineColorComboBox[i]->insertItem(DisplaySettingsVolume::SURFACE_OUTLINE_COLOR_BLACK,
                                                    "Black");
      volumeOverlaySurfaceOutlineColorComboBox[i]->insertItem(DisplaySettingsVolume::SURFACE_OUTLINE_COLOR_BLUE,
                                                    "Blue");
      volumeOverlaySurfaceOutlineColorComboBox[i]->insertItem(DisplaySettingsVolume::SURFACE_OUTLINE_COLOR_GREEN,
                                                    "Green");
      volumeOverlaySurfaceOutlineColorComboBox[i]->insertItem(DisplaySettingsVolume::SURFACE_OUTLINE_COLOR_RED,
                                                    "Red");
      volumeOverlaySurfaceOutlineColorComboBox[i]->insertItem(DisplaySettingsVolume::SURFACE_OUTLINE_COLOR_WHITE,
                                                    "White");
      QObject::connect(volumeOverlaySurfaceOutlineColorComboBox[i], SIGNAL(activated(int)),
                       this, SLOT(readVolumeSurfaceOutline()));
      pageVolumeSurfaceOutlineWidgetGroup->addWidget(volumeOverlaySurfaceOutlineColorComboBox[i]);
      
      //
      // Fiducial Thickness float spin box
      //
      volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i] = new QDoubleSpinBox;
      volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i]->setMinimum(0.0);
      volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i]->setMaximum(1000.0);
      volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i]->setSingleStep(0.1);
      volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i]->setDecimals(2);
      QObject::connect(volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i], SIGNAL(valueChanged(double)),
                       this, SLOT(readVolumeSurfaceOutline()));
      pageVolumeSurfaceOutlineWidgetGroup->addWidget(volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i]);
   
      //
      // Show fiducial surface outline check box
      //
      volumeShowOverlaySurfaceOutlineCheckBox[i] = new QCheckBox("");
      QObject::connect(volumeShowOverlaySurfaceOutlineCheckBox[i], SIGNAL(toggled(bool)),
                       this, SLOT(readVolumeSurfaceOutline()));
      pageVolumeSurfaceOutlineWidgetGroup->addWidget(volumeShowOverlaySurfaceOutlineCheckBox[i]);
                       
      //
      // overlay surface selection
      //
      if (i > 0) {
         volumeOverlaySurfaceSelectionComboBox[i] = 
            new GuiBrainModelSelectionComboBox(false,
                                               true,
                                               false,
                                               "");
         QObject::connect(volumeOverlaySurfaceSelectionComboBox[i], SIGNAL(activated(int)),
                          this, SLOT(readVolumeSurfaceOutline()));
         pageVolumeSurfaceOutlineWidgetGroup->addWidget(volumeOverlaySurfaceSelectionComboBox[i]);
      }
      else {
         volumeOverlaySurfaceSelectionComboBox[i] = NULL;
      }
   }
   
   //
   // Surface outline section
   //
   QGroupBox* volumeShowSurfaceOutlineGroupBox = new QGroupBox("Surface Outline");
   QObject::connect(volumeShowSurfaceOutlineGroupBox, SIGNAL(toggled(bool)),
                    this, SLOT(readVolumeSurfaceOutline()));
   QGridLayout* volumeShowSurfaceOutlineGroupLayout = new QGridLayout(volumeShowSurfaceOutlineGroupBox);
   volumeShowSurfaceOutlineGroupLayout->addWidget(new QLabel("Show"), 0, 0);
   volumeShowSurfaceOutlineGroupLayout->addWidget(new QLabel("Color"), 0, 1);
   volumeShowSurfaceOutlineGroupLayout->addWidget(new QLabel("Thickness"), 0, 2); 
   volumeShowSurfaceOutlineGroupLayout->addWidget(new QLabel("Surface"), 0, 3);
   for (int i = 0; i < DisplaySettingsVolume::MAXIMUM_OVERLAY_SURFACES; i++) {
      volumeShowSurfaceOutlineGroupLayout->addWidget(volumeShowOverlaySurfaceOutlineCheckBox[i], i+1, 0);  
      volumeShowSurfaceOutlineGroupLayout->addWidget(volumeOverlaySurfaceOutlineColorComboBox[i], i+1, 1);
      volumeShowSurfaceOutlineGroupLayout->addWidget(volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i], i+1, 2);
      if (i > 0) {
         volumeShowSurfaceOutlineGroupLayout->addWidget(volumeOverlaySurfaceSelectionComboBox[i]);
      }
      else {
         volumeShowSurfaceOutlineGroupLayout->addWidget(new QLabel("Active Fiducial Surface"));
      }
      
       //
      // Connect some signals
      //   
      //QObject::connect(volumeShowOverlaySurfaceOutlineCheckBox[i], SIGNAL(toggled(bool)),
      //                 volumeOverlaySurfaceOutlineColorComboBox[i], SLOT(setEnabled(bool)));
      //QObject::connect(volumeShowOverlaySurfaceOutlineCheckBox[i], SIGNAL(toggled(bool)),
      //                 volumeOverlaySurfaceOutlineThicknessDoubleSpinBox[i], SLOT(setEnabled(bool)));
      if (i > 0) {
         //QObject::connect(volumeShowOverlaySurfaceOutlineCheckBox[i], SIGNAL(toggled(bool)),
         //                 volumeOverlaySurfaceSelectionComboBox[i], SLOT(setEnabled(bool)));
      }
   }
   volumeShowSurfaceOutlineGroupLayout->setColumnStretch(0, 0);
   volumeShowSurfaceOutlineGroupLayout->setColumnStretch(1, 0);
   volumeShowSurfaceOutlineGroupLayout->setColumnStretch(2, 0);
   volumeShowSurfaceOutlineGroupLayout->setColumnStretch(3, 100);
   volumeShowSurfaceOutlineGroupBox->setFixedHeight(volumeShowSurfaceOutlineGroupBox->sizeHint().height());
   
   QWidget* volumeSurfaceOutlineWidget = new QWidget;
   QVBoxLayout* volumeSurfaceOutlineLayout = new QVBoxLayout(volumeSurfaceOutlineWidget);
   volumeSurfaceOutlineLayout->addWidget(volumeShowSurfaceOutlineGroupBox);
   volumeSurfaceOutlineWidget->setFixedHeight(volumeSurfaceOutlineWidget->sizeHint().height());
   
   pageVolumeSurfaceOutline = volumeSurfaceOutlineWidget;
   pageWidgetStack->addWidget(pageVolumeSurfaceOutline);
}


Generated by  Doxygen 1.6.0   Back to index