mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
* replace many toggled(bool) with changed() signals
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
This commit is contained in:
parent
67ae65f430
commit
3931b65341
@ -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"
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
||||
|
||||
|
@ -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() ) );
|
||||
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -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() ) );
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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) ) );
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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() ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -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() ) );
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
@ -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() ) );
|
||||
|
@ -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)));
|
||||
|
@ -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" >
|
||||
@ -39,13 +36,24 @@
|
||||
</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&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&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>&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&owse...</string>
|
||||
</property>
|
||||
@ -89,14 +106,13 @@
|
||||
<property name="text" >
|
||||
<string>Use &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>
|
||||
@ -104,6 +120,9 @@
|
||||
<tabstop>secondKeymapED</tabstop>
|
||||
<tabstop>secondKeymapPB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -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" >
|
||||
@ -214,6 +211,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="windowWidthSB" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>9999</number>
|
||||
</property>
|
||||
@ -237,6 +237,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="windowHeightSB" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="maximum" >
|
||||
<number>9999</number>
|
||||
</property>
|
||||
@ -373,10 +376,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<tabstops>
|
||||
<tabstop>uiFileED</tabstop>
|
||||
<tabstop>uiFilePB</tabstop>
|
||||
@ -393,6 +392,9 @@
|
||||
<tabstop>lastfilesSB</tabstop>
|
||||
<tabstop>cursorFollowsCB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
Reference in New Issue
Block a user