cosmetics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20217 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-09-11 18:33:42 +00:00
parent 34492a9d03
commit 470aba2a0e
77 changed files with 166 additions and 175 deletions

View File

@ -98,7 +98,7 @@ public:
* to a particular dialog.
*/
//@{
virtual Controller & controller() const = 0;
virtual Controller & controller() = 0;
//@}
/** \c Button controller part

View File

@ -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:

View File

@ -46,7 +46,7 @@ GuiBibitemDialog::GuiBibitemDialog(LyXView & lv)
}
ControlCommand & GuiBibitemDialog::controller() const
ControlCommand & GuiBibitemDialog::controller()
{
return static_cast<ControlCommand &>(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"]));

View File

@ -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

View File

@ -111,7 +111,7 @@ GuiBibtexDialog::GuiBibtexDialog(LyXView & lv)
}
ControlBibtex & GuiBibtexDialog::controller() const
ControlBibtex & GuiBibtexDialog::controller()
{
return static_cast<ControlBibtex &>(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();

View File

@ -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_;

View File

@ -112,7 +112,7 @@ GuiBoxDialog::GuiBoxDialog(LyXView & lv)
}
ControlBox & GuiBoxDialog::controller() const
ControlBox & GuiBoxDialog::controller()
{
return static_cast<ControlBox &>(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) {

View File

@ -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<std::string> ids_;

View File

@ -43,7 +43,7 @@ GuiBranchDialog::GuiBranchDialog(LyXView & lv)
}
ControlBranch & GuiBranchDialog::controller() const
ControlBranch & GuiBranchDialog::controller()
{
return static_cast<ControlBranch &>(GuiDialog::controller());
}
@ -62,7 +62,7 @@ void GuiBranchDialog::change_adaptor()
}
void GuiBranchDialog::update_contents()
void GuiBranchDialog::updateContents()
{
typedef BranchList::const_iterator const_iterator;

View File

@ -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();
};

View File

@ -46,7 +46,7 @@ GuiChangesDialog::GuiChangesDialog(LyXView & lv)
}
ControlChanges & GuiChangesDialog::controller() const
ControlChanges & GuiChangesDialog::controller()
{
return static_cast<ControlChanges &>(GuiDialog::controller());
}
@ -59,7 +59,7 @@ void GuiChangesDialog::closeEvent(QCloseEvent *e)
}
void GuiChangesDialog::update_contents()
void GuiChangesDialog::updateContents()
{
docstring text;
docstring author = controller().getChangeAuthor();

View File

@ -33,8 +33,8 @@ protected Q_SLOTS:
private:
void closeEvent(QCloseEvent * e);
ControlChanges & controller() const;
void update_contents();
ControlChanges & controller();
void updateContents();
};
} // namespace frontend

View File

@ -106,7 +106,7 @@ GuiCharacterDialog::GuiCharacterDialog(LyXView & lv)
}
ControlCharacter & GuiCharacterDialog::controller() const
ControlCharacter & GuiCharacterDialog::controller()
{
return static_cast<ControlCharacter &>(GuiDialog::controller());
}
@ -156,7 +156,7 @@ static int findPos2nd(vector<std::pair<A,B> > const & vec, B const & val)
}
void GuiCharacterDialog::update_contents()
void GuiCharacterDialog::updateContents()
{
ControlCharacter const & ctrl = controller();

View File

@ -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<FamilyPair> family;
std::vector<SeriesPair> series;

View File

@ -102,7 +102,7 @@ GuiCitationDialog::GuiCitationDialog(LyXView & lv)
}
ControlCitation & GuiCitationDialog::controller() const
ControlCitation & GuiCitationDialog::controller()
{
return static_cast<ControlCitation &>(GuiDialog::controller());
}

View File

@ -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

View File

@ -110,13 +110,13 @@ GuiDelimiterDialog::GuiDelimiterDialog(LyXView & lv)
}
ControlMath & GuiDelimiterDialog::controller() const
ControlMath & GuiDelimiterDialog::controller()
{
return static_cast<ControlMath &>(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;

View File

@ -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_;

View File

@ -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);

View File

@ -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

View File

@ -612,7 +612,7 @@ GuiDocumentDialog::GuiDocumentDialog(LyXView & lv)
}
ControlDocument & GuiDocumentDialog::controller() const
ControlDocument & GuiDocumentDialog::controller()
{
return static_cast<ControlDocument &>(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();
}

View File

@ -114,12 +114,12 @@ private:
std::vector<std::string> 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

View File

@ -40,7 +40,7 @@ GuiERTDialog::GuiERTDialog(LyXView & lv)
}
ControlERT & GuiERTDialog::controller() const
ControlERT & GuiERTDialog::controller()
{
return static_cast<ControlERT &>(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;

View File

@ -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

View File

@ -43,7 +43,7 @@ GuiErrorListDialog::GuiErrorListDialog(LyXView & lv)
}
ControlErrorList & GuiErrorListDialog::controller() const
ControlErrorList & GuiErrorListDialog::controller()
{
return static_cast<ControlErrorList &>(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();

View File

@ -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

View File

@ -184,7 +184,7 @@ GuiExternalDialog::GuiExternalDialog(LyXView & lv)
}
ControlExternal & GuiExternalDialog::controller() const
ControlExternal & GuiExternalDialog::controller()
{
return static_cast<ControlExternal &>(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<string>(scale)));
scaleED.setText(QString::number(scale));
}
@ -390,7 +390,7 @@ void getDisplay(external::DisplayType & display,
if (!displayCB.isChecked())
display = external::NoDisplay;
scale = convert<int>(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<string>(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<string>(bbox.xl)));
ybED.setText(toqstr(convert<string>(bbox.yb)));
xrED.setText(toqstr(convert<string>(bbox.xr)));
ytED.setText(toqstr(convert<string>(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<int>(fromqstr(xlED.text()));
data.bbox.yb = convert<int>(fromqstr(ybED.text()));
data.bbox.xr = convert<int>(fromqstr(xrED.text()));
data.bbox.yt = convert<int>(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);

View File

@ -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

View File

@ -54,7 +54,7 @@ GuiFloatDialog::GuiFloatDialog(LyXView & lv)
}
ControlFloat & GuiFloatDialog::controller() const
ControlFloat & GuiFloatDialog::controller()
{
return static_cast<ControlFloat &>(GuiDialog::controller());
}
@ -73,7 +73,7 @@ void GuiFloatDialog::closeEvent(QCloseEvent * e)
}
void GuiFloatDialog::update_contents()
void GuiFloatDialog::updateContents()
{
floatFP->set(controller().params());
}

View File

@ -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

View File

@ -211,7 +211,7 @@ GuiGraphicsDialog::GuiGraphicsDialog(LyXView & lv)
}
ControlGraphics & GuiGraphicsDialog::controller() const
ControlGraphics & GuiGraphicsDialog::controller()
{
return static_cast<ControlGraphics &>(GuiDialog::controller());
}
@ -381,7 +381,7 @@ static int getItemNo(const vector<string> & v, string const & s)
}
void GuiGraphicsDialog::update_contents()
void GuiGraphicsDialog::updateContents()
{
// clear and fill in the comboboxes
vector<string> const bb_units = frontend::getBBUnits();

View File

@ -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();

View File

@ -78,7 +78,7 @@ GuiIncludeDialog::GuiIncludeDialog(LyXView & lv)
}
ControlInclude & GuiIncludeDialog::controller() const
ControlInclude & GuiIncludeDialog::controller()
{
return static_cast<ControlInclude &>(GuiDialog::controller());
}
@ -186,7 +186,7 @@ void GuiIncludeDialog::browseClicked()
}
void GuiIncludeDialog::update_contents()
void GuiIncludeDialog::updateContents()
{
InsetCommandParams const & params = controller().params();

View File

@ -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();

View File

@ -75,7 +75,7 @@ GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv,
}
ControlCommand & GuiIndexDialogBase::controller() const
ControlCommand & GuiIndexDialogBase::controller()
{
return static_cast<ControlCommand &>(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));

View File

@ -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_;

View File

@ -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<ControlListings &>(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(

View File

@ -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

View File

@ -117,7 +117,7 @@ GuiLogDialog::GuiLogDialog(LyXView & lv)
}
ControlLog & GuiLogDialog::controller() const
ControlLog & GuiLogDialog::controller()
{
return static_cast<ControlLog &>(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());

View File

@ -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;

View File

@ -65,7 +65,7 @@ GuiMathMatrixDialog::GuiMathMatrixDialog(LyXView & lv)
}
ControlMath & GuiMathMatrixDialog::controller() const
ControlMath & GuiMathMatrixDialog::controller()
{
return static_cast<ControlMath &>(GuiDialog::controller());
}

View File

@ -38,7 +38,7 @@ public Q_SLOTS:
void change_adaptor();
/// parent controller
ControlMath & controller() const;
ControlMath & controller();
};
} // namespace frontend

View File

@ -53,7 +53,7 @@ GuiNomenclDialog::GuiNomenclDialog(LyXView & lv)
}
ControlCommand & GuiNomenclDialog::controller() const
ControlCommand & GuiNomenclDialog::controller()
{
return static_cast<ControlCommand &>(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"]));

View File

@ -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

View File

@ -42,7 +42,7 @@ GuiNoteDialog::GuiNoteDialog(LyXView & lv)
}
ControlNote & GuiNoteDialog::controller() const
ControlNote & GuiNoteDialog::controller()
{
return static_cast<ControlNote &>(GuiDialog::controller());
}
@ -61,7 +61,7 @@ void GuiNoteDialog::change_adaptor()
}
void GuiNoteDialog::update_contents()
void GuiNoteDialog::updateContents()
{
QRadioButton * rb = 0;

View File

@ -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

View File

@ -92,7 +92,7 @@ GuiParagraphDialog::GuiParagraphDialog(LyXView & lv)
}
ControlParagraph & GuiParagraphDialog::controller() const
ControlParagraph & GuiParagraphDialog::controller()
{
return static_cast<ControlParagraph &>(GuiDialog::controller());
}
@ -202,7 +202,7 @@ void GuiParagraphDialog::applyView()
}
void GuiParagraphDialog::update_contents()
void GuiParagraphDialog::updateContents()
{
ParagraphParameters const & params = controller().params();

View File

@ -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

View File

@ -1959,7 +1959,7 @@ GuiPrefsDialog::GuiPrefsDialog(LyXView & lv)
}
ControlPrefs & GuiPrefsDialog::controller() const
ControlPrefs & GuiPrefsDialog::controller()
{
return static_cast<ControlPrefs &>(GuiDialog::controller());
}
@ -2023,7 +2023,7 @@ void GuiPrefsDialog::applyView()
apply(controller().rc());
}
void GuiPrefsDialog::update_contents()
void GuiPrefsDialog::updateContents()
{
updateRc(controller().rc());
}

View File

@ -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<PrefModule *> modules_;
};

View File

@ -67,7 +67,7 @@ GuiPrintDialog::GuiPrintDialog(LyXView & lv)
}
ControlPrint & GuiPrintDialog::controller() const
ControlPrint & GuiPrintDialog::controller()
{
return static_cast<ControlPrint &>(GuiDialog::controller());
}
@ -117,7 +117,7 @@ void GuiPrintDialog::pagerangeChanged()
}
void GuiPrintDialog::update_contents()
void GuiPrintDialog::updateContents()
{
PrinterParams & pp = controller().params();

View File

@ -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

View File

@ -88,7 +88,7 @@ GuiRefDialog::GuiRefDialog(LyXView & lv)
}
ControlRef & GuiRefDialog::controller() const
ControlRef & GuiRefDialog::controller()
{
return static_cast<ControlRef &>(GuiDialog::controller());
}
@ -107,7 +107,7 @@ void GuiRefDialog::gotoClicked()
void GuiRefDialog::selectionChanged()
{
if (readOnly())
if (controller().isBufferReadonly())
return;
QList<QListWidgetItem *> 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);

View File

@ -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();

View File

@ -63,7 +63,7 @@ GuiSearchDialog::GuiSearchDialog(LyXView & lv)
}
ControlSearch & GuiSearchDialog::controller() const
ControlSearch & GuiSearchDialog::controller()
{
return static_cast<ControlSearch &>(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());
}
}

View File

@ -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);

View File

@ -55,7 +55,7 @@ GuiSendtoDialog::GuiSendtoDialog(LyXView & lv)
}
ControlSendto & GuiSendtoDialog::controller() const
ControlSendto & GuiSendtoDialog::controller()
{
return static_cast<ControlSendto &>(GuiDialog::controller());
}
@ -74,7 +74,7 @@ void GuiSendtoDialog::closeEvent(QCloseEvent * e)
}
void GuiSendtoDialog::update_contents()
void GuiSendtoDialog::updateContents()
{
all_formats_ = controller().allFormats();

View File

@ -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<Format const *> all_formats_;

View File

@ -37,7 +37,7 @@ GuiShowFileDialog::GuiShowFileDialog(LyXView & lv)
}
ControlShowFile & GuiShowFileDialog::controller() const
ControlShowFile & GuiShowFileDialog::controller()
{
return static_cast<ControlShowFile &>(GuiDialog::controller());
}
@ -50,7 +50,7 @@ void GuiShowFileDialog::closeEvent(QCloseEvent * e)
}
void GuiShowFileDialog::update_contents()
void GuiShowFileDialog::updateContents()
{
setWindowTitle(toqstr(controller().getFileName()));

View File

@ -30,9 +30,9 @@ private:
///
void closeEvent(QCloseEvent * e);
/// parent controller
ControlShowFile & controller() const;
ControlShowFile & controller();
/// update
void update_contents();
void updateContents();
};
} // namespace frontend

View File

@ -62,7 +62,7 @@ GuiSpellcheckerDialog::GuiSpellcheckerDialog(LyXView & lv)
}
ControlSpellchecker & GuiSpellcheckerDialog::controller() const
ControlSpellchecker & GuiSpellcheckerDialog::controller()
{
return static_cast<ControlSpellchecker &>(GuiDialog::controller());
}
@ -131,7 +131,7 @@ void GuiSpellcheckerDialog::reject()
}
void GuiSpellcheckerDialog::update_contents()
void GuiSpellcheckerDialog::updateContents()
{
if (isVisibleView() || controller().exitEarly())
controller().check();

View File

@ -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

View File

@ -148,7 +148,7 @@ GuiTabularDialog::GuiTabularDialog(LyXView & lv)
}
ControlTabular & GuiTabularDialog::controller() const
ControlTabular & GuiTabularDialog::controller()
{
return static_cast<ControlTabular &>(GuiDialog::controller());
}
@ -600,7 +600,7 @@ void GuiTabularDialog::update_borders()
}
void GuiTabularDialog::update_contents()
void GuiTabularDialog::updateContents()
{
controller().initialiseParams(string());

View File

@ -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();
};

View File

@ -47,7 +47,7 @@ GuiTabularCreateDialog::GuiTabularCreateDialog(LyXView & lv)
}
ControlTabularCreate & GuiTabularCreateDialog::controller() const
ControlTabularCreate & GuiTabularCreateDialog::controller()
{
return static_cast<ControlTabularCreate &>(GuiDialog::controller());
}

View File

@ -31,7 +31,7 @@ private Q_SLOTS:
void rowsChanged(int);
/// parent controller
ControlTabularCreate & controller() const;
ControlTabularCreate & controller();
private:
/// Apply changes

View File

@ -60,7 +60,7 @@ GuiTexinfoDialog::GuiTexinfoDialog(LyXView & lv)
}
ControlTexinfo & GuiTexinfoDialog::controller() const
ControlTexinfo & GuiTexinfoDialog::controller()
{
return static_cast<ControlTexinfo &>(GuiDialog::controller());
}

View File

@ -42,7 +42,7 @@ private:
///
void closeEvent(QCloseEvent * e);
///
ControlTexinfo & controller() const;
ControlTexinfo & controller();
///
void updateStyles(ControlTexinfo::texFileSuffix);
///

View File

@ -64,7 +64,7 @@ GuiThesaurusDialog::GuiThesaurusDialog(LyXView & lv)
}
ControlThesaurus & GuiThesaurusDialog::controller() const
ControlThesaurus & GuiThesaurusDialog::controller()
{
return static_cast<ControlThesaurus &>(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("");

View File

@ -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();
};

View File

@ -51,7 +51,7 @@ GuiURLDialog::GuiURLDialog(LyXView & lv)
}
ControlCommand & GuiURLDialog::controller() const
ControlCommand & GuiURLDialog::controller()
{
return static_cast<ControlCommand &>(GuiDialog::controller());
}
@ -71,7 +71,7 @@ void GuiURLDialog::closeEvent(QCloseEvent * e)
void GuiURLDialog::update_contents()
void GuiURLDialog::updateContents()
{
InsetCommandParams const & params = controller().params();

View File

@ -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

View File

@ -87,7 +87,7 @@ GuiVSpaceDialog::GuiVSpaceDialog(LyXView & lv)
}
ControlVSpace & GuiVSpaceDialog::controller() const
ControlVSpace & GuiVSpaceDialog::controller()
{
return static_cast<ControlVSpace &>(GuiDialog::controller());
}
@ -181,7 +181,7 @@ void GuiVSpaceDialog::applyView()
}
void GuiVSpaceDialog::update_contents()
void GuiVSpaceDialog::updateContents()
{
setWidgetsFromVSpace(controller().params(),
spacingCO, valueLE, unitCO, keepCB);

View File

@ -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

View File

@ -62,7 +62,7 @@ GuiWrapDialog::GuiWrapDialog(LyXView & lv)
}
ControlWrap & GuiWrapDialog::controller() const
ControlWrap & GuiWrapDialog::controller()
{
return static_cast<ControlWrap &>(GuiDialog::controller());
}
@ -118,7 +118,7 @@ static string const numtostr(double val)
}
void GuiWrapDialog::update_contents()
void GuiWrapDialog::updateContents()
{
InsetWrapParams & params = controller().params();

View File

@ -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

View File

@ -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