void Plot3DDialog::initTitlePage() { QHBoxLayout* hb1 = new QHBoxLayout(); hb1->addStretch(); QLabel *colorLabel = new QLabel(tr( "Co&lor" )); hb1->addWidget(colorLabel); btnTitleColor = new ColorButton(); hb1->addWidget(btnTitleColor); colorLabel->setBuddy(btnTitleColor); btnTitleFont = new QPushButton(tr( "&Font" )); hb1->addWidget(btnTitleFont); QVBoxLayout* vl = new QVBoxLayout(); boxTitle = new QTextEdit(); boxTitle->setMaximumHeight(80); vl->addWidget(boxTitle); titleFormatButtons = new TextFormatButtons(boxTitle); titleFormatButtons->toggleCurveButton(false); titleFormatButtons->toggleFontButtons(false); hb1->addWidget(titleFormatButtons); hb1->addStretch(); vl->addLayout(hb1); vl->addStretch(); title = new QWidget(); title->setLayout(vl); generalDialog->insertTab(title, tr( "&Title" ) ); connect( btnTitleFont, SIGNAL(clicked()), this, SLOT(pickTitleFont() ) ); }
void Plot3DDialog::initTitlePage() { QHBoxLayout* hb1 = new QHBoxLayout(); hb1->addStretch(); buttonLowerGreek = new QPushButton(QChar(0x3B1)); hb1->addWidget(buttonLowerGreek); buttonUpperGreek = new QPushButton(QChar(0x393)); hb1->addWidget(buttonUpperGreek); btnTitleColor = new QPushButton(tr( "&Color" )); hb1->addWidget(btnTitleColor); btnTitleFont = new QPushButton(tr( "&Font" )); hb1->addWidget(btnTitleFont); hb1->addStretch(); QVBoxLayout* vl = new QVBoxLayout(); boxTitle = new QLineEdit(); vl->addWidget(boxTitle); vl->addLayout(hb1); vl->addStretch(); title = new QWidget(); title->setLayout(vl); generalDialog->insertTab(title, tr( "&Title" ) ); connect( btnTitleColor, SIGNAL(clicked()), this, SLOT(pickTitleColor() ) ); connect( btnTitleFont, SIGNAL(clicked()), this, SLOT(pickTitleFont() ) ); connect( buttonLowerGreek, SIGNAL(clicked()), this, SLOT(showLowerGreek())); connect( buttonUpperGreek, SIGNAL(clicked()), this, SLOT(showUpperGreek())); }
void configDialog::initPlotsPage() { ApplicationWindow *app = (ApplicationWindow *)parentWidget(); plotsTabWidget = new QTabWidget(generalDialog); plots = new QWidget(plotsTabWidget); QHBox *hbox1 = new QHBox (plots); hbox1->setSpacing(5); QButtonGroup *GroupBoxOptions = new QButtonGroup( 2,QGroupBox::Horizontal, QString::null, hbox1); boxAutoscaling = new QCheckBox(GroupBoxOptions,"boxAutoscaling"); boxAutoscaling->setChecked(app->autoscale2DPlots); boxScaleFonts = new QCheckBox(GroupBoxOptions,"boxScaleFonts"); boxScaleFonts->setChecked(app->autoScaleFonts); boxTitle= new QCheckBox(GroupBoxOptions); boxTitle->setChecked(app->titleOn); boxAllAxes= new QCheckBox(GroupBoxOptions); boxAllAxes->setChecked (app->allAxesOn); boxFrame= new QCheckBox(GroupBoxOptions); boxFrame->setChecked(app->canvasFrameOn); boxBackbones= new QCheckBox(GroupBoxOptions); boxBackbones->setChecked(app->drawBackbones); labelFrameWidth = new QLabel(GroupBoxOptions); boxFrameWidth= new QSpinBox(1, 100, 1,GroupBoxOptions); boxFrameWidth->setValue(app->canvasFrameWidth); if (!app->canvasFrameOn) { labelFrameWidth->hide(); boxFrameWidth->hide(); } lblLinewidth = new QLabel(GroupBoxOptions); boxLinewidth= new QSpinBox(0, 100, 1,GroupBoxOptions); boxLinewidth->setValue(app->axesLineWidth); lblMargin = new QLabel(GroupBoxOptions); boxMargin= new QSpinBox(0, 1000, 5, GroupBoxOptions); boxMargin->setValue(app->defaultPlotMargin); boxResize = new QCheckBox(plots); boxResize->setChecked(!app->autoResizeLayers); if(boxResize->isChecked()) boxScaleFonts->setEnabled(false); QVBoxLayout* hlayout2 = new QVBoxLayout(plots,5,5); hlayout2->addWidget(hbox1); hlayout2->addWidget(boxResize); plotsTabWidget->insertTab( plots, tr( "Options" ) ); initCurvesPage(); plotTicks = new QWidget(plotsTabWidget); QButtonGroup *GroupBox6 = new QButtonGroup(4, QGroupBox::Horizontal,QString::null,plotTicks); lblTicks = new QLabel(GroupBox6); boxMajTicks = new QComboBox(GroupBox6); lblMajTicks = new QLabel(GroupBox6); boxMajTicksLength = new QSpinBox(0, 100, 1,GroupBox6); boxMajTicksLength->setValue (app->majTicksLength); lblMinTicks = new QLabel(GroupBox6); boxMinTicks = new QComboBox(GroupBox6); lblMinTicksLength = new QLabel(GroupBox6); boxMinTicksLength= new QSpinBox(0, 100, 1,GroupBox6); boxMinTicksLength->setValue(app->minTicksLength); QHBoxLayout* hl = new QHBoxLayout(plotTicks,5,5); hl->addWidget(GroupBox6); plotsTabWidget->insertTab(plotTicks, tr( "Ticks" ) ); plotFonts = new QWidget(plotsTabWidget); QButtonGroup *GroupBox2DFonts = new QButtonGroup(1,QGroupBox::Horizontal,QString::null,plotFonts); buttonTitleFont= new QPushButton(GroupBox2DFonts, "buttonTitleFont" ); buttonLegendFont= new QPushButton(GroupBox2DFonts, "buttonLegendFont" ); buttonAxesFont= new QPushButton(GroupBox2DFonts, "buttonAxesFont" ); buttonNumbersFont= new QPushButton(GroupBox2DFonts, "buttonNumbersFont" ); QHBoxLayout* hl2 = new QHBoxLayout(plotFonts,5,5); hl2->addWidget(GroupBox2DFonts); plotsTabWidget->insertTab(plotFonts, tr( "Fonts" ) ); connect( boxResize, SIGNAL( clicked() ), this, SLOT( enableScaleFonts() ) ); connect( boxFrame, SIGNAL( toggled(bool) ), this, SLOT( showFrameWidth(bool) ) ); connect( buttonAxesFont, SIGNAL( clicked() ), this, SLOT( pickAxesFont() ) ); connect( buttonNumbersFont, SIGNAL( clicked() ), this, SLOT( pickNumbersFont() ) ); connect( buttonLegendFont, SIGNAL( clicked() ), this, SLOT( pickLegendFont() ) ); connect( buttonTitleFont, SIGNAL( clicked() ), this, SLOT( pickTitleFont() ) ); }