Exemplo n.º 1
0
void preferencesWidget::setPage(QListWidgetItem *argItem, QListWidgetItem *oldItem) {

	disconnect(SIGNAL(applyClicked())) ;
	disconnect(SIGNAL(resetClicked())) ;

	if(((configWidget*)oldItem->data(Qt::UserRole).value<QWidget*>())->wantsHelp()) {
		disconnect(SIGNAL(helpClicked())) ;
	}

	oldItem->data(Qt::UserRole).value<QWidget*>()->hide() ;


	if(((configWidget*)argItem->data(Qt::UserRole).value<QWidget*>())->wantsHelp()) {
		connect(this,SIGNAL(helpClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(helpClicked())) ;
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(FALSE) ;
	} else {
		buttonBox->button(QDialogButtonBox::Help)->setDisabled(TRUE) ;
	}

	if(((configWidget*)argItem->data(Qt::UserRole).value<QWidget*>())->wantsApplyDiscard()) {
		connect(this,SIGNAL(applyClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(applyClicked())) ;
		connect(this,SIGNAL(resetClicked()),argItem->data(Qt::UserRole).value<QWidget*>(),SLOT(resetClicked())) ;
		buttonBox->button(QDialogButtonBox::Apply)->setDisabled(FALSE) ;
		buttonBox->button(QDialogButtonBox::Discard)->setDisabled(FALSE) ;
	} else {
		buttonBox->button(QDialogButtonBox::Apply)->setDisabled(TRUE) ;
		buttonBox->button(QDialogButtonBox::Discard)->setDisabled(TRUE) ;
	}

	argItem->data(Qt::UserRole).value<QWidget*>()->show() ;

}
Exemplo n.º 2
0
// constructor used when the query builder must make its own
// connection to the database
SaQueryBuilder::SaQueryBuilder( QgsVectorLayer *layer,
                                QWidget *parent, Qt::WFlags fl )
    : QDialog( parent, fl ), mLayer( layer )
{
  setupUi( this );
  connect( buttonBox, SIGNAL( helpRequested() ), this, SLOT( helpClicked() ) );

  QPushButton *pbn = new QPushButton( tr( "&Test" ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( test() ) );

  pbn = new QPushButton( tr( "&Clear" ) );
  buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
  connect( pbn, SIGNAL( clicked() ), this, SLOT( clear() ) );

  // remove the ILIKE button since ILIKE is a PostgreSQL special
  // not supported by SQL Anywhere
  btnILike->setVisible( false );

  setupGuiViews();

  mOrigSubsetString = layer->subsetString();

  lblDataUri->setText( layer->publicSource() );
  txtSQL->setText( mOrigSubsetString );

  populateFields();
}
Exemplo n.º 3
0
AddCatDialog::AddCatDialog( KStars *_ks )
        : KDialog( ( QWidget* )_ks ),  ks( _ks )
{
    QDir::setCurrent( QDir::homePath() );
    acd = new AddCatDialogUI(this);
    setMainWidget(acd);
    setCaption( i18n( "Import Catalog" ) );
    setButtons( KDialog::Help|KDialog::Ok|KDialog::Cancel );

    connect( acd->DataURL->lineEdit(), SIGNAL( lostFocus() ), this, SLOT( slotShowDataFile() ) );
    connect( acd->DataURL, SIGNAL( urlSelected( const KUrl & ) ),
             this, SLOT( slotShowDataFile() ) );
    connect( acd->PreviewButton, SIGNAL( clicked() ), this, SLOT( slotPreviewCatalog() ) );
    connect( this, SIGNAL( okClicked() ), this, SLOT( slotCreateCatalog() ) );
//    connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
    connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
    connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));

    acd->FieldList->addItem( i18n( "ID Number" ) );
    acd->FieldList->addItem( i18n( "Right Ascension" ) );
    acd->FieldList->addItem( i18n( "Declination" ) );
    acd->FieldList->addItem( i18n( "Object Type" ) );

    acd->FieldPool->addItem( i18n( "Common Name" ) );
    acd->FieldPool->addItem( i18n( "Magnitude" ) );
    acd->FieldPool->addItem( i18n( "Flux" ) );
    acd->FieldPool->addItem( i18n( "Major Axis" ) );
    acd->FieldPool->addItem( i18n( "Minor Axis" ) );
    acd->FieldPool->addItem( i18n( "Position Angle" ) );
    acd->FieldPool->addItem( i18n( "Ignore" ) );
}
Exemplo n.º 4
0
KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets ) : KPageDialog( 0 )
{
	setFaceType( KPageDialog::List );
	setWindowTitle( i18n( "Preferences" ) );
	setButtons( Help|Default|Ok|Apply|Cancel );
	setDefaultButton( Ok );
	setModal( true );
	showButtonSeparator( true );

	// ok i need some stuff in that pref dlg...
	//setIconListAllVisible(true);

	m_viewPage = new ViewPage();
	KPageWidgetItem *item = addPage( m_viewPage, i18n( "View" ) );
	item->setIcon( KIcon( "preferences-desktop-theme" ) );
	item->setHeader( i18n( "View Settings" ) );
	m_viewPage->setSettings( viewSets );

	m_diffPage = new DiffPage();
	item = addPage( m_diffPage, i18n( "Diff" ) );
	item->setIcon( KIcon( "text-x-patch" ) );
	item->setHeader( i18n( "Diff Settings" ) );
	m_diffPage->setSettings( diffSets );

//	frame = addVBoxPage( i18n( "" ), i18n( "" ), UserIcon( "" ) );

	connect( this, SIGNAL(defaultClicked()), SLOT(slotDefault()) );
	connect( this, SIGNAL(helpClicked()), SLOT(slotHelp()) );
	connect( this, SIGNAL(applyClicked()), SLOT(slotApply()) );
	connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
	connect( this, SIGNAL(cancelClicked()), SLOT(slotCancel()) );

	adjustSize();
}
void RemoveRedEyesWindow::slotButtonClicked(int button)
{
    emit buttonClicked(static_cast<KDialog::ButtonCode> (button));

    switch (button)
    {
        case User2:                 // testrun
            emit user2Clicked();
            break;
        case User1:                 // correction
            emit user1Clicked();
            break;
        case Cancel:
            emit cancelClicked();
            break;
        case Close:
            emit myCloseClicked();
            break;
        case Help:
            emit helpClicked();
            break;
        case Default:
            emit defaultClicked();
            break;
    }
}
Exemplo n.º 6
0
KGncPriceSourceDlg::KGncPriceSourceDlg(const QString &stockName, const QString& gncSource, QWidget * parent) : QDialog(parent), d(new Private)
{
  QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Help);
  QWidget *mainWidget = new QWidget(this);
  QVBoxLayout *mainLayout = new QVBoxLayout;
  setLayout(mainLayout);
  mainLayout->addWidget(mainWidget);
  QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
  okButton->setDefault(true);
  okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
  connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
  connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  d->widget = new KGncPriceSourceDlgDecl();
  mainLayout->addWidget(d->widget);
  // signals and slots connections
  connect(d->widget->buttonsSource, SIGNAL(buttonClicked(int)), this, SLOT(buttonPressed(int)));
  connect(this, SIGNAL(helpClicked()), this, SLOT(slotHelp()));
  // initialize data fields
  d->widget->textStockName->setText(i18n("Investment: %1", stockName));
  d->widget->textGncSource->setText(i18n("Quote source: %1", gncSource));
  d->widget->listKnownSource->clear();
  d->widget->listKnownSource->insertItems(0, WebPriceQuote::quoteSources());
  d->widget->lineUserSource->setText(gncSource);
  d->widget->checkAlwaysUse->setChecked(true);
  d->widget->buttonsSource->setId(d->widget->buttonNoSource, 0);
  d->widget->buttonsSource->setId(d->widget->buttonSelectSource, 1);
  d->widget->buttonsSource->setId(d->widget->buttonUserSource, 2);
  d->widget->buttonsSource->button(0)->setChecked(true);
  mainLayout->addWidget(buttonBox);
  buttonPressed(0);
  return;
}
Exemplo n.º 7
0
/*
 * Initialize
 */
