From 470aba2a0e552f27d55992372c09f15af9725fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 11 Sep 2007 18:33:42 +0000 Subject: [PATCH] cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20217 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/Dialog.h | 2 +- src/frontends/qt4/DockView.h | 2 +- src/frontends/qt4/GuiBibitem.cpp | 4 ++-- src/frontends/qt4/GuiBibitem.h | 4 ++-- src/frontends/qt4/GuiBibtex.cpp | 6 +++--- src/frontends/qt4/GuiBibtex.h | 4 ++-- src/frontends/qt4/GuiBox.cpp | 4 ++-- src/frontends/qt4/GuiBox.h | 4 ++-- src/frontends/qt4/GuiBranch.cpp | 4 ++-- src/frontends/qt4/GuiBranch.h | 4 ++-- src/frontends/qt4/GuiChanges.cpp | 4 ++-- src/frontends/qt4/GuiChanges.h | 4 ++-- src/frontends/qt4/GuiCharacter.cpp | 4 ++-- src/frontends/qt4/GuiCharacter.h | 4 ++-- src/frontends/qt4/GuiCitation.cpp | 2 +- src/frontends/qt4/GuiCitation.h | 2 +- src/frontends/qt4/GuiDelimiter.cpp | 4 ++-- src/frontends/qt4/GuiDelimiter.h | 4 ++-- src/frontends/qt4/GuiDialog.cpp | 8 +------ src/frontends/qt4/GuiDialog.h | 7 ++---- src/frontends/qt4/GuiDocument.cpp | 8 +++---- src/frontends/qt4/GuiDocument.h | 4 ++-- src/frontends/qt4/GuiERT.cpp | 4 ++-- src/frontends/qt4/GuiERT.h | 4 ++-- src/frontends/qt4/GuiErrorList.cpp | 4 ++-- src/frontends/qt4/GuiErrorList.h | 4 ++-- src/frontends/qt4/GuiExternal.cpp | 30 +++++++++++++------------- src/frontends/qt4/GuiExternal.h | 4 ++-- src/frontends/qt4/GuiFloat.cpp | 4 ++-- src/frontends/qt4/GuiFloat.h | 4 ++-- src/frontends/qt4/GuiGraphics.cpp | 4 ++-- src/frontends/qt4/GuiGraphics.h | 4 ++-- src/frontends/qt4/GuiInclude.cpp | 4 ++-- src/frontends/qt4/GuiInclude.h | 4 ++-- src/frontends/qt4/GuiIndex.cpp | 4 ++-- src/frontends/qt4/GuiIndex.h | 4 ++-- src/frontends/qt4/GuiListings.cpp | 6 +++--- src/frontends/qt4/GuiListings.h | 4 ++-- src/frontends/qt4/GuiLog.cpp | 6 +++--- src/frontends/qt4/GuiLog.h | 4 ++-- src/frontends/qt4/GuiMathMatrix.cpp | 2 +- src/frontends/qt4/GuiMathMatrix.h | 2 +- src/frontends/qt4/GuiNomencl.cpp | 4 ++-- src/frontends/qt4/GuiNomencl.h | 4 ++-- src/frontends/qt4/GuiNote.cpp | 4 ++-- src/frontends/qt4/GuiNote.h | 4 ++-- src/frontends/qt4/GuiParagraph.cpp | 4 ++-- src/frontends/qt4/GuiParagraph.h | 4 ++-- src/frontends/qt4/GuiPrefs.cpp | 4 ++-- src/frontends/qt4/GuiPrefs.h | 4 ++-- src/frontends/qt4/GuiPrint.cpp | 4 ++-- src/frontends/qt4/GuiPrint.h | 4 ++-- src/frontends/qt4/GuiRef.cpp | 14 ++++++------ src/frontends/qt4/GuiRef.h | 4 ++-- src/frontends/qt4/GuiSearch.cpp | 6 +++--- src/frontends/qt4/GuiSearch.h | 2 +- src/frontends/qt4/GuiSendto.cpp | 4 ++-- src/frontends/qt4/GuiSendto.h | 4 ++-- src/frontends/qt4/GuiShowFile.cpp | 4 ++-- src/frontends/qt4/GuiShowFile.h | 4 ++-- src/frontends/qt4/GuiSpellchecker.cpp | 4 ++-- src/frontends/qt4/GuiSpellchecker.h | 4 ++-- src/frontends/qt4/GuiTabular.cpp | 4 ++-- src/frontends/qt4/GuiTabular.h | 4 ++-- src/frontends/qt4/GuiTabularCreate.cpp | 2 +- src/frontends/qt4/GuiTabularCreate.h | 2 +- src/frontends/qt4/GuiTexinfo.cpp | 2 +- src/frontends/qt4/GuiTexinfo.h | 2 +- src/frontends/qt4/GuiThesaurus.cpp | 6 +++--- src/frontends/qt4/GuiThesaurus.h | 4 ++-- src/frontends/qt4/GuiURL.cpp | 4 ++-- src/frontends/qt4/GuiURL.h | 4 ++-- src/frontends/qt4/GuiVSpace.cpp | 4 ++-- src/frontends/qt4/GuiVSpace.h | 4 ++-- src/frontends/qt4/GuiWrap.cpp | 4 ++-- src/frontends/qt4/GuiWrap.h | 4 ++-- src/frontends/qt4/qt_helpers.h | 2 +- 77 files changed, 166 insertions(+), 175 deletions(-) diff --git a/src/frontends/controllers/Dialog.h b/src/frontends/controllers/Dialog.h index 03095cf2f2..fb2bef474e 100644 --- a/src/frontends/controllers/Dialog.h +++ b/src/frontends/controllers/Dialog.h @@ -98,7 +98,7 @@ public: * to a particular dialog. */ //@{ - virtual Controller & controller() const = 0; + virtual Controller & controller() = 0; //@} /** \c Button controller part diff --git a/src/frontends/qt4/DockView.h b/src/frontends/qt4/DockView.h index e5c8773cef..261c4b532d 100644 --- a/src/frontends/qt4/DockView.h +++ b/src/frontends/qt4/DockView.h @@ -65,7 +65,7 @@ public: } bool isClosing() const { return false; } void partialUpdateView(int /*id*/) {} - Controller & controller() const { return *controller_; } + Controller & controller() { return *controller_; } std::string name() const { return name_; } //@} private: diff --git a/src/frontends/qt4/GuiBibitem.cpp b/src/frontends/qt4/GuiBibitem.cpp index 812c2299f7..1ee6a81681 100644 --- a/src/frontends/qt4/GuiBibitem.cpp +++ b/src/frontends/qt4/GuiBibitem.cpp @@ -46,7 +46,7 @@ GuiBibitemDialog::GuiBibitemDialog(LyXView & lv) } -ControlCommand & GuiBibitemDialog::controller() const +ControlCommand & GuiBibitemDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -65,7 +65,7 @@ void GuiBibitemDialog::closeEvent(QCloseEvent *e) } -void GuiBibitemDialog::update_contents() +void GuiBibitemDialog::updateContents() { keyED->setText(toqstr(controller().params()["key"])); labelED->setText(toqstr(controller().params()["label"])); diff --git a/src/frontends/qt4/GuiBibitem.h b/src/frontends/qt4/GuiBibitem.h index c46c0d9533..671021a130 100644 --- a/src/frontends/qt4/GuiBibitem.h +++ b/src/frontends/qt4/GuiBibitem.h @@ -33,7 +33,7 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlCommand & controller() const; + ControlCommand & controller(); private: /// @@ -41,7 +41,7 @@ private: /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index a39de142a4..4b5fd27721 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -111,7 +111,7 @@ GuiBibtexDialog::GuiBibtexDialog(LyXView & lv) } -ControlBibtex & GuiBibtexDialog::controller() const +ControlBibtex & GuiBibtexDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -233,7 +233,7 @@ void GuiBibtexDialog::deletePressed() void GuiBibtexDialog::databaseChanged() { - deletePB->setEnabled(!readOnly() && databaseLW->currentRow() != -1); + deletePB->setEnabled(!controller().isBufferReadonly() && databaseLW->currentRow() != -1); } @@ -250,7 +250,7 @@ void GuiBibtexDialog::closeEvent(QCloseEvent *e) } -void GuiBibtexDialog::update_contents() +void GuiBibtexDialog::updateContents() { bool bibtopic = controller().usingBibtopic(); diff --git a/src/frontends/qt4/GuiBibtex.h b/src/frontends/qt4/GuiBibtex.h index 77fef6a21f..bccbb25c90 100644 --- a/src/frontends/qt4/GuiBibtex.h +++ b/src/frontends/qt4/GuiBibtex.h @@ -55,13 +55,13 @@ private: private: /// parent controller - ControlBibtex & controller() const; + ControlBibtex & controller(); /// virtual bool isValid(); /// Apply changes virtual void applyView(); /// update - virtual void update_contents(); + virtual void updateContents(); /// GuiBibtexAddDialog * add_; diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index 2c70cbdc97..0e6b55c3dd 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -112,7 +112,7 @@ GuiBoxDialog::GuiBoxDialog(LyXView & lv) } -ControlBox & GuiBoxDialog::controller() const +ControlBox & GuiBoxDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -172,7 +172,7 @@ void GuiBoxDialog::restoreClicked() } -void GuiBoxDialog::update_contents() +void GuiBoxDialog::updateContents() { string type(controller().params().type); for (unsigned int i = 0; i < gui_names_.size(); ++i) { diff --git a/src/frontends/qt4/GuiBox.h b/src/frontends/qt4/GuiBox.h index badaf7eb5d..938721a285 100644 --- a/src/frontends/qt4/GuiBox.h +++ b/src/frontends/qt4/GuiBox.h @@ -39,7 +39,7 @@ private: void closeEvent(QCloseEvent * e); /// parent controller - ControlBox & controller() const; + ControlBox & controller(); /// add and remove special lengths void setSpecial(bool ibox); /// only show valid inner box items @@ -48,7 +48,7 @@ private: /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// std::vector ids_; diff --git a/src/frontends/qt4/GuiBranch.cpp b/src/frontends/qt4/GuiBranch.cpp index b687f82a0e..1a85b35fff 100644 --- a/src/frontends/qt4/GuiBranch.cpp +++ b/src/frontends/qt4/GuiBranch.cpp @@ -43,7 +43,7 @@ GuiBranchDialog::GuiBranchDialog(LyXView & lv) } -ControlBranch & GuiBranchDialog::controller() const +ControlBranch & GuiBranchDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -62,7 +62,7 @@ void GuiBranchDialog::change_adaptor() } -void GuiBranchDialog::update_contents() +void GuiBranchDialog::updateContents() { typedef BranchList::const_iterator const_iterator; diff --git a/src/frontends/qt4/GuiBranch.h b/src/frontends/qt4/GuiBranch.h index eb8512132f..b0a78638c6 100644 --- a/src/frontends/qt4/GuiBranch.h +++ b/src/frontends/qt4/GuiBranch.h @@ -33,11 +33,11 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlBranch & controller() const; + ControlBranch & controller(); /// Apply changes void applyView(); /// Update dialog before showing it - void update_contents(); + void updateContents(); }; diff --git a/src/frontends/qt4/GuiChanges.cpp b/src/frontends/qt4/GuiChanges.cpp index be9edb85da..e615c14a0f 100644 --- a/src/frontends/qt4/GuiChanges.cpp +++ b/src/frontends/qt4/GuiChanges.cpp @@ -46,7 +46,7 @@ GuiChangesDialog::GuiChangesDialog(LyXView & lv) } -ControlChanges & GuiChangesDialog::controller() const +ControlChanges & GuiChangesDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -59,7 +59,7 @@ void GuiChangesDialog::closeEvent(QCloseEvent *e) } -void GuiChangesDialog::update_contents() +void GuiChangesDialog::updateContents() { docstring text; docstring author = controller().getChangeAuthor(); diff --git a/src/frontends/qt4/GuiChanges.h b/src/frontends/qt4/GuiChanges.h index 5fcee96d19..ed895f0dfc 100644 --- a/src/frontends/qt4/GuiChanges.h +++ b/src/frontends/qt4/GuiChanges.h @@ -33,8 +33,8 @@ protected Q_SLOTS: private: void closeEvent(QCloseEvent * e); - ControlChanges & controller() const; - void update_contents(); + ControlChanges & controller(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index 83da18bb24..14c2b17f4b 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -106,7 +106,7 @@ GuiCharacterDialog::GuiCharacterDialog(LyXView & lv) } -ControlCharacter & GuiCharacterDialog::controller() const +ControlCharacter & GuiCharacterDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -156,7 +156,7 @@ static int findPos2nd(vector > const & vec, B const & val) } -void GuiCharacterDialog::update_contents() +void GuiCharacterDialog::updateContents() { ControlCharacter const & ctrl = controller(); diff --git a/src/frontends/qt4/GuiCharacter.h b/src/frontends/qt4/GuiCharacter.h index 512a3e331e..b9e7eedc02 100644 --- a/src/frontends/qt4/GuiCharacter.h +++ b/src/frontends/qt4/GuiCharacter.h @@ -35,11 +35,11 @@ protected Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlCharacter & controller() const; + ControlCharacter & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); std::vector family; std::vector series; diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 4aaf7034cf..4f2e5cc625 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -102,7 +102,7 @@ GuiCitationDialog::GuiCitationDialog(LyXView & lv) } -ControlCitation & GuiCitationDialog::controller() const +ControlCitation & GuiCitationDialog::controller() { return static_cast(GuiDialog::controller()); } diff --git a/src/frontends/qt4/GuiCitation.h b/src/frontends/qt4/GuiCitation.h index 339da17822..95a0158dce 100644 --- a/src/frontends/qt4/GuiCitation.h +++ b/src/frontends/qt4/GuiCitation.h @@ -53,7 +53,7 @@ public Q_SLOTS: private: /// - ControlCitation & controller() const; + ControlCitation & controller(); /// void closeEvent(QCloseEvent * e); /// prepares a call to GuiCitation::searchKeys when we diff --git a/src/frontends/qt4/GuiDelimiter.cpp b/src/frontends/qt4/GuiDelimiter.cpp index da0fbd5bad..230c1783b7 100644 --- a/src/frontends/qt4/GuiDelimiter.cpp +++ b/src/frontends/qt4/GuiDelimiter.cpp @@ -110,13 +110,13 @@ GuiDelimiterDialog::GuiDelimiterDialog(LyXView & lv) } -ControlMath & GuiDelimiterDialog::controller() const +ControlMath & GuiDelimiterDialog::controller() { return static_cast(GuiDialog::controller()); } -char_type GuiDelimiterDialog::doMatch(char_type const symbol) const +char_type GuiDelimiterDialog::doMatch(char_type const symbol) { string const & str = controller().texName(symbol); string match; diff --git a/src/frontends/qt4/GuiDelimiter.h b/src/frontends/qt4/GuiDelimiter.h index e3724500b1..1edf6248e2 100644 --- a/src/frontends/qt4/GuiDelimiter.h +++ b/src/frontends/qt4/GuiDelimiter.h @@ -39,11 +39,11 @@ public Q_SLOTS: private: /// - char_type doMatch(char_type const symbol) const; + char_type doMatch(char_type const symbol); /// void updateTeXCode(int size); /// parent controller - ControlMath & controller() const; + ControlMath & controller(); /// TeX code that will be inserted. QString tex_code_; diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp index 095928db53..941568ccf9 100644 --- a/src/frontends/qt4/GuiDialog.cpp +++ b/src/frontends/qt4/GuiDialog.cpp @@ -114,12 +114,6 @@ bool GuiDialog::isVisibleView() const } -bool GuiDialog::readOnly() const -{ - return controller().isBufferReadonly(); -} - - void GuiDialog::showView() { QSize const hint = sizeHint(); @@ -160,7 +154,7 @@ void GuiDialog::updateView() // protect the BC from unwarranted state transitions updating_ = true; - update_contents(); + updateContents(); updating_ = false; setUpdatesEnabled(true); diff --git a/src/frontends/qt4/GuiDialog.h b/src/frontends/qt4/GuiDialog.h index 7eafe75c1a..1628efd16a 100644 --- a/src/frontends/qt4/GuiDialog.h +++ b/src/frontends/qt4/GuiDialog.h @@ -50,7 +50,6 @@ public Q_SLOTS: void slotClose(); public: - /** Check whether we may apply our data. * * The buttons are disabled if not and (re-)enabled if yes. @@ -68,8 +67,6 @@ public: void setViewTitle(docstring const & title); - /// - bool readOnly() const; /// the dialog has changed contents virtual void changed(); @@ -77,7 +74,7 @@ public: /// default: do nothing virtual void applyView() {} /// default: do nothing - virtual void update_contents() {} + virtual void updateContents() {} protected: /// Hide the dialog. @@ -126,7 +123,7 @@ public: * Methods to access the various components making up a dialog. */ //@{ - virtual Controller & controller() const { return *controller_; } + virtual Controller & controller() { return *controller_; } //@} /** Defaults to nothing. Can be used by the Controller, however, to diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 6d051e323c..b586395f54 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -612,7 +612,7 @@ GuiDocumentDialog::GuiDocumentDialog(LyXView & lv) } -ControlDocument & GuiDocumentDialog::controller() const +ControlDocument & GuiDocumentDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -849,7 +849,7 @@ void GuiDocumentDialog::classChanged() params.setJustBaseClass(tc); if (lyxrc.auto_reset_options) params.useClassDefaults(); - update_contents(); + updateContents(); } @@ -1407,7 +1407,7 @@ void GuiDocumentDialog::applyView() } -void GuiDocumentDialog::update_contents() +void GuiDocumentDialog::updateContents() { updateParams(controller().params()); } @@ -1428,7 +1428,7 @@ void GuiDocumentDialog::useClassDefaults() params.setJustBaseClass(latexModule->classCO->currentIndex()); params.useClassDefaults(); - update_contents(); + updateContents(); } diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index dff7bdccd9..f94ad62130 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -114,12 +114,12 @@ private: std::vector lang_; /// parent controller - ControlDocument & controller() const; + ControlDocument & controller(); private: /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// save as default template void saveDocDefault(); /// reset to default params diff --git a/src/frontends/qt4/GuiERT.cpp b/src/frontends/qt4/GuiERT.cpp index ed3798411b..5082997d7c 100644 --- a/src/frontends/qt4/GuiERT.cpp +++ b/src/frontends/qt4/GuiERT.cpp @@ -40,7 +40,7 @@ GuiERTDialog::GuiERTDialog(LyXView & lv) } -ControlERT & GuiERTDialog::controller() const +ControlERT & GuiERTDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -68,7 +68,7 @@ void GuiERTDialog::applyView() } -void GuiERTDialog::update_contents() +void GuiERTDialog::updateContents() { switch (controller().status()) { case InsetERT::Open: openRB->setChecked(true); break; diff --git a/src/frontends/qt4/GuiERT.h b/src/frontends/qt4/GuiERT.h index 1d1e53df65..f714f1c29e 100644 --- a/src/frontends/qt4/GuiERT.h +++ b/src/frontends/qt4/GuiERT.h @@ -32,11 +32,11 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlERT & controller() const; + ControlERT & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index ac8ea3df65..245987e4da 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -43,7 +43,7 @@ GuiErrorListDialog::GuiErrorListDialog(LyXView & lv) } -ControlErrorList & GuiErrorListDialog::controller() const +ControlErrorList & GuiErrorListDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -78,7 +78,7 @@ void GuiErrorListDialog::select(QListWidgetItem * wi) } -void GuiErrorListDialog::update_contents() +void GuiErrorListDialog::updateContents() { setViewTitle(from_utf8(controller().name())); errorsLW->clear(); diff --git a/src/frontends/qt4/GuiErrorList.h b/src/frontends/qt4/GuiErrorList.h index 4687debf71..e0a7eb3f94 100644 --- a/src/frontends/qt4/GuiErrorList.h +++ b/src/frontends/qt4/GuiErrorList.h @@ -35,11 +35,11 @@ private: void closeEvent(QCloseEvent *); void showEvent(QShowEvent *); /// parent controller - ControlErrorList & controller() const; + ControlErrorList & controller(); /// select an entry void select(QListWidgetItem *); /// update contents - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiExternal.cpp b/src/frontends/qt4/GuiExternal.cpp index b5c01e2cd1..3dee635524 100644 --- a/src/frontends/qt4/GuiExternal.cpp +++ b/src/frontends/qt4/GuiExternal.cpp @@ -184,7 +184,7 @@ GuiExternalDialog::GuiExternalDialog(LyXView & lv) } -ControlExternal & GuiExternalDialog::controller() const +ControlExternal & GuiExternalDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -359,7 +359,7 @@ void setDisplay(QCheckBox & displayCB, QComboBox & showCO, QLineEdit & scaleED, showCO.setEnabled(!no_display && !read_only); displayCB.setChecked(!no_display); scaleED.setEnabled(!no_display && !read_only); - scaleED.setText(toqstr(convert(scale))); + scaleED.setText(QString::number(scale)); } @@ -390,7 +390,7 @@ void getDisplay(external::DisplayType & display, if (!displayCB.isChecked()) display = external::NoDisplay; - scale = convert(fromqstr(scaleED.text())); + scale = scaleED.text().toInt(); } @@ -429,7 +429,7 @@ void setSize(QLineEdit & widthED, QComboBox & widthUnitCO, widthED.setText(toqstr(scale)); widthUnitCO.setCurrentIndex(0); } else { - widthED.setText(toqstr(convert(data.width.value()))); + widthED.setText(QString::number(data.width.value())); // Because 'Scale' is position 0... // Note also that width cannot be zero here, so // we don't need to worry about the default unit. @@ -493,10 +493,10 @@ void setCrop(QCheckBox & clipCB, { clipCB.setChecked(data.clip); graphics::BoundingBox const & bbox = data.bbox; - xlED.setText(toqstr(convert(bbox.xl))); - ybED.setText(toqstr(convert(bbox.yb))); - xrED.setText(toqstr(convert(bbox.xr))); - ytED.setText(toqstr(convert(bbox.yt))); + xlED.setText(QString::number(bbox.xl)); + ybED.setText(QString::number(bbox.yb)); + xrED.setText(QString::number(bbox.xr)); + ytED.setText(QString::number(bbox.yt)); } @@ -511,10 +511,10 @@ void getCrop(external::ClipData & data, if (!bb_changed) return; - data.bbox.xl = convert(fromqstr(xlED.text())); - data.bbox.yb = convert(fromqstr(ybED.text())); - data.bbox.xr = convert(fromqstr(xrED.text())); - data.bbox.yt = convert(fromqstr(ytED.text())); + data.bbox.xl = xlED.text().toInt(); + data.bbox.yb = ybED.text().toInt(); + data.bbox.xr = xrED.text().toInt(); + data.bbox.yt = ytED.text().toInt(); } @@ -522,7 +522,7 @@ void getExtra(external::ExtraData & data, GuiExternalDialog::MapType const & extra) { typedef GuiExternalDialog::MapType MapType; - MapType::const_iterator it = extra.begin(); + MapType::const_iterator it = extra.begin(); MapType::const_iterator const end = extra.end(); for (; it != end; ++it) data.set(it->first, trim(fromqstr(it->second))); @@ -532,7 +532,7 @@ void getExtra(external::ExtraData & data, -void GuiExternalDialog::update_contents() +void GuiExternalDialog::updateContents() { tab->setCurrentIndex(0); InsetExternalParams const & params = controller().params(); @@ -549,7 +549,7 @@ void GuiExternalDialog::update_contents() setDisplay(*displayCB, *showCO, *displayscaleED, - params.display, params.lyxscale, readOnly()); + params.display, params.lyxscale, controller().isBufferReadonly()); setRotation(*angleED, *originCO, params.rotationdata); diff --git a/src/frontends/qt4/GuiExternal.h b/src/frontends/qt4/GuiExternal.h index 4864b45096..0d736e6487 100644 --- a/src/frontends/qt4/GuiExternal.h +++ b/src/frontends/qt4/GuiExternal.h @@ -46,11 +46,11 @@ public: // bool activateAspectratio() const; /// parent controller - ControlExternal & controller() const; + ControlExternal & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// Helper function called when the template is changed. void updateTemplate(); /// get bounding box from file diff --git a/src/frontends/qt4/GuiFloat.cpp b/src/frontends/qt4/GuiFloat.cpp index cc1eff1ec1..87d1ca7a67 100644 --- a/src/frontends/qt4/GuiFloat.cpp +++ b/src/frontends/qt4/GuiFloat.cpp @@ -54,7 +54,7 @@ GuiFloatDialog::GuiFloatDialog(LyXView & lv) } -ControlFloat & GuiFloatDialog::controller() const +ControlFloat & GuiFloatDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -73,7 +73,7 @@ void GuiFloatDialog::closeEvent(QCloseEvent * e) } -void GuiFloatDialog::update_contents() +void GuiFloatDialog::updateContents() { floatFP->set(controller().params()); } diff --git a/src/frontends/qt4/GuiFloat.h b/src/frontends/qt4/GuiFloat.h index 645ca5bb88..881245d0ed 100644 --- a/src/frontends/qt4/GuiFloat.h +++ b/src/frontends/qt4/GuiFloat.h @@ -32,11 +32,11 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlFloat & controller() const; + ControlFloat & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index cc58105a84..4ce719a1a3 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -211,7 +211,7 @@ GuiGraphicsDialog::GuiGraphicsDialog(LyXView & lv) } -ControlGraphics & GuiGraphicsDialog::controller() const +ControlGraphics & GuiGraphicsDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -381,7 +381,7 @@ static int getItemNo(const vector & v, string const & s) } -void GuiGraphicsDialog::update_contents() +void GuiGraphicsDialog::updateContents() { // clear and fill in the comboboxes vector const bb_units = frontend::getBBUnits(); diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index e70e23c134..3e9908b06d 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -44,12 +44,12 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlGraphics & controller() const; + ControlGraphics & controller(); bool isValid(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// get bounding box from file void getBB(); diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index a6c3e15539..42ca019b67 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -78,7 +78,7 @@ GuiIncludeDialog::GuiIncludeDialog(LyXView & lv) } -ControlInclude & GuiIncludeDialog::controller() const +ControlInclude & GuiIncludeDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -186,7 +186,7 @@ void GuiIncludeDialog::browseClicked() } -void GuiIncludeDialog::update_contents() +void GuiIncludeDialog::updateContents() { InsetCommandParams const & params = controller().params(); diff --git a/src/frontends/qt4/GuiInclude.h b/src/frontends/qt4/GuiInclude.h index 035da82d10..09abe6791b 100644 --- a/src/frontends/qt4/GuiInclude.h +++ b/src/frontends/qt4/GuiInclude.h @@ -40,7 +40,7 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlInclude & controller() const; + ControlInclude & controller(); /// void updateLists(); /// validate listings parameters and return an error message, if any @@ -51,7 +51,7 @@ private: /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// edit the child document, .lyx file will be opened in lyx /// other formats will be edited by external applications. void edit(); diff --git a/src/frontends/qt4/GuiIndex.cpp b/src/frontends/qt4/GuiIndex.cpp index 70059ca659..4982b693dc 100644 --- a/src/frontends/qt4/GuiIndex.cpp +++ b/src/frontends/qt4/GuiIndex.cpp @@ -75,7 +75,7 @@ GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv, } -ControlCommand & GuiIndexDialogBase::controller() const +ControlCommand & GuiIndexDialogBase::controller() { return static_cast(GuiDialog::controller()); } @@ -100,7 +100,7 @@ void GuiIndexDialogBase::closeEvent(QCloseEvent * e) } -void GuiIndexDialogBase::update_contents() +void GuiIndexDialogBase::updateContents() { docstring const contents = controller().params()["name"]; keywordED->setText(toqstr(contents)); diff --git a/src/frontends/qt4/GuiIndex.h b/src/frontends/qt4/GuiIndex.h index e6c8445f5a..3db4df32de 100644 --- a/src/frontends/qt4/GuiIndex.h +++ b/src/frontends/qt4/GuiIndex.h @@ -36,13 +36,13 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlCommand & controller() const; + ControlCommand & controller(); /// bool isValid(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); /// QString label_; diff --git a/src/frontends/qt4/GuiListings.cpp b/src/frontends/qt4/GuiListings.cpp index 2ec3b29bc4..3fd4318392 100644 --- a/src/frontends/qt4/GuiListings.cpp +++ b/src/frontends/qt4/GuiListings.cpp @@ -240,12 +240,12 @@ GuiListingsDialog::GuiListingsDialog(LyXView & lv) listingsTB->setPlainText( qt_("Input listing parameters on the right. Enter ? for a list of parameters.")); - update_contents(); + updateContents(); } -ControlListings & GuiListingsDialog::controller() const +ControlListings & GuiListingsDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -457,7 +457,7 @@ static string plainParam(std::string const & par) } -void GuiListingsDialog::update_contents() +void GuiListingsDialog::updateContents() { // set default values listingsTB->setPlainText( diff --git a/src/frontends/qt4/GuiListings.h b/src/frontends/qt4/GuiListings.h index 6ffee237a3..4d6b1d5b75 100644 --- a/src/frontends/qt4/GuiListings.h +++ b/src/frontends/qt4/GuiListings.h @@ -46,13 +46,13 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlListings & controller() const; + ControlListings & controller(); /// return false if validate_listings_params returns error bool isValid(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index c665f77d67..290015ff16 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -117,7 +117,7 @@ GuiLogDialog::GuiLogDialog(LyXView & lv) } -ControlLog & GuiLogDialog::controller() const +ControlLog & GuiLogDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -132,11 +132,11 @@ void GuiLogDialog::closeEvent(QCloseEvent * e) void GuiLogDialog::updateClicked() { - update_contents(); + updateContents(); } -void GuiLogDialog::update_contents() +void GuiLogDialog::updateContents() { setViewTitle(controller().title()); diff --git a/src/frontends/qt4/GuiLog.h b/src/frontends/qt4/GuiLog.h index ad6fe49e1b..07940d94ff 100644 --- a/src/frontends/qt4/GuiLog.h +++ b/src/frontends/qt4/GuiLog.h @@ -31,11 +31,11 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlLog & controller() const; + ControlLog & controller(); /// Apply changes void applyView() {} /// update - void update_contents(); + void updateContents(); /// log syntax highlighter LogHighlighter * highlighter; diff --git a/src/frontends/qt4/GuiMathMatrix.cpp b/src/frontends/qt4/GuiMathMatrix.cpp index 939acbbe19..e52500375c 100644 --- a/src/frontends/qt4/GuiMathMatrix.cpp +++ b/src/frontends/qt4/GuiMathMatrix.cpp @@ -65,7 +65,7 @@ GuiMathMatrixDialog::GuiMathMatrixDialog(LyXView & lv) } -ControlMath & GuiMathMatrixDialog::controller() const +ControlMath & GuiMathMatrixDialog::controller() { return static_cast(GuiDialog::controller()); } diff --git a/src/frontends/qt4/GuiMathMatrix.h b/src/frontends/qt4/GuiMathMatrix.h index 7eae605d0b..e7d5aeb11e 100644 --- a/src/frontends/qt4/GuiMathMatrix.h +++ b/src/frontends/qt4/GuiMathMatrix.h @@ -38,7 +38,7 @@ public Q_SLOTS: void change_adaptor(); /// parent controller - ControlMath & controller() const; + ControlMath & controller(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiNomencl.cpp b/src/frontends/qt4/GuiNomencl.cpp index 11acc63959..61f57ef161 100644 --- a/src/frontends/qt4/GuiNomencl.cpp +++ b/src/frontends/qt4/GuiNomencl.cpp @@ -53,7 +53,7 @@ GuiNomenclDialog::GuiNomenclDialog(LyXView & lv) } -ControlCommand & GuiNomenclDialog::controller() const +ControlCommand & GuiNomenclDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -78,7 +78,7 @@ void GuiNomenclDialog::closeEvent(QCloseEvent * e) } -void GuiNomenclDialog::update_contents() +void GuiNomenclDialog::updateContents() { prefixED->setText(toqstr(controller().params()["prefix"])); symbolED->setText(toqstr(controller().params()["symbol"])); diff --git a/src/frontends/qt4/GuiNomencl.h b/src/frontends/qt4/GuiNomencl.h index 5c0405553e..f42f1f2b7f 100644 --- a/src/frontends/qt4/GuiNomencl.h +++ b/src/frontends/qt4/GuiNomencl.h @@ -36,13 +36,13 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlCommand & controller() const; + ControlCommand & controller(); /// bool isValid(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiNote.cpp b/src/frontends/qt4/GuiNote.cpp index c10ce960d0..350fc925c5 100644 --- a/src/frontends/qt4/GuiNote.cpp +++ b/src/frontends/qt4/GuiNote.cpp @@ -42,7 +42,7 @@ GuiNoteDialog::GuiNoteDialog(LyXView & lv) } -ControlNote & GuiNoteDialog::controller() const +ControlNote & GuiNoteDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -61,7 +61,7 @@ void GuiNoteDialog::change_adaptor() } -void GuiNoteDialog::update_contents() +void GuiNoteDialog::updateContents() { QRadioButton * rb = 0; diff --git a/src/frontends/qt4/GuiNote.h b/src/frontends/qt4/GuiNote.h index e1f6e57f5f..50a2d3318b 100644 --- a/src/frontends/qt4/GuiNote.h +++ b/src/frontends/qt4/GuiNote.h @@ -29,11 +29,11 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlNote & controller() const; + ControlNote & controller(); /// Apply changes void applyView(); /// Update dialog before showing it - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index 618436fd60..0606fca896 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -92,7 +92,7 @@ GuiParagraphDialog::GuiParagraphDialog(LyXView & lv) } -ControlParagraph & GuiParagraphDialog::controller() const +ControlParagraph & GuiParagraphDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -202,7 +202,7 @@ void GuiParagraphDialog::applyView() } -void GuiParagraphDialog::update_contents() +void GuiParagraphDialog::updateContents() { ParagraphParameters const & params = controller().params(); diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index 18f1180ce8..ff6cdccff8 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -50,11 +50,11 @@ private Q_SLOTS: /// void enableLinespacingValue(int); /// parent controller - ControlParagraph & controller() const; + ControlParagraph & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 709d82dcad..b30389ac1a 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1959,7 +1959,7 @@ GuiPrefsDialog::GuiPrefsDialog(LyXView & lv) } -ControlPrefs & GuiPrefsDialog::controller() const +ControlPrefs & GuiPrefsDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -2023,7 +2023,7 @@ void GuiPrefsDialog::applyView() apply(controller().rc()); } -void GuiPrefsDialog::update_contents() +void GuiPrefsDialog::updateContents() { updateRc(controller().rc()); } diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index 72b8d22dfd..cc04b86bda 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -358,11 +358,11 @@ public: /// Movers & movers(); /// parent controller - ControlPrefs & controller() const; + ControlPrefs & controller(); /// Apply changes void applyView(); /// update (do we need this?) - void update_contents(); + void updateContents(); std::vector modules_; }; diff --git a/src/frontends/qt4/GuiPrint.cpp b/src/frontends/qt4/GuiPrint.cpp index a495a24113..49692890d4 100644 --- a/src/frontends/qt4/GuiPrint.cpp +++ b/src/frontends/qt4/GuiPrint.cpp @@ -67,7 +67,7 @@ GuiPrintDialog::GuiPrintDialog(LyXView & lv) } -ControlPrint & GuiPrintDialog::controller() const +ControlPrint & GuiPrintDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -117,7 +117,7 @@ void GuiPrintDialog::pagerangeChanged() } -void GuiPrintDialog::update_contents() +void GuiPrintDialog::updateContents() { PrinterParams & pp = controller().params(); diff --git a/src/frontends/qt4/GuiPrint.h b/src/frontends/qt4/GuiPrint.h index 52abe81960..4314988964 100644 --- a/src/frontends/qt4/GuiPrint.h +++ b/src/frontends/qt4/GuiPrint.h @@ -35,13 +35,13 @@ private Q_SLOTS: void printerChanged(); void pagerangeChanged(); /// parent controller - ControlPrint & controller() const; + ControlPrint & controller(); private: /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 74e01fd60c..cdb6e59c94 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -88,7 +88,7 @@ GuiRefDialog::GuiRefDialog(LyXView & lv) } -ControlRef & GuiRefDialog::controller() const +ControlRef & GuiRefDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -107,7 +107,7 @@ void GuiRefDialog::gotoClicked() void GuiRefDialog::selectionChanged() { - if (readOnly()) + if (controller().isBufferReadonly()) return; QList selections = refsLW->selectedItems(); @@ -121,7 +121,7 @@ void GuiRefDialog::selectionChanged() void GuiRefDialog::refHighlighted(QListWidgetItem * sel) { - if (readOnly()) + if (controller().isBufferReadonly()) return; /* int const cur_item = refsLW->currentRow(); @@ -144,7 +144,7 @@ void GuiRefDialog::refHighlighted(QListWidgetItem * sel) void GuiRefDialog::refSelected(QListWidgetItem * sel) { - if (readOnly()) + if (controller().isBufferReadonly()) return; /* int const cur_item = refsLW->currentRow(); @@ -187,7 +187,7 @@ void GuiRefDialog::closeEvent(QCloseEvent * e) } -void GuiRefDialog::update_contents() +void GuiRefDialog::updateContents() { InsetCommandParams const & params = controller().params(); @@ -196,14 +196,14 @@ void GuiRefDialog::update_contents() referenceED->setText(toqstr(params["reference"])); nameED->setText(toqstr(params["name"])); - nameED->setReadOnly(!nameAllowed() && !readOnly()); + nameED->setReadOnly(!nameAllowed() && !controller().isBufferReadonly()); // restore type settings for new insets if (params["reference"].empty()) typeCO->setCurrentIndex(orig_type); else typeCO->setCurrentIndex(InsetRef::getType(params.getCmdName())); - typeCO->setEnabled(typeAllowed() && !readOnly()); + typeCO->setEnabled(typeAllowed() && !controller().isBufferReadonly()); if (!typeAllowed()) typeCO->setCurrentIndex(0); diff --git a/src/frontends/qt4/GuiRef.h b/src/frontends/qt4/GuiRef.h index 50947fc16b..6c0faae500 100644 --- a/src/frontends/qt4/GuiRef.h +++ b/src/frontends/qt4/GuiRef.h @@ -44,13 +44,13 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlRef & controller() const; + ControlRef & controller(); /// bool isValid(); /// apply changes void applyView(); /// update dialog - void update_contents(); + void updateContents(); /// is name allowed for this ? bool nameAllowed(); diff --git a/src/frontends/qt4/GuiSearch.cpp b/src/frontends/qt4/GuiSearch.cpp index 938a55aa5b..437253fe73 100644 --- a/src/frontends/qt4/GuiSearch.cpp +++ b/src/frontends/qt4/GuiSearch.cpp @@ -63,7 +63,7 @@ GuiSearchDialog::GuiSearchDialog(LyXView & lv) } -ControlSearch & GuiSearchDialog::controller() const +ControlSearch & GuiSearchDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -91,8 +91,8 @@ void GuiSearchDialog::findChanged() replaceallPB->setEnabled(false); } else { findPB->setEnabled(true); - replacePB->setEnabled(!readOnly()); - replaceallPB->setEnabled(!readOnly()); + replacePB->setEnabled(!controller().isBufferReadonly()); + replaceallPB->setEnabled(!controller().isBufferReadonly()); } } diff --git a/src/frontends/qt4/GuiSearch.h b/src/frontends/qt4/GuiSearch.h index 3e5c8d147f..9ae3842ac1 100644 --- a/src/frontends/qt4/GuiSearch.h +++ b/src/frontends/qt4/GuiSearch.h @@ -38,7 +38,7 @@ private: void showView(); void closeEvent(QCloseEvent * e); /// parent controller - ControlSearch & controller() const; + ControlSearch & controller(); /// void find(docstring const & str, bool casesens, bool words, bool backwards); diff --git a/src/frontends/qt4/GuiSendto.cpp b/src/frontends/qt4/GuiSendto.cpp index 8d775237b0..b89245b77a 100644 --- a/src/frontends/qt4/GuiSendto.cpp +++ b/src/frontends/qt4/GuiSendto.cpp @@ -55,7 +55,7 @@ GuiSendtoDialog::GuiSendtoDialog(LyXView & lv) } -ControlSendto & GuiSendtoDialog::controller() const +ControlSendto & GuiSendtoDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -74,7 +74,7 @@ void GuiSendtoDialog::closeEvent(QCloseEvent * e) } -void GuiSendtoDialog::update_contents() +void GuiSendtoDialog::updateContents() { all_formats_ = controller().allFormats(); diff --git a/src/frontends/qt4/GuiSendto.h b/src/frontends/qt4/GuiSendto.h index 92aaf0a97f..d69ca02f28 100644 --- a/src/frontends/qt4/GuiSendto.h +++ b/src/frontends/qt4/GuiSendto.h @@ -41,13 +41,13 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlSendto & controller() const; + ControlSendto & controller(); /// bool isValid(); /// Apply from dialog void applyView(); /// Update the dialog - void update_contents(); + void updateContents(); /// std::vector all_formats_; diff --git a/src/frontends/qt4/GuiShowFile.cpp b/src/frontends/qt4/GuiShowFile.cpp index 821fdb67fc..000325f8f3 100644 --- a/src/frontends/qt4/GuiShowFile.cpp +++ b/src/frontends/qt4/GuiShowFile.cpp @@ -37,7 +37,7 @@ GuiShowFileDialog::GuiShowFileDialog(LyXView & lv) } -ControlShowFile & GuiShowFileDialog::controller() const +ControlShowFile & GuiShowFileDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -50,7 +50,7 @@ void GuiShowFileDialog::closeEvent(QCloseEvent * e) } -void GuiShowFileDialog::update_contents() +void GuiShowFileDialog::updateContents() { setWindowTitle(toqstr(controller().getFileName())); diff --git a/src/frontends/qt4/GuiShowFile.h b/src/frontends/qt4/GuiShowFile.h index bc7f4e6b3b..44e9a781ee 100644 --- a/src/frontends/qt4/GuiShowFile.h +++ b/src/frontends/qt4/GuiShowFile.h @@ -30,9 +30,9 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlShowFile & controller() const; + ControlShowFile & controller(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 027b397ed4..2f8d7cb3d9 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -62,7 +62,7 @@ GuiSpellcheckerDialog::GuiSpellcheckerDialog(LyXView & lv) } -ControlSpellchecker & GuiSpellcheckerDialog::controller() const +ControlSpellchecker & GuiSpellcheckerDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -131,7 +131,7 @@ void GuiSpellcheckerDialog::reject() } -void GuiSpellcheckerDialog::update_contents() +void GuiSpellcheckerDialog::updateContents() { if (isVisibleView() || controller().exitEarly()) controller().check(); diff --git a/src/frontends/qt4/GuiSpellchecker.h b/src/frontends/qt4/GuiSpellchecker.h index 668821c5e7..1a9ff470a8 100644 --- a/src/frontends/qt4/GuiSpellchecker.h +++ b/src/frontends/qt4/GuiSpellchecker.h @@ -46,14 +46,14 @@ private: /// update from controller void partialUpdate(int id); /// parent controller - ControlSpellchecker & controller() const; + ControlSpellchecker & controller(); //// void accept(); void add(); void ignore(); void replace(); /// - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 68df6cd199..0d60664068 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -148,7 +148,7 @@ GuiTabularDialog::GuiTabularDialog(LyXView & lv) } -ControlTabular & GuiTabularDialog::controller() const +ControlTabular & GuiTabularDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -600,7 +600,7 @@ void GuiTabularDialog::update_borders() } -void GuiTabularDialog::update_contents() +void GuiTabularDialog::updateContents() { controller().initialiseParams(string()); diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index 41893feda3..2e643f9097 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -71,13 +71,13 @@ private: /// void closeEvent(QCloseEvent * e); /// parent controller - ControlTabular & controller() const; + ControlTabular & controller(); /// bool isValid() { return true; } /// update borders void update_borders(); /// update - void update_contents(); + void updateContents(); /// save some values before closing the gui void closeGUI(); }; diff --git a/src/frontends/qt4/GuiTabularCreate.cpp b/src/frontends/qt4/GuiTabularCreate.cpp index 045807be3d..a4394388ab 100644 --- a/src/frontends/qt4/GuiTabularCreate.cpp +++ b/src/frontends/qt4/GuiTabularCreate.cpp @@ -47,7 +47,7 @@ GuiTabularCreateDialog::GuiTabularCreateDialog(LyXView & lv) } -ControlTabularCreate & GuiTabularCreateDialog::controller() const +ControlTabularCreate & GuiTabularCreateDialog::controller() { return static_cast(GuiDialog::controller()); } diff --git a/src/frontends/qt4/GuiTabularCreate.h b/src/frontends/qt4/GuiTabularCreate.h index 8387b43bef..e620f804a3 100644 --- a/src/frontends/qt4/GuiTabularCreate.h +++ b/src/frontends/qt4/GuiTabularCreate.h @@ -31,7 +31,7 @@ private Q_SLOTS: void rowsChanged(int); /// parent controller - ControlTabularCreate & controller() const; + ControlTabularCreate & controller(); private: /// Apply changes diff --git a/src/frontends/qt4/GuiTexinfo.cpp b/src/frontends/qt4/GuiTexinfo.cpp index 95220c0156..26a0d85d06 100644 --- a/src/frontends/qt4/GuiTexinfo.cpp +++ b/src/frontends/qt4/GuiTexinfo.cpp @@ -60,7 +60,7 @@ GuiTexinfoDialog::GuiTexinfoDialog(LyXView & lv) } -ControlTexinfo & GuiTexinfoDialog::controller() const +ControlTexinfo & GuiTexinfoDialog::controller() { return static_cast(GuiDialog::controller()); } diff --git a/src/frontends/qt4/GuiTexinfo.h b/src/frontends/qt4/GuiTexinfo.h index 34de13dab0..bd3ea34e3e 100644 --- a/src/frontends/qt4/GuiTexinfo.h +++ b/src/frontends/qt4/GuiTexinfo.h @@ -42,7 +42,7 @@ private: /// void closeEvent(QCloseEvent * e); /// - ControlTexinfo & controller() const; + ControlTexinfo & controller(); /// void updateStyles(ControlTexinfo::texFileSuffix); /// diff --git a/src/frontends/qt4/GuiThesaurus.cpp b/src/frontends/qt4/GuiThesaurus.cpp index fd80b5f1f6..8db29843a8 100644 --- a/src/frontends/qt4/GuiThesaurus.cpp +++ b/src/frontends/qt4/GuiThesaurus.cpp @@ -64,7 +64,7 @@ GuiThesaurusDialog::GuiThesaurusDialog(LyXView & lv) } -ControlThesaurus & GuiThesaurusDialog::controller() const +ControlThesaurus & GuiThesaurusDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -91,7 +91,7 @@ void GuiThesaurusDialog::entryChanged() void GuiThesaurusDialog::selectionChanged() { int const col = meaningsTV->currentColumn(); - if (col<0 || readOnly()) + if (col < 0 || controller().isBufferReadonly()) return; replaceED->setText(meaningsTV->currentItem()->text(col)); @@ -138,7 +138,7 @@ void GuiThesaurusDialog::updateLists() } -void GuiThesaurusDialog::update_contents() +void GuiThesaurusDialog::updateContents() { entryED->setText(toqstr(controller().text())); replaceED->setText(""); diff --git a/src/frontends/qt4/GuiThesaurus.h b/src/frontends/qt4/GuiThesaurus.h index e21bab5a2a..297e20daf2 100644 --- a/src/frontends/qt4/GuiThesaurus.h +++ b/src/frontends/qt4/GuiThesaurus.h @@ -39,9 +39,9 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlThesaurus & controller() const; + ControlThesaurus & controller(); /// update - void update_contents(); + void updateContents(); /// void updateLists(); }; diff --git a/src/frontends/qt4/GuiURL.cpp b/src/frontends/qt4/GuiURL.cpp index a9b6e5025e..2662ecaf09 100644 --- a/src/frontends/qt4/GuiURL.cpp +++ b/src/frontends/qt4/GuiURL.cpp @@ -51,7 +51,7 @@ GuiURLDialog::GuiURLDialog(LyXView & lv) } -ControlCommand & GuiURLDialog::controller() const +ControlCommand & GuiURLDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -71,7 +71,7 @@ void GuiURLDialog::closeEvent(QCloseEvent * e) -void GuiURLDialog::update_contents() +void GuiURLDialog::updateContents() { InsetCommandParams const & params = controller().params(); diff --git a/src/frontends/qt4/GuiURL.h b/src/frontends/qt4/GuiURL.h index c9159dbfac..bb64e77594 100644 --- a/src/frontends/qt4/GuiURL.h +++ b/src/frontends/qt4/GuiURL.h @@ -32,13 +32,13 @@ public Q_SLOTS: private: void closeEvent(QCloseEvent *); /// parent controller - ControlCommand & controller() const; + ControlCommand & controller(); /// bool isValid(); /// apply dialog void applyView(); /// update dialog - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index 13068b0d0d..e3332c95a8 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -87,7 +87,7 @@ GuiVSpaceDialog::GuiVSpaceDialog(LyXView & lv) } -ControlVSpace & GuiVSpaceDialog::controller() const +ControlVSpace & GuiVSpaceDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -181,7 +181,7 @@ void GuiVSpaceDialog::applyView() } -void GuiVSpaceDialog::update_contents() +void GuiVSpaceDialog::updateContents() { setWidgetsFromVSpace(controller().params(), spacingCO, valueLE, unitCO, keepCB); diff --git a/src/frontends/qt4/GuiVSpace.h b/src/frontends/qt4/GuiVSpace.h index 12c2978b82..fff6041a72 100644 --- a/src/frontends/qt4/GuiVSpace.h +++ b/src/frontends/qt4/GuiVSpace.h @@ -35,11 +35,11 @@ private Q_SLOTS: private: /// parent controller - ControlVSpace & controller() const; + ControlVSpace & controller(); /// Apply from dialog void applyView(); /// Update the dialog - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/GuiWrap.cpp b/src/frontends/qt4/GuiWrap.cpp index 997fdf181e..21122c3b34 100644 --- a/src/frontends/qt4/GuiWrap.cpp +++ b/src/frontends/qt4/GuiWrap.cpp @@ -62,7 +62,7 @@ GuiWrapDialog::GuiWrapDialog(LyXView & lv) } -ControlWrap & GuiWrapDialog::controller() const +ControlWrap & GuiWrapDialog::controller() { return static_cast(GuiDialog::controller()); } @@ -118,7 +118,7 @@ static string const numtostr(double val) } -void GuiWrapDialog::update_contents() +void GuiWrapDialog::updateContents() { InsetWrapParams & params = controller().params(); diff --git a/src/frontends/qt4/GuiWrap.h b/src/frontends/qt4/GuiWrap.h index b06b686b74..9fa79f2e5b 100644 --- a/src/frontends/qt4/GuiWrap.h +++ b/src/frontends/qt4/GuiWrap.h @@ -32,11 +32,11 @@ private Q_SLOTS: private: void closeEvent(QCloseEvent * e); /// parent controller - ControlWrap & controller() const; + ControlWrap & controller(); /// Apply changes void applyView(); /// update - void update_contents(); + void updateContents(); }; } // namespace frontend diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h index 575bdf0146..d6ee69ee2a 100644 --- a/src/frontends/qt4/qt_helpers.h +++ b/src/frontends/qt4/qt_helpers.h @@ -51,7 +51,7 @@ void lengthAutoToWidgets(QLineEdit * input, LengthCombo * combo, //FIXME setAutoTextCB should really take an argument, as indicated, that //determines what text is to be written for "auto". But making //that work involves more extensive revisions than we now want -//to make, since "auto" also appears in update_contents() (see +//to make, since "auto" also appears in updateContents() (see //GuiGraphics.cpp). //The right way to do this, I think, would be to define a class //checkedLengthSet (and a partnering labeledLengthSete) that encapsulated