DialogSettings::DialogSettings(QWidget* parent, Qt::WindowFlags flags) : QDialog(parent, flags), m_contents(new QListWidget(this)), m_pages(new QStackedWidget(this)) { setWindowTitle(tr("Settings")); m_contents->setMovement(QListView::Static); m_contents->setMaximumWidth(128); createPages(); m_contents->setCurrentRow(0); QPushButton* closeButton = new QPushButton(tr("Close")); connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); QHBoxLayout* horizontalLayout = new QHBoxLayout; horizontalLayout->addWidget(m_contents); horizontalLayout->addWidget(m_pages, 1); QHBoxLayout* buttonsLayout = new QHBoxLayout; buttonsLayout->addStretch(1); buttonsLayout->addWidget(closeButton); QVBoxLayout* mainLayout = new QVBoxLayout; mainLayout->addLayout(horizontalLayout); mainLayout->addStretch(1); mainLayout->addSpacing(12); mainLayout->addLayout(buttonsLayout); setLayout(mainLayout); }
void KWQTableView::doPrintPreview() { QPrinter printer; QPointer<KPrintPreview> preview = new KPrintPreview(&printer, this); QTextDocument td; createPages(&printer, &td, true); preview->exec(); delete preview; }
LRESULT AutoSearchFrame::onAdd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { TabbedDialog dlg(STRING(AUTOSEARCH_DLG)); AutoSearchItemSettings options; createPages(dlg, options); if (dlg.DoModal() == IDOK) { SettingsManager::getInstance()->set(SettingsManager::LAST_AS_FILETYPE, options.fileTypeStr); addFromDialog(options); } return 0; }
/************************************************ * * ***********************************************/ Sheet *TestBoomaga::createSheet(const QString &definition) { QList<ProjectPage *> pages = createPages(definition); Sheet *sheet = new Sheet(pages.count(), 0); for(int i=0; i< pages.count(); ++i) { sheet->setPage(i, pages.at(i)); } return sheet; }
/*! Constructor for the private implementation of wps wizard @param [in] wizard WpsWizard* pointer to the framework object @param [in] wizardHelper WlanWizardHelper * pointer to the wizard helpper class @return WpsWizardPrivate */ WpsWizardPrivate::WpsWizardPrivate( WpsWizard* wizard, WlanWizardHelper *wizardHelper) : q_ptr(wizard), mWizardHelper(wizardHelper), mTranslator(new HbTranslator("wpswizardplugin")), mRandomNumber(0) { OstTraceFunctionEntry1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_ENTRY, this); createPages(); OstTraceFunctionExit1(WPSWIZARDPRIVATE_WPSWIZARDPRIVATE_EXIT, this); }
/*! Constructor of EAP Wizard. @param [in] wizardHelper pointer to the helper instance. */ EapWizardPrivate::EapWizardPrivate( WlanWizardHelper *wizardHelper) : mWizardHelper(wizardHelper), mTranslator(new HbTranslator("eapwizard")), mEapConfIf(new EapQtConfigInterface( EapQtConfigInterface::EapBearerTypeWlan, EapQtConfigInterface::IapIdUndefined)) { OstTraceFunctionEntry0( EAPWIZARDPRIVATE_EAPWIZARDPRIVATE_ENTRY ); Q_ASSERT(wizardHelper); createPages(); OstTraceFunctionExit0( EAPWIZARDPRIVATE_EAPWIZARDPRIVATE_EXIT ); }
gui::MessageBox::MessageBox(const sf::Vector2u& dimensions, const std::string& text, const gui::Font& font, const sf::Color& backgroundCol, const sf::Color& textCol) : mDimensions(dimensions), mFont(&font), mCurrentPage(0), mBackgroundCol(backgroundCol), mTextCol(textCol) { createPages(gui::alignString(text, dimensions.x)); }
TestDataView::TestDataView(QWidget *parent, Qt::WFlags flags) : QDialog( parent, flags) { createList(); createPages(); QHBoxLayout *lay = new QHBoxLayout; lay->addWidget(list); lay->addWidget(pages, 1); setLayout(lay); setWindowTitle(tr("Data View")); }
void KWQTableView::doPrint() { QPrinter printer; WQPrintDialogPage * p = new WQPrintDialogPage(this); p->setPrintStyle(Prefs::printStyle()); QPrintDialog *printDialog = KdePrint::createPrintDialog(&printer, QList<QWidget*>() << p, this); if (printDialog->exec() == QDialog::Accepted) { Prefs::setPrintStyle(p->printStyle()); QTextDocument td; createPages(&printer, &td, true); } delete printDialog; }
OptionsDialog::OptionsDialog(QWidget *parent) : FloatingDialog(parent), ui(new Ui::OptionsDialog) { this->setWindowIcon(Resources::iconOptions()); ui->setupUi(this); while(ui->stackedPages->count()) ui->stackedPages->removeWidget(ui->stackedPages->widget(0)); connect(ui->listContent, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), SLOT(changePage(QListWidgetItem*,QListWidgetItem*))); createPages(); ui->listContent->setCurrentRow(0); ui->buttonBox->button(QDialogButtonBox::Close)->setIcon(Resources::iconClose()); }
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(), m_controllerType(CONTROLLER_UNKNOWN), m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN), m_levellingPerformed(false), m_restartNeeded(false), m_connectionManager(0) { setWindowTitle(tr("OpenPilot Setup Wizard")); setOption(QWizard::IndependentPages, false); for(quint16 i = 0; i < ActuatorSettings::CHANNELMAX_NUMELEM; i++) { m_actuatorSettings << actuatorChannelSettings(); } setWizardStyle(QWizard::ModernStyle); setMinimumSize(600, 450); resize(600, 450); createPages(); }
LRESULT AutoSearchFrame::onDuplicate(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if (ctrlAutoSearch.GetSelectedCount() == 1) { int sel = ctrlAutoSearch.GetNextItem(-1, LVNI_SELECTED); AutoSearchPtr as = ctrlAutoSearch.getItemData(sel)->asItem; TabbedDialog dlg(STRING(AUTOSEARCH_DLG)); AutoSearchItemSettings options(as, true); createPages(dlg, options); if (dlg.DoModal() == IDOK) { addFromDialog(options); } } return 0; }
FormMain::FormMain(QWidget *parent) : QWidget(parent), ui(new Ui::FormMain) { ui->setupUi(this); this->setWindowFlags(Qt::FramelessWindowHint); createPages(); connect(ui->stackedWidget->widget(m_formIndex.value(FORMLOGIN)),SIGNAL(closeMainForm()) ,this,SLOT(on_btnClose_clicked())); connect(ui->stackedWidget->widget(m_formIndex.value(FORMLOGIN)),SIGNAL(changeToMaintain()) ,this,SLOT(LoginSuccess())); hideToolBox(); setWidgetSize(400,300); //焦点默认给登陆界面 ((FormLogin*)ui->stackedWidget->widget(m_formIndex.value(FORMLOGIN)))->setFocus(); }
LRESULT AutoSearchFrame::onChange(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if (ctrlAutoSearch.GetSelectedCount() == 1) { int sel = ctrlAutoSearch.GetNextItem(-1, LVNI_SELECTED); auto ii = ctrlAutoSearch.getItemData(sel); TabbedDialog dlg(STRING(AUTOSEARCH_DLG)); AutoSearchItemSettings options(ii->asItem, false); createPages(dlg, options); if (dlg.DoModal() == IDOK) { options.setItemProperties(ii->asItem, options.searchString); AutoSearchManager::getInstance()->updateAutoSearch(ii->asItem); } } return 0; }
MainWin::MainWin(QWidget *parent) : QMainWindow(parent) { app->setOverrideCursor(QCursor(Qt::WaitCursor)); m_isClosing = false; m_waitState = false; m_doConnect = false; m_treeStackTrap = false; m_dtformat = "yyyy-MM-dd HH:mm:ss"; mainWin = this; setupUi(this); /* Setup UI defined by main.ui (designer) */ register_message_callback(message_callback); readPreferences(); treeWidget->clear(); treeWidget->setColumnCount(1); treeWidget->setHeaderLabel( tr("Select Page") ); treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu); tabWidget->setTabsClosable(true); /* wait for QT 4.5 */ createPages(); resetFocus(); /* lineEdit->setFocus() */ this->show(); readSettings(); foreach(Console *console, m_consoleHash) { console->connect_dir(); } /* * Note, the notifier is now a global flag, although each notifier * can be individually turned on and off at a socket level. Once * the notifier is turned off, we don't accept anything from anyone * this prevents unwanted messages from getting into the input * dialogs such as restore that read from the director and "know" * what to expect. */ m_notify = true; m_currentConsole = (Console*)getFromHash(m_firstItem); QTimer::singleShot(2000, this, SLOT(popLists())); if (m_miscDebug) { QString directoryResourceName; m_currentConsole->getDirResName(directoryResourceName); Pmsg1(100, "Setting initial window to %s\n", directoryResourceName.toUtf8().data()); } app->restoreOverrideCursor(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setFixedSize(900, 710); m_timer = 0; //Create pages createPages(); //Connect other signals and slots connect(ui->exitMenuBtn, SIGNAL(clicked()), qApp, SLOT(quit())); connect(YubiKeyFinder::getInstance(), SIGNAL(keyFound(bool, bool*)), this, SLOT(keyFound(bool, bool*))); connect(YubiKeyWriter::getInstance(), SIGNAL(errorOccurred(QString)), this, SLOT(showStatusMessage(QString))); connect(m_otpPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_oathPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_staticPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_chalRespPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_settingPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_toolPage, SIGNAL(showStatusMessage(const QString &,int)), this, SLOT(showStatusMessage(const QString &,int))); connect(m_aboutPage, SIGNAL(changePage(int)), this, SLOT(setCurrentPage(int))); connect(m_settingPage, SIGNAL(settingsChanged()), m_otpPage, SLOT(loadSettings())); connect(m_settingPage, SIGNAL(settingsChanged()), m_oathPage, SLOT(loadSettings())); //Intialize settings m_settingPage->init(); //Start YubiKey finder YubiKeyFinder::getInstance()->start(); }
SetupWizard::SetupWizard(QWidget *parent) : QWizard(parent), VehicleConfigurationSource(), m_controllerType(CONTROLLER_UNKNOWN), m_vehicleType(VEHICLE_UNKNOWN), m_inputType(INPUT_UNKNOWN), m_escType(ESC_UNKNOWN), m_servoType(SERVO_UNKNOWN), m_airspeedType(AIRSPEED_DISABLED), m_gpsType(GPS_DISABLED), m_vehicleTemplate(NULL), m_calibrationPerformed(false), m_restartNeeded(false), m_connectionManager(NULL) { setWindowTitle(tr("Setup Wizard")); setOption(QWizard::IndependentPages, false); for (quint16 i = 0; i < ActuatorSettings::CHANNELMAX_NUMELEM; i++) { m_actuatorSettings << actuatorChannelSettings(); } setWizardStyle(QWizard::ModernStyle); setMinimumSize(780, 600); resize(780, 600); createPages(); }
bool KWQTableView::doHtmlExport(const QUrl &url) { bool success = false; QUrl tmp(url); QFile data(tmp.path()); if (data.open(QFile::WriteOnly)) { QPrinter printer; QTextDocument td; td.setMetaInformation(QTextDocument::DocumentTitle, model()->sourceModel()->document()->title()); QTextStream out(&data); out.setCodec("utf-8"); createPages(&printer, &td, false); out << td.toHtml("utf-8"); data.close(); success = true; } return success; }
void TestBoomaga::test_ProjectRotation() { QFETCH(int, exp); Rotation expected = NoRotate + exp; QString dataTag = QTest::currentDataTag(); QString layoutName = dataTag.section(";", 0, 0); QString pagesDef = dataTag.section(";", 1); Layout *layout = createLayout(layoutName); QList<ProjectPage*> pages = createPages(pagesDef); Rotation result = project->calcRotation(pages, layout); QCOMPARE((int)result, (int)expected); delete layout; qDeleteAll(pages); }
MainWin::MainWin(QWidget *parent) : QMainWindow(parent) { app->setOverrideCursor(QCursor(Qt::WaitCursor)); m_isClosing = false; m_waitState = false; m_doConnect = false; m_dtformat = "yyyy-MM-dd HH:mm:ss"; mainWin = this; setupUi(this); /* Setup UI defined by main.ui (designer) */ register_message_callback(message_callback); readPreferences(); treeWidget->clear(); treeWidget->setColumnCount(1); treeWidget->setHeaderLabel( tr("Select Page") ); treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu); createPages(); resetFocus(); /* lineEdit->setFocus() */ #ifndef HAVE_QWT actionJobPlot->setEnabled(false); actionJobPlot->setVisible(false); #endif this->show(); readSettings(); foreach(Console *console, m_consoleHash) console->connect_dir(); m_currentConsole = (Console*)getFromHash(m_firstItem); QTimer::singleShot(750, this, SLOT(popLists())); if (m_miscDebug) { QString directoryResourceName; m_currentConsole->getDirResName(directoryResourceName); Pmsg1(100, "Setting initial window to %s\n", directoryResourceName.toUtf8().data()); } }
Document::Document() : mPages() , mName(){ createPages(); }
void gui::MessageBox::setText(const std::string& text) { mPages.clear(); createPages(gui::alignString(text, mDimensions.x)); mCurrentPage = 0; }