void
ControlEditorDialog::setupActions()
{
    createAction("file_close", SLOT(slotClose()));
    m_closeButton->setText(tr("Close"));
    connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose()));
    createAction("control_help", SLOT(slotHelpRequested()));
    createAction("help_about_app", SLOT(slotHelpAbout()));

    createGUI("controleditor.rc");
}
Exemple #2
0
widgetLocale::widgetLocale(QWidget *parent) : QWidget(parent), ui(new Ui::widgetLocale)
{
  //Initialize the Interface
  ui->setupUi(this);
  
  //Connect the signals/slots
  connect(ui->pushCancel, SIGNAL(clicked()), this, SLOT(slotClose()) );
  connect(ui->pushApply, SIGNAL(clicked()), this, SLOT(slotApply()) );
  //Get all the available languages
  locCodeL = getLanguages(); //get language codes
  locL.clear();
  for(int i=0; i<locCodeL.length(); i++){
    QLocale locale(locCodeL[i]);
    locL << QLocale::languageToString(locale.language());
  }
  //Get the current language
  QLocale mylocale;
  QString cLocale = QLocale::languageToString(mylocale.language()) + " ("+mylocale.name()+")";
  qDebug() << "Default Locale:" << cLocale;
  //Setup the interface
  ui->lineCurrentLocale->setText(cLocale); //current language
  for(int i=0; i< locL.length(); i++){
    ui->localeListWidget->addItem(locL[i] + " ("+locCodeL[i]+")"); //Available languages
  }
}
GuiCoordinator::GuiCoordinator(void){
  qDebug() << "GuiCoordinator constructor";
  _mainWindow=new MainWindow();

    // MainWindow -> GuiCoordinator : load the Table

    /*connect(
           _mainWindow,
           SIGNAL(robotFileXml(const QString&,const QString&)),
            this,
            SLOT(forwardRobotNameXml(const QString&,const QString&))
           );
*/
    connect(_mainWindow,
           SIGNAL(uiPlay()),
           this,
           SLOT(slotPlay()));

    connect(_mainWindow,
           SIGNAL(uiPause()),
           this,
           SLOT(slotPause()));
    connect(_mainWindow,
           SIGNAL(uiStop()),
           this,
           SLOT(slotStop()));
    connect(_mainWindow,
           SIGNAL(close()),
           this,
           SLOT(slotClose()));

  }