void MovieSequenceForm::init()
{
  setAttribute(Qt::WA_DeleteOnClose);
  setAttribute(Qt::WA_AlwaysShowToolTips);
  mSegments = mvMovieSegmentArray();
  connect(doneButton, SIGNAL(clicked()), this, SLOT(close()));
  connect(addAfterButton, SIGNAL(clicked()), this, SLOT(addAfterClicked()));
  connect(addBeforeButton, SIGNAL(clicked()), this, SLOT(addBeforeClicked()));
  connect(replaceButton, SIGNAL(clicked()), this, SLOT(replaceClicked()));
  connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
  connect(setMovieButton, SIGNAL(clicked()), this, SLOT(setMovieClicked()));
  connect(setStartButton, SIGNAL(clicked()), this, SLOT(setStartClicked()));
  connect(setEndButton, SIGNAL(clicked()), this, SLOT(setEndClicked()));
  connect(runAllButton, SIGNAL(clicked()), this, SLOT(runAllClicked()));
  connect(saveButton, SIGNAL(clicked()), this, SLOT(saveClicked()));
  connect(loadButton, SIGNAL(clicked()), this, SLOT(loadClicked()));
  connect(helpButton, SIGNAL(clicked()), this, SLOT(helpClicked()));
  connect(table, SIGNAL(cellChanged(int, int)), this, SLOT(entryChanged(int,int)));
  setFontDependentWidths();
  mModified = false;

  // Change window size to give 4 rows plus header
  imod_info_input();
  adjustSize();
  QSize winSize = sizeHint();
  QSize tableSize = table->sizeHint();
  int desired = 5.6 * (table->fontMetrics().height() + 3);
  resize(winSize.width(), winSize.height() + (desired - tableSize.height()));
}
Exemplo n.º 8
0
ParserMaker::ParserMaker(QWidget *parent, ParserManager *pd, SiilihaiSettings &s, SiilihaiProtocol &p) :
    QMainWindow(parent), pdb(pd), settings(s), protocol(p), nam(this), engine(this, 0, 0, &nam) {
    ui.setupUi(this);
    loginMatcher = new PatternMatcher(this, true);

    groupListEditor = new GroupListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(groupListEditor, groupListEditor->tabIcon(), groupListEditor->tabName());
    threadListEditor = new ThreadListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(threadListEditor, threadListEditor->tabIcon(), threadListEditor->tabName());
    threadListEditor->setEnabled(false);
    messageListEditor = new MessageListPatternEditor(engine, &parser, &subscription, this);
    ui.tabWidget->addTab(messageListEditor, threadListEditor->tabIcon(), messageListEditor->tabName());
    messageListEditor->setEnabled(false);

    connect(groupListEditor, SIGNAL(groupSelected(ForumGroup*)), threadListEditor, SLOT(setGroup(ForumGroup*)));
    connect(threadListEditor, SIGNAL(threadSelected(ForumThread*)), messageListEditor, SLOT(setThread(ForumThread*)));

    connect(&protocol, SIGNAL(saveParserFinished(int, QString)), this, SLOT(saveParserFinished(int, QString)));
    connect(ui.openParserButton, SIGNAL(clicked()), this, SLOT(openClicked()));
    connect(ui.newFromRequestButton, SIGNAL(clicked()), this, SLOT(newFromRequestClicked()));
    connect(ui.saveChangesButton, SIGNAL(clicked()), this, SLOT(saveClicked()));
    connect(ui.saveAsNewButton, SIGNAL(clicked()), this, SLOT(saveAsNewClicked()));
    connect(ui.testForumUrlButton, SIGNAL(clicked()), this, SLOT(testForumUrlClicked()));
    connect(ui.forumUrl, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.parserName, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.parserType, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState()));
    connect(ui.viewThreadPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.threadListPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.viewMessagePath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.loginPath, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.loginTypeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState()));
    connect(ui.tryLoginButton, SIGNAL(clicked()), this, SLOT(tryLogin()));
    connect(ui.tryWithoutLoginButton, SIGNAL(clicked()), this, SLOT(tryWithoutLogin()));
    connect(ui.verifyLoginPattern, SIGNAL(textEdited(QString)), this, SLOT(updateState()));
    connect(ui.helpButton, SIGNAL(clicked()), this, SLOT(helpClicked()));
    connect(&engine, SIGNAL(loginFinished(ForumSubscription *,bool)), this, SLOT(loginFinished(ForumSubscription *, bool)));
    connect(&subscription, SIGNAL(errorsChanged()), this, SLOT(subscriptionErrorsChanged()));

    connect(&engine, SIGNAL(getHttpAuthentication(ForumSubscription *, QAuthenticator *)),
            this, SLOT(getHttpAuthentication(ForumSubscription *, QAuthenticator *)));

    connect(loginMatcher, SIGNAL(dataMatched(int, QString, PatternMatchType)),
            this, SLOT(dataMatched(int, QString, PatternMatchType)));
    connect(loginMatcher, SIGNAL(dataMatchingStart(QString&)), this, SLOT(dataMatchingStart(QString&)));
    connect(loginMatcher, SIGNAL(dataMatchingEnd()), this, SLOT(dataMatchingEnd()));

    subscription.setLatestThreads(100);
    subscription.setLatestMessages(100);
    loginWithoutCredentials = false;

    updateState();
    ui.tabWidget->setCurrentIndex(0);
    if (!restoreGeometry(settings.value("parsermaker_geometry").toByteArray()))
        showMaximized();

    show();
}
Exemplo n.º 9
0
void preferencesWidget::buttonClicked(QAbstractButton *button) {

	if(buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole) {
		emit applyClicked() ;
	} else if(buttonBox->buttonRole(button) == QDialogButtonBox::DestructiveRole) {
		emit resetClicked() ;
	} else if(buttonBox->buttonRole(button) == QDialogButtonBox::HelpRole) {
		emit helpClicked() ;
	}
}
Exemplo n.º 10
0
void KNoteBook::setHelpButton(const char *name)
{
  if(!pnote->help)
  {
    pnote->help = new QPushButton(name, this);
    pnote->help->show();
    connect( pnote->help, SIGNAL(clicked()), SLOT(helpClicked()));
  }
  else
    pnote->help->setText(name);
  setSizes();
}
Exemplo n.º 11
0
Wizard::Wizard(QWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
  : QWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this)
{
  QStringList states;
  states << "default";
  states << "initialization";
  states << "destroy";
  setStates(states);
  setDisplayStates(states);

  connect(this, SIGNAL(helpClicked()), SLOT(runHelp()));
}
Exemplo n.º 12
0
calculator::calculator(QWidget *parent) : KDialog(parent)
{
    setWindowTitle(i18n("Chemical Calculator"));
    setButtons(Help | Close);
    setDefaultButton(Close);

    ui.setupUi(mainWidget());

    int maxTextWidth = 0;
    QStyleOptionViewItem option;
    option.initFrom(ui.tree);
    for (int i = 0; i < ui.tree->topLevelItemCount(); ++i) {
        maxTextWidth = qMax(maxTextWidth, ui.tree->itemDelegate()->sizeHint(option, ui.tree->model()->index(i, 0)).width());
    }
    // 20 because we want some margins, not a too tight text
    ui.tree->setMaximumWidth(qMax(ui.tree->maximumWidth(), maxTextWidth + 20));

    // Add the nuclear calculator to the user interface
    m_nuclearCalculator = new nuclearCalculator(this);
    ui.stack->addWidget(m_nuclearCalculator);
    // Add the gas calculator to the user interface
    m_gasCalculator = new gasCalculator(this);
    ui.stack->addWidget(m_gasCalculator);
    // Add the concentration calculator to the user interface
    m_concCalculator = new concCalculator(this);
    ui.stack->addWidget(m_concCalculator);
    // Add the molecular mass Calculator widget to the user interface
    m_moleCalculator = new MolcalcWidget(this);
    ui.stack->addWidget(m_moleCalculator);
    // Add the molecular mass Calculator widget to the user interface
    m_titraCalculator = new titrationCalculator(this);
    ui.stack->addWidget(m_titraCalculator);

#ifdef HAVE_FACILE
    // Add the equation balancer widget to the user interface
    QTreeWidgetItem *treeItem = new QTreeWidgetItem(ui.tree);
    treeItem->setText(0, i18n("Equation Balancer"));

    m_equationBalancer = new EQChemDialog(this);
    ui.stack->addWidget(m_equationBalancer);
#endif
    // Add an image to the file
    ui.pic->setPixmap((QIcon::fromTheme("calculate")).pixmap(128,128));

    // Connect the tree item selection signal to the corresponding slot
    connect(ui.tree, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this,
            SLOT(slotItemSelection(QTreeWidgetItem*)));

    ui.tree->setCurrentItem(ui.tree->topLevelItem(0), 0, QItemSelectionModel::ToggleCurrent);

    // help clicked
    connect(this, SIGNAL(helpClicked()), this, SLOT(slotHelp()));
}
bool ProjectSettings::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: chooseDatabaseFile(); break;
    case 1: chooseProjectFile(); break;
    case 2: helpClicked(); break;
    case 3: okClicked(); break;
    case 4: languageChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    default:
	return ProjectSettingsBase::qt_invoke( _id, _o );
    }
    return TRUE;
}
ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName,
        QWidget *parent )
    : KDialog( parent ), mConfigWidget( wdg )
{
    setCaption( i18n( "Modify View: " ) + viewName );
    setButtons( Help | Ok | Cancel );
    setDefaultButton( Ok );
    showButtonSeparator( true );

    setMainWidget( mConfigWidget );
    connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
    resize( 600, 300 );
}
Exemplo n.º 15
0
void QWizard::help()
{
    QWidget * page = d->ws->visibleWidget();
    if ( !page )
	return;

#if 0
    QWizardPage *wpage = ::qt_cast<QWizardPage*>(page);
    if ( wpage )
	emit wpage->helpClicked();
#endif
    emit helpClicked();
}
Exemplo n.º 16
0
ErrorMessage::ErrorMessage (QWidget *parent)
	: KDialogBase (parent, "errorDialog", false, 0, KDialogBase::Close | KDialogBase::Help | KDialogBase::User1, KDialogBase::Close, true, i18n("Help on &Error") )
{
	connect( this, SIGNAL( user1Clicked() ), this, SLOT( showHelpOnError() ) );
	connect( this, SIGNAL( helpClicked() ), this, SLOT( errorMessageHelp() ) );
	setCaption( i18n("Error Dialog") );
	setButtonWhatsThis( KDialogBase::Close, i18n("Closes this error dialog") );
	setButtonWhatsThis( KDialogBase::Help, i18n("Click here to read more on this error dialog in KTurtle's Handbook.") );
	setButtonTip( KDialogBase::Help, i18n("Click here for help using this error dialog") );
	setButtonWhatsThis( KDialogBase::User1, i18n("Click here for help regarding the error you selected in the list. This button will not work when no error is selected.") );
	setButtonTip( KDialogBase::User1, i18n("Click here for help regarding the error you selected.") );
	
	QWidget *baseWidget = new QWidget(this);
	setMainWidget(baseWidget);
	baseLayout = new QVBoxLayout(baseWidget); 
	
	label = new QLabel(baseWidget);
	label->setText( i18n("In this list you find the error(s) that resulted from running your Logo code. \nGood luck!") );
	// \nYou can select an error and click the 'Help on Error' button for help.
	label->setScaledContents(true);
	baseLayout->addWidget(label);
	
	spacer = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
	baseLayout->addItem(spacer);
	
	errTable = new QTable(0, 3, baseWidget);
	errTable->setSelectionMode(QTable::SingleRow);
	errTable->setReadOnly(true);
	errTable->setShowGrid(false);
	errTable->setFocusStyle(QTable::FollowStyle);
	errTable->setLeftMargin(0);
	
	errTable->horizontalHeader()->setLabel( 0, i18n("number") );
	errTable->hideColumn(0); // needed to link with the errorData which stores the tokens, codes, etc.
	
	errTable->horizontalHeader()->setLabel( 1, i18n("line") );
	errTable->setColumnWidth(1, baseWidget->fontMetrics().width("88888") );
	
	errTable->horizontalHeader()->setLabel( 2, i18n("description") );
	errTable->setColumnStretchable(2, true);

	baseLayout->addWidget(errTable);
	
	// Since both help buttons are not working yet. Doc need a section on the Error Dialog!
	enableButton(KDialogBase::Help, false);
	enableButton(KDialogBase::User1, false);
	
	errCount = 1;
}
Exemplo n.º 17
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
{

    setWindowTitle("BuildmLearn Toolkit");
    showMaximized();
    iNewProjectWidget = new NewProjectWidget(this);
    iNewProjectWidget->show();

    iStackedWidget = new QStackedWidget(this);
    iBlankWidget = new QWidget(this);
    iInfoTemplateWidget = new InfoTemplate(this);
    iQuizTemplateWidget = new QuizTemplate(this);

    iStackedWidget->addWidget(iBlankWidget);
    iStackedWidget->addWidget(iInfoTemplateWidget);
    iStackedWidget->addWidget(iQuizTemplateWidget);

    iStackedWidget->setCurrentIndex(0);

    setCentralWidget(iStackedWidget);

    // Menu
    fileMenu = menuBar()->addMenu(tr("&File"));
    projectMenu = menuBar()->addMenu(tr("&Project"));
    helpMenu = menuBar()->addMenu(tr("&Help"));

    newAct = new QAction(tr("&New"), this);
    exitAct = new QAction(tr("&Exit"), this);
    buildAct = new QAction(tr("&Generate application"), this);
    howitworksAct = new QAction(tr("&How it works"), this);
    aboutAct = new QAction(tr("&About"), this);

    fileMenu->addAction(newAct);
    fileMenu->addAction(exitAct);

    projectMenu->addAction(buildAct);

    helpMenu->addAction(howitworksAct);
    helpMenu->addAction(aboutAct);

    connect(iNewProjectWidget, SIGNAL(startProject(int)), this, SLOT(startProject(int)));
    connect(aboutAct, SIGNAL(triggered()), this ,SLOT(aboutClicked()));
    connect(newAct, SIGNAL(triggered()), this ,SLOT(newClicked()));
    connect(howitworksAct, SIGNAL(triggered()), this ,SLOT(helpClicked()));
    connect(buildAct, SIGNAL(triggered()), this ,SLOT(generateClicked()));
    connect(exitAct, SIGNAL(triggered()), this ,SLOT(close()));
}
Exemplo n.º 18
0
KMailCVT::KMailCVT(QWidget *parent)
	: KAssistantDialog(parent) {
        setModal(true);
	setWindowTitle( i18n( "KMailCVT Import Tool" ) );


	selfilterpage = new KSelFilterPage;
	page1 = new KPageWidgetItem( selfilterpage, i18n( "Step 1: Select Filter" ) );

	addPage( page1);

	importpage = new KImportPage;
	page2 = new KPageWidgetItem( importpage, i18n( "Step 2: Importing..." ) );
	addPage( page2 );
        connect(this,SIGNAL(helpClicked()),this,SLOT(help()));
}
Exemplo n.º 19
0
/**
 * Set up the dialog.
 */
