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

void GuiDisplayControlDialog::createBorderMainPage (  )  [private]

create the border main sub page

Border page containing main selections

Definition at line 13308 of file GuiDisplayControlDialog.cxx.

References WuQWidgetGroup::addWidget(), borderOpacityDoubleSpinBox, bordersDrawTypeComboBox, borderSizeSpinBox, borderSymbolComboBox, ColorFile::ColorStorage::getAllSymbolTypesAsStrings(), maxPointSize, minPointSize, overrideBorderWithAreaColorsCheckBox, pageBorderMain, pageBorderMainWidgetGroup, pageWidgetStack, readBorderMainPage(), showBordersCheckBox, showBordersToggleSlot(), showFirstLinkRedBordersCheckBox, showRaisedBordersCheckBox, showUncertaintyBordersCheckBox, and unstretchedBordersDoubleSpinBox.

Referenced by showDisplayControlPage().

{
   showBordersCheckBox = new QCheckBox("Show Borders");
   QObject::connect(showBordersCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(showBordersToggleSlot(bool)));

   showRaisedBordersCheckBox = new QCheckBox("Show Raised Borders (flat surfaces only)");
   QObject::connect(showRaisedBordersCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readBorderMainPage()));
    
   showUncertaintyBordersCheckBox = new QCheckBox("Show Uncertainty Vectors (flat surfaces only)");
   QObject::connect(showUncertaintyBordersCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readBorderMainPage()));
    
   showFirstLinkRedBordersCheckBox = new QCheckBox("Show First Link Red");
   QObject::connect(showFirstLinkRedBordersCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readBorderMainPage()));
    
   bordersDrawTypeComboBox = new QComboBox;
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_SYMBOLS,
                                       "Draw Borders as Symbols");
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_LINES,
                                       "Draw Borders as Lines");
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_SYMBOLS_AND_LINES,
                                       "Draw Borders as Symbols And Lines");
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_UNSTRETCHED_LINES,
                                       "Draw Borders as Unstretched Lines");
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_VARIABILITY,
                                       "Draw Borders Showing Variability");
   bordersDrawTypeComboBox->insertItem(DisplaySettingsBorders::BORDER_DRAW_AS_VARIABILITY_AND_LINES,
                                       "Draw Borders Showing Variability and Lines");
   bordersDrawTypeComboBox->setFixedSize(bordersDrawTypeComboBox->sizeHint());
   
   QObject::connect(bordersDrawTypeComboBox, SIGNAL(activated(int)),
                    this, SLOT(readBorderMainPage()));
                    
   QLabel* symbolLabel = new QLabel("Symbol Type ");
   borderSymbolComboBox = new QComboBox;
   std::vector<QString> borderOverrideLabels;
   ColorFile::ColorStorage::getAllSymbolTypesAsStrings(borderOverrideLabels);
   for (unsigned int i = 0; i < borderOverrideLabels.size(); i++) {
      borderSymbolComboBox->addItem(borderOverrideLabels[i]);
   }
   QObject::connect(borderSymbolComboBox, SIGNAL(activated(int)),
                    this, SLOT(readBorderMainPage()));
   QHBoxLayout* symbolLayout = new QHBoxLayout;
   symbolLayout->addWidget(symbolLabel);
   symbolLayout->addWidget(borderSymbolComboBox);
   symbolLayout->addStretch();

   QLabel* opacityLabel = new QLabel("Opacity");
   borderOpacityDoubleSpinBox = new QDoubleSpinBox;
   borderOpacityDoubleSpinBox->setMinimum(0.0);
   borderOpacityDoubleSpinBox->setMaximum(1.0);
   borderOpacityDoubleSpinBox->setSingleStep(0.01);
   borderOpacityDoubleSpinBox->setDecimals(3);
   QObject::connect(borderOpacityDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readBorderMainPage()));
   QHBoxLayout* opacityLayout = new QHBoxLayout;
   opacityLayout->addWidget(opacityLabel);
   opacityLayout->addWidget(borderOpacityDoubleSpinBox);
   opacityLayout->addStretch();
                    
   QLabel* spinLabel = new QLabel("Border Line Width / Point Size");   
   borderSizeSpinBox = new QDoubleSpinBox;
   borderSizeSpinBox->setMinimum(minPointSize);
   borderSizeSpinBox->setMaximum(maxPointSize);
   borderSizeSpinBox->setSingleStep(1.0);
   borderSizeSpinBox->setDecimals(1);
   QObject::connect(borderSizeSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readBorderMainPage()));
   QHBoxLayout* sizeLayout = new QHBoxLayout;
   sizeLayout->addWidget(spinLabel);
   sizeLayout->addWidget(borderSizeSpinBox);
   sizeLayout->addStretch();
   
   QLabel* stretchLabel = new QLabel("Unstretched Lines Factor");
   unstretchedBordersDoubleSpinBox = new QDoubleSpinBox;
   unstretchedBordersDoubleSpinBox->setMinimum(0.001);
   unstretchedBordersDoubleSpinBox->setMaximum(100000.0);
   unstretchedBordersDoubleSpinBox->setSingleStep(1.0);
   unstretchedBordersDoubleSpinBox->setDecimals(2);
   QObject::connect(unstretchedBordersDoubleSpinBox, SIGNAL(valueChanged(double)),
                    this, SLOT(readBorderMainPage()));
   QHBoxLayout* stretchLayout = new QHBoxLayout;
   stretchLayout->addWidget(stretchLabel);
   stretchLayout->addWidget(unstretchedBordersDoubleSpinBox);
   stretchLayout->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(displayBorderColorKey()));
                    
   //
   // Override border with area colors check box
   //
   overrideBorderWithAreaColorsCheckBox = new QCheckBox("Override Border Colors with Area Colors");
   QObject::connect(overrideBorderWithAreaColorsCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readBorderMainPage()));
                    
   //
   // Vertical Box Layout for all border items
   //
   pageBorderMain = new QWidget; 
   QVBoxLayout* bordersSubPageMainLayout = new QVBoxLayout(pageBorderMain);
   bordersSubPageMainLayout->addWidget(showBordersCheckBox);
   bordersSubPageMainLayout->addWidget(showRaisedBordersCheckBox);
   bordersSubPageMainLayout->addWidget(showUncertaintyBordersCheckBox);
   bordersSubPageMainLayout->addWidget(showFirstLinkRedBordersCheckBox);
   bordersSubPageMainLayout->addWidget(overrideBorderWithAreaColorsCheckBox);
   bordersSubPageMainLayout->addWidget(bordersDrawTypeComboBox);
   bordersSubPageMainLayout->addLayout(symbolLayout);
   bordersSubPageMainLayout->addLayout(sizeLayout);
   bordersSubPageMainLayout->addLayout(opacityLayout);
   bordersSubPageMainLayout->addLayout(stretchLayout);
   bordersSubPageMainLayout->addWidget(colorKeyPushButton);
   bordersSubPageMainLayout->addStretch();

   pageBorderMainWidgetGroup = new WuQWidgetGroup(this);
   pageBorderMainWidgetGroup->addWidget(showBordersCheckBox);
   pageBorderMainWidgetGroup->addWidget(showRaisedBordersCheckBox);
   pageBorderMainWidgetGroup->addWidget(showUncertaintyBordersCheckBox);
   pageBorderMainWidgetGroup->addWidget(showFirstLinkRedBordersCheckBox);
   pageBorderMainWidgetGroup->addWidget(bordersDrawTypeComboBox);
   pageBorderMainWidgetGroup->addWidget(borderSymbolComboBox);
   pageBorderMainWidgetGroup->addWidget(borderOpacityDoubleSpinBox);
   pageBorderMainWidgetGroup->addWidget(borderSizeSpinBox);
   pageBorderMainWidgetGroup->addWidget(unstretchedBordersDoubleSpinBox);
   pageBorderMainWidgetGroup->addWidget(overrideBorderWithAreaColorsCheckBox);
   
   pageWidgetStack->addWidget(pageBorderMain);
}


Generated by  Doxygen 1.6.0   Back to index