Preferences::Preferences(QWidget *w) : Q3TabDialog(w, "Preferences", FALSE, Qt::WDestructiveClose) { helpFile = "preferences.html"; setCaption(tr("Edit Prefs")); loadSettings(); createGeneralPage(); createColorPage(); createFontPage(); createMTPage(); // main tool bar createCTPage(); // chart tool bar createETPage(); // extra tool bar setApplyButton(tr("&Apply")); connect(this, SIGNAL(applyButtonPressed()), this, SLOT(slotSave())); setCancelButton(tr("&Ok")); //connect(this, SIGNAL(cancelButtonPressed()), this, SLOT(exitDialog())); setOkButton(QString::null); setHelpButton(); QObject::connect(this, SIGNAL(helpButtonPressed()), this, SLOT(slotHelp())); resize(sz); }
PropertySheetUI::PropertySheetUI() { setOkButton(false); setApplyButton(true); m_lpfnDefSheet = NULL; m_pfnDlgProc = s_sheetWndProc; m_pCallback = NULL; m_pages = NULL; m_modeless = false; }
ZLQtOptionsDialog::ZLQtOptionsDialog(const ZLResource &resource, shared_ptr<ZLRunnable> applyAction, bool showApplyButton) : QTabDialog(0, 0, true), ZLDesktopOptionsDialog(resource, applyAction) { setCaption(::qtString(ZLOptionsDialog::caption())); setOkButton(::qtButtonName(ZLDialogManager::OK_BUTTON)); setHelpButton(::qtButtonName(ZLDialogManager::CANCEL_BUTTON)); connect(this, SIGNAL(helpButtonPressed()), this, SLOT(reject())); if (showApplyButton) { setApplyButton(::qtButtonName(ZLDialogManager::APPLY_BUTTON)); connect(this, SIGNAL(applyButtonPressed()), this, SLOT(apply())); } }
TabDialog::TabDialog( QWidget *parent, const char *name ) : QTabDialog( parent, name ) { setupTab5(); QDialog::resize(350,380); setApplyButton("&Apply"); connect( this, SIGNAL( defaultButtonPressed() ), this, SLOT( ok() ) ); connect( this, SIGNAL( applyButtonPressed() ), this, SLOT( apply() ) ); }
CuboidDialog::CuboidDialog() : QTabDialog( 0, "CuboidDialog", true ) { setCaption( trUtf8( "Cuboid Dialog" ) ); // Cuboid dimensions cub_dimension_box = new QVGroupBox( this ); cub_dimension_box->setFrameShape( QFrame::NoFrame ); cub_dimension_box->setTitle( trUtf8( "Cuboid dimensions (nb of cells)" ) ); len_label = new QLabel( "Length", cub_dimension_box ); cubLen = new DistributionSelector( cub_dimension_box, "cubLen" ); wid_label = new QLabel( "Width", cub_dimension_box ); cubWid = new DistributionSelector( cub_dimension_box, "cubWid" ); hgt_label = new QLabel( "Height", cub_dimension_box ); cubHgt = new DistributionSelector( cub_dimension_box, "cubHgt" ); addTab( cub_dimension_box , "Dimensions" ); // Cuboid orientation cub_orientation_box = new QVGroupBox( this ); cub_orientation_box->setFrameShape( QFrame::NoFrame ); rot_label1 = new QLabel( "Azimuth (0.0=North, 90.0=East)", cub_orientation_box ); cubRotStrike = new DistributionSelector( cub_orientation_box, "cubRotStrike" ); rot_label2 = new QLabel( "Dip (0.0=Horizontal, 90.0=Vertical)", cub_orientation_box ); cubRotDip = new DistributionSelector( cub_orientation_box, "cubRotDip" ); addTab( cub_orientation_box, "Orientation" ); setOKButton(); setApplyButton(); setCancelButton(); }
/** * Constructs the dialog. */ SettingsDialog::SettingsDialog(int tabIndex, QWidget* parent, const char* name, bool modal, WFlags fl) : QTabDialog(parent, name, modal, fl) { setCaption(tr("Settings")); setApplyButton(tr("Apply")); setCancelButton(tr("Cancel")); setOkButton(tr("OK")); setHelpButton(tr("Help")); this->addTab(createGeneralTab(), tr("General")); this->addTab(createPathTab(), tr("Paths")); this->addTab(createDownloadTab(), tr("Download")); setup(); if (tabIndex >= 0 && tabIndex < tabBar()->count()) { tabBar()->setCurrentTab(tabIndex); } resize(sizeHint());//resize(400, 400); connect(this, SIGNAL(applyButtonPressed()), this, SLOT(applySettings())); }
Scanner::Scanner (QString n, DBIndex *i) : QTabDialog (0, 0, FALSE) { chartIndex = i; scannerName = n; QString s = "Qtstalker Scanner"; s.append(": "); s.append(scannerName); setCaption (s); QWidget *w = new QWidget(this); QVBoxLayout *vbox = new QVBoxLayout(w); vbox->setMargin(5); vbox->setSpacing(5); QHGroupBox *gbox = new QHGroupBox(tr("Symbol Selection"), w); vbox->addWidget(gbox); allSymbols = new QCheckBox(tr("All symbols"), gbox); connect(allSymbols, SIGNAL(toggled(bool)), this, SLOT(allSymbolsToggled(bool))); fileButton = new QPushButton(tr("0 Symbols"), gbox); connect(fileButton, SIGNAL(clicked()), this, SLOT(getSymbols())); basePath = new QComboBox(gbox); basePath->insertItem(tr("Chart"), -1); basePath->insertItem(tr("Group"), -1); QGridLayout *grid = new QGridLayout(vbox, 1, 2); grid->setColStretch(1, 1); QLabel *label = new QLabel(tr("Bar Length"), w); grid->addWidget(label, 0, 0); BarData bd(scannerName); period = new QComboBox(w); bd.getBarLengthList(barLengthList); period->insertStringList(barLengthList, -1); period->setCurrentText("Daily"); grid->addWidget(period, 0, 1); label = new QLabel(tr("Bars"), w); grid->addWidget(label, 1, 0); bars = new QSpinBox(1, 99999999, 1, w); bars->setValue(100); grid->addWidget(bars, 1, 1); list = new FormulaEdit(w, FormulaEdit::Logic); vbox->addWidget(list); setDefaultButton(tr("&Scan")); connect(this, SIGNAL(defaultButtonPressed()), this, SLOT(scan())); setApplyButton(tr("&Apply")); connect(this, SIGNAL(applyButtonPressed()), this, SLOT(saveRule())); setCancelButton(tr("&Cancel")); connect(this, SIGNAL(cancelButtonPressed()), this, SLOT(exitDialog())); setOkButton(QString::null); setHelpButton(); QObject::connect(this, SIGNAL(helpButtonPressed()), this, SLOT(slotHelp())); addTab(w, tr("Parms")); loadRule(); }