]> git.lyx.org Git - features.git/commitdiff
* replace many toggled(bool) with changed() signals
authorEdwin Leuven <e.leuven@gmail.com>
Wed, 17 Jan 2007 13:06:16 +0000 (13:06 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Wed, 17 Jan 2007 13:06:16 +0000 (13:06 +0000)
the former is also trigged when updating dialogs. we should use toggled(bool) to en/disable widgets and in situations when we are sure that we always want to act on a toggle

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16724 a592a061-630c-0410-9148-cb99ea01b6c8

19 files changed:
src/frontends/qt4/BulletsModule.C
src/frontends/qt4/BulletsModule.h
src/frontends/qt4/FloatPlacement.C
src/frontends/qt4/QBibtexDialog.C
src/frontends/qt4/QCharacterDialog.C
src/frontends/qt4/QDocumentDialog.C
src/frontends/qt4/QERTDialog.C
src/frontends/qt4/QGraphicsDialog.C
src/frontends/qt4/QIncludeDialog.C
src/frontends/qt4/QLPrintDialog.C
src/frontends/qt4/QLToolbar.C
src/frontends/qt4/QNoteDialog.C
src/frontends/qt4/QParagraphDialog.C
src/frontends/qt4/QPrefsDialog.C
src/frontends/qt4/QPrefsDialog.h
src/frontends/qt4/QRefDialog.C
src/frontends/qt4/QViewSourceDialog.C
src/frontends/qt4/ui/QPrefKeyboardUi.ui
src/frontends/qt4/ui/QPrefUi.ui

index e0847448c01f3f0595eb04166e321bae7b4a7ab5..80f2fb31ca3bb46ab61cf7976858a81d333be4dc 100644 (file)
@@ -143,7 +143,7 @@ void BulletsModule::bulletSelected(QListWidgetItem * item, QListWidgetItem *)
 }
 
 