void ManageInterfaceCategories::initLayout() {
  m_uiForm.setupUi(this);

  m_uiForm.categoryTreeView->setModel(&m_model);
  m_uiForm.categoryTreeView->show();

  // OK button should save any changes and then exit.
  connect(m_uiForm.okButton, SIGNAL(pressed()), &m_model,
          SLOT(saveHiddenCategories()));
  connect(m_uiForm.okButton, SIGNAL(pressed()), this, SLOT(close()));

  // Cancel should just exit.
  connect(m_uiForm.cancelButton, SIGNAL(pressed()), this, SLOT(close()));

  connect(m_uiForm.helpButton, SIGNAL(pressed()), this, SLOT(helpClicked()));
}
Exemplo n.º 20
0
void OSPlugin::connectDocumentSignals(OSDocument* osDocument)
{
  bool test;
  test = connect( osDocument, SIGNAL(closeClicked()), this, SLOT(hideSender()) );
  OS_ASSERT(test);
  //test = connect( osDocument, SIGNAL(exitClicked()), this, SLOT(quit()) );
  //OS_ASSERT(test);
  test = connect( osDocument, SIGNAL(importClicked()), this, SLOT(importIdfForSender()) );
  OS_ASSERT(test);
  test = connect( osDocument, SIGNAL(loadFileClicked()), this, SLOT(openForSender()) );
  OS_ASSERT(test);
  test = connect( osDocument, SIGNAL(newClicked()), this, SLOT(newForSender()) );
  OS_ASSERT(test);
  test = connect( osDocument, SIGNAL(helpClicked()), this, SLOT(showHelp()) );
  OS_ASSERT(test);
}
Exemplo n.º 21
0
RSDialog::RSDialog(QWidget* parent) : KDialog(parent)
{
    setCaption(i18n("Risks/Security Phrases"));
    setButtons(Help | Close);

    createRPhrases();
    createSPhrases();

    ui.setupUi(mainWidget());

    connect(ui.filterButton, SIGNAL(clicked()),
            this, SLOT(filter()));
    connect(this, SIGNAL(helpClicked()),
            this, SLOT(slotHelp()));

        filter();
}
void setupHelpButton(KDialog* dialog, KAboutData* aboutData)
{
    QObject::disconnect(dialog, SIGNAL(helpClicked()),
                        dialog, SLOT(slotHelp()));

    KHelpMenu* helpMenu = new KHelpMenu(dialog, aboutData, false);
    KMenu* menu         = helpMenu->menu();
    menu->removeAction(menu->actions().first());

    QAction* openHandbookAction = new QAction(i18n("Handbook"), dialog);

    QObject::connect(openHandbookAction, SIGNAL(triggered(bool)),
                     dialog, SLOT(slotHelp()));

    menu->insertAction(menu->actions().first(), openHandbookAction);
    dialog->button(KDialog::Help)->setMenu(menu);
}
bool QDialogButtons::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: clicked((Button)(*((Button*)static_QUType_ptr.get(_o+1)))); break;
    case 1: acceptClicked(); break;
    case 2: rejectClicked(); break;
    case 3: helpClicked(); break;
    case 4: applyClicked(); break;
    case 5: allClicked(); break;
    case 6: retryClicked(); break;
    case 7: ignoreClicked(); break;
    case 8: abortClicked(); break;
    default:
	return QWidget::qt_emit(_id,_o);
    }
    return TRUE;
}
XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort,
                                        QWidget* parent )
    : KDialog( parent ), mCore( core ),
      mUseSorting( sort )
{
  setCaption( i18n( "Choose Which Contacts to Export" ) );
  setButtons( Help | Ok | Cancel );
  setDefaultButton( Ok );
  setModal( true );
  showButtonSeparator( true );

  initGUI();

  connect( mFiltersCombo, SIGNAL( activated( int ) ),
           SLOT( filterChanged( int ) ) );

  // setup filters
  mFilters = Filter::restore( KGlobal::config().data(), "Filter" );
  Filter::List::ConstIterator filterIt;
  QStringList filters;
  for ( filterIt = mFilters.constBegin(); filterIt != mFilters.constEnd(); ++filterIt )
    filters.append( (*filterIt).name() );

  mFiltersCombo->addItems( filters );
  mUseFilters->setEnabled( filters.count() > 0 );

  // setup categories
  const QStringList categories = KABPrefs::instance()->customCategories();
  mCategoriesView->setCategories( categories );
  mUseCategories->setEnabled( categories.count() > 0 );

  int count = mCore->selectedUIDs().count();
  mUseSelection->setEnabled( count != 0 );
  mUseSelection->setChecked( count  > 0 );

  mSortTypeCombo->addItem( i18nc( "@item:inlistbox Sort order", "Ascending" ) );
  mSortTypeCombo->addItem( i18nc( "@item:inlistbox Sort order", "Descending" ) );

  mFields = mCore->addressBook()->fields( KABC::Field::All );
  KABC::Field::List::ConstIterator fieldIt;
  for ( fieldIt = mFields.constBegin(); fieldIt != mFields.constEnd(); ++fieldIt )
    mFieldCombo->addItem( (*fieldIt)->label() );
  connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
}
Exemplo n.º 25
0
void
QDialogButtons::handleClicked()
{
    const QObject *s = sender();
    if(!s)
	return;

    for(QMapIterator<QDialogButtons::Button, QWidget *> it = d->buttons.begin(); it != d->buttons.end(); ++it) {
	if(it.data() == s) {
	    emit clicked((QDialogButtons::Button)it.key());
	    switch(it.key()) {
	    case Retry:
		emit retryClicked();
		break;
	    case Ignore:
		emit ignoreClicked();
		break;
	    case Abort:
		emit abortClicked();
		break;
	    case All:
		emit allClicked();
		break;
	    case Accept:
		emit acceptClicked();
		break;
	    case Reject:
		emit rejectClicked();
		break;
	    case Apply:
		emit applyClicked();
		break;
	    case Help:
		emit helpClicked();
		break;
	    default:
		break;
	    }
	    return;
	}
    }
}
bool WizardEditor::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: okClicked(); break;
    case 1: applyClicked(); break;
    case 2: cancelClicked(); break;
    case 3: helpClicked(); break;
    case 4: addClicked(); break;
    case 5: removeClicked(); break;
    case 6: upClicked(); break;
    case 7: downClicked(); break;
    case 8: itemHighlighted((int)static_QUType_int.get(_o+1)); break;
    case 9: itemSelected((int)static_QUType_int.get(_o+1)); break;
    case 10: itemDragged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 11: itemDropped((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    default:
	return WizardEditorBase::qt_invoke( _id, _o );
    }
    return TRUE;
}
bool WizardEditorBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: init(); break;
    case 2: destroy(); break;
    case 3: addClicked(); break;
    case 4: applyClicked(); break;
    case 5: cancelClicked(); break;
    case 6: downClicked(); break;
    case 7: helpClicked(); break;
    case 8: itemHighlighted((int)static_QUType_int.get(_o+1)); break;
    case 9: itemSelected((int)static_QUType_int.get(_o+1)); break;
    case 10: okClicked(); break;
    case 11: removeClicked(); break;
    case 12: upClicked(); break;
    default:
	return QDialog::qt_invoke( _id, _o );
    }
    return TRUE;
}
Exemplo n.º 28
0
StartupMenu::StartupMenu(QWidget *parent) : 
  QMenuBar(parent)
{

  // File menu
  m_fileMenu = new QMenu(tr("&File"),this);
  QAction * newAction = new QAction(tr("&New"), this);
  QAction * loadFileAction = new QAction(tr("&Open"), this);
  QAction * importAction = new QAction(tr("&Import IDF"), this);
  //QAction * importSDDAction = new QAction(tr("&Import SDD"), this);
  QAction * exitAction = new QAction(tr("E&xit"), this);
  exitAction->setShortcuts(QKeySequence::Quit);

  connect(importAction, SIGNAL(triggered()), this, SIGNAL(importClicked()));
  //connect(importSDDAction, SIGNAL(triggered()), this, SIGNAL(importSDDClicked()));
  connect(loadFileAction, SIGNAL(triggered()), this, SIGNAL(loadFileClicked()));
  connect(newAction, SIGNAL(triggered()), this, SIGNAL(newClicked()));
  connect(exitAction, SIGNAL(triggered()),this,SIGNAL(exitClicked()));

  m_fileMenu->addAction(newAction);
  m_fileMenu->addAction(loadFileAction);
  m_fileMenu->addSeparator();
  m_fileMenu->addAction(importAction);
  //m_fileMenu->addAction(importSDDAction);
  m_fileMenu->addSeparator();
  m_fileMenu->addAction(exitAction);

  addMenu(m_fileMenu);

  // Help menu
  m_helpMenu = new QMenu(tr("&Help"),this);

  addMenu(m_helpMenu);

  QAction * helpAction = new QAction(tr("OpenStudio &Help"),this);

  connect(helpAction, SIGNAL(triggered()),this,SIGNAL(helpClicked()));

  m_helpMenu->addAction(helpAction);
}
Exemplo n.º 29
0
GameSetup::GameSetup(QWidget *parent) :
    ui(new Ui::GameSetup)
{

    settings = new GameSettings();
    setCaption(i18n("Setup GameOfLife"));
    setButtons(Ok|Cancel|Help|Default);
    setDefaultButton(Ok);
    setModal(true);
    showButtonSeparator(true);
    setButtonText(Help, i18n("A&bout"));

    QWidget *main = new QWidget(this);
    setMainWidget(main);

    ui->setupUi(main);

    ui->boxShapes->addItem("Rectangle");
    ui->boxShapes->addItem("Rounded rectangle");
    ui->boxShapes->addItem("Ellipse");

    cell = QPixmap(71, 21);
    bkg = QPixmap(71, 21);


    connect(ui->sliderR, SIGNAL(valueChanged(int)), this, SLOT(onSliderRValueChanged(int)));
    connect(ui->sliderG, SIGNAL(valueChanged(int)), this, SLOT(onSliderGValueChanged(int)));
    connect(ui->sliderB, SIGNAL(valueChanged(int)), this, SLOT(onSliderValueChanged(int)));

    connect(ui->sliderR_2, SIGNAL(valueChanged(int)), this, SLOT(onSliderR_2ValueChanged(int)));
    connect(ui->sliderG_2, SIGNAL(valueChanged(int)), this, SLOT(onSliderG_2ValueChanged(int)));
    connect(ui->sliderB_2, SIGNAL(valueChanged(int)), this, SLOT(onSliderB_2ValueChanged(int)));


    connect(this, SIGNAL(okClicked()), SLOT(onOkClicked()));
    connect(this, SIGNAL(helpClicked()), SLOT(onHelpClicked()));
    connect(this, SIGNAL(defaultClicked()), SLOT(onDefaultClicked()));

    ShowSettings();
}
Exemplo n.º 30
0
void KDialogBase::init( int buttonMask, ButtonCode /*defaultButton*/, const QString& caption )
{
    setCaption( caption );
    _layout = new QVBoxLayout( this, 6 );
    QHBoxLayout* buts = new QHBoxLayout( _layout, 6 );
    QPushButton* but;
    if ( buttonMask & Help ) {
        but = new QPushButton( tr("Help"), this );
        buts->addWidget( but );
        connect( but, SIGNAL( clicked() ), this, SIGNAL( helpClicked() ) );
    }
    buts->addStretch(1);
    if ( buttonMask & Ok ) {
        but = new QPushButton( tr("OK"), this );
        buts->addWidget( but );
        connect( but, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    }
    if ( buttonMask & Cancel ) {
        but = new QPushButton( tr("Cancel"), this );
        buts->addWidget( but );
        connect( but, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
    }
}