Exemple #4
0
Konfigurator::Konfigurator(bool f, int startPage) : KPageDialog((QWidget *)0),
        firstTime(f), internalCall(false), sizeX(-1), sizeY(-1)
{
    setWindowTitle(i18n("Konfigurator - Creating Your Own Krusader"));
    setWindowModality(Qt::ApplicationModal);
    setFaceType(KPageDialog::List);

    setStandardButtons(QDialogButtonBox::Help|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Close|
                       QDialogButtonBox::Apply|QDialogButtonBox::Reset);
    button(QDialogButtonBox::Apply)->setDefault(true);

    connect(button(QDialogButtonBox::Close), SIGNAL(clicked()), SLOT(slotClose()));
    connect(button(QDialogButtonBox::Help), SIGNAL(clicked()), SLOT(slotShowHelp()));
    connect(button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()), SLOT(slotRestoreDefaults()));
    connect(button(QDialogButtonBox::Reset), SIGNAL(clicked()), SLOT(slotReset()));
    connect(button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(slotApply()));
    connect(this, SIGNAL(currentPageChanged(KPageWidgetItem *, KPageWidgetItem *)), this, SLOT(slotPageSwitch(KPageWidgetItem *, KPageWidgetItem *)));
    connect(&restoreTimer, SIGNAL(timeout()), this, SLOT(slotRestorePage()));

    createLayout(startPage);

    KConfigGroup group(krConfig, "Konfigurator");
    int sx = group.readEntry("Window Width", -1);
    int sy = group.readEntry("Window Height", -1);

    if (sx != -1 && sy != -1)
        resize(sx, sy);
    else
        resize(900, 680);

    if (group.readEntry("Window Maximized",  false))
        showMaximized();
    else
        show();
}
void
Widget::createWidgets()
{
	editData = new QLineEdit( this );
	editData->setEnabled( false );

	editText = new QLineEdit( this );
	editText->setEnabled( false );

	QPushButton * buttonSend = new QPushButton( tr("&Send"), this ),
				* buttonExit = new QPushButton( tr("E&xit"), this );

	connect( buttonSend, SIGNAL( clicked() ), SLOT( slotSend() ) );
	connect( buttonExit, SIGNAL( clicked() ), SLOT( slotClose() ) );

	QHBoxLayout * horLayout = new QHBoxLayout();

	horLayout->addWidget( editText );
	horLayout->addStretch();
	horLayout->addWidget( buttonSend );

	QVBoxLayout * layout = new QVBoxLayout( this );

	layout->addWidget( editData );
	layout->addLayout( horLayout );
	layout->addStretch();
	layout->addWidget( buttonExit );
}
MainWindow::MainWindow(QWidget* parent, const char* name, WFlags fl)
//     : KMainWindow(parent, name, fl),  m_debuggerSettings(0), m_browserSettings(0)
    : KParts::MainWindow(parent, name, fl),  m_debuggerSettings(0), m_browserSettings(0)
{
  if(!name) { setName("MainWindow"); }

  setupStatusBar();

  m_debugger_manager = new DebuggerManager(this);

  createWidgets();

  setupActions();

  createGUI(0);

  resize( QSize(633, 533).expandedTo(minimumSizeHint()) );
  clearWState(WState_Polished);

  m_debugger_manager->init();

  connect(kapp, SIGNAL(aboutToQuit()), this, SLOT(slotClose()));

  connect(ProtoeditorSettings::self(), SIGNAL(sigSettingsChanged()),
          this, SLOT(slotSettingsChanged()));

  loadSites();

  stateChanged("init");
}
Exemple #7
0
PlayListDialog::PlayListDialog( QString caption,
                               QWidget* parent, const char* name)
            : QDialog(parent),
   m_playList(new PlayList(this))
{
    setObjectName( name );
    setModal(false);
    setWindowTitle( caption );

    QGridLayout *metagrid = new QGridLayout;
    metagrid->addWidget(m_playList, 0, 0);

    QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
    metagrid->addWidget(buttonBox, 1, 0);
    metagrid->setRowStretch(0, 10);

    setLayout(metagrid);

    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    connect(buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked()),
            this, SLOT(slotClose()));

    restore();
}
MidiMixerWindow::MidiMixerWindow(QWidget *parent,
                                 RosegardenDocument *document):
    MixerWindow(parent, document),
    m_tabFrame(0)
{
    // Initial setup
    //
    setupTabs();

    createAction("file_close", SLOT(slotClose()));

    createAction("play", SIGNAL(play()));
    createAction("stop", SIGNAL(stop()));
    createAction("playback_pointer_back_bar", SIGNAL(rewindPlayback()));
    createAction("playback_pointer_forward_bar", SIGNAL(fastForwardPlayback()));
    createAction("playback_pointer_start", SIGNAL(rewindPlaybackToBeginning()));
    createAction("playback_pointer_end", SIGNAL(fastForwardPlaybackToEnd()));
    createAction("record", SIGNAL(record()));
    createAction("panic", SIGNAL(panic()));
    createAction("midimix_help", SLOT(slotHelpRequested()));
    createAction("help_about_app", SLOT(slotHelpAbout()));

    createGUI("midimixer.rc");
    setRewFFwdToAutoRepeat();
}
DisplayDialog::DisplayDialog(QWidget *parent)
                     : QDialog(parent)
{
  vLayout = new QVBoxLayout(this);
  setAttribute( Qt::WA_DeleteOnClose  );
  Text = new QTextEdit(this);
  //Text->setTextFormat(Qt::PlainText);
  Text->setReadOnly(true);
  Text->setMinimumSize(200, 100);
  vLayout->addWidget(Text);

  QHBoxLayout *h = new QHBoxLayout(this);
  vLayout->addLayout(h);

	QWidget *w1 = new QWidget(this);
	h->addWidget( w1 );
  h->setStretchFactor(w1,5); // stretchable placeholder

  QPushButton *ButtonClose = new QPushButton(tr("Close"), this);
	h->addWidget( ButtonClose );
  connect(ButtonClose, SIGNAL(clicked()), SLOT(slotClose()));
  ButtonClose->setFocus();

	QWidget *w2= new QWidget(this);
	h->addWidget( w2 );
  h->setStretchFactor(w2,5); // stretchable placeholder
}
void KSlovar::registerButtons()
{
  m_newDictionary = new KAction(i18n("&New dictionary"), "filenew", KShortcut(KKey("CTRL+n")), this, SLOT(slotNewDictionary()), actionCollection(), "newDictionary");
  m_openDictionary = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
  m_quit = KStdAction::quit(kapp, SLOT(quit()), actionCollection());

  m_back=KStdAction::back(this, SLOT(slotPrevPhrase()), actionCollection());
  m_forward=KStdAction::forward(this, SLOT(slotNextPhrase()), actionCollection());
  m_home=KStdAction::home(this, SLOT(slotHome()), actionCollection());

  m_editDictionary = new KAction(i18n("&Edit dictionary"), "edit", KShortcut(KKey("CTRL+e")), this, SLOT(slotEditDictionary()), actionCollection(), "editDictionary");
  m_close=KStdAction::close(this, SLOT(slotClose()), actionCollection());

  m_find = KStdAction::find(this, SLOT(slotFind()), actionCollection());
  m_findNext = KStdAction::findNext(this, SLOT(slotFindNext()), actionCollection());
  m_literalSearch = new KToggleAction(i18n("&Literal search"), "filter", KShortcut(KKey("CTRL+l")), this, SLOT(slotToggleLiteral()), actionCollection(), "literalSearch");
  m_backSearch = new KToggleAction(i18n("Ba&ck search"), "previous", KShortcut(KKey("CTRL+b")), this, SLOT(slotToggleBack()), actionCollection(), "backSearch");

  m_print=KStdAction::print(this, SLOT(slotPrint()), actionCollection());
  m_selectAll=KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());

  m_addPhrase=new KAction(i18n("&Add phrase"), "filenew", KShortcut(KKey("CTRL+a")), this, SLOT(slotAddPhrase()), actionCollection(), "addPhrase");
  m_editPhrase=new KAction(i18n("Edi&t phrase"), "edit", KShortcut(KKey("CTRL+t")), this, SLOT(slotEditPhrase()), actionCollection(), "editPhrase");
  m_removePhrase=new KAction(i18n("&Remove phrase"), "editdelete", KShortcut(KKey("Delete")), this, SLOT(slotRemovePhrase()), actionCollection(), "removePhrase");

  m_listPopup=new QPopupMenu;
  m_addPhrase->plug(m_listPopup);
  m_editPhrase->plug(m_listPopup);
  m_removePhrase->plug(m_listPopup);

  m_config = KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection());
  m_conversion = new KAction(i18n("Edit &conversion table"), "conversion", this, SLOT(slotConversionTable()), actionCollection(), "editConversion");
  m_update = new KAction(i18n("Update &languages"), "ktalkd", KShortcut(KKey("")), this, SLOT(slotDownloadLanguage()), actionCollection(), "updateLanguages");
  m_wizard = new KAction(i18n("Run &First-time wizard"), "wizard", KShortcut(KKey("")), this, SLOT(slotFirstRunWizard()), actionCollection(), "firstRunWizard");
}
Exemple #11
0
UpdateScreen::UpdateScreen(const CompanyDefn& company)
    : QMainWindow(0, "UpdateScreen", WType_TopLevel | WDestructiveClose),
      _connection(NULL)
{
    QFrame* frame = new QFrame(this);

    QLabel* fromLabel = new QLabel(tr("From Version:"), frame);
    _fromVersion = new LineEdit(14, frame);
    _fromVersion->setFocusPolicy(NoFocus);

    QLabel* toLabel = new QLabel(tr("To Version:"), frame);
    _toVersion = new ComboBox(frame);
    toLabel->setBuddy(_toVersion);

    QFrame* buttons = new QFrame(frame);
    _update = new QPushButton(tr("&Update"), buttons);
    _close = new QPushButton(tr("&Close"), buttons);

    connect(_update, SIGNAL(clicked()), SLOT(slotUpdate()));
    connect(_close, SIGNAL(clicked()), SLOT(slotClose()));

    QGridLayout* buttonGrid = new QGridLayout(buttons);
    buttonGrid->setSpacing(6);
    buttonGrid->setMargin(6);
    buttonGrid->setColStretch(0, 1);
    buttonGrid->addWidget(_update, 0, 1);
    buttonGrid->addWidget(_close, 0, 2);

    QGridLayout* grid = new QGridLayout(frame);
    grid->setSpacing(3);
    grid->setMargin(3);
    grid->setColStretch(2, 1);
    grid->addColSpacing(2, 20);
    grid->addWidget(fromLabel, 0, 0);
    grid->addWidget(_fromVersion, 0, 1, AlignLeft | AlignVCenter);
    grid->addWidget(toLabel, 0, 3);
    grid->addWidget(_toVersion, 0, 4, AlignLeft | AlignVCenter);
    grid->addMultiCellWidget(buttons, 1, 1, 0, 4);

    ServerConfig config;
    config.load();

    _fromVersion->setText(company.version());

    QDir dir(parseDir(config.dataDir), "*.xml");
    dir.cd("models");
    QStringList entries = dir.entryList();
    for (unsigned int i = 0; i < entries.size(); ++i) {
	QString version = QFileInfo(entries[i]).baseName();
	if (version < company.version()) continue;
	_toVersion->insertItem(version);
    }
    _toVersion->setCurrentItem(company.version());

    _company = company;

    setCentralWidget(frame);
    setCaption(tr("Version Update: %1").arg(company.name()));
}
Exemple #12
0
void widgetKeyboard::programInit(QStringList kModel, QStringList kLayouts)
{
  connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushApply, SIGNAL(clicked()), this, SLOT(slotApply()));
  keyboardModels = kModel;
  keyboardLayouts = kLayouts;
  connectKeyboardSlots();
}
Exemple #13
0
void PresentationKB::mousePressEvent(QMouseEvent* e)
{
    if ( !e )
        return;

    if (d->endOfShow && d->showingEnd)
        slotClose();
}
void desktopSelection::programInit(QList<QStringList> pkgList, QStringList sPkgs)
{
  listDeskPkgs = pkgList;
  selectedPkgs = sPkgs;
  connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushSave, SIGNAL(clicked()), this, SLOT(slotSave()));
  initDesktopPkgs();
}
Exemple #15
0
void GLDMaskBox::mousePressEvent(QMouseEvent *e)
{
    if (!m_oTipBoxParam.m_bIsOverTimeShow)
    {
        if (e->button() == Qt::LeftButton)
        {
            slotClose();
        }
    }
}
Exemple #16
0
GuiShowFile::GuiShowFile(GuiView & lv)
	: GuiDialog(lv, "file", qt_("Show File"))
{
	setupUi(this);

	connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));

	bc().setPolicy(ButtonPolicy::OkCancelPolicy);
	bc().setCancel(closePB);
}
Exemple #17
0
void sndDialog::programInit()
{
    // Connect our pushbuttons
    connect(pushTest, SIGNAL( clicked() ), this, SLOT( slotDiagnostic() ) );
    connect(pushClose, SIGNAL( clicked() ), this, SLOT( slotClose() ) );
    connect(pushApply, SIGNAL( clicked() ), this, SLOT( slotSave() ) );
    connect(comboSound, SIGNAL( currentIndexChanged(int) ), this, SLOT( slotEnableApply() ) );

    refreshDevices();
}
void dialogCheckHardware::programInit()
{
  connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));

  // Get the various hardware details
  getVideo();
  getNetwork();
  getSound();

}
Exemple #19
0
NamedAreaDialog::NamedAreaDialog(QWidget* parent, Selection* selection)
        : KDialog(parent)
        , m_selection(selection)
{
    setButtons(KDialog::Ok | KDialog::Close | KDialog::User1 | KDialog::User2 | KDialog::User3);
    setButtonsOrientation(Qt::Vertical);
    setButtonText(KDialog::Ok, i18n("&Select"));
    setButtonText(KDialog::User1, i18n("&Remove"));
    setButtonText(KDialog::User2, i18n("&Edit..."));
    setButtonText(KDialog::User3, i18n("&New..."));
    setCaption(i18n("Named Areas"));
    setModal(true);
    setObjectName("NamedAreaDialog");

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

    QVBoxLayout *vboxLayout = new QVBoxLayout(widget);
    vboxLayout->setMargin(0);
    vboxLayout->setSpacing(KDialog::spacingHint());

    m_list = new KListWidget(this);
    m_list->setSortingEnabled(true);
    vboxLayout->addWidget(m_list);

    m_rangeName = new QLabel(this);
    m_rangeName->setText(i18n("Area: %1", QString()));
    vboxLayout->addWidget(m_rangeName);

    const QList<QString> namedAreas = m_selection->activeSheet()->map()->namedAreaManager()->areaNames();
    for (int i = 0; i < namedAreas.count(); ++i)
        m_list->addItem(namedAreas[i]);

    if (m_list->count() == 0) {
        enableButtonOk(false);
        enableButton(KDialog::User1, false);
        enableButton(KDialog::User2, false);
        m_list->setCurrentRow(0);
    }

    connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
    connect(this, SIGNAL(cancelClicked()), this, SLOT(slotClose()));
    connect(this, SIGNAL(user1Clicked()), this, SLOT(slotRemove()));
    connect(this, SIGNAL(user2Clicked()), this, SLOT(slotEdit()));
    connect(this, SIGNAL(user3Clicked()), this, SLOT(slotNew()));
    connect(m_list, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(slotOk()));
    connect(m_list, SIGNAL(currentTextChanged(const QString&)),
            this, SLOT(displayAreaValues(const QString&)));

    if (m_list->count() > 0)
        m_list->setCurrentItem(m_list->item(0));

    m_list->setFocus();
}
void KSlovar::processFileOpen(const QString &fileName)
{
  QStringList temp;
  if( !fileName.isEmpty() )
  {
    QFile file( fileName );
    if( file.open(IO_ReadOnly) )
    {
      QString temp;
      file.readLine(temp, 50);
      if( !temp.startsWith("SQLite format 3") )
      {
        KMessageBox::error(this, i18n("This is not a valid dictionary!") );
        return;
      }
      slotClose();
    }
    else
    {
      KMessageBox::error(this, i18n("Couldn't read the dictionary!") );
      return;
    }
    file.close();

    KSData::instance()->setDictionary(new KSDBHandler(fileName));
    KSData::instance()->getDictionary()->start();

    m_home->setEnabled(true);
    m_editDictionary->setEnabled(true);
    m_close->setEnabled(true);
    m_addPhrase->setEnabled(true);


    m_backHistory.clear();
    KSData::instance()->setDictionaryPath(fileName);
    loadPartOfSpeech(KSData::instance()->getDictionary()->processString("SELECT lang FROM head;").toInt());
    int type = KSData::instance()->getDictionary()->processString("SELECT type FROM head;").toInt();
    KSData::instance()->setType(type);
    if(!type)
    {
      XMLParser=new KSXSLHandler(QString::fromUtf8(locate("appdata", "styles/"+Configuration::dictionaryStyle()+"/"+Configuration::dictionaryStyle()+"-default.xsl")));
    }
    else
    {
      XMLParser=new KSXSLHandler(QString::fromUtf8(locate("appdata", "styles/"+Configuration::dictionaryStyle()+"/"+Configuration::dictionaryStyle()+"-transitional.xsl")));
    }

    m_search->setDisabled(false);
    m_list->setEmptyText(i18n("Begin search by typing a\nword into the search bar."));
    m_list->clear();
    slotHome();
  }
}
Exemple #21
0
KFindTextDialog::KFindTextDialog( QWidget *parent, const char *name )
    : QDialog( parent, name )
{
    // mimimise initial size of dialog
    resize( 0, 0 );

    QVBoxLayout *vl = new QVBoxLayout( this, 15 );

    QHBoxLayout *hl = new QHBoxLayout( 15 );
    vl->addLayout( hl );

    QLabel *label = new QLabel( i18n( "Find:" ), this );
    label->setFixedSize( label->sizeHint() );

    QLineEdit *edit = new QLineEdit( this );
    edit->setFixedHeight( edit->sizeHint().height() );
    edit->setFocus();
    connect( edit, SIGNAL( textChanged( const char * ) ),
		    SLOT( slotTextChanged( const char * ) ) );

    hl->addWidget( label );
    hl->addWidget( edit );

    hl = new QHBoxLayout;
    vl->addLayout( hl );

    QCheckBox *cb = new QCheckBox( i18n( "Case &sensitive" ), this );
    connect( cb, SIGNAL( toggled( bool ) ), this, SLOT( slotCase( bool ) ) );
    cb->setFixedSize( cb->sizeHint() );
    hl->addWidget( cb );

    hl->addStretch();

    hl = new QHBoxLayout( 15 );
    vl->addLayout( hl );

    QPushButton *btn = new QPushButton( i18n( "&Find" ), this );
    btn->setFixedSize( btn->sizeHint() );
    btn->setDefault( true );
    connect( btn, SIGNAL( clicked() ), this, SLOT( slotFind() ) );
    hl->addWidget( btn );

    hl->addStretch();

    btn = new QPushButton( i18n( "&Close" ), this );
    btn->setFixedSize( btn->sizeHint() );
    connect( btn, SIGNAL( clicked() ), this, SLOT( slotClose() ) );
    hl->addWidget( btn );

    vl->activate();

    rExp.setCaseSensitive( false );
}
Exemple #22
0
void dialogFSSize::programInit(QString desc, int curSize, int availSize, int minSize)
{
  connect(horizontalSizeSlider, SIGNAL(sliderMoved(int)), this, SLOT(slotSliderChangedValue(int)));
  connect(spinSize, SIGNAL(valueChanged(int)), this, SLOT(slotSpinBoxChanged(int)));
  connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushSave, SIGNAL(clicked()), this, SLOT(slotSave()));
  horizontalSizeSlider->setMinimum(minSize);
  horizontalSizeSlider->setMaximum(availSize);
  horizontalSizeSlider->setValue(curSize);
  spinSize->setRange(minSize, availSize);
  spinSize->setValue(curSize);
  labelDesc->setText(desc);
}
void widgetKeyboard::programInit(QStringList kModel, QStringList kLayouts, QString cModel, QString cLayout, QString cVarient)
{
  connect(pushClose, SIGNAL(clicked()), this, SLOT(slotClose()));
  connect(pushApply, SIGNAL(clicked()), this, SLOT(slotApply()));
  keyboardModels = kModel;
  keyboardLayouts = kLayouts;
  cKeyModel = cModel;
  cKeyLayout = cLayout;
  cKeyVarient = cVarient;
  if(cKeyLayout.isEmpty()){ cKeyLayout = "us"; }

  connectKeyboardSlots();
}
Exemple #24
0
void KTimerDialog::slotInternalTimeout()
{
    emit timerTimeout();
    switch(buttonOnTimeout)
    {
        case Help:
            slotHelp();
            break;
        case Default:
            slotDefault();
            break;
        case Ok:
            slotOk();
            break;
        case Apply:
            applyPressed();
            break;
        case Try:
            slotTry();
            break;
        case Cancel:
            slotCancel();
            break;
        case Close:
            slotClose();
            break;
        /*case User1:
            slotUser1();
            break;
        case User2:
            slotUser2();
            break;*/
        case User3:
            slotUser3();
            break;
        case No:
            slotNo();
            break;
        case Yes:
            slotCancel();
            break;
        case Details:
            slotDetails();
            break;
        case Filler:
        case Stretch:
            kdDebug() << "Cannot execute button code " << buttonOnTimeout << endl;
            break;
    }
}
Exemple #25
0
/*!
 * \brief GUI::ChangeDeleteUserDialog::connects
 * Verbindet alle Signale und Slots die in dieser Klasse verwendet werden.
 */
