WBSDefinitionDialog::WBSDefinitionDialog(Project &project, WBSDefinition &def, QWidget *p) : KoDialog(p) { setCaption( i18n("WBS Definition") ); setButtons( Ok|Cancel ); setDefaultButton( Ok ); showButtonSeparator( true ); m_panel = new WBSDefinitionPanel(project, def, this); setMainWidget(m_panel); enableButtonOk(false); connect(m_panel, SIGNAL(changed(bool)), SLOT(enableButtonOk(bool))); connect(this, SIGNAL(okClicked()), SLOT(slotOk())); }
ChannelDialog::ChannelDialog(const QString& title, QWidget *parent) : KDialog(parent) { setCaption(title); setButtons(Ok|Cancel); m_mainWidget = new Ui::ChannelDialogUI(); m_mainWidget->setupUi(mainWidget()); m_mainWidget->m_channelEdit->setFocus(); connect(this,SIGNAL(okClicked()),this,SLOT(slotOk())); connect(m_mainWidget->m_channelEdit, SIGNAL(textChanged(QString)),this,SLOT(slotServerNameChanged(QString)) ); slotServerNameChanged( m_mainWidget->m_channelEdit->text() ); }
void KstSettingsDlgI::configureSource() { KstDataSourceConfigWidget *cw = KstDataSource::configWidgetForPlugin(_source->currentText()); if (!cw) { return; } KDialogBase *dlg = new KDialogBase(this, "Data Config Dialog", true, i18n("Configure Data Source")); connect(dlg, SIGNAL(okClicked()), cw, SLOT(save())); cw->reparent(dlg, QPoint(0, 0)); dlg->setMainWidget(cw); cw->load(); dlg->exec(); delete dlg; }
void LevelWinDialog::subcontrolClicked(int id) { switch (id) { case ID_OK: emit okClicked(); close(); break; case ID_CANCEL: emit cancelClicked(); close(); break; } }
ConnectionEditor::ConnectionEditor(QWidget* parent, QObject* sndr, QObject* rcvr, FormWindow* fw) : ConnectionEditorBase(parent, 0, true), m_formWindow(fw) { if (!rcvr || rcvr == m_formWindow) rcvr = m_formWindow->mainContainer(); if (!sndr || sndr == m_formWindow) sndr = m_formWindow->mainContainer(); m_sender = sndr; m_receiver = rcvr; /* Create widget list */ QStringList lst; lst << m_formWindow->name(); for (QPtrDictIterator<QWidget> it(*m_formWindow->widgets()); it.current(); ++it) { if (it.current()->isVisibleTo(this) && !it.current()->inherits("QLayoutWidget") && !it.current()->inherits("Spacer") && qstrcmp(it.current()->name(), "central widget") && !m_formWindow->isMainContainer(it.current()) && !lst.contains(it.current()->name())) lst << it.current()->name(); } // Fill receiver combos with widget list // fillWidgetList(comboReceiver, lst, m_receiver->name()); // Fill receiver combos with widget and action list for (QPtrListIterator<QAction> it(m_formWindow->actionList()); it.current(); ++it) lst << it.current()->name(); lst.sort(); fillWidgetList(comboReceiver, lst, m_receiver->name()); fillWidgetList(comboSender, lst, m_sender->name()); senderChanged(m_sender->name()); fillConnectionsList(); updateConnectButton(); updateDisconnectButton(); // Connections connect(comboSender, SIGNAL(activated(const QString&)), SLOT(senderChanged(const QString&))); connect(comboReceiver, SIGNAL(activated(const QString&)), SLOT(receiverChanged(const QString&))); connect(signalBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton())); connect(slotBox, SIGNAL(selectionChanged()), SLOT(updateConnectButton())); connect(connectButton, SIGNAL(clicked()), SLOT(connectClicked())); connect(disconnectButton, SIGNAL(clicked()), SLOT(disconnectClicked())); connect(okButton, SIGNAL(clicked()), SLOT(okClicked())); connect(cancelButton, SIGNAL(clicked()), SLOT(cancelClicked())); connect(signalBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked())); connect(slotBox, SIGNAL(doubleClicked(QListBoxItem*)), SLOT(connectClicked())); }
void SongDialog::initControls() { this->resize(800,600); QVBoxLayout *layout = new QVBoxLayout(this); this->setWindowTitle(tr("Song")); textEdit=new QTextEdit(); layout->addWidget(textEdit); QPushButton* okButton=new QPushButton(tr("OK")); layout->addWidget(okButton); connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); }
DropValuesDialog::DropValuesDialog(Spreadsheet* s, bool mask, QWidget* parent, Qt::WFlags fl) : KDialog(parent, fl), m_spreadsheet(s), m_mask(mask) { setWindowTitle(i18n("Drop values")); QFrame* mainWidget = new QFrame(this); ui.setupUi(mainWidget); setMainWidget( mainWidget ); ui.cbOperator->addItem(i18n("equal to")); ui.cbOperator->addItem(i18n("between (including end points)")); ui.cbOperator->addItem(i18n("between (excluding end points)")); ui.cbOperator->addItem(i18n("greater then")); ui.cbOperator->addItem(i18n("greater then or equal to")); ui.cbOperator->addItem(i18n("lesser then")); ui.cbOperator->addItem(i18n("lesser then or equal to")); ui.leValue1->setValidator( new QDoubleValidator(ui.leValue1) ); ui.leValue2->setValidator( new QDoubleValidator(ui.leValue2) ); setButtons( KDialog::Ok | KDialog::Cancel ); if (m_mask) { setButtonText(KDialog::Ok, i18n("&Mask")); setButtonToolTip(KDialog::Ok, i18n("Mask values in the specified region")); ui.lMode->setText(i18n("Mask values")); setWindowTitle(i18n("Mask values")); } else { setButtonText(KDialog::Ok, i18n("&Drop")); setButtonToolTip(KDialog::Ok, i18n("Drop values in the specified region")); } connect( ui.cbOperator, SIGNAL(currentIndexChanged(int)), this, SLOT(operatorChanged(int)) ); connect(this, SIGNAL(okClicked()), this, SLOT(okClicked())); resize( QSize(400,0).expandedTo(minimumSize()) ); operatorChanged(0); }
EditNamedAreaDialog::EditNamedAreaDialog(QWidget* parent, Selection* selection) : KDialog(parent) , m_selection(selection) { setButtons(Ok | Cancel); setModal(true); setObjectName("EditNamedAreaDialog"); enableButtonOk(false); QWidget *page = new QWidget(); setMainWidget(page); QGridLayout * gridLayout = new QGridLayout(page); gridLayout->setMargin(KDialog::marginHint()); gridLayout->setSpacing(KDialog::spacingHint()); QLabel * textLabel4 = new QLabel(page); textLabel4->setText(i18n("Cells:")); gridLayout->addWidget(textLabel4, 2, 0); m_cellRange = new KLineEdit(page); gridLayout->addWidget(m_cellRange, 2, 1); QLabel * textLabel1 = new QLabel(page); textLabel1->setText(i18n("Sheet:")); gridLayout->addWidget(textLabel1, 1, 0); m_sheets = new KComboBox(page); gridLayout->addWidget(m_sheets, 1, 1); QLabel * textLabel2 = new QLabel(page); textLabel2->setText(i18n("Area name:")); gridLayout->addWidget(textLabel2, 0, 0); m_areaNameEdit = new KLineEdit(page); gridLayout->addWidget(m_areaNameEdit, 0, 1); const QList<KCSheet*> sheetList = m_selection->activeSheet()->map()->sheetList(); for (int i = 0; i < sheetList.count(); ++i) { KCSheet* sheet = sheetList.at(i); if (!sheet) continue; m_sheets->insertItem(i, sheet->sheetName()); } connect(this, SIGNAL(okClicked()), this, SLOT(slotOk())); connect(m_areaNameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotAreaNameModified(const QString&))); }
// Constructor for the settings dialogue box SettingsDialogue::SettingsDialogue(GLEMainWindow *parent) : QDialog(parent) { mainWin = parent; // Create a new tab widget and add tabs for the various // categories of setting appTab = new ApplicationTab(this); servTab = new ServerTab(this); drawTab = new DrawingTab(this); toolTab = new ToolTab(this, parent); tabWidget = new QTabWidget; tabWidget->addTab(toolTab, tr("Tools")); tabWidget->addTab(appTab, tr("Application")); tabWidget->addTab(drawTab, tr("Drawing")); tabWidget->addTab(servTab, tr("Server")); // Add ok and cancel button QPushButton *okButton = new QPushButton(tr("OK")); QPushButton *cancelButton = new QPushButton(tr("Cancel")); okButton->setDefault(true); // Connect to slots: we need to handle what happens on accept // and reject connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); // Layout the buttons QHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->addStretch(1); buttonLayout->addWidget(okButton); buttonLayout->addWidget(cancelButton); // Layout the dialogue box as a whole QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(tabWidget); mainLayout->addLayout(buttonLayout); setLayout(mainLayout); initApplicationTab(); initServerTab(); initDrawingTab(); initToolTab(); resize(mainWin->width()/2, mainWin->height()/2); // Set the window title setWindowTitle(tr("%1 Settings").arg(APP_NAME)); }
GrepDialog::GrepDialog( GrepViewPlugin * plugin, QWidget *parent ) : KDialog(parent), Ui::GrepWidget(), m_plugin( plugin ) { setAttribute(Qt::WA_DeleteOnClose); setButtons( KDialog::Ok | KDialog::Cancel ); setButtonText( KDialog::Ok, i18n("Search") ); setCaption( i18n("Find In Files") ); setDefaultButton( KDialog::Ok ); setupUi(mainWidget()); KConfigGroup cg = KGlobal::config()->group( "GrepDialog" ); patternCombo->addItem( "" ); patternCombo->addItems( cg.readEntry("LastSearchItems", QStringList()) ); patternCombo->setInsertPolicy(QComboBox::InsertAtTop); templateEdit->setText(template_str[0]); templateTypeCombo->addItems(template_desc); regexCheck->setChecked(cg.readEntry("regexp", false )); caseSensitiveCheck->setChecked(cg.readEntry("case_sens", true)); directoryRequester->setUrl( KUrl( QDir::homePath() ) ); directoryRequester->fileDialog()->setUrl( KUrl( QDir::homePath() ) ); directoryRequester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); syncButton->setIcon(KIcon("dirsync")); recursiveCheck->setChecked(cg.readEntry("recursive", true)); limitToProjectCheck->setChecked(cg.readEntry("search_project_files", true)); filesCombo->addItems(cg.readEntry("file_patterns", filepatterns)); excludeCombo->addItems(cg.readEntry("exclude_patterns", excludepatterns) ); suppressErrorsCheck->setChecked(cg.readEntry("no_find_errs", true)); connect(this, SIGNAL(okClicked()), this, SLOT(search())); connect(syncButton, SIGNAL(clicked()), this, SLOT(syncButtonClicked())); connect(templateTypeCombo, SIGNAL(activated(int)), this, SLOT(templateTypeComboActivated(int))); connect(patternCombo, SIGNAL(editTextChanged(const QString&)), this, SLOT(patternComboEditTextChanged( const QString& ))); patternComboEditTextChanged( patternCombo->currentText() ); patternCombo->setFocus(); }
void WicdApplet::createConfigurationInterface(KConfigDialog *parent) { QWidget *widget = new QWidget(parent); ui.setupUi(widget); parent->addPage(widget, i18n("General"), Applet::icon()); connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted())); connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted())); ui.displayqualityBox->setChecked(m_showSignalStrength ? Qt::Checked : Qt::Unchecked); ui.autoscanBox->setChecked(m_autoScan ? Qt::Checked : Qt::Unchecked); ui.plotterBox->setChecked(m_showPlotter ? Qt::Checked : Qt::Unchecked); connect(ui.displayqualityBox, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.autoscanBox, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); connect(ui.plotterBox, SIGNAL(stateChanged(int)), parent, SLOT(settingsModified())); }
void KstVectorDialogI::configureSource() { bool isNew = false; KST::dataSourceList.lock().readLock(); KstDataSourcePtr ds = *KST::dataSourceList.findReusableFileName(_w->FileName->url().url()); KST::dataSourceList.lock().unlock(); if (!ds) { isNew = true; ds = KstDataSource::loadSource(_w->FileName->url().url()); if (!ds || !ds->isValid()) { _w->_configure->setEnabled(false); return; } } assert(_configWidget); KDialog *dlg = new KDialog(this); dlg->setObjectName("Data Config Dialog"); dlg->setModal(true); dlg->setCaption(i18n("Configure Data Source")); if (isNew) { connect(dlg, SIGNAL(okClicked()), _configWidget, SLOT(save())); connect(dlg, SIGNAL(applyClicked()), _configWidget, SLOT(save())); } else { connect(dlg, SIGNAL(okClicked()), this, SLOT(markSourceAndSave())); connect(dlg, SIGNAL(applyClicked()), this, SLOT(markSourceAndSave())); } _configWidget->setParent(dlg); dlg->setMainWidget(_configWidget); _configWidget->setInstance(ds); _configWidget->load(); dlg->exec(); _configWidget->setParent(0L); dlg->setMainWidget(0L); delete dlg; updateCompletion(); // could be smarter by only running if Ok/Apply clicked }
void Role::makeConnection() { connect(logic->getClient(),SIGNAL(getMessage(QString)),this,SLOT(decipher(QString))); connect(this,SIGNAL(sendCommand(QString)),logic->getClient(),SLOT(sendMessage(QString))); connect(decisionArea,SIGNAL(okClicked()),this,SLOT(onOkClicked())); connect(decisionArea,SIGNAL(cancelClicked()),this,SLOT(onCancelClicked())); connect(decisionArea,SIGNAL(exchangeClicked()),this,SLOT(exchangeCards())); connect(decisionArea,SIGNAL(resignClicked()),this,SLOT(resign())); connect(buttonArea->getButtons().at(0),SIGNAL(buttonSelected(int)),this,SLOT(buy())); connect(buttonArea->getButtons().at(1),SIGNAL(buttonSelected(int)),this,SLOT(synthetize())); connect(buttonArea->getButtons().at(2),SIGNAL(buttonSelected(int)),this,SLOT(extract())); connect(buttonArea,SIGNAL(buttonUnselected()),this,SLOT(onCancelClicked())); connect(handArea,SIGNAL(cardReady()),this,SLOT(cardAnalyse())); connect(playerArea,SIGNAL(playerReady()),this,SLOT(playerAnalyse())); }
void KstChangeFileDialog::configureSource() { bool isNew = false; KST::dataSourceList.lock().readLock(); KstDataSourcePtr ds = *KST::dataSourceList.findReusableFileName(_file); KST::dataSourceList.lock().unlock(); if (!ds) { isNew = true; ds = KstDataSource::loadSource(_file); if (!ds || !ds->isValid()) { _configureSource->setEnabled(false); return; } } if (_configWidget) { KDialogBase *dlg = new KDialogBase(this, "Data Config Dialog", true, tr("Configure Data Source")); if (isNew) { connect(dlg, SIGNAL(okClicked()), _configWidget, SLOT(save())); connect(dlg, SIGNAL(applyClicked()), _configWidget, SLOT(save())); } else { connect(dlg, SIGNAL(okClicked()), this, SLOT(markSourceAndSave())); connect(dlg, SIGNAL(applyClicked()), this, SLOT(markSourceAndSave())); } _configWidget->reparent(dlg, QPoint(0, 0)); dlg->setMainWidget(_configWidget); static_cast<KstDataSourceConfigWidget*>((QWidget*)_configWidget)->setInstance(ds); static_cast<KstDataSourceConfigWidget*>((QWidget*)_configWidget)->load(); dlg->exec(); _configWidget->reparent(0L, QPoint(0, 0)); dlg->setMainWidget(0L); delete dlg; sourceChanged(_dataFile->url()); } }
EditRecordDlg::EditRecordDlg(QWidget *parent) : QDialog(parent){ setWindowTitle(tr("Edit a record")); idLabel = new QLabel(tr("ID:")); idEdit = new QLineEdit; idEdit->setText(edit_id); idEdit->setEnabled(true); nameLabel = new QLabel(tr("name:")); nameEdit = new QLineEdit; nameEdit->setText(edit_name); nameEdit->setEnabled(true); producerLabel = new QLabel(tr("producer:")); producerEdit = new QLineEdit; producerEdit->setText(edit_producer); producerEdit->setEnabled(true); priceLabel = new QLabel(tr("price:")); priceEdit = new QLineEdit; char s[10];memset(s,0,10); sprintf(s,"%d",edit_price); priceEdit->setText(s); priceEdit->setEnabled(true); okButton = new QPushButton(tr("OK")); cancleButton = new QPushButton(tr("Cancle")); connect(okButton,SIGNAL(clicked()),this,SLOT(okClicked())); connect(cancleButton,SIGNAL(clicked()),this,SLOT(cancleClicked())); QGridLayout *left = new QGridLayout; left->addWidget(idLabel,0,0); left->addWidget(idEdit,0,1); left->addWidget(nameLabel,1,0); left->addWidget(nameEdit,1,1); left->addWidget(producerLabel,2,0); left->addWidget(producerEdit,2,1); left->addWidget(priceLabel,3,0); left->addWidget(priceEdit,3,1); QVBoxLayout *right = new QVBoxLayout; right->addWidget(okButton); right->addWidget(cancleButton); QHBoxLayout *mainlayout = new QHBoxLayout(this); mainlayout->addLayout(left); mainlayout->addLayout(right); }
EdgedetectDialog::EdgedetectDialog(cv::Mat& img, QWidget *parent) : QDialog(parent) { img.copyTo(image); pimage = &img; if (pimage->channels()==3) { cvtColor(*pimage, gray_image, CV_RGB2GRAY); } else { pimage->copyTo(gray_image); } log_ksize = 3; log_scale = 1; log_delta = 0; log_thr = 0; canny_ksize = 3; canny_lthr = 50; canny_hthr = 100; int max_lthr = pimage->cols + pimage->rows; int max_hthr = pimage->cols + pimage->rows; tabWidget = new QTabWidget(); tabWidget->addTab(new LOGDialog(1, 2, 0,this),"LOG"); tabWidget->addTab(new CannyDialog(1,50,200,max_lthr,max_hthr,this),"Canny"); okButton = new QPushButton("&OK"); okButton->setDefault(true); okButton->setEnabled(true); connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); closeButton = new QPushButton(tr("&Close")); connect(closeButton, SIGNAL(clicked()), this, SLOT(closeEdgedetect())); QVBoxLayout *top_layout = new QVBoxLayout(); top_layout->addWidget(tabWidget); QHBoxLayout *btm_layout = new QHBoxLayout(); btm_layout->addWidget(okButton); btm_layout->addWidget(closeButton); QVBoxLayout *layout = new QVBoxLayout(); layout->addLayout(top_layout); layout->addLayout(btm_layout); this->setLayout(layout); this->setWindowTitle(tr("Edge Detect")); this->setFixedHeight(sizeHint().height()); }
/* * Constructs a MultiLineEditorBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * */ MultiLineEditorBase::MultiLineEditorBase( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { (void)statusBar(); if ( !name ) setName( "MultiLineEditorBase" ); setCentralWidget( new QWidget( this, "qt_central_widget" ) ); MultiLineEditorBaseLayout = new QHBoxLayout( centralWidget(), 11, 6, "MultiLineEditorBaseLayout"); Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4"); Layout3 = new QVBoxLayout( 0, 0, 6, "Layout3"); OkButton = new QPushButton( centralWidget(), "OkButton" ); OkButton->setOn( FALSE ); OkButton->setAutoDefault( TRUE ); OkButton->setDefault( TRUE ); Layout3->addWidget( OkButton ); applyButton = new QPushButton( centralWidget(), "applyButton" ); Layout3->addWidget( applyButton ); cancelButton = new QPushButton( centralWidget(), "cancelButton" ); Layout3->addWidget( cancelButton ); Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); Layout3->addItem( Spacer3 ); helpButton = new QPushButton( centralWidget(), "helpButton" ); Layout3->addWidget( helpButton ); Layout4->addLayout( Layout3 ); MultiLineEditorBaseLayout->addLayout( Layout4 ); // toolbars // menubar menuBar = new QMenuBar( this, "menuBar" ); languageChange(); resize( QSize(598, 307).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( OkButton, SIGNAL( clicked() ), this, SLOT( okClicked() ) ); connect( applyButton, SIGNAL( clicked() ), this, SLOT( applyClicked() ) ); connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelClicked() ) ); }
PageItemAttributes::PageItemAttributes( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog(parent, fl) { setupUi(this); setModal(modal); relationships << tr("None", "relationship") << tr("Relates To") << tr("Is Parent Of") << tr("Is Child Of"); relationshipsData << "none" << "relation" << "parent" << "child"; connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); connect(attributesTable, SIGNAL(cellChanged(int,int)), this, SLOT(tableItemChanged(int,int))); connect(addButton, SIGNAL(clicked()), this, SLOT(addEntry())); connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteEntry())); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearEntries())); connect(copyButton, SIGNAL(clicked()), this, SLOT(copyEntry())); }
AddNewMenu::AddNewMenu(QWidget *parent) : QDialog(parent), ui(new Ui::AddNewMenu) { ui->setupUi(this); QRegExp regExp("[0-9]{1,14}([.][0-9]{0,4})?"); ui->unitPrice->setValidator(new QRegExpValidator(regExp, this)); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(okClicked())); connect(ui->imagesButton, SIGNAL(clicked()), this, SLOT(selectImages())); connect(ui->mainImageButton, SIGNAL(clicked()), this, SLOT(selectMainImage())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(close())); connect(ui->name, SIGNAL(textChanged(QString)), this, SLOT(enableOkButton())); connect(ui->unitPrice, SIGNAL(textChanged(QString)), this, SLOT(enableOkButton())); ui->name->setFocus(); ui->okButton->setEnabled(false); }
LinkList::LinkList( QWidget *parent ) : QWidget( parent ) { setupUi( this ); linkEditor = new LinkEditor(); connect( okButton, SIGNAL( clicked( bool ) ), this, SLOT( hide() ) ); connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddButtonClicked() ) ); connect( removeButton, SIGNAL( clicked( bool ) ), this, SLOT( onRemoveButtonClicked() ) ); connect( editButton, SIGNAL( clicked( bool ) ), this, SLOT( onEditButtonClicked() ) ); connect( linkTree, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( onItemDblClicked( QTreeWidgetItem* ) ) ); connect( linkEditor, SIGNAL( okClicked() ), this, SLOT( onEditorFinished() ) ); }
buttonBox::buttonBox(QWidget *parent) : QWidget(parent) { QDialogButtonBox *box = new QDialogButtonBox(Qt::Horizontal); button = new QPushButton("Ok"); // the following two are both ok //connect(button, SIGNAL(clicked()), this, SLOT(okClicked())); connect(box, SIGNAL(accepted()), this, SLOT(okClicked())); box->addButton(button, QDialogButtonBox::AcceptRole); QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(box); }
VisibilityConditionsDialog::VisibilityConditionsDialog(QMap<QString, PropertyInfo> const &properties , QList<Item *> const &items, QWidget *parent) : QDialog(parent) , ui(new Ui::VisibilityConditionsDialog) , mProperties(properties), mItems(items) { ui->setupUi(this); ui->propertyComboBox->addItem(QString()); ui->propertyComboBox->addItems(properties.keys()); setWidgetValues(); connect(ui->propertyComboBox, SIGNAL(activated(QString const &)), this, SLOT(changeProperty(QString const &))); connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(okClicked())); }
KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const QString& title, QWidget* parent, bool modal) : KPageDialog(parent), d( new KGameDialogPrivate ) { setCaption(title); setButtons(Ok|Default|Apply|Cancel); setDefaultButton(Ok); setFaceType(KPageDialog::Tabbed); setModal(modal); init(g, owner); connect(this,SIGNAL(okClicked()),this,SLOT(slotOk())); connect(this,SIGNAL(defaultClicked()),this,SLOT(slotDefault())); connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply())); }
ObjectNodeDialog::ObjectNodeDialog( UMLView * pView, ObjectNodeWidget * pWidget ) : KPageDialog(pView) { setCaption( i18n("Properties") ); setButtons( Ok | Apply | Cancel | Help ); setDefaultButton( Ok ); setModal( true ); setFaceType( KPageDialog::List ); showButtonSeparator( true ); m_pView = pView; m_pObjectNodeWidget = pWidget; m_bChangesMade = false; setupPages(); connect(this,SIGNAL(okClicked()),this,SLOT(slotOk())); connect(this,SIGNAL(applyClicked()),this,SLOT(slotApply())); }
NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *settings, TQWidget* parent, const char* name ) : KDialogBase( parent, name, false, i18n( "Medium Detected" ), Ok|Cancel|User1, Ok, true), m_medium(medium), m_settings( settings ) { setCaption( TDEIO::decodeFileName(m_medium.name()) ); clearWState( WState_Polished ); TQWidget *page = new TQWidget( this ); setMainWidget(page); TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); m_view = new NotificationDialogView( page ); topLayout->addWidget(m_view); m_view->iconLabel->setPixmap( m_medium.pixmap(64) ); m_view->mimetypeLabel->setText( i18n( "<b>Medium type:</b>" ) + " " + m_medium.mimeTypePtr()->comment() ); updateActionsListBox(); resize( TQSize(400,400).expandedTo( minimumSizeHint() ) ); m_actionWatcher = new KDirWatch(); TQString services_dir = locateLocal( "data", "konqueror/servicemenus", true ); m_actionWatcher->addDir( services_dir ); setButtonText( User1, i18n("Configure...") ); connect( m_actionWatcher, TQT_SIGNAL( dirty( const TQString & ) ), this, TQT_SLOT( slotActionsChanged( const TQString & ) ) ); connect( this , TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) ); connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotConfigure() ) ); connect( m_view->actionsList, TQT_SIGNAL( doubleClicked ( TQListBoxItem*, const TQPoint & ) ), this, TQT_SLOT( slotOk() ) ); connect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( delayedDestruct() ) ); m_actionWatcher->startScan(); TQPushButton * btn = actionButton( Ok ); btn->setFocus(); }
/*! \brief Init the widget */ void ColorSetDlg::createColorSetDlg() { QGroupBox *groupBox1 = new QGroupBox(tr("Background Color"), this); QLabel *backColorLbl = new QLabel(tr("Background Color"), groupBox1); backColorBtn = new QPushButton(groupBox1); backColorBtn->setFlat(true); backColorBtn->setAutoFillBackground(true); QPalette pa; pa.setColor(QPalette::Button, ResManager::backColor); backColorBtn->setPalette(pa); QGroupBox *groupBox2 = new QGroupBox(tr("Vessel Color Mode"), this); btnGroup = new QButtonGroup(this); btnGroup->setExclusive(true); QCheckBox *chkBox1 = new QCheckBox(tr("Vessel Type"), groupBox2); QCheckBox *chkBox2 = new QCheckBox(tr("Monochrome"), groupBox2); QCheckBox *chkBox3 = new QCheckBox(tr("Highlight Typical Pathway"), groupBox2); QCheckBox *chkBox4 = new QCheckBox(tr("Parameter Distribution"), groupBox2); btnGroup->addButton(chkBox1, 0); btnGroup->addButton(chkBox2, 1); btnGroup->addButton(chkBox3, 2); btnGroup->addButton(chkBox4, 3); btnGroup->button(ResManager::vesColorMode)->setChecked(true); colorDlg = new QColorDialog(this); connect(backColorBtn, SIGNAL(clicked()), colorDlg, SLOT(exec())); connect(colorDlg, SIGNAL(colorSelected(const QColor &)), this, SLOT(setBackColor(const QColor &))); okButton = new QPushButton(tr("OK"), this); cancelButton = new QPushButton(tr("Cancel"), this); connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); QHBoxLayout *grp1Layout = new QHBoxLayout(groupBox1); grp1Layout->addWidget(backColorLbl); grp1Layout->addWidget(backColorBtn); QVBoxLayout *grp2Layout = new QVBoxLayout(groupBox2); grp2Layout->addWidget(chkBox1); grp2Layout->addWidget(chkBox2); grp2Layout->addWidget(chkBox3); grp2Layout->addWidget(chkBox4); QGridLayout *mainLayout = new QGridLayout(this); mainLayout->addWidget(groupBox1,0,0,2,2); mainLayout->addWidget(groupBox2,2,0,4,2); mainLayout->addWidget(okButton,6,0,1,1); mainLayout->addWidget(cancelButton,6,1,1,1); }
MainProjectDialog::MainProjectDialog(Project &p, QWidget *parent, const char */*name*/) : KoDialog( parent), project(p) { setWindowTitle( i18n("Project Settings") ); setButtons( Ok|Cancel ); setDefaultButton( Ok ); showButtonSeparator( true ); panel = new MainProjectPanel(project, this); setMainWidget(panel); enableButtonOk(false); resize( QSize(500, 410).expandedTo(minimumSizeHint())); connect(this, SIGNAL(okClicked()), SLOT(slotOk())); connect(panel, SIGNAL(obligatedFieldsFilled(bool)), SLOT(enableButtonOk(bool))); }
MasterPasswordDialog::MasterPasswordDialog(QWidget *parent) : QDialog(parent) , ui(new Ui::MasterPasswordDialog) , d_ptr(new MasterPasswordDialogPrivate) { ui->setupUi(this); setWindowIcon(QIcon(":/images/ctSESAM.ico")); ui->infoLabel->setStyleSheet("font-weight: bold"); setWindowTitle(QString("%1 %2").arg(AppName).arg(isPortable() ? " - PORTABLE" : "")); QObject::connect(ui->okPushButton, SIGNAL(pressed()), SLOT(okClicked())); QObject::connect(ui->passwordLineEdit, SIGNAL(textEdited(QString)), SLOT(checkPasswords())); QObject::connect(ui->repeatPasswordLineEdit, SIGNAL(textEdited(QString)), SLOT(checkPasswords())); setRepeatPassword(false); invalidatePassword(); checkPasswords(); resize(width(), 1); }
void GroupWisePrivacyDialog::slotAddClicked() { if ( !m_searchDlg ) { m_searchDlg = new KDialog( this); m_searchDlg->setCaption(i18n( "Search for Contact to Block" )); m_searchDlg->setButtons(KDialog::Ok|KDialog::Cancel ); m_searchDlg->setDefaultButton(KDialog::Ok); m_searchDlg->setModal(false); m_search = new GroupWiseContactSearch( m_account, QAbstractItemView::ExtendedSelection, false, m_searchDlg ); m_searchDlg->setMainWidget( m_search ); QObject::connect( m_searchDlg, SIGNAL(okClicked()), SLOT(slotSearchedForUsers()) ); QObject::connect( m_search, SIGNAL(selectionValidates(bool)), m_searchDlg, SLOT(enableButtonOk(bool)) ); m_searchDlg->enableButtonOk( false ); } m_searchDlg->show(); }
KMMsgPartDialogCompat::KMMsgPartDialogCompat( const char *, bool readOnly) : KMMsgPartDialog(), mMsgPart( 0 ) { setShownEncodings( SevenBit|EightBit|QuotedPrintable|Base64 ); if (readOnly) { mMimeType->setEditable(false); mMimeType->setEnabled(false); mFileName->setReadOnly(true); mDescription->setReadOnly(true); mEncoding->setEnabled(false); mInline->setEnabled(false); mEncrypted->setEnabled(false); mSigned->setEnabled(false); } connect(this,SIGNAL(okClicked()),SLOT(slotOk())); }