rename a few view functions from foo() to fooView()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20024 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-09-03 20:28:26 +00:00
parent cec37055da
commit 9a95d2a936
97 changed files with 177 additions and 181 deletions

View File

@ -181,7 +181,7 @@ void Dialogs::updateBufferDependent(bool switched) const
Dialog * dialog = it->second.get();
if (switched && dialog->controller().isBufferDependent()) {
if (dialog->isVisible() && dialog->controller().initialiseParams(""))
dialog->view().update();
dialog->view().updateView();
else
dialog->hide();
} else {

View File

@ -92,7 +92,7 @@ void ControlExternal::editExternal()
{
BOOST_ASSERT(params_.get());
dialog().view().apply();
dialog().view().applyView();
string const lfun =
InsetExternalMailer::params2string(params(), kernel().buffer());
kernel().dispatch(FuncRequest(LFUN_EXTERNAL_EDIT, lfun));

View File

@ -142,7 +142,7 @@ void ControlGraphics::editGraphics()
{
BOOST_ASSERT(params_.get());
dialog().view().apply();
dialog().view().applyView();
string const lfun =
InsetGraphicsMailer::params2string(params(), kernel().buffer());
kernel().dispatch(FuncRequest(LFUN_GRAPHICS_EDIT, lfun));

View File

@ -233,7 +233,7 @@ void ControlSpellchecker::check()
LYXERR(Debug::GUI) << "Updating spell progress." << endl;
oldval_ = newvalue_;
// set progress bar
dialog().view().partialUpdate(SPELL_PROGRESSED);
dialog().view().partialUpdateView(SPELL_PROGRESSED);
}
// speller might be dead ...
@ -261,7 +261,7 @@ void ControlSpellchecker::check()
// set suggestions
if (res != SpellBase::OK && res != SpellBase::IGNORED_WORD) {
LYXERR(Debug::GUI) << "Found a word needing checking." << endl;
dialog().view().partialUpdate(SPELL_FOUND_WORD);
dialog().view().partialUpdateView(SPELL_FOUND_WORD);
}
}

View File

@ -142,14 +142,14 @@ void ControlTabular::setWidth(string const & width)
else
set(Tabular::SET_PWIDTH, width);
dialog().view().update();
dialog().view().updateView();
}
void ControlTabular::toggleMultiColumn()
{
set(Tabular::MULTICOLUMN);
dialog().view().update();
dialog().view().updateView();
}

View File

@ -34,7 +34,7 @@ Dialog::~Dialog()
{}
void Dialog::setButtonsValid(bool valid)
void Dialog::setButtonsValid(bool /*valid*/)
{}
@ -51,7 +51,7 @@ void Dialog::show(string const & data)
}
preShow();
view().show();
view().showView();
postShow();
}
@ -68,7 +68,7 @@ void Dialog::update(string const & data)
}
preUpdate();
view().update();
view().updateView();
postUpdate();
}
@ -80,11 +80,11 @@ void Dialog::checkStatus()
void Dialog::hide()
{
if (!view().isVisible())
if (!view().isVisibleView())
return;
controller().clearParams();
view().hide();
view().hideView();
kernel().disconnect(name());
}
@ -98,26 +98,26 @@ void Dialog::apply()
return;
}
view().apply();
view().applyView();
controller().dispatchParams();
if (controller().disconnectOnApply() && !is_closing_) {
kernel().disconnect(name());
controller().initialiseParams(string());
view().update();
view().updateView();
}
}
bool Dialog::isVisible() const
{
return view().isVisible();
return view().isVisibleView();
}
void Dialog::redraw()
{
view().redraw();
view().redrawView();
}
@ -168,19 +168,19 @@ Dialog::View & Dialog::view() const
}
void Dialog::View::setTitle(docstring const & newtitle)
void Dialog::View::setViewTitle(docstring const & newtitle)
{
title_ = newtitle;
}
docstring const & Dialog::View::getTitle() const
docstring const & Dialog::View::getViewTitle() const
{
return title_;
}
void Dialog::View::partialUpdate(int)
void Dialog::View::partialUpdateView(int)
{}
} // namespace frontend

View File

