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

void GuiDisplayControlDialog::createShapeSettingsPage (  )  [private]

create the shape settings page

create the shape settings page.

Definition at line 9777 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), pageSurfaceShapeSettings, pageSurfaceShapeSettingsWidgetGroup, pageWidgetStack, palColorMapButtonGroup, readShapeSettings(), GuiNodeAttributeColumnSelectionComboBox::setNoneSelectionLabel(), shapeColorMapGrayRadioButton, shapeColorMapInterpolatePaletteCheckBox, shapeColorMapOrangeYellowRadioButton, shapeColorMapPaletteComboBox, shapeColorMapPaletteRadioButton, shapeColorMapSelection(), shapeDisplayColorBarCheckBox, shapeMaximumMappingDoubleSpinBox, shapeMinimumMappingDoubleSpinBox, shapeMinMaxColumnSelectionComboBox, shapeNodeIdDeviationComboBox, shapeNodeIdDeviationGroupBox, shapeViewMaximumLabel, shapeViewMinimumLabel, surfaceShapeHistogram(), and updateShapeMinMaxMappingSettings().

Referenced by showDisplayControlPage().

{
   //-----------------------------------------------------------------------------
   //
   // Selected column information.
   //   
   QLabel* shapeMinMaxColumnSelectionLabel = new QLabel("Column");
   shapeMinMaxColumnSelectionComboBox = new GuiNodeAttributeColumnSelectionComboBox(
                                          GUI_NODE_FILE_TYPE_SURFACE_SHAPE,
                                          false,
                                          false,
                                          false);
   QObject::connect(shapeMinMaxColumnSelectionComboBox, SIGNAL(activated(int)),
                    this, SLOT(updateShapeMinMaxMappingSettings()));

   QLabel* minMaxLabel = new QLabel("Min/Max ");
   shapeViewMinimumLabel = new QLabel("");
   shapeViewMaximumLabel = new QLabel("");
   QLabel* mappingLabel = new QLabel("Mapping ");
   shapeMinimumMappingDoubleSpinBox = new QDoubleSpinBox;
   shapeMinimumMappingDoubleSpinBox->setMinimum(-1000000.0);
   shapeMinimumMappingDoubleSpinBox->setMaximum( 1000000.0);
   shapeMinimumMappingDoubleSpinBox->setSingleStep(1.0);
   shapeMinimumMappingDoubleSpinBox->setDecimals(6);
   QObject::connect(shapeMinimumMappingDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readShapeSettings()));
   shapeMaximumMappingDoubleSpinBox = new QDoubleSpinBox;
   shapeMaximumMappingDoubleSpinBox->setMinimum(-1000000.0);
   shapeMaximumMappingDoubleSpinBox->setMaximum( 1000000.0);
   shapeMaximumMappingDoubleSpinBox->setSingleStep(1.0);
   shapeMaximumMappingDoubleSpinBox->setDecimals(6);
   QObject::connect(shapeMaximumMappingDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readShapeSettings()));
   QGridLayout* selectionGridLayout = new QGridLayout;
   selectionGridLayout->addWidget(shapeMinMaxColumnSelectionLabel, 0, 0);
   selectionGridLayout->addWidget(shapeMinMaxColumnSelectionComboBox, 0, 1, 1, 2);
   selectionGridLayout->addWidget(minMaxLabel, 1, 0);
   selectionGridLayout->addWidget(shapeViewMinimumLabel, 1, 1);
   selectionGridLayout->addWidget(shapeViewMaximumLabel, 1, 2);
   selectionGridLayout->addWidget(mappingLabel, 2, 0);
   selectionGridLayout->addWidget(shapeMinimumMappingDoubleSpinBox, 2, 1);
   selectionGridLayout->addWidget(shapeMaximumMappingDoubleSpinBox, 2, 2);

   //
   // Histogram button
   //
   QPushButton* histoPushButton = new QPushButton("Histogram...");
   histoPushButton->setAutoDefault(false);
   histoPushButton->setFixedSize(histoPushButton->sizeHint());
   QObject::connect(histoPushButton, SIGNAL(clicked()),
                    this, SLOT(surfaceShapeHistogram()));

   //
   // Group box and layouts
   //
   QVBoxLayout* selectionLeftLayout = new QVBoxLayout;
   selectionLeftLayout->addLayout(selectionGridLayout);
   selectionLeftLayout->addWidget(histoPushButton);
   QGroupBox* selectionGroupBox = new QGroupBox("Min Max Mapping");
   QHBoxLayout* selectionGroupLayout = new QHBoxLayout(selectionGroupBox);
   selectionGroupLayout->addLayout(selectionLeftLayout);
   selectionGroupLayout->addStretch();
   
   //-----------------------------------------------------------------------------
   //
   // Color map selections
   //
   shapeColorMapGrayRadioButton = new QRadioButton("Gray");
   shapeColorMapOrangeYellowRadioButton = new QRadioButton("Orange-Yellow");
   shapeColorMapPaletteRadioButton = new QRadioButton("Palette");
   shapeColorMapPaletteComboBox = new QComboBox;   
   QObject::connect(shapeColorMapPaletteComboBox, SIGNAL(activated(int)),
                    this, SLOT(readShapeSettings()));
                    
   //
   // Button group to keep radio buttons mutually exclusive
   //
   palColorMapButtonGroup = new QButtonGroup(this);
   palColorMapButtonGroup->setExclusive(true);
   palColorMapButtonGroup->addButton(shapeColorMapGrayRadioButton, DisplaySettingsSurfaceShape::SURFACE_SHAPE_COLOR_MAP_GRAY);
   palColorMapButtonGroup->addButton(shapeColorMapOrangeYellowRadioButton, DisplaySettingsSurfaceShape::SURFACE_SHAPE_COLOR_MAP_ORANGE_YELLOW);
   palColorMapButtonGroup->addButton(shapeColorMapPaletteRadioButton, DisplaySettingsSurfaceShape::SURFACE_SHAPE_COLOR_MAP_PALETTE);
   QObject::connect(palColorMapButtonGroup, SIGNAL(buttonClicked(int)),
                    this, SLOT(shapeColorMapSelection(int)));
  
   //
   // Interpolate palette colors
   //
   shapeColorMapInterpolatePaletteCheckBox = new QCheckBox("Interpolate Palette Colors");
   QObject::connect(shapeColorMapInterpolatePaletteCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readShapeSettings()));
    
   //
   // Display color bar
   //
   shapeDisplayColorBarCheckBox = new QCheckBox("Display Color Bar");
   QObject::connect(shapeDisplayColorBarCheckBox, SIGNAL(clicked()),
                    this, SLOT(readShapeSettings()));

   //
   // Color mapping items
   //
   QHBoxLayout* paletteBoxLayout = new QHBoxLayout;
   QLabel* paletteDummy = new QLabel(" ");
   paletteBoxLayout->addWidget(shapeColorMapPaletteRadioButton);
   paletteBoxLayout->addWidget(shapeColorMapPaletteComboBox);
   paletteBoxLayout->addWidget(paletteDummy);
   paletteBoxLayout->setStretchFactor(paletteDummy, 1000);
   QGroupBox* colorMappingGroupBox = new QGroupBox("Color Mapping");
   QVBoxLayout* colorMappingGroupLayout = new QVBoxLayout(colorMappingGroupBox);
   colorMappingGroupLayout->addWidget(shapeColorMapGrayRadioButton);
   colorMappingGroupLayout->addWidget(shapeColorMapOrangeYellowRadioButton);
   colorMappingGroupLayout->addLayout(paletteBoxLayout);
   colorMappingGroupLayout->addWidget(shapeColorMapInterpolatePaletteCheckBox);
   colorMappingGroupLayout->addWidget(shapeDisplayColorBarCheckBox);
   
   //-----------------------------------------------------------------------------
   //
   // Uncertainty column
   //
   shapeNodeIdDeviationComboBox = new GuiNodeAttributeColumnSelectionComboBox(
                                             GUI_NODE_FILE_TYPE_SURFACE_SHAPE,
                                             false,
                                             false,
                                             false);
   shapeNodeIdDeviationComboBox->setNoneSelectionLabel("Disabled");
   QObject::connect(shapeNodeIdDeviationComboBox, SIGNAL(activated(int)),
                    this, SLOT(readShapeSettings()));
   shapeNodeIdDeviationGroupBox = new QGroupBox("Node ID Deviation");
   shapeNodeIdDeviationGroupBox->setCheckable(true);
   QObject::connect(shapeNodeIdDeviationGroupBox, SIGNAL(toggled(bool)),
                    shapeNodeIdDeviationComboBox, SLOT(setEnabled(bool)));                 
   QObject::connect(shapeNodeIdDeviationGroupBox, SIGNAL(toggled(bool)),
                    this, SLOT(readShapeSettings()));                 
   QVBoxLayout* shapeNodeLayout = new QVBoxLayout(shapeNodeIdDeviationGroupBox);
   shapeNodeLayout->addWidget(shapeNodeIdDeviationComboBox);
   
   //
   // Place all items in a vertical box 
   //
   pageSurfaceShapeSettings = new QWidget;
   pageWidgetStack->addWidget(pageSurfaceShapeSettings);
   QVBoxLayout* shapeSettingsLayout = new QVBoxLayout(pageSurfaceShapeSettings);
   shapeSettingsLayout->addWidget(selectionGroupBox);
   shapeSettingsLayout->addWidget(colorMappingGroupBox);
   shapeSettingsLayout->addWidget(shapeNodeIdDeviationGroupBox);
   pageSurfaceShapeSettings->setFixedHeight(pageSurfaceShapeSettings->sizeHint().height());
   pageSurfaceShapeSettings->setMaximumWidth(400);
   
   pageSurfaceShapeSettingsWidgetGroup = new WuQWidgetGroup(this);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeMinMaxColumnSelectionLabel);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeMinMaxColumnSelectionComboBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeMinimumMappingDoubleSpinBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeMaximumMappingDoubleSpinBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeColorMapPaletteComboBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeColorMapGrayRadioButton);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeColorMapOrangeYellowRadioButton);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeColorMapPaletteRadioButton);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeColorMapInterpolatePaletteCheckBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeDisplayColorBarCheckBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeNodeIdDeviationComboBox);
   pageSurfaceShapeSettingsWidgetGroup->addWidget(shapeNodeIdDeviationGroupBox);
}


Generated by  Doxygen 1.6.0   Back to index