KexiProjectConnectionSelectionPage::KexiProjectConnectionSelectionPage(QWidget* parent) : KexiAssistantPage(i18n("Database Connection"), i18n("Select database server's connection you wish to use to " "create a new Kexi project. " "<p>Here you may also add, edit or remove connections " "from the list."), parent) { setBackButtonVisible(true); setNextButtonVisible(true); if (KexiDB::hasDatabaseServerDrivers()) { QVBoxLayout *lyr = new QVBoxLayout; connSelector = new KexiConnectionSelectorWidget( Kexi::connset(), "kfiledialog:///OpenExistingOrCreateNewProject", KAbstractFileWidget::Saving); lyr->addWidget(connSelector); connSelector->showAdvancedConn(); connect(connSelector, SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)), this, SLOT(next())); connSelector->layout()->setContentsMargins(0, 0, 0, 0); connSelector->hideHelpers(); connSelector->hideDescription(); setContents(lyr); setFocusWidget(connSelector->connectionsList()); } else {
KexiProjectTitleSelectionPage::KexiProjectTitleSelectionPage(QWidget* parent) : KexiAssistantPage(i18n("Project Title & Filename"), i18n("Enter title for the new project. " "Filename will be created automatically based on the title. " "You can change the filename too."), parent) { setBackButtonVisible(true); setNextButtonVisible(true); contents = new KexiDBTitlePage(QString()); contents->formLayout->setSpacing(KDialog::spacingHint()); contents->le_title->setText(defaultDatabaseName()); contents->le_title->selectAll(); connect(contents->le_title, SIGNAL(textChanged(QString)), this, SLOT(titleTextChanged(QString))); fileHandler = new KexiStartupFileHandler( KUrl("kfiledialog:///OpenExistingOrCreateNewProject"), KexiStartupFileHandler::SavingFileBasedDB, contents->file_requester); connect(fileHandler, SIGNAL(askForOverwriting(KexiContextMessage)), this, SLOT(askForOverwriting(KexiContextMessage))); contents->file_requester->fileDialog()->setCaption(i18n("Save New Project As")); updateUrl(); setContents(contents); }
void ToolBarPage::onDisappear() { setBackButtonVisible(true); setMenuActionsVisible(true); applicationWindow()->setStyleName(defaultStyleName); MWindow *window = MApplication::activeWindow(); if (!wasFullScreen && window && window->isFullScreen()) window->showNormal(); }
void ToolBarPage::onAppear() { wasFullScreen = MApplication::activeWindow()->isFullScreen(); setBackButtonVisible(visibleBackButton->isChecked()); setMenuActionsVisible(visibleMenuButton->isChecked()); defaultStyleName = applicationWindow()->styleName(); if (!currentStyleName.isEmpty()) applicationWindow()->setStyleName(currentStyleName); if (isTabBarOnTop() && !MApplication::activeWindow()->isFullScreen()) MApplication::activeWindow()->showFullScreen(); }
void KexiPasswordPage::init() { setBackButtonVisible(true); setNextButtonVisible(true); QVBoxLayout *lyr = new QVBoxLayout; d->widget = new KexiPasswordWidget(0, KexiPasswordWidget::ShowUsernameLine | KexiPasswordWidget::ShowDomainLine | KexiPasswordWidget::UsernameReadOnly | KexiPasswordWidget::DomainReadOnly); QLineEdit *passEdit = d->widget->findChild<QLineEdit*>("passEdit"); Q_ASSERT(passEdit); passEdit->setMaximumWidth(passEdit->fontMetrics().width("W")*24); lyr->addWidget(d->widget); lyr->addStretch(); setFocusWidget(passEdit); setDescription(d->widget->prompt()); d->widget->setPrompt(QString()); setContents(lyr); connect(d->widget, SIGNAL(returnPressed()), this, SLOT(next())); }
KexiProjectStorageTypeSelectionPage::KexiProjectStorageTypeSelectionPage(QWidget* parent) : KexiAssistantPage(i18n("Storage Method"), i18n("Select a storage method which will be used to store the new project."), parent) , m_fileTypeSelected(true) { setBackButtonVisible(true); QWidget* contents = new QWidget; setupUi(contents); const int dsize = IconSize(KIconLoader::Desktop); btn_file->setIcon(KIcon(KexiDB::defaultFileBasedDriverIconName())); btn_file->setIconSize(QSize(dsize, dsize)); connect(btn_file, SIGNAL(clicked()), this, SLOT(buttonClicked())); btn_server->setIcon(KIcon(KEXI_DATABASE_SERVER_ICON_NAME)); btn_server->setIconSize(QSize(dsize, dsize)); connect(btn_server, SIGNAL(clicked()), this, SLOT(buttonClicked())); setFocusWidget(btn_file); setContents(contents); }