@ -243,22 +243,22 @@ public:
* accompanying Controller in preparation for their dispatch to
* the LyX kernel.
*/
virtual void apply() = 0;
virtual void applyView() = 0;
/// Hide the dialog from sight
virtual void hide() = 0;
virtual void hideView() = 0;
/// Redraw the dialog (e.g. if the colors have been remapped).
virtual void redraw() {}
virtual void redrawView() {}
/// Create the dialog if necessary, update it and display it.
virtual void show() = 0;
virtual void showView() = 0;
/// Update the display of the dialog whilst it is still visible.
virtual void update() = 0;
virtual void updateView() = 0;
/// \return true if the dialog is visible.
virtual bool isVisible() const = 0;
virtual bool isVisibleView() const = 0;
//@}
/** Defaults to nothing. Can be used by the Controller, however, to
@ -266,12 +266,12 @@ public:
* dialog therefore needs updating.
* \param id identifies what should be updated.
*/
virtual void partialUpdate(int id);
virtual void partialUpdateView(int id);
/// sets the title of the dialog (window caption)
void setTitle(docstring const &);
void setViewTitle(docstring const &);
/// gets the title of the dialog (window caption)
docstring const & getTitle() const;
docstring const & getViewTitle() const;
/** \name View Access
* Enable the derived classes to access the other parts of the whole.

View File

@ -50,13 +50,12 @@ public:
/// Dialog::View inherited methods
//@{
void apply() {}
void hide() { QDockWidget::hide(); }
void show() { QDockWidget::show(); }
bool isVisible() const
{ return QDockWidget::isVisible(); }
void redraw() {}
void update()
void applyView() {}
void hideView() { QDockWidget::hide(); }
void showView() { QDockWidget::show(); }
bool isVisibleView() const { return QDockWidget::isVisible(); }
void redrawView() {}
void updateView()
{
widget_->update();
QDockWidget::update();

View File

@ -45,7 +45,7 @@ public:
{ return static_cast<ControlAboutlyx const &>(this->getController()); }
private:
/// not needed
virtual void apply() {}
virtual void applyView() {}
/// not needed
virtual void update_contents() {}
// build the dialog

View File

@ -85,7 +85,7 @@ void GuiBibitem::update_contents()
}
void GuiBibitem::apply()
void GuiBibitem::applyView()
{
controller().params()["key"] = qstring_to_ucs4(dialog_->keyED->text());
controller().params()["label"] = qstring_to_ucs4(dialog_->labelED->text());

View File

@ -54,7 +54,7 @@ protected:
private:
friend class GuiBibitemDialog;
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -331,7 +331,7 @@ void GuiBibtex::update_contents()
}
void GuiBibtex::apply()
void GuiBibtex::applyView()
{
docstring dbs(qstring_to_ucs4(dialog_->databaseLW->item(0)->text()));

View File

@ -82,7 +82,7 @@ protected:
virtual bool isValid();
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -256,7 +256,7 @@ void GuiBox::update_contents()
}
void GuiBox::apply()
void GuiBox::applyView()
{
controller().params().type =
ids_[dialog_->typeCO->currentIndex()];

View File

@ -62,7 +62,7 @@ private:
///
friend class GuiBoxDialog;
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -100,7 +100,7 @@ void GuiBranch::update_contents()
}
void GuiBranch::apply()
void GuiBranch::applyView()
{
docstring const type = qstring_to_ucs4(dialog_->branchCO->currentText());
controller().params().branch = type;

View File

@ -53,7 +53,7 @@ private:
friend class GuiBranchDialog;
/// Apply changes
virtual void apply();
virtual void applyView();
/// Build the dialog
virtual void build_dialog();
/// Update dialog before showing it

View File

@ -48,10 +48,10 @@ GuiBranches::GuiBranches(QWidget * parent, Qt::WFlags f)
void GuiBranches::update(BufferParams const & params)
{
branchlist_ = params.branchlist();
update();
updateView();
}
void GuiBranches::update()
void GuiBranches::updateView()
{
// store the selected branch
QTreeWidgetItem * item = branchesTW->currentItem();
@ -100,7 +100,7 @@ void GuiBranches::on_addBranchPB_pressed()
if (!new_branch.isEmpty()) {
branchlist_.add(qstring_to_ucs4(new_branch));
newBranchLE->clear();
update();
updateView();
}
}
@ -115,7 +115,7 @@ void GuiBranches::on_removePB_pressed()
if (!sel_branch.isEmpty()) {
branchlist_.remove(qstring_to_ucs4(sel_branch));
newBranchLE->clear();
update();
updateView();
}
}
@ -146,7 +146,7 @@ void GuiBranches::toggleBranch(QTreeWidgetItem * item)
Branch * branch = branchlist_.find(qstring_to_ucs4(sel_branch));
if (branch && branch->setSelected(!selected)) {
newBranchLE->clear();
update();
updateView();
}
}
}
@ -177,7 +177,7 @@ void GuiBranches::toggleColor(QTreeWidgetItem * item)
// add the color to the branchlist
branch->setColor(fromqstr(ncol.name()));
newBranchLE->clear();
update();
updateView();
}
}
}

View File

@ -45,7 +45,7 @@ Q_SIGNALS:
protected:
void toggleBranch(QTreeWidgetItem *);
void toggleColor(QTreeWidgetItem *);
void update();
void updateView();
protected Q_SLOTS:
void on_addBranchPB_pressed();

View File

@ -64,7 +64,7 @@ public:
private:
friend class GuiChangesDialog;
/// Apply changes
virtual void apply() {};
virtual void applyView() {};
/// update
virtual void update_contents();
/// build the dialog

View File

@ -192,7 +192,7 @@ void GuiCharacter::update_contents()
}
void GuiCharacter::apply()
void GuiCharacter::applyView()
{
ControlCharacter & ctrl = controller();

View File

@ -53,7 +53,7 @@ public:
{ return static_cast<ControlCharacter const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -79,7 +79,7 @@ GuiCitationDialog::GuiCitationDialog(Dialog & dialog, GuiCitation * form)
{
setupUi(this);
setWindowTitle(toqstr("LyX: " + getTitle()));
setWindowTitle(toqstr("LyX: " + getViewTitle()));
connect(citationStyleCO, SIGNAL(activated(int)),
this, SLOT(changed()));
@ -129,7 +129,7 @@ void GuiCitationDialog::closeEvent(QCloseEvent * e)
}
void GuiCitationDialog::apply()
void GuiCitationDialog::applyView()
{
int const choice = std::max(0, citationStyleCO->currentIndex());
style_ = choice;
@ -143,14 +143,14 @@ void GuiCitationDialog::apply()
}
void GuiCitationDialog::hide()
void GuiCitationDialog::hideView()
{
form_->clearParams();
accept();
}
void GuiCitationDialog::show()
void GuiCitationDialog::showView()
{
findLE->clear();
availableLV->setFocus();
@ -160,7 +160,7 @@ void GuiCitationDialog::show()
}
bool GuiCitationDialog::isVisible() const
bool GuiCitationDialog::isVisibleView() const
{
return QDialog::isVisible();
}
@ -168,9 +168,9 @@ bool GuiCitationDialog::isVisible() const
void GuiCitationDialog::on_okPB_clicked()
{
apply();
applyView();
form_->clearSelection();
hide();
hideView();
}
@ -183,7 +183,7 @@ void GuiCitationDialog::on_cancelPB_clicked()
void GuiCitationDialog::on_applyPB_clicked()
{
apply();
applyView();
}
@ -194,7 +194,7 @@ void GuiCitationDialog::on_restorePB_clicked()
}
void GuiCitationDialog::update()
void GuiCitationDialog::updateView()
{
fillFields();
fillEntries();
@ -356,7 +356,7 @@ bool GuiCitationDialog::isSelected(const QModelIndex & idx)
void GuiCitationDialog::setButtons()
{
selectionManager->update();
selectionManager->updateView();
int const srows = selectedLV->model()->rowCount();
applyPB->setEnabled(srows > 0);
okPB->setEnabled(srows > 0);

View File

@ -40,23 +40,23 @@ public:
virtual ~GuiCitationDialog();
virtual void apply();
virtual void applyView();
/// Hide the dialog from sight
void hide();
void hideView();
/// Redraw the dialog (e.g. if the colors have been remapped).
void redraw() {}
void redrawView() {}
/// Create the dialog if necessary, update it and display it.
void show();
void showView();
/// \return true if the dialog is visible.
bool isVisible() const;
bool isVisibleView() const;
public Q_SLOTS:
/// Update the display of the dialog whilst it is still visible.
void update();
void updateView();
protected:
void closeEvent(QCloseEvent * e);

View File

@ -62,7 +62,7 @@ public:
ControlMath const & controller() const
{ return static_cast<ControlMath const &>(this->getController()); }
private:
virtual void apply() {}
virtual void applyView() {}
virtual void update_contents() {}
/// Build the dialog.
virtual void build_dialog();

View File

@ -56,7 +56,7 @@ void GuiDialog::RestoreButton()
{
// Tell the kernel that a request to refresh the dialog's contents
// has been received. It's up to the kernel to supply the necessary
// info by calling GuiDialog::update().
// info by calling GuiDialog::updateView().
kernel().updateDialog(name_);
bc().restore();
}

View File

@ -28,7 +28,7 @@ ButtonController & GuiDialogView::bc()
}
bool GuiDialogView::isVisible() const
bool GuiDialogView::isVisibleView() const
{
return form() && form()->isVisible();
}
@ -40,7 +40,7 @@ bool GuiDialogView::readOnly() const
}
void GuiDialogView::show()
void GuiDialogView::showView()
{
if (!form())
build();
@ -49,11 +49,11 @@ void GuiDialogView::show()
if (sizeHint.height() >= 0 && sizeHint.width() >= 0)
form()->setMinimumSize(sizeHint);
update(); // make sure its up-to-date
updateView(); // make sure its up-to-date
if (dialog().controller().exitEarly())
return;
form()->setWindowTitle(toqstr("LyX: " + getTitle()));
form()->setWindowTitle(toqstr("LyX: " + getViewTitle()));
if (form()->isVisible()) {
form()->raise();
@ -66,7 +66,7 @@ void GuiDialogView::show()
}
void GuiDialogView::hide()
void GuiDialogView::hideView()
{
if (form() && form()->isVisible())
form()->hide();

View File

@ -48,13 +48,13 @@ protected:
/// Build the dialog
virtual void build();
/// Hide the dialog.
virtual void hide();
virtual void hideView();
/// Create the dialog if necessary, update it and display it.
virtual void show();
virtual void showView();
/// update the dialog's contents
virtual void update_contents() = 0;
///
virtual bool isVisible() const;
virtual bool isVisibleView() const;
/// is the dialog currently valid ?
virtual bool isValid();
@ -91,7 +91,7 @@ protected:
virtual ~GuiView() {}
/// update the dialog
virtual void update() {
virtual void updateView() {
dialog_->setUpdatesEnabled(false);
// protect the BC from unwarranted state transitions

View File

@ -1417,7 +1417,7 @@ void GuiDocument::showPreamble()
}
void GuiDocument::apply()
void GuiDocument::applyView()
{
if (!dialog_.get())
return;
@ -1437,7 +1437,7 @@ void GuiDocument::update_contents()
void GuiDocument::saveDocDefault()
{
// we have to apply the params first
apply();
applyView();
controller().saveAsDefault();
}

View File

@ -134,7 +134,7 @@ public:
{ return static_cast<ControlDocument const &>(this->getController()); }
private:
/// Apply changes
void apply();
void applyView();
/// update
void update_contents();
/// build the dialog

View File

@ -73,7 +73,7 @@ void GuiERT::build_dialog()
}
void GuiERT::apply()
void GuiERT::applyView()
{
if (dialog_->openRB->isChecked())
controller().setStatus(Inset::Open);

View File

@ -51,7 +51,7 @@ public:
private:
friend class GuiERTDialog;
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -83,7 +83,7 @@ void GuiEmbeddedFilesDialog::on_filesLW_itemDoubleClicked()
}
void GuiEmbeddedFilesDialog::update()
void GuiEmbeddedFilesDialog::updateView()
{
filesLW->clear();

View File

@ -32,7 +32,7 @@ public Q_SLOTS:
///
void on_filesLW_itemDoubleClicked();
///
void update();
void updateView();
///
void on_enableCB_toggled(bool enable);
///

View File

@ -90,7 +90,7 @@ void GuiErrorList::select(QListWidgetItem * wi)
void GuiErrorList::update_contents()
{
setTitle(from_utf8(controller().name()));
setViewTitle(from_utf8(controller().name()));
dialog_->errorsLW->clear();
dialog_->descriptionTB->setPlainText(QString());

View File

@ -56,7 +56,7 @@ private:
/// select an entry
void select(QListWidgetItem *);
/// required apply
virtual void apply() {}
virtual void applyView() {}
/// build dialog
virtual void build_dialog();
/// update contents

View File

@ -129,13 +129,12 @@ GuiExternalDialog::GuiExternalDialog(GuiExternal * form)
}
void GuiExternalDialog::show()
void GuiExternalDialog::showView()
{
QDialog::show();
}
bool GuiExternalDialog::activateAspectratio() const
{
if (widthUnitCO->currentIndex() == 0)
@ -651,7 +650,7 @@ void GuiExternal::updateTemplate()
}
void GuiExternal::apply()
void GuiExternal::applyView()
{
InsetExternalParams params = controller().params();

View File

@ -32,7 +32,7 @@ class GuiExternalDialog : public QDialog, public Ui::ExternalUi
public:
GuiExternalDialog(GuiExternal * form);
virtual void show();
virtual void showView();
protected Q_SLOTS:
virtual void bbChanged();
virtual void browseClicked();
@ -69,7 +69,7 @@ public:
typedef std::map<std::string, QString> MapType;
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -83,7 +83,7 @@ void GuiFloat::update_contents()
}
void GuiFloat::apply()
void GuiFloat::applyView()
{
InsetFloatParams & params = controller().params();

View File

@ -54,7 +54,7 @@ public:
{ return static_cast<ControlFloat const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -199,13 +199,14 @@ GuiFontLoader::GuiFontLoader()
void GuiFontLoader::update()
{
for (int i1 = 0; i1 < Font::NUM_FAMILIES; ++i1)
for (int i1 = 0; i1 < Font::NUM_FAMILIES; ++i1) {
for (int i2 = 0; i2 < 2; ++i2)
for (int i3 = 0; i3 < 4; ++i3)
for (int i4 = 0; i4 < 10; ++i4) {
delete fontinfo_[i1][i2][i3][i4];
fontinfo_[i1][i2][i3][i4] = 0;
}
}
}

View File

@ -176,7 +176,7 @@ GuiGraphicsDialog::GuiGraphicsDialog(GuiGraphics * form)
}
void GuiGraphicsDialog::show()
void GuiGraphicsDialog::showView()
{
QDialog::show();
}
@ -576,7 +576,7 @@ void GuiGraphics::update_contents()
}
void GuiGraphics::apply()
void GuiGraphics::applyView()
{
InsetGraphicsParams & igp = controller().params();

View File

@ -34,7 +34,7 @@ class GuiGraphicsDialog : public QDialog, public Ui::GraphicsUi
public:
GuiGraphicsDialog(GuiGraphics * form);
virtual void setAutoText();
virtual void show();
virtual void showView();
protected Q_SLOTS:
virtual void change_adaptor();
virtual void change_bb();
@ -70,7 +70,7 @@ protected:
virtual bool isValid();
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -68,7 +68,7 @@ GuiIncludeDialog::GuiIncludeDialog(GuiInclude * form)
}
void GuiIncludeDialog::show()
void GuiIncludeDialog::showView()
{
QDialog::show();
}
@ -275,7 +275,7 @@ void GuiInclude::update_contents()
}
void GuiInclude::apply()
void GuiInclude::applyView()
{
InsetCommandParams params = controller().params();

View File

@ -30,7 +30,7 @@ public:
void updateLists();
virtual void show();
virtual void showView();
/// validate listings parameters and return an error message, if any
docstring validate_listings_params();
protected Q_SLOTS:
@ -67,7 +67,7 @@ protected:
virtual bool isValid();
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -116,7 +116,7 @@ void GuiIndex::update_contents()
}
void GuiIndex::apply()
void GuiIndex::applyView()
{
controller().params()["name"] = qstring_to_ucs4(dialog_->keywordED->text());
}

View File

@ -55,7 +55,7 @@ protected:
virtual bool isValid();
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -427,7 +427,7 @@ void GuiListings::build_dialog()
}
void GuiListings::apply()
void GuiListings::applyView()
{
InsetListingsParams & params = controller().params();
params.setInline(dialog_->inlineCB->isChecked());

View File

@ -66,7 +66,7 @@ public:
{ return static_cast<ControlListings const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -129,7 +129,7 @@ void GuiLog::build_dialog()
void GuiLog::update_contents()
{
setTitle(controller().title());
setViewTitle(controller().title());
std::ostringstream ss;
controller().getContents(ss);

View File

@ -56,7 +56,7 @@ public:
{ return static_cast<ControlLog const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
/// update
virtual void update_contents();
/// build the dialog

View File

@ -55,7 +55,7 @@ public:
ControlMath const & controller() const
{ return static_cast<ControlMath const &>(this->getController()); }
private:
virtual void apply() {}
virtual void applyView() {}
virtual void update_contents() {}
/// Build the dialog.
virtual void build_dialog();

View File

@ -50,7 +50,7 @@ public:
QMenuBar * menuBar() const;
/// update the state of the menuitems - not needed
void update();
void updateView();
private:
/// Initialize specific MACOS X menubar

View File

@ -51,7 +51,7 @@ GuiNomenclDialog::GuiNomenclDialog(GuiNomencl * form)
}
void GuiNomenclDialog::show()
void GuiNomenclDialog::showView()
{
QDialog::show();
}
@ -113,7 +113,7 @@ void GuiNomencl::update_contents()
}
void GuiNomencl::apply()
void GuiNomencl::applyView()
{
controller().params()["prefix"] = qstring_to_ucs4(dialog_->prefixED->text());
controller().params()["symbol"] = qstring_to_ucs4(dialog_->symbolED->text());

View File

@ -31,7 +31,7 @@ class GuiNomenclDialog : public QDialog, public Ui::NomenclUi
Q_OBJECT
public:
GuiNomenclDialog(GuiNomencl * form);
virtual void show();
virtual void showView();
protected Q_SLOTS:
virtual void change_adaptor();
virtual void reject();
@ -58,7 +58,7 @@ protected:
virtual bool isValid();
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -101,7 +101,7 @@ void GuiNote::update_contents()
}
void GuiNote::apply()
void GuiNote::applyView()
{
InsetNoteParams::Type type;

View File

@ -54,7 +54,7 @@ public:
{ return static_cast<ControlNote const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// Build the dialog
virtual void build_dialog();
/// Update dialog before showing it

View File

@ -180,7 +180,7 @@ void GuiParagraph::build_dialog()
}
void GuiParagraph::apply()
void GuiParagraph::applyView()
{
ParagraphParameters & params = controller().params();

View File

@ -68,7 +68,7 @@ public:
{ return static_cast<ControlParagraph const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -49,7 +49,7 @@ GuiPopupMenu::GuiPopupMenu(GuiMenubar * owner,
}
void GuiPopupMenu::update()
void GuiPopupMenu::updateView()
{
LYXERR(Debug::GUI) << BOOST_CURRENT_FUNCTION << endl;
LYXERR(Debug::GUI) << "\tTriggered menu: " << to_utf8(name_) << endl;

View File

@ -37,7 +37,7 @@ public:
public Q_SLOTS:
/// populate the toplevel menu and all children
void update();
void updateView();
private:
/// Get a Menu item label from the menu backend

View File

@ -1138,11 +1138,11 @@ void PrefCopiers::apply(LyXRC & /*rc*/) const
void PrefCopiers::update(LyXRC const & /*rc*/)
{
update();
updateView();
}
void PrefCopiers::update()
void PrefCopiers::updateView()
{
// The choice widget
// save current selection
@ -1312,7 +1312,7 @@ void PrefCopiers::new_copier()
form_->movers().set(fmt->name(), command);
update();
updateView();
int const last = AllCopiersLW->count() - 1;
AllCopiersLW->setCurrentRow(last);
@ -1331,7 +1331,7 @@ void PrefCopiers::modify_copier()
string const command = fromqstr(copierED->text());
form_->movers().set(fmt->name(), command);
update();
updateView();
updateButtons();
}
@ -1347,7 +1347,7 @@ void PrefCopiers::remove_copier()
string const & fmt_name = fmt->name();
form_->movers().set(fmt_name, string());
update();
updateView();
updateButtons();
}
@ -1404,11 +1404,11 @@ void PrefFileformats::apply(LyXRC & /*rc*/) const
void PrefFileformats::update(LyXRC const & /*rc*/)
{
update();
updateView();
}
void PrefFileformats::update()
void PrefFileformats::updateView()
{
// save current selection
QString current = guiNameED->text();
@ -1531,7 +1531,7 @@ void PrefFileformats::new_format()
form_->formats().sort();
form_->converters().update(form_->formats());
update();
updateView();
updateButtons();
formatsChanged();
}
@ -1561,7 +1561,7 @@ void PrefFileformats::remove_format()
form_->formats().erase(current_text);
form_->converters().update(form_->formats());
update();
updateView();
updateButtons();
formatsChanged();
}
@ -2038,7 +2038,7 @@ void GuiPrefs::build_dialog()
dialog_.reset(new GuiPrefsDialog(this));
}
void GuiPrefs::apply()
void GuiPrefs::applyView()
{
dialog_->apply(controller().rc());
}