-void BulletsModule::on_customCB_toggled(bool custom)
+void BulletsModule::on_customCB_clicked(bool custom)
 {
        if (!custom) {
                if (current_font_ < 0)
@@ -203,3 +203,4 @@ Bullet const & BulletsModule::getBullet(int level) const
 
 #include "BulletsModule_moc.cpp"
 
+
index 29fa1132680f1b564785979983a62d8b3124abd6..55b60881b6a921e5557f16f9c55862c8da1ae629 100644 (file)
@@ -43,7 +43,7 @@ Q_SIGNALS:
 protected Q_SLOTS:
 
        void on_bulletsizeCO_activated(int level);
-       void on_customCB_toggled(bool);
+       void on_customCB_clicked(bool);
        void on_customLE_textEdited(const QString &);
        void bulletSelected(QListWidgetItem *, QListWidgetItem*);
        void showLevel(int);
index 8e10ea17cb72d163a0a0f96a8a13ec5fd47d37d4..62c0e7c967f20047872e5d6acfafd2ba4712e337 100644 (file)
@@ -31,14 +31,13 @@ FloatPlacement::FloatPlacement(QWidget *)
        connect(pageCB, SIGNAL(clicked()), this, SLOT(tbhpClicked()));
        connect(herepossiblyCB, SIGNAL(clicked()), this, SLOT(tbhpClicked()));
        connect(defaultsCB, SIGNAL(clicked()), this, SLOT(tbhpClicked()));
-
-       connect(defaultsCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(ignoreCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(pageCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(heredefinitelyCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(herepossiblyCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(bottomCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
-       connect(topCB, SIGNAL(toggled(bool)), this, SLOT(changedSlot()));
+       connect(defaultsCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(ignoreCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(pageCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(heredefinitelyCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(herepossiblyCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(bottomCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
+       connect(topCB, SIGNAL(clicked()), this, SLOT(changedSlot()));
 
        spanCB->hide();
        sidewaysCB->hide();
@@ -238,3 +237,4 @@ void FloatPlacement::checkAllowed()
 
 #include "FloatPlacement_moc.cpp"
 
+
index 88e6159e312c6756392089546470c3c786330a7d..ac93f96222bf0fc668b4c93768f62ac0aa78afbe 100644 (file)
@@ -58,7 +58,7 @@ QBibtexDialog::QBibtexDialog(QBibtex * form)
                this, SLOT( change_adaptor() ) );
        connect(databaseLW, SIGNAL( itemSelectionChanged() ),
                this, SLOT( databaseChanged() ) );
-       connect(bibtocCB, SIGNAL( toggled(bool) ),
+       connect(bibtocCB, SIGNAL( clicked() ),
                this, SLOT( change_adaptor() ) );
        connect(btPrintCO, SIGNAL( activated(int) ),
                this, SLOT( change_adaptor() ) );
index daa96e02d69ce3db9bfbaa31a3cd51c1acf09239..04a0b6139faa58a6b9fcf203abe06d6704468eb9 100644 (file)
@@ -38,7 +38,7 @@ QCharacterDialog::QCharacterDialog(QCharacter * form)
     connect( shapeCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
     connect( colorCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
     connect( langCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
-    connect( toggleallCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( toggleallCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
 }
 
 
index dcd66369e5c9c54fef2eaa2da5abe3bd024798a5..bc248ee18d2a36ea2da24cd8fa623a306f6fc5aa 100644 (file)
@@ -90,14 +90,14 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        connect(textLayoutModule->lspacingCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(textLayoutModule->lspacingCO, SIGNAL(activated(int)), this, SLOT(setLSpacing(int)));
        connect(textLayoutModule->lspacingLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
-       connect(textLayoutModule->skipRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(textLayoutModule->indentRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(textLayoutModule->skipRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(textLayoutModule->indentRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(textLayoutModule->skipCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(textLayoutModule->skipLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(textLayoutModule->skipLengthCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(textLayoutModule->skipCO, SIGNAL(activated(int)), this, SLOT(setSkip(int)));
        connect(textLayoutModule->skipRB, SIGNAL(toggled(bool)), this, SLOT(enableSkip(bool)));
-       connect(textLayoutModule->twoColumnCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(textLayoutModule->twoColumnCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
                textLayoutModule->lspacingLE));
        textLayoutModule->skipLE->setValidator(unsignedLengthValidator(
@@ -136,8 +136,8 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        connect(fontModule->fontsizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(fontModule->scaleSansSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
        connect(fontModule->scaleTypewriterSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
-       connect(fontModule->fontScCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(fontModule->fontOsfCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(fontModule->fontScCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(fontModule->fontOsfCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
 
        for (int n = 0; tex_fonts_roman[n][0]; ++n) {
                QString font = toqstr(tex_fonts_roman_gui[n]);
@@ -174,15 +174,15 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        // page layout
        connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
        connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
-       connect(pageLayoutModule->portraitRB, SIGNAL(toggled(bool)), this, SLOT(portraitChanged()));
+       connect(pageLayoutModule->portraitRB, SIGNAL(clicked()), this, SLOT(portraitChanged()));
        connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(pageLayoutModule->paperheightLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(pageLayoutModule->paperwidthLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(pageLayoutModule->paperwidthUnitCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(pageLayoutModule->paperheightUnitCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(pageLayoutModule->portraitRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(pageLayoutModule->landscapeRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(pageLayoutModule->facingPagesCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(pageLayoutModule->portraitRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(pageLayoutModule->landscapeRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(pageLayoutModule->facingPagesCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(pageLayoutModule->pagestyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        pageLayoutModule->pagestyleCO->addItem(qt_("default"));
        pageLayoutModule->pagestyleCO->addItem(qt_("empty"));
@@ -221,7 +221,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        marginsModule = new UiWidget<Ui::MarginsUi>;
        // margins
        connect(marginsModule->marginCB, SIGNAL(toggled(bool)), this, SLOT(setCustomMargins(bool)));
-       connect(marginsModule->marginCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(marginsModule->marginCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(marginsModule->topLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
        connect(marginsModule->topUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(marginsModule->bottomLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
@@ -275,7 +275,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        connect(langModule->defaultencodingCB, SIGNAL(toggled(bool)), langModule->encodingCO, SLOT(setDisabled(bool)));
        // language & quote
        connect(langModule->languageCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(langModule->defaultencodingCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(langModule->defaultencodingCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(langModule->encodingCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(langModule->quoteStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        // language & quotes
@@ -320,11 +320,11 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citationStyleL, SLOT( setEnabled(bool) ) );
        connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citeStyleCO, SLOT( setEnabled(bool) ) );
        // biblio
-       connect(biblioModule->citeDefaultRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(biblioModule->citeDefaultRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(biblioModule->citeNatbibRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        connect(biblioModule->citeStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(biblioModule->citeJurabibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(biblioModule->bibtopicCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(biblioModule->citeJurabibRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(biblioModule->bibtopicCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
        // biblio
        biblioModule->citeStyleCO->addItem(qt_("Author-year"));
        biblioModule->citeStyleCO->addItem(qt_("Numerical"));
@@ -336,10 +336,10 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
        connect(mathsModule->amsautoCB, SIGNAL(toggled(bool)), mathsModule->amsCB, SLOT(setDisabled(bool)));
        connect(mathsModule->esintautoCB, SIGNAL(toggled(bool)), mathsModule->esintCB, SLOT(setDisabled(bool)));
        // maths
-       connect(mathsModule->amsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(mathsModule->amsautoCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(mathsModule->esintCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
-       connect(mathsModule->esintautoCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
+       connect(mathsModule->amsCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(mathsModule->amsautoCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(mathsModule->esintCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+       connect(mathsModule->esintautoCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
 
        latexModule = new UiWidget<Ui::LaTeXUi>;
        // latex class
index 9d4f5fa6550517ebc90b494ba12b6631803c4873..298090b9dfba3587b3f673cf3ef7b5e742d51169 100644 (file)
@@ -13,8 +13,7 @@
 #include "QERTDialog.h"
 #include "QERT.h"
 
-#include <qpushbutton.h>
-//Added by qt3to4:
+#include <QPushButton>
 #include <QCloseEvent>
 
 namespace lyx {
@@ -29,9 +28,9 @@ QERTDialog::QERTDialog(QERT * form)
        connect(closePB, SIGNAL(clicked()),
                form, SLOT(slotClose()));
 
-    connect( inlineRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( collapsedRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( openRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( inlineRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( collapsedRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( openRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
 }
 
 
index c9cf61ab5d5fedbcbba2897d3eb62edbafd59631..7567c5b15b557546d277daa18cd2c4fada9b6933 100644 (file)
@@ -53,13 +53,13 @@ QGraphicsDialog::QGraphicsDialog(QGraphics * form)
                this, SLOT( change_adaptor() ) );
        connect(subcaption, SIGNAL( textChanged(const QString&) ),
                this, SLOT( change_adaptor() ) );
-       connect(subfigure, SIGNAL( toggled(bool) ),
+       connect(subfigure, SIGNAL( clicked() ),
                this, SLOT( change_adaptor() ) );
        connect(latexoptions, SIGNAL( textChanged(const QString&) ),
                this, SLOT( change_adaptor() ) );
        connect(clip, SIGNAL( stateChanged(int) ),
                this, SLOT( change_adaptor() ) );
-       connect(displayGB, SIGNAL( toggled(bool) ),
+       connect(displayGB, SIGNAL( clicked() ),
                this, SLOT( change_adaptor() ) );
        connect(showCB, SIGNAL( currentIndexChanged(int) ),
                this, SLOT( change_adaptor() ) );
@@ -85,7 +85,7 @@ QGraphicsDialog::QGraphicsDialog(QGraphics * form)
                this, SLOT( change_adaptor() ) );
        connect(getPB, SIGNAL( clicked() ),
                this, SLOT( change_adaptor() ) );
-       connect(scaleCB, SIGNAL(toggled(bool)),
+       connect(scaleCB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()) );
        connect(Scale, SIGNAL( textChanged(const QString&) ),
                this, SLOT( change_adaptor() ) );
index 6fbebe6e107598751d024c0c9082c73155fe4220..379af0fee533346aa685185d0801c26ab81a7443 100644 (file)
@@ -33,13 +33,13 @@ QIncludeDialog::QIncludeDialog(QInclude * form)
        connect(closePB, SIGNAL(clicked()),
                form, SLOT(slotClose()));
 
-    connect( visiblespaceCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( visiblespaceCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
     connect( filenameED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
     connect( loadPB, SIGNAL( clicked() ), this, SLOT( loadClicked() ) );
     connect( browsePB, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
     connect( typeCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) );
     connect( typeCO, SIGNAL( activated(int) ), this, SLOT( typeChanged(int) ) );
-    connect( previewCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( previewCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
 
        filenameED->setValidator(new PathValidator(true, filenameED));
 }
index eb941495395537dd5b870c25c5f80849ca8f2cd5..ca408b5c9127e02fe89d83ba48bcfd8bd7dc7871 100644 (file)
@@ -38,15 +38,15 @@ QLPrintDialog::QLPrintDialog(QPrint * f)
     connect( printerED, SIGNAL( textChanged(const QString&) ), this, SLOT( printerChanged() ) );
     connect( fileED, SIGNAL( textChanged(const QString&) ), this, SLOT( fileChanged() ) );
     connect( browsePB, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
-    connect( allRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( reverseCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( collateCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( allRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( reverseCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( collateCB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
     connect( fromED, SIGNAL( textChanged(const QString&) ), this, SLOT( pagerangeChanged() ) );
     connect( fromED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
     connect( toED, SIGNAL( textChanged(const QString&) ), this, SLOT( pagerangeChanged() ) );
     connect( toED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
-    connect( fileRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( printerRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( fileRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( printerRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
     connect( rangeRB, SIGNAL( toggled(bool) ), fromED, SLOT( setEnabled(bool) ) );
     connect( rangeRB, SIGNAL( toggled(bool) ), toED, SLOT( setEnabled(bool) ) );
 }
index bf161e722d733563cef29cbcb9e661b63c8ca24e..41cce17ae8c2e0e45ff576272421899223903699 100644 (file)
@@ -183,7 +183,7 @@ void QLToolbar::add(FuncRequest const & func, docstring const & tooltip)
                tb->setToolTip(toqstr(tooltip));
                tb->setFocusPolicy(Qt::NoFocus);
                InsertTableWidget * iv = new InsertTableWidget(owner_, tb);
-               connect(tb, SIGNAL(toggled(bool)), iv, SLOT(show(bool)));
+               connect(tb, SIGNAL(clicked(bool)), iv, SLOT(show(bool)));
                connect(iv, SIGNAL(visible(bool)), tb, SLOT(setChecked(bool)));
                connect(this, SIGNAL(updated()), iv, SLOT(updateParent()));
                addWidget(tb);
index 74379167984d113361f5337c398be473d80f1067..b0303481dda8139f5a44873053d1c64aa3fc0625 100644 (file)
@@ -30,11 +30,11 @@ QNoteDialog::QNoteDialog(QNote * form)
        connect(closePB, SIGNAL(clicked()),
                form, SLOT(slotClose()));
 
-    connect( noteRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( greyedoutRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( commentRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( framedRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
-    connect( shadedRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
+    connect( noteRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( greyedoutRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( commentRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( framedRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
+    connect( shadedRB, SIGNAL( clicked() ), this, SLOT( change_adaptor() ) );
 }
 
 
index c069591d7f957228c5c4a634862ce124dd6ace47..bf4f2fdc48410527522363758518cfaf099026fa 100644 (file)
@@ -44,7 +44,7 @@ QParagraphDialog::QParagraphDialog(QParagraph * form)
                this, SLOT( enableLinespacingValue(int) ) );
        connect(linespacingValue, SIGNAL( textChanged(const QString&) ), 
                this, SLOT( change_adaptor() ) );
-       connect(indentCB, SIGNAL( toggled(bool) ), 
+       connect(indentCB, SIGNAL( clicked() ), 
                this, SLOT( change_adaptor() ) );
        connect(labelWidth, SIGNAL( textChanged(const QString&) ), 
                this, SLOT( change_adaptor() ) );
index dbf7c7193a1904b381565ea14ff122e2556f3c78..5b6127dc5e58a1bcb6c2360d1e10a4144747e4ed 100644 (file)
@@ -241,20 +241,7 @@ PrefKeyboard::PrefKeyboard(QPrefs * form, QWidget * parent)
 {
        setupUi(this);
 
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               firstKeymapLA, SLOT( setEnabled(bool) ) );
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               secondKeymapLA, SLOT( setEnabled(bool) ) );
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               firstKeymapED, SLOT( setEnabled(bool) ) );
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               secondKeymapED, SLOT( setEnabled(bool) ) );
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               firstKeymapPB, SLOT( setEnabled(bool) ) );
-       connect(keymapCB, SIGNAL( toggled(bool) ),
-               secondKeymapPB, SLOT( setEnabled(bool) ) );
-
-       connect(keymapCB, SIGNAL(toggled(bool)),
+       connect(keymapCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(firstKeymapED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
@@ -276,13 +263,6 @@ void PrefKeyboard::update(LyXRC const & rc)
 {
        // FIXME: can derive CB from the two EDs
        keymapCB->setChecked(rc.use_kbmap);
-       // no idea why we need these. Fscking Qt.
-       firstKeymapED->setEnabled(rc.use_kbmap);
-       firstKeymapPB->setEnabled(rc.use_kbmap);
-       firstKeymapLA->setEnabled(rc.use_kbmap);
-       secondKeymapED->setEnabled(rc.use_kbmap);
-       secondKeymapPB->setEnabled(rc.use_kbmap);
-       secondKeymapLA->setEnabled(rc.use_kbmap);
        firstKeymapED->setText(external_path(rc.primary_kbmap));
        secondKeymapED->setText(external_path(rc.secondary_kbmap));
 }
@@ -296,7 +276,7 @@ QString PrefKeyboard::testKeymap(QString keymap)
 
 void PrefKeyboard::on_firstKeymapPB_clicked(bool)
 {
-       QString file = testKeymap(firstKeymapED->text());
+       QString const file = testKeymap(firstKeymapED->text());
        if (!file.isEmpty())
                firstKeymapED->setText(file);
 }
@@ -304,12 +284,23 @@ void PrefKeyboard::on_firstKeymapPB_clicked(bool)
 
 void PrefKeyboard::on_secondKeymapPB_clicked(bool)
 {
-       QString file = testKeymap(secondKeymapED->text());
+       QString const file = testKeymap(secondKeymapED->text());
        if (!file.isEmpty())
                secondKeymapED->setText(file);
 }
 
 
+void PrefKeyboard::on_keymapCB_toggled(bool keymap)
+{
+       firstKeymapLA->setEnabled(keymap);
+       secondKeymapLA->setEnabled(keymap);
+       firstKeymapED->setEnabled(keymap);
+       secondKeymapED->setEnabled(keymap);
+       firstKeymapPB->setEnabled(keymap);
+       secondKeymapPB->setEnabled(keymap);
+}
+
+
 PrefLatex::PrefLatex(QPrefs * form, QWidget * parent)
 : PrefModule(_(Outputs), _("LaTeX"), form, parent)
 {
@@ -322,7 +313,7 @@ PrefLatex::PrefLatex(QPrefs * form, QWidget * parent)
                this, SIGNAL(changed()));
        connect(latexIndexED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
-       connect(latexAutoresetCB, SIGNAL(toggled(bool)),
+       connect(latexAutoresetCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(latexDviPaperED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
@@ -582,7 +573,7 @@ PrefCygwinPath::PrefCygwinPath(QWidget * parent)
 : PrefModule(_(Outputs), _("Paths"), 0, parent)
 {
        setupUi(this);
-       connect(pathCB, SIGNAL(toggled(bool)),
+       connect(pathCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
 }
 
@@ -781,9 +772,9 @@ PrefSpellchecker::PrefSpellchecker(QPrefs * form, QWidget * parent)
                this, SIGNAL(changed()));
        connect(persDictionaryED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
-       connect(compoundWordCB, SIGNAL(toggled(bool)),
+       connect(compoundWordCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(inputEncodingCB, SIGNAL(toggled(bool)),
+       connect(inputEncodingCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
 
        spellCommandCO->addItem(qt_("ispell"));
@@ -1295,9 +1286,9 @@ PrefFileformats::PrefFileformats(QPrefs * form, QWidget * parent)
                this, SLOT(fileformat_changed()));
        connect(editorED, SIGNAL(textChanged(const QString&)),
                this, SLOT(fileformat_changed()));
-       connect(documentCB, SIGNAL(toggled(bool)),
+       connect(documentCB, SIGNAL(clicked()),
                this, SLOT(fileformat_changed()));
-       connect(vectorCB, SIGNAL(toggled(bool)),
+       connect(vectorCB, SIGNAL(clicked()),
                this, SLOT(fileformat_changed()));
        connect(formatNewPB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
@@ -1484,17 +1475,17 @@ PrefLanguage::PrefLanguage(QWidget * parent)
 {
        setupUi(this);
 
-       connect(rtlCB, SIGNAL(toggled(bool)),
+       connect(rtlCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(markForeignCB, SIGNAL(toggled(bool)),
+       connect(markForeignCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(autoBeginCB, SIGNAL(toggled(bool)),
+       connect(autoBeginCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(autoEndCB, SIGNAL(toggled(bool)),
+       connect(autoEndCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(useBabelCB, SIGNAL(toggled(bool)),
+       connect(useBabelCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(globalCB, SIGNAL(toggled(bool)),
+       connect(globalCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(languagePackageED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
@@ -1559,7 +1550,7 @@ PrefPrinter::PrefPrinter(QWidget * parent)
 {
        setupUi(this);
 
-       connect(printerAdaptCB, SIGNAL(toggled(bool)),
+       connect(printerAdaptCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(printerCommandED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
@@ -1660,31 +1651,23 @@ PrefUserInterface::PrefUserInterface(QPrefs * form, QWidget * parent)
                this, SIGNAL(changed()));
        connect(bindFileED, SIGNAL(textChanged(const QString&)),
                this, SIGNAL(changed()));
-       connect(restoreCursorCB, SIGNAL(toggled(bool)),
+       connect(restoreCursorCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(loadSessionCB, SIGNAL(toggled(bool)),
+       connect(loadSessionCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(loadWindowSizeCB, SIGNAL(toggled(bool)),
+       connect(loadWindowSizeCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
-       connect(loadWindowSizeCB, SIGNAL(toggled(bool)),
-               windowWidthLA, SLOT(setDisabled(bool)));
-       connect(loadWindowSizeCB, SIGNAL(toggled(bool)),
-               windowHeightLA, SLOT(setDisabled(bool)));
-       connect(loadWindowSizeCB, SIGNAL(toggled(bool)),
-               windowWidthSB, SLOT(setDisabled(bool)));
-       connect(loadWindowSizeCB, SIGNAL(toggled(bool)),
-               windowHeightSB, SLOT(setDisabled(bool)));
-       connect(loadWindowLocationCB, SIGNAL(toggled(bool)),
+       connect(loadWindowLocationCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(windowWidthSB, SIGNAL(valueChanged(int)),
                this, SIGNAL(changed()));
        connect(windowHeightSB, SIGNAL(valueChanged(int)),
                this, SIGNAL(changed()));
-       connect(cursorFollowsCB, SIGNAL(toggled(bool)),
+       connect(cursorFollowsCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(autoSaveSB, SIGNAL(valueChanged(int)),
                this, SIGNAL(changed()));
-       connect(autoSaveCB, SIGNAL(toggled(bool)),
+       connect(autoSaveCB, SIGNAL(clicked()),
                this, SIGNAL(changed()));
        connect(lastfilesSB, SIGNAL(valueChanged(int)),
                this, SIGNAL(changed()));
@@ -1721,10 +1704,6 @@ void PrefUserInterface::update(LyXRC const & rc)
        loadSessionCB->setChecked(rc.load_session);
        bool loadWindowSize = rc.geometry_width == 0 && rc.geometry_height == 0;
        loadWindowSizeCB->setChecked(loadWindowSize);
-       windowWidthSB->setEnabled(!loadWindowSize);
-       windowHeightSB->setEnabled(!loadWindowSize);
-       windowWidthLA->setEnabled(!loadWindowSize);
-       windowHeightLA->setEnabled(!loadWindowSize);
        if (!loadWindowSize) {
                windowWidthSB->setValue(rc.geometry_width);
                windowHeightSB->setValue(rc.geometry_height);
@@ -1758,6 +1737,15 @@ void PrefUserInterface::select_bind()
 }
 
 
+void PrefUserInterface::on_loadWindowSizeCB_toggled(bool loadwindowsize)
+{
+       windowWidthLA->setDisabled(loadwindowsize);
+       windowHeightLA->setDisabled(loadwindowsize);
+       windowWidthSB->setDisabled(loadwindowsize);
+       windowHeightSB->setDisabled(loadwindowsize);
+}
+
+
 PrefIdentity::PrefIdentity(QWidget * parent)
 : PrefModule(docstring(), _("Identity"), 0, parent)
 {
index eb03c5ffdf8c48c59d37a0a245912b1680b17f10..1322984a7a2caa5c05a0a42a3ae7731fd76379aa 100644 (file)
@@ -124,6 +124,7 @@ public:
 private Q_SLOTS:
        void on_firstKeymapPB_clicked(bool);
        void on_secondKeymapPB_clicked(bool);
+       void on_keymapCB_toggled(bool);
 
 private:
        QString testKeymap(QString keymap);
@@ -354,6 +355,7 @@ public:
 public Q_SLOTS:
        void select_ui();
        void select_bind();
+       void on_loadWindowSizeCB_toggled(bool);
 
 };
 
index 0427198b8c42e71f427c545ee6b9607c7a701ed8..71c5301f0c4fef4127a50b8ec8e0e926a16c7365 100644 (file)
@@ -44,7 +44,7 @@ QRefDialog::QRefDialog(QRef * form)
                this, SLOT( refHighlighted(QListWidgetItem *) ) );
        connect( refsLW, SIGNAL(  itemActivated(QListWidgetItem *) ), 
                this, SLOT( refSelected(QListWidgetItem *) ) );
-       connect( sortCB, SIGNAL( toggled(bool) ),
+       connect( sortCB, SIGNAL( clicked(bool) ),
                this, SLOT( sortToggled(bool) ) );
        connect( gotoPB, SIGNAL( clicked() ), 
                this, SLOT( gotoClicked() ) );
index 281c65725d2c2f894645f1215ccaecb1ca0cdd1b..1bcf73344051d3030b596b07a89b99a550a2084d 100644 (file)
@@ -27,7 +27,7 @@ QViewSourceDialog::QViewSourceDialog(QViewSource * form)
        setupUi(this);
 
        connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
-       connect(viewFullSourceCB, SIGNAL(toggled(bool)),
+       connect(viewFullSourceCB, SIGNAL(clicked()),
                this, SLOT(slotUpdate()));
        connect(autoUpdateCB, SIGNAL(toggled(bool)),
                updatePB, SLOT(setDisabled(bool)));
index 12ee4d9593bb8108eba6b549b9db6549d1a208f4..ea65afb2d85bab86834357a60b27774c1f55d27f 100644 (file)
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>QPrefKeyboardUi</class>
  <widget class="QWidget" name="QPrefKeyboardUi" >
   <property name="geometry" >
     </spacer>
    </item>
    <item row="1" column="1" >
-    <widget class="QLineEdit" name="firstKeymapED" />
+    <widget class="QLineEdit" name="firstKeymapED" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
+    </widget>
    </item>
    <item row="2" column="1" >
-    <widget class="QLineEdit" name="secondKeymapED" />
+    <widget class="QLineEdit" name="secondKeymapED" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
+    </widget>
    </item>
    <item row="2" column="2" >
     <widget class="QPushButton" name="secondKeymapPB" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
      <property name="text" >
       <string>Bro&amp;wse...</string>
      </property>
@@ -56,6 +64,9 @@
    </item>
    <item row="2" column="0" >
     <widget class="QLabel" name="secondKeymapLA" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
      <property name="text" >
       <string>S&amp;econd:</string>
      </property>
@@ -66,6 +77,9 @@
    </item>
    <item row="1" column="0" >
     <widget class="QLabel" name="firstKeymapLA" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
      <property name="text" >
       <string>&amp;First:</string>
      </property>
@@ -76,6 +90,9 @@
    </item>
    <item row="1" column="2" >
     <widget class="QPushButton" name="firstKeymapPB" >
+     <property name="enabled" >
+      <bool>false</bool>
+     </property>
      <property name="text" >
       <string>Br&amp;owse...</string>
      </property>
      <property name="text" >
       <string>Use &amp;keyboard map</string>
      </property>
+     <property name="checked" >
+      <bool>false</bool>
+     </property>
     </widget>
    </item>
   </layout>
  </widget>
- <pixmapfunction></pixmapfunction>
- <includes>
-  <include location="local" >qt_helpers.h</include>
- </includes>
  <tabstops>
   <tabstop>keymapCB</tabstop>
   <tabstop>firstKeymapED</tabstop>
   <tabstop>secondKeymapED</tabstop>
   <tabstop>secondKeymapPB</tabstop>
  </tabstops>
+ <includes>
+  <include location="local" >qt_helpers.h</include>
+ </includes>
  <resources/>
  <connections/>
 </ui>
index 8ca5be6baf7ccba5fd652afb31495646f8344099..80f2379d4537de008bfca418c9a5107c90ed4209 100644 (file)
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>QPrefUi</class>
  <widget class="QWidget" name="QPrefUi" >
   <property name="geometry" >
         </item>
         <item>
          <widget class="QSpinBox" name="windowWidthSB" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
           <property name="maximum" >
            <number>9999</number>
           </property>
         </item>
         <item>
          <widget class="QSpinBox" name="windowHeightSB" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
           <property name="maximum" >
            <number>9999</number>
           </property>
    </item>
   </layout>
  </widget>
- <pixmapfunction></pixmapfunction>
- <includes>
-  <include location="local" >qt_helpers.h</include>
- </includes>
  <tabstops>
   <tabstop>uiFileED</tabstop>
   <tabstop>uiFilePB</tabstop>
   <tabstop>lastfilesSB</tabstop>
   <tabstop>cursorFollowsCB</tabstop>
  </tabstops>
+ <includes>
+  <include location="local" >qt_helpers.h</include>
+ </includes>
  <resources/>
  <connections/>
 </ui>