FileDialogProxy::FileDialogProxy(KFileDialog::OperationMode mode, QObject *parent) : QObject(parent), m_dialog(new KFileDialog(KUrl("~"), QString(), 0)) { m_dialog->setOperationMode(mode); connect(m_dialog, SIGNAL(finished()), this, SLOT(dialogFinished())); }
void Plugin::CreateNewPassword () { if (!NewPasswordDialog_->isVisible ()) { NewPasswordDialog_->clear (); NewPasswordDialog_->show (); } QEventLoop loop; connect (NewPasswordDialog_.get (), SIGNAL (dialogFinished ()), &loop, SLOT (quit ()), Qt::QueuedConnection); // qDebug () << Q_FUNC_INFO << "Loop start"; loop.exec (); // qDebug () << Q_FUNC_INFO << "Loop exit"; QString password = NewPasswordDialog_->GetPassword (); // check result of recursive calls of this method through loop.exec(). if (!IsPasswordSet ()) { // clear old settings and data Settings_->clear (); Storage_->clear (); // set up new settings UpdatePasswordSettings (password); UpdateActionsStates (); } }
DownloadOptionsDialog::~DownloadOptionsDialog() { if (!m_signalEmited) { emit dialogFinished(-1); } delete ui; }
void KHelpMenu::reportBug() { if( !mBugReport ) { mBugReport = new KBugReport( mParent, false, d->mAboutData ); connect( mBugReport, SIGNAL(finished()),this,SLOT( dialogFinished()) ); } mBugReport->show(); }
void KHelpMenu::switchApplicationLanguage() { if ( !d->mSwitchApplicationLanguage ) { d->mSwitchApplicationLanguage = new KSwitchLanguageDialog( mParent, "switchlanguagedialog", false ); connect( d->mSwitchApplicationLanguage, SIGNAL(finished()), this, SLOT( dialogFinished()) ); } d->mSwitchApplicationLanguage->show(); }
void KHelpMenu::aboutKDE() { if( !mAboutKDE ) { mAboutKDE = new KAboutKDE( mParent, "aboutkde", false ); connect( mAboutKDE, SIGNAL(finished()), this, SLOT( dialogFinished()) ); } mAboutKDE->show(); }
void NodeCreationDialog::finish(bool accepted) { if (_imp->isFinished) { return; } _imp->isFinished = true; Q_EMIT dialogFinished(accepted); }
void ModuleEnablerDialog::done(int r) { mTreeStableTicks = 2; if (r != QDialog::Accepted) { // Dialog was rejected, no module should be enabled or disabled. mSourceTreeModel->restoreDefault(); } QDialog::done(r); emit dialogFinished(r); }
void KHelpMenu::aboutApplication() { if (d->mAboutData) { if( !mAboutApp ) { mAboutApp = new KAboutApplication( d->mAboutData, mParent, "about", false ); connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) ); } mAboutApp->show(); } else if( mAboutAppText.isEmpty() ) { emit showAboutApplication(); } else { if( !mAboutApp ) { mAboutApp = new KDialogBase( QString::null, // Caption is defined below KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, mParent, "about", false, true, KStdGuiItem::ok() ); connect( mAboutApp, SIGNAL(finished()), this, SLOT( dialogFinished()) ); QHBox *hbox = new QHBox( mAboutApp ); mAboutApp->setMainWidget( hbox ); hbox->setSpacing(KDialog::spacingHint()*3); hbox->setMargin(KDialog::marginHint()*1); QLabel *label1 = new QLabel(hbox); label1->setPixmap( kapp->icon() ); QLabel *label2 = new QLabel(hbox); label2->setText( mAboutAppText ); mAboutApp->setPlainCaption( i18n("About %1").arg(kapp->caption()) ); mAboutApp->disableResize(); } mAboutApp->show(); } }
void DatabaseOpenWidget::openDatabase() { QSharedPointer<CompositeKey> masterKey = databaseKey(); if (!masterKey) { return; } m_ui->editPassword->setShowPassword(false); QCoreApplication::processEvents(); m_db.reset(new Database()); QString error; QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); bool ok = m_db->open(m_filename, masterKey, &error, false); QApplication::restoreOverrideCursor(); if (!ok) { m_ui->messageWidget->showMessage(error, MessageWidget::MessageType::Error); return; } if (m_db) { #ifdef WITH_XC_TOUCHID QHash<QString, QVariant> useTouchID = config()->get("UseTouchID").toHash(); // check if TouchID can & should be used to unlock the database next time if (m_ui->checkTouchID->isChecked() && TouchID::getInstance().isAvailable()) { // encrypt and store key blob if (TouchID::getInstance().storeKey(m_filename, PasswordKey(m_ui->editPassword->text()).rawKey())) { useTouchID.insert(m_filename, true); } } else { // when TouchID not available or unchecked, reset for the current database TouchID::getInstance().reset(m_filename); useTouchID.insert(m_filename, false); } config()->set("UseTouchID", useTouchID); #endif if (m_ui->messageWidget->isVisible()) { m_ui->messageWidget->animatedHide(); } emit dialogFinished(true); } else { m_ui->messageWidget->showMessage(error, MessageWidget::Error); m_ui->editPassword->setText(""); #ifdef WITH_XC_TOUCHID // unable to unlock database, reset TouchID for the current database TouchID::getInstance().reset(m_filename); #endif } }
void DownloadOptionsDialog::emitDialogFinished(int status) { if (status != 0) { if (ui->radioOpen->isChecked()) { status = 1; } else if (ui->radioSave->isChecked()) { status = 2; } else if (ui->radioExternal->isChecked()) { status = 3; } } m_signalEmited = true; emit dialogFinished(status); }
//BEGIN class KConstantEditor KConstantEditor::KConstantEditor( QWidget * parent ) : KDialog( parent ) { m_widget = new ConstantsEditorWidget( this ); m_widget->layout()->setMargin( 0 ); setMainWidget( m_widget ); setButtons( Close ); m_widget->cmdNew->setIcon( QIcon::fromTheme("document-new") ); m_widget->cmdDelete->setIcon( QIcon::fromTheme("edit-delete") ); setCaption( i18n("Constants Editor") ); connect( this, SIGNAL(finished()), this, SLOT(dialogFinished()) ); m_constantValidator = new ConstantValidator( this ); m_widget->nameEdit->setValidator( m_constantValidator ); updateConstantsList(); connect( m_widget->nameEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( constantNameEdited( const QString & ) ) ); connect( m_widget->valueEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( saveCurrentConstant() ) ); connect( m_widget->nameEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( checkValueValid() ) ); connect( m_widget->valueEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( checkValueValid() ) ); connect( m_widget->cmdNew, SIGNAL( clicked() ), this, SLOT( cmdNew_clicked() ) ); connect( m_widget->cmdDelete, SIGNAL( clicked() ), this, SLOT( cmdDelete_clicked() ) ); connect( m_widget->constantList, SIGNAL(currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * )), this, SLOT(selectedConstantChanged( QTreeWidgetItem * )) ); connect( m_widget->constantList, SIGNAL(itemClicked( QTreeWidgetItem *, int )), this, SLOT(itemClicked()) ); connect( XParser::self()->constants(), SIGNAL(constantsChanged()), this, SLOT(updateConstantsList()) ); checkValueValid(); }