* to a particular dialog.
*/
//@{
- virtual Controller & controller() const = 0;
+ virtual Controller & controller() = 0;
//@}
/** \c Button controller part
}
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:
}
-ControlCommand & GuiBibitemDialog::controller() const
+ControlCommand & GuiBibitemDialog::controller()
{
return static_cast<ControlCommand &>(GuiDialog::controller());
}
}
-void GuiBibitemDialog::update_contents()
+void GuiBibitemDialog::updateContents()
{
keyED->setText(toqstr(controller().params()["key"]));
labelED->setText(toqstr(controller().params()["label"]));
///
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlCommand & controller() const;
+ ControlCommand & controller();
private:
///
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlBibtex & GuiBibtexDialog::controller() const
+ControlBibtex & GuiBibtexDialog::controller()
{
return static_cast<ControlBibtex &>(GuiDialog::controller());
}
void GuiBibtexDialog::databaseChanged()
{
- deletePB->setEnabled(!readOnly() && databaseLW->currentRow() != -1);
+ deletePB->setEnabled(!controller().isBufferReadonly() && databaseLW->currentRow() != -1);
}
}
-void GuiBibtexDialog::update_contents()
+void GuiBibtexDialog::updateContents()
{
bool bibtopic = controller().usingBibtopic();
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_;
}
-ControlBox & GuiBoxDialog::controller() const
+ControlBox & GuiBoxDialog::controller()
{
return static_cast<ControlBox &>(GuiDialog::controller());
}
}
-void GuiBoxDialog::update_contents()
+void GuiBoxDialog::updateContents()
{
string type(controller().params().type);
for (unsigned int i = 0; i < gui_names_.size(); ++i) {
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
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
///
std::vector<std::string> ids_;
}
-ControlBranch & GuiBranchDialog::controller() const
+ControlBranch & GuiBranchDialog::controller()
{
return static_cast<ControlBranch &>(GuiDialog::controller());
}
}
-void GuiBranchDialog::update_contents()
+void GuiBranchDialog::updateContents()
{
typedef BranchList::const_iterator const_iterator;
///
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();
};
}
-ControlChanges & GuiChangesDialog::controller() const
+ControlChanges & GuiChangesDialog::controller()
{
return static_cast<ControlChanges &>(GuiDialog::controller());
}
}
-void GuiChangesDialog::update_contents()
+void GuiChangesDialog::updateContents()
{
docstring text;
docstring author = controller().getChangeAuthor();
private:
void closeEvent(QCloseEvent * e);
- ControlChanges & controller() const;
- void update_contents();
+ ControlChanges & controller();
+ void updateContents();
};
} // namespace frontend
}
-ControlCharacter & GuiCharacterDialog::controller() const
+ControlCharacter & GuiCharacterDialog::controller()
{
return static_cast<ControlCharacter &>(GuiDialog::controller());
}
}
-void GuiCharacterDialog::update_contents()
+void GuiCharacterDialog::updateContents()
{
ControlCharacter const & ctrl = controller();
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;
}
-ControlCitation & GuiCitationDialog::controller() const
+ControlCitation & GuiCitationDialog::controller()
{
return static_cast<ControlCitation &>(GuiDialog::controller());
}
private:
///
- ControlCitation & controller() const;
+ ControlCitation & controller();
///
void closeEvent(QCloseEvent * e);
/// prepares a call to GuiCitation::searchKeys when we
}
-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;
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_;
}
-bool GuiDialog::readOnly() const
-{
- return controller().isBufferReadonly();
-}
-
-
void GuiDialog::showView()
{
QSize const hint = sizeHint();
// protect the BC from unwarranted state transitions
updating_ = true;
- update_contents();
+ updateContents();
updating_ = false;
setUpdatesEnabled(true);
void slotClose();
public:
-
/** Check whether we may apply our data.
*
* The buttons are disabled if not and (re-)enabled if yes.
void setViewTitle(docstring const & title);
- ///
- bool readOnly() const;
/// the dialog has changed contents
virtual void changed();
/// default: do nothing
virtual void applyView() {}
/// default: do nothing
- virtual void update_contents() {}
+ virtual void updateContents() {}
protected:
/// Hide the dialog.
* 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
}
-ControlDocument & GuiDocumentDialog::controller() const
+ControlDocument & GuiDocumentDialog::controller()
{
return static_cast<ControlDocument &>(GuiDialog::controller());
}
params.setJustBaseClass(tc);
if (lyxrc.auto_reset_options)
params.useClassDefaults();
- update_contents();
+ updateContents();
}
}
-void GuiDocumentDialog::update_contents()
+void GuiDocumentDialog::updateContents()
{
updateParams(controller().params());
}
params.setJustBaseClass(latexModule->classCO->currentIndex());
params.useClassDefaults();
- update_contents();
+ updateContents();
}
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
}
-ControlERT & GuiERTDialog::controller() const
+ControlERT & GuiERTDialog::controller()
{
return static_cast<ControlERT &>(GuiDialog::controller());
}
}
-void GuiERTDialog::update_contents()
+void GuiERTDialog::updateContents()
{
switch (controller().status()) {
case InsetERT::Open: openRB->setChecked(true); break;
private:
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlERT & controller() const;
+ ControlERT & controller();
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlErrorList & GuiErrorListDialog::controller() const
+ControlErrorList & GuiErrorListDialog::controller()
{
return static_cast<ControlErrorList &>(GuiDialog::controller());
}
}
-void GuiErrorListDialog::update_contents()
+void GuiErrorListDialog::updateContents()
{
setViewTitle(from_utf8(controller().name()));
errorsLW->clear();
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
}
-ControlExternal & GuiExternalDialog::controller() const
+ControlExternal & GuiExternalDialog::controller()
{
return static_cast<ControlExternal &>(GuiDialog::controller());
}
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));
}
if (!displayCB.isChecked())
display = external::NoDisplay;
- scale = convert<int>(fromqstr(scaleED.text()));
+ scale = scaleED.text().toInt();
}
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.
{
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));
}
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();
}
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)));
-void GuiExternalDialog::update_contents()
+void GuiExternalDialog::updateContents()
{
tab->setCurrentIndex(0);
InsetExternalParams const & params = controller().params();
setDisplay(*displayCB, *showCO,
*displayscaleED,
- params.display, params.lyxscale, readOnly());
+ params.display, params.lyxscale, controller().isBufferReadonly());
setRotation(*angleED, *originCO, params.rotationdata);
//
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
}
-ControlFloat & GuiFloatDialog::controller() const
+ControlFloat & GuiFloatDialog::controller()
{
return static_cast<ControlFloat &>(GuiDialog::controller());
}
}
-void GuiFloatDialog::update_contents()
+void GuiFloatDialog::updateContents()
{
floatFP->set(controller().params());
}
private:
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlFloat & controller() const;
+ ControlFloat & controller();
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlGraphics & GuiGraphicsDialog::controller() const
+ControlGraphics & GuiGraphicsDialog::controller()
{
return static_cast<ControlGraphics &>(GuiDialog::controller());
}
}
-void GuiGraphicsDialog::update_contents()
+void GuiGraphicsDialog::updateContents()
{
// clear and fill in the comboboxes
vector<string> const bb_units = frontend::getBBUnits();
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();
}
-ControlInclude & GuiIncludeDialog::controller() const
+ControlInclude & GuiIncludeDialog::controller()
{
return static_cast<ControlInclude &>(GuiDialog::controller());
}
}
-void GuiIncludeDialog::update_contents()
+void GuiIncludeDialog::updateContents()
{
InsetCommandParams const & params = controller().params();
private:
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlInclude & controller() const;
+ ControlInclude & controller();
///
void updateLists();
/// validate listings parameters and return an error message, if any
/// 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();
}
-ControlCommand & GuiIndexDialogBase::controller() const
+ControlCommand & GuiIndexDialogBase::controller()
{
return static_cast<ControlCommand &>(GuiDialog::controller());
}
}
-void GuiIndexDialogBase::update_contents()
+void GuiIndexDialogBase::updateContents()
{
docstring const contents = controller().params()["name"];
keywordED->setText(toqstr(contents));
///
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_;
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());
}
}
-void GuiListingsDialog::update_contents()
+void GuiListingsDialog::updateContents()
{
// set default values
listingsTB->setPlainText(
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
}
-ControlLog & GuiLogDialog::controller() const
+ControlLog & GuiLogDialog::controller()
{
return static_cast<ControlLog &>(GuiDialog::controller());
}
void GuiLogDialog::updateClicked()
{
- update_contents();
+ updateContents();
}
-void GuiLogDialog::update_contents()
+void GuiLogDialog::updateContents()
{
setViewTitle(controller().title());
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;
}
-ControlMath & GuiMathMatrixDialog::controller() const
+ControlMath & GuiMathMatrixDialog::controller()
{
return static_cast<ControlMath &>(GuiDialog::controller());
}
void change_adaptor();
/// parent controller
- ControlMath & controller() const;
+ ControlMath & controller();
};
} // namespace frontend
}
-ControlCommand & GuiNomenclDialog::controller() const
+ControlCommand & GuiNomenclDialog::controller()
{
return static_cast<ControlCommand &>(GuiDialog::controller());
}
}
-void GuiNomenclDialog::update_contents()
+void GuiNomenclDialog::updateContents()
{
prefixED->setText(toqstr(controller().params()["prefix"]));
symbolED->setText(toqstr(controller().params()["symbol"]));
///
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
}
-ControlNote & GuiNoteDialog::controller() const
+ControlNote & GuiNoteDialog::controller()
{
return static_cast<ControlNote &>(GuiDialog::controller());
}
}
-void GuiNoteDialog::update_contents()
+void GuiNoteDialog::updateContents()
{
QRadioButton * rb = 0;
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
}
-ControlParagraph & GuiParagraphDialog::controller() const
+ControlParagraph & GuiParagraphDialog::controller()
{
return static_cast<ControlParagraph &>(GuiDialog::controller());
}
}
-void GuiParagraphDialog::update_contents()
+void GuiParagraphDialog::updateContents()
{
ParagraphParameters const & params = controller().params();
///
void enableLinespacingValue(int);
/// parent controller
- ControlParagraph & controller() const;
+ ControlParagraph & controller();
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlPrefs & GuiPrefsDialog::controller() const
+ControlPrefs & GuiPrefsDialog::controller()
{
return static_cast<ControlPrefs &>(GuiDialog::controller());
}
apply(controller().rc());
}
-void GuiPrefsDialog::update_contents()
+void GuiPrefsDialog::updateContents()
{
updateRc(controller().rc());
}
///
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_;
};
}
-ControlPrint & GuiPrintDialog::controller() const
+ControlPrint & GuiPrintDialog::controller()
{
return static_cast<ControlPrint &>(GuiDialog::controller());
}
}
-void GuiPrintDialog::update_contents()
+void GuiPrintDialog::updateContents()
{
PrinterParams & pp = controller().params();
void printerChanged();
void pagerangeChanged();
/// parent controller
- ControlPrint & controller() const;
+ ControlPrint & controller();
private:
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlRef & GuiRefDialog::controller() const
+ControlRef & GuiRefDialog::controller()
{
return static_cast<ControlRef &>(GuiDialog::controller());
}
void GuiRefDialog::selectionChanged()
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
QList<QListWidgetItem *> selections = refsLW->selectedItems();
void GuiRefDialog::refHighlighted(QListWidgetItem * sel)
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
/* int const cur_item = refsLW->currentRow();
void GuiRefDialog::refSelected(QListWidgetItem * sel)
{
- if (readOnly())
+ if (controller().isBufferReadonly())
return;
/* int const cur_item = refsLW->currentRow();
}
-void GuiRefDialog::update_contents()
+void GuiRefDialog::updateContents()
{
InsetCommandParams const & params = controller().params();
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);
///
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();
}
-ControlSearch & GuiSearchDialog::controller() const
+ControlSearch & GuiSearchDialog::controller()
{
return static_cast<ControlSearch &>(GuiDialog::controller());
}
replaceallPB->setEnabled(false);
} else {
findPB->setEnabled(true);
- replacePB->setEnabled(!readOnly());
- replaceallPB->setEnabled(!readOnly());
+ replacePB->setEnabled(!controller().isBufferReadonly());
+ replaceallPB->setEnabled(!controller().isBufferReadonly());
}
}
void showView();
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlSearch & controller() const;
+ ControlSearch & controller();
///
void find(docstring const & str, bool casesens,
bool words, bool backwards);
}
-ControlSendto & GuiSendtoDialog::controller() const
+ControlSendto & GuiSendtoDialog::controller()
{
return static_cast<ControlSendto &>(GuiDialog::controller());
}
}
-void GuiSendtoDialog::update_contents()
+void GuiSendtoDialog::updateContents()
{
all_formats_ = controller().allFormats();
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_;
}
-ControlShowFile & GuiShowFileDialog::controller() const
+ControlShowFile & GuiShowFileDialog::controller()
{
return static_cast<ControlShowFile &>(GuiDialog::controller());
}
}
-void GuiShowFileDialog::update_contents()
+void GuiShowFileDialog::updateContents()
{
setWindowTitle(toqstr(controller().getFileName()));
///
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlShowFile & controller() const;
+ ControlShowFile & controller();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlSpellchecker & GuiSpellcheckerDialog::controller() const
+ControlSpellchecker & GuiSpellcheckerDialog::controller()
{
return static_cast<ControlSpellchecker &>(GuiDialog::controller());
}
}
-void GuiSpellcheckerDialog::update_contents()
+void GuiSpellcheckerDialog::updateContents()
{
if (isVisibleView() || controller().exitEarly())
controller().check();
/// 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
}
-ControlTabular & GuiTabularDialog::controller() const
+ControlTabular & GuiTabularDialog::controller()
{
return static_cast<ControlTabular &>(GuiDialog::controller());
}
}
-void GuiTabularDialog::update_contents()
+void GuiTabularDialog::updateContents()
{
controller().initialiseParams(string());
///
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();
};
}
-ControlTabularCreate & GuiTabularCreateDialog::controller() const
+ControlTabularCreate & GuiTabularCreateDialog::controller()
{
return static_cast<ControlTabularCreate &>(GuiDialog::controller());
}
void rowsChanged(int);
/// parent controller
- ControlTabularCreate & controller() const;
+ ControlTabularCreate & controller();
private:
/// Apply changes
}
-ControlTexinfo & GuiTexinfoDialog::controller() const
+ControlTexinfo & GuiTexinfoDialog::controller()
{
return static_cast<ControlTexinfo &>(GuiDialog::controller());
}
///
void closeEvent(QCloseEvent * e);
///
- ControlTexinfo & controller() const;
+ ControlTexinfo & controller();
///
void updateStyles(ControlTexinfo::texFileSuffix);
///
}
-ControlThesaurus & GuiThesaurusDialog::controller() const
+ControlThesaurus & GuiThesaurusDialog::controller()
{
return static_cast<ControlThesaurus &>(GuiDialog::controller());
}
void GuiThesaurusDialog::selectionChanged()
{
int const col = meaningsTV->currentColumn();
- if (col<0 || readOnly())
+ if (col < 0 || controller().isBufferReadonly())
return;
replaceED->setText(meaningsTV->currentItem()->text(col));
}
-void GuiThesaurusDialog::update_contents()
+void GuiThesaurusDialog::updateContents()
{
entryED->setText(toqstr(controller().text()));
replaceED->setText("");
private:
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlThesaurus & controller() const;
+ ControlThesaurus & controller();
/// update
- void update_contents();
+ void updateContents();
///
void updateLists();
};
}
-ControlCommand & GuiURLDialog::controller() const
+ControlCommand & GuiURLDialog::controller()
{
return static_cast<ControlCommand &>(GuiDialog::controller());
}
-void GuiURLDialog::update_contents()
+void GuiURLDialog::updateContents()
{
InsetCommandParams const & params = controller().params();
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
}
-ControlVSpace & GuiVSpaceDialog::controller() const
+ControlVSpace & GuiVSpaceDialog::controller()
{
return static_cast<ControlVSpace &>(GuiDialog::controller());
}
}
-void GuiVSpaceDialog::update_contents()
+void GuiVSpaceDialog::updateContents()
{
setWidgetsFromVSpace(controller().params(),
spacingCO, valueLE, unitCO, keepCB);
private:
/// parent controller
- ControlVSpace & controller() const;
+ ControlVSpace & controller();
/// Apply from dialog
void applyView();
/// Update the dialog
- void update_contents();
+ void updateContents();
};
} // namespace frontend
}
-ControlWrap & GuiWrapDialog::controller() const
+ControlWrap & GuiWrapDialog::controller()
{
return static_cast<ControlWrap &>(GuiDialog::controller());
}
}
-void GuiWrapDialog::update_contents()
+void GuiWrapDialog::updateContents()
{
InsetWrapParams & params = controller().params();
private:
void closeEvent(QCloseEvent * e);
/// parent controller
- ControlWrap & controller() const;
+ ControlWrap & controller();
/// Apply changes
void applyView();
/// update
- void update_contents();
+ void updateContents();
};
} // namespace frontend
//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