void GUI::ChangeDeleteUserDialog::connects()
{
    connect(ui->closePushButton, SIGNAL(clicked()), this, SLOT(slotClose()));
    connect(ui->confirmPasswordLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotCheckIfSamePassword()));
    connect(ui->confirmAgainPasswordLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotCheckIfSamePassword()));
    connect(ui->addUserPushButton, SIGNAL(clicked()), this, SLOT(slotInsertUser()));
    connect(ui->emailLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotCheckEmailValidity(QString)));
    connect(ui->balanceLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotSetValue(QString)));
    connect(this, SIGNAL(signalUpdateUserList()), this, SLOT(slotUpdateUserList()));
    connect(ui->emailListView, SIGNAL(clicked(QModelIndex)), this, SLOT(slotSelectedEmail(QModelIndex)));
    connect(this, SIGNAL(signalUpdateUserData()), this, SLOT(slotUpdateUserData()));
    connect(ui->deletePushButton, SIGNAL(clicked()), this, SLOT(slotDeleteUser()));
    connect(ui->changePushButton, SIGNAL(clicked()),this,SLOT(slotChangeUser()));
}
Exemple #26
0
/*
 * starts visual ocr process. Depending on the ocr engine, this function creates
 * a new dialog, and shows it.
 */
bool KSANEOCR::startOCRVisible( QWidget *parent )
{
   if( visibleOCRRunning ) return( false );
   bool res = true;

   m_parent = parent;

   if( m_ocrEngine == GOCR )
   {
       m_ocrProcessDia = new KGOCRDialog ( parent, m_spellInitialConfig );
   }
   else if( m_ocrEngine == OCRAD )
   {
       m_ocrProcessDia = new ocradDialog( parent, m_spellInitialConfig );
   }
   else if( m_ocrEngine == KADMOS )
   {
#ifdef HAVE_KADMOS
/*** Kadmos Engine OCR ***/
       m_ocrProcessDia = new KadmosDialog( parent, m_spellInitialConfig );
#else
       KMessageBox::sorry(0, i18n("This version of Kooka was not compiled with KADMOS support.\n"
           "Please select another OCR engine in Kooka's options dialog."));
       kdDebug(28000) << "Sorry, this version of Kooka has no KADMOS support" << endl;
#endif /* HAVE_KADMOS */
   }
   else
   {
      kdDebug(28000) << "ERR Unknown OCR engine requested!" << endl;
   }

   /*
    * this part is independant from the engine again
    */
   if( m_ocrProcessDia )
   {
       m_ocrProcessDia->setupGui();

       m_ocrProcessDia->introduceImage( m_img );
       visibleOCRRunning = true;

      connect( m_ocrProcessDia, SIGNAL( user1Clicked()), this, SLOT( startOCRProcess() ));
      connect( m_ocrProcessDia, SIGNAL( closeClicked()), this, SLOT( slotClose() ));
      connect( m_ocrProcessDia, SIGNAL( user2Clicked()), this, SLOT( slotStopOCR() ));
      m_ocrProcessDia->show();

   }
   return( res );
}
Exemple #27
0
void TrayUI::slotItemClicked(QAction* act){
  QString code = act->whatsThis();
  if(code=="quit"){
    //Close the tray
    slotClose();
  }else if(code=="update"){
    //Re-check for updates by syscache
    BackendResync();
  }else if(code.isEmpty()){
    return;
  }else{
    //Launch one of the external applications
    launchApp(code);
  }
  
}
Exemple #28
0
void DTScheduleWidget::setupActions()
{
    connect(ui->acDelReception, SIGNAL(triggered()), this, SLOT(slotDelReception()));
    connect(ui->acClientInfo, SIGNAL(triggered()), this, SLOT(slotClientInfo()));

    connect(ui->mCalendar, SIGNAL(activated(QDate)), this, SLOT(slotChangeDate(QDate)));
    connect(ui->mCalendar, SIGNAL(clicked(QDate)), this, SLOT(slotChangeDate(QDate)));
    connect(ui->mDeReceptionDate, SIGNAL(dateChanged(QDate)), this, SLOT(slotChangeMoveDate(QDate)));
    connect(ui->mScheduleView, SIGNAL(eventAddReception(QString,QDateTime,QDateTime)), this, SLOT(slotAddReception(QString,QDateTime,QDateTime)));
    connect(ui->mScheduleView, SIGNAL(contextMenuRequested(QModelIndex,QPoint)), this, SLOT(slotContextMenuRequested(QModelIndex,QPoint)));

    connect(ui->mTbSplit, SIGNAL(clicked(bool)), this, SLOT(slotSplitView(bool)));
    connect(ui->mPbClose, SIGNAL(clicked()), this, SLOT(slotClose()));
    connect(ui->mTbUp, SIGNAL(clicked()), this, SLOT(slotMoveUp()));
    connect(ui->mTbDown, SIGNAL(clicked()), this, SLOT(slotMoveDown()));
}
int z3950results::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotClose(); break;
        case 1: slotSelectRecord(); break;
        case 2: slotUpdateQueryText(); break;
        default: ;
        }
        _id -= 3;
    }
    return _id;
}
Exemple #30
0
GuiPhantom::GuiPhantom(GuiView & lv)
	: GuiDialog(lv, "phantom", qt_("Phantom Settings"))
{
	setupUi(this);

	connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
	connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));

	connect(phantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
	connect(hphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
	connect(vphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));

	bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
	bc().setOK(okPB);
	bc().setCancel(closePB);
}