View File

@ -242,7 +242,7 @@ public:
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
void update();
void updateView();
private Q_SLOTS:
void switch_copierLB(int nr);
@ -266,7 +266,7 @@ public:
void apply(LyXRC & rc) const;
void update(LyXRC const & rc);
void update();
void updateView();
Q_SIGNALS:
void formatsChanged();
private:
@ -374,7 +374,7 @@ public:
{ return static_cast<ControlPrefs const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update (do we need this?)
virtual void update_contents();

View File

@ -157,7 +157,7 @@ void GuiPrint::update_contents()
}
void GuiPrint::apply()
void GuiPrint::applyView()
{
PrinterParams::Target t = PrinterParams::PRINTER;
if (dialog_->fileRB->isChecked())

View File

@ -55,7 +55,7 @@ public:
{ return static_cast<ControlPrint const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -73,7 +73,7 @@ GuiRefDialog::GuiRefDialog(GuiRef * form)
setFocusProxy(refsLW);
}
void GuiRefDialog::show()
void GuiRefDialog::showView()
{
QDialog::show();
}
@ -244,7 +244,7 @@ void GuiRef::update_contents()
}
void GuiRef::apply()
void GuiRef::applyView()
{
InsetCommandParams & params = controller().params();

View File

@ -32,7 +32,7 @@ class GuiRefDialog : public QDialog, public Ui::RefUi {
public:
GuiRefDialog(GuiRef * form);
virtual void show();
virtual void showView();
public Q_SLOTS:
void changed_adaptor();
@ -70,7 +70,7 @@ protected:
private:
/// apply changes
virtual void apply();
virtual void applyView();
/// build dialog
virtual void build_dialog();
/// update dialog

View File

@ -57,7 +57,7 @@ GuiSearchDialog::GuiSearchDialog(GuiSearch * form)
}
void GuiSearchDialog::show()
void GuiSearchDialog::showView()
{
QDialog::show();
findCO->lineEdit()->setSelection(0, findCO->lineEdit()->text().length());

View File

@ -30,7 +30,7 @@ class GuiSearchDialog : public QDialog, public Ui::SearchUi {
public:
GuiSearchDialog(GuiSearch * form);
virtual void show();
virtual void showView();
protected Q_SLOTS:
void findChanged();
void findClicked();
@ -59,7 +59,7 @@ public:
{ return static_cast<ControlSearch const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
/// update
virtual void update_contents() {}
/// build the dialog

View File

@ -67,7 +67,7 @@ GuiSelectionManager::GuiSelectionManager(
}
void GuiSelectionManager::update()
void GuiSelectionManager::updateView()
{
int const arows = availableLV->model()->rowCount();
QModelIndexList const availSels =

View File

@ -49,7 +49,7 @@ class GuiSelectionManager : public QObject {
/// Sets the state of the various push buttons, depending upon the
/// state of the widgets. (E.g., "delete" is enabled only if the
/// selection is non-empty.)
virtual void update();
virtual void updateView();
/// Not strictly a matter of focus, which may be elsewhere, but
/// whether selectedLV is `more focused' than availableLV. Intended
@ -65,9 +65,9 @@ class GuiSelectionManager : public QObject {
///dialog to want to update---the focused subwidget or selected item.
///(Specifically, it is emitted by *_PB_clicked() and *_LV_clicked.)
///NOTE: No automatic update of the button state is done here. If you
///just want to do that, connect updateHook() to update(). Much of the
///just want to do that, connect updateHook() to updateView(). Much of the
///time, though, you will want to do a bit more processing first, so
///you can connect to some other function that itself calls update().
///you can connect to some other function that itself calls updateView().
void updateHook();
///Emitted on Ctrl-Enter in the availableLV. Intended to be connected
///to an "OK" event in the parent dialog.

View File

@ -120,7 +120,7 @@ void GuiSendto::update_contents()
}
void GuiSendto::apply()
void GuiSendto::applyView()
{
int const line(dialog_->formatLW->currentRow());

View File

@ -64,7 +64,7 @@ protected:
virtual bool isValid();
private:
/// Apply from dialog
virtual void apply();
virtual void applyView();
/// Update the dialog
virtual void update_contents();
/// Build the dialog

View File

@ -50,7 +50,7 @@ public:
{ return static_cast<ControlShowFile const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
/// update
virtual void update_contents();
/// build the dialog

View File

@ -142,7 +142,7 @@ void GuiSpellchecker::build_dialog()
void GuiSpellchecker::update_contents()
{
if (isVisible() || controller().exitEarly())
if (isVisibleView() || controller().exitEarly())
controller().check();
}

View File

@ -72,7 +72,7 @@ private:
void replace();
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
///
virtual void update_contents();
/// build the dialog

View File

@ -96,7 +96,7 @@ protected:
private:
/// We can't use this ...
virtual void apply() {}
virtual void applyView() {}
/// update borders
virtual void update_borders();
/// update

View File

@ -78,7 +78,7 @@ void GuiTabularCreate::build_dialog()
}
void GuiTabularCreate::apply()
void GuiTabularCreate::applyView()
{
controller().params().first = dialog_->rowsSB->value();
controller().params().second = dialog_->columnsSB->value();

View File

@ -51,7 +51,7 @@ public:
{ return static_cast<ControlTabularCreate const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents() {}
/// build the dialog

View File

@ -88,7 +88,7 @@ void GuiTexinfoDialog::viewClicked()
}
void GuiTexinfoDialog::update()
void GuiTexinfoDialog::updateView()
{
switch (whatStyleCO->currentIndex()) {
case 0:

View File

@ -32,7 +32,7 @@ class GuiTexinfoDialog : public QDialog, public Ui::TexinfoUi
public:
GuiTexinfoDialog(GuiTexinfo * form);
public Q_SLOTS:
virtual void update();
virtual void updateView();
protected Q_SLOTS:
virtual void change_adaptor();
virtual void rescanClicked();
@ -61,7 +61,7 @@ public:
{ return static_cast<ControlTexinfo const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
/// update (do we need this?)
virtual void update_contents() {}
/// build the dialog

View File

@ -65,7 +65,7 @@ public:
{ return static_cast<ControlThesaurus const &>(this->getController()); }
private:
/// Apply changes
virtual void apply() {}
virtual void applyView() {}
/// update
virtual void update_contents();
/// build the dialog

View File

@ -114,13 +114,13 @@ bool GuiToc::initialiseParams(std::string const & data)
{
if (!ControlToc::initialiseParams(data))
return false;
update();
updateView();
modelReset();
return true;
}
void GuiToc::update()
void GuiToc::updateView()
{
toc_models_.clear();
TocList::const_iterator it = tocs().begin();

View File

@ -37,7 +37,7 @@ public:
/// \c ControlToc inherited method.
virtual bool initialiseParams(std::string const & data);
///
void update();
void updateView();
///
bool canOutline(int type) const;

View File

@ -84,7 +84,7 @@ void UrlView::update_contents()
}
void UrlView::apply()
void UrlView::applyView()
{
InsetCommandParams & params = controller().params();

View File

@ -52,7 +52,7 @@ protected:
virtual bool isValid();
private:
/// apply dialog
virtual void apply();
virtual void applyView();
/// build dialog
virtual void build_dialog();
/// update dialog

View File

@ -209,7 +209,7 @@ void GuiVSpace::build_dialog()
}
void GuiVSpace::apply()
void GuiVSpace::applyView()
{
// spacing
// If a vspace choice is "Length" but there's no text in

View File

@ -61,7 +61,7 @@ private:
/// Build the dialog
virtual void build_dialog();
/// Apply from dialog
virtual void apply();
virtual void applyView();
/// Update the dialog
virtual void update_contents();
};

View File

@ -751,7 +751,7 @@ bool GuiViewBase::focusNextPrevChild(bool /*next*/)
}
void GuiViewBase::show()
void GuiViewBase::showView()
{
QMainWindow::setWindowTitle(qt_("LyX"));
QMainWindow::show();

View File

@ -73,7 +73,7 @@ public:
void openMenu(docstring const &);
/// show - display the top-level window
void show();
void showView();
/// menu item has been selected
void activated(FuncRequest const &);

View File

@ -59,7 +59,7 @@ GuiViewSourceDialog::GuiViewSourceDialog(GuiViewSource * form)
}
void GuiViewSourceDialog::update()
void GuiViewSourceDialog::updateView()
{
if (autoUpdateCB->isChecked())
form_->update(viewFullSourceCB->isChecked());

View File

@ -53,7 +53,7 @@ public:
public Q_SLOTS:
// update content
void update();
void updateView();
private:
GuiViewSource * form_;

View File

@ -36,9 +36,6 @@ class QPaintEvent;
namespace lyx {
namespace frontend {
class GuiView;
class QLPainter;
/// for emulating triple click
class double_click {
public:
@ -116,7 +113,6 @@ public:
virtual void removeCursor();
private:
void doGreyOut(QLPainter & pain);
///
void focusInEvent(QFocusEvent *);
///

View File

@ -95,7 +95,7 @@ void GuiWrap::build_dialog()
}
void GuiWrap::apply()
void GuiWrap::applyView()
{
double const value = convert<double>(fromqstr(dialog_->widthED->text()));
Length::UNIT unit = dialog_->unitsLC->currentLengthItem();

View File

@ -51,7 +51,7 @@ public:
{ return static_cast<ControlWrap const &>(this->getController()); }
private:
/// Apply changes
virtual void apply();
virtual void applyView();
/// update
virtual void update_contents();
/// build the dialog

View File

@ -231,7 +231,7 @@ void TocWidget::enableControls(bool enable)
void TocWidget::update()
{
LYXERR(Debug::GUI) << "In TocWidget::update()" << endl;
LYXERR(Debug::GUI) << "In TocWidget::updateView()" << endl;
select(form_->getCurrentIndex(typeCO->currentIndex()));
QWidget::update();
}

View File

@ -22,7 +22,8 @@ namespace frontend {
class GuiToc;
class TocWidget : public QWidget, public Ui::TocUi {
class TocWidget : public QWidget, public Ui::TocUi
{
Q_OBJECT
public:
TocWidget(GuiToc * form, QWidget * parent = 0);