Add override specifiers to improve code maintainability

This commit is contained in:
Yuriy Skalko 2020-10-01 10:42:11 +03:00 committed by Jean-Marc Lasgouttes
parent 2330b4ce9c
commit efc0877f8f
203 changed files with 2524 additions and 2526 deletions

View File

@ -24,19 +24,19 @@ public:
/// \name SpellChecker inherited methods
//@{
enum Result check(WordLangTuple const &);
void suggest(WordLangTuple const &, docstring_list &);
void stem(WordLangTuple const &, docstring_list &) {}
void insert(WordLangTuple const &);
void remove(WordLangTuple const &);
void accept(WordLangTuple const &);
bool hasDictionary(Language const * lang) const;
int numDictionaries() const;
bool canCheckParagraph() const { return true; }
int numMisspelledWords() const;
void misspelledWord(int index, int & start, int & length) const;
docstring const error();
void advanceChangeNumber();
enum Result check(WordLangTuple const &) override;
void suggest(WordLangTuple const &, docstring_list &) override;
void stem(WordLangTuple const &, docstring_list &) override {}
void insert(WordLangTuple const &) override;
void remove(WordLangTuple const &) override;
void accept(WordLangTuple const &) override;
bool hasDictionary(Language const * lang) const override;
int numDictionaries() const override;
bool canCheckParagraph() const override { return true; }
int numMisspelledWords() const override;
void misspelledWord(int index, int & start, int & length) const override;
docstring const error() override;
void advanceChangeNumber() override;
//@}
private:

View File

@ -25,16 +25,16 @@ public:
/// \name SpellChecker inherited methods
//@{
enum Result check(WordLangTuple const &);
void suggest(WordLangTuple const &, docstring_list &);
void stem(WordLangTuple const &, docstring_list &) {}
void insert(WordLangTuple const &);
void remove(WordLangTuple const &);
void accept(WordLangTuple const &);
bool hasDictionary(Language const * lang) const;
int numDictionaries() const;
docstring const error();
void advanceChangeNumber();
enum Result check(WordLangTuple const &) override;
void suggest(WordLangTuple const &, docstring_list &) override;
void stem(WordLangTuple const &, docstring_list &) override {}
void insert(WordLangTuple const &) override;
void remove(WordLangTuple const &) override;
void accept(WordLangTuple const &) override;
bool hasDictionary(Language const * lang) const override;
int numDictionaries() const override;
docstring const error() override;
void advanceChangeNumber() override;
//@}
private:

View File

@ -31,16 +31,16 @@ public:
/// SpellChecker inherited methods.
///@{
enum Result check(WordLangTuple const &);
void suggest(WordLangTuple const &, docstring_list &);
void stem(WordLangTuple const &, docstring_list &) {}
void insert(WordLangTuple const &);
void remove(WordLangTuple const &);
void accept(WordLangTuple const &);
bool hasDictionary(Language const * lang) const;
int numDictionaries() const;
docstring const error();
void advanceChangeNumber();
enum Result check(WordLangTuple const &) override;
void suggest(WordLangTuple const &, docstring_list &) override;
void stem(WordLangTuple const &, docstring_list &) override {}
void insert(WordLangTuple const &) override;
void remove(WordLangTuple const &) override;
void accept(WordLangTuple const &) override;
bool hasDictionary(Language const * lang) const override;
int numDictionaries() const override;
docstring const error() override;
void advanceChangeNumber() override;
///@}
private:

View File

@ -25,16 +25,16 @@ public:
/// \name SpellChecker inherited methods.
///@{
enum Result check(WordLangTuple const &);
void suggest(WordLangTuple const &, docstring_list &);
void stem(WordLangTuple const &, docstring_list &);
void insert(WordLangTuple const &);
void remove(WordLangTuple const &);
void accept(WordLangTuple const &);
bool hasDictionary(Language const * lang) const;
int numDictionaries() const;
docstring const error();
void advanceChangeNumber();
enum Result check(WordLangTuple const &) override;
void suggest(WordLangTuple const &, docstring_list &) override;
void stem(WordLangTuple const &, docstring_list &) override;
void insert(WordLangTuple const &) override;
void remove(WordLangTuple const &) override;
void accept(WordLangTuple const &) override;
bool hasDictionary(Language const * lang) const override;
int numDictionaries() const override;
docstring const error() override;
void advanceChangeNumber() override;
///@}
private:

View File

@ -234,7 +234,7 @@ public:
argc_(argc), argv_(argv)
{
}
void doExec()
void doExec() override
{
int const exit_status = lyx_->execWithoutGui(argc_, argv_);
exit(exit_status);

View File

@ -137,13 +137,11 @@ public:
std::string const & command() const { return command_; }
private:
virtual bool
do_copy(support::FileName const & from, support::FileName const & to,
std::string const & latex) const;
bool do_copy(support::FileName const & from, support::FileName const & to,
std::string const & latex) const override;
virtual bool
do_rename(support::FileName const & from, support::FileName const & to,
std::string const & latex) const;
bool do_rename(support::FileName const & from, support::FileName const & to,
std::string const & latex) const override;
std::string command_;
};

View File

@ -64,10 +64,10 @@ public:
explicit LastFilesSection(unsigned int num = 4);
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
/// Return lastfiles container (vector)
LastFiles const lastFiles() const { return lastfiles; }
@ -119,10 +119,10 @@ public:
public:
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
/// Return lastopened container (vector)
LastOpened const getfiles() const { return lastopened; }
@ -161,10 +161,10 @@ public:
LastFilePosSection() : num_lastfilepos(100) {}
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
/** add cursor position to the fname entry in the filepos list
@param pos file name and position of the cursor when the BufferView is closed.
@ -253,10 +253,10 @@ public:
void clear();
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
/** return bookmark list. Non-const container is used since
bookmarks will be cleaned after use.
@ -283,10 +283,10 @@ public:
///
LastCommandsSection(unsigned int num);
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
/// Return lastcommands container (vector)
LastCommands const getcommands() const { return lastcommands; }
@ -327,10 +327,10 @@ public:
explicit AuthFilesSection();
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
bool find(std::string const & name) const;
@ -351,10 +351,10 @@ public:
explicit ShellEscapeSection() {};
///
void read(std::istream & is);
void read(std::istream & is) override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
bool find(std::string const & name) const;

View File

@ -641,14 +641,14 @@ public:
virtual ~TextCompletionList() {}
///
virtual bool sorted() const { return true; }
bool sorted() const override { return true; }
///
virtual size_t size() const
size_t size() const override
{
return list_.size();
}
///
virtual docstring const & data(size_t idx) const
docstring const & data(size_t idx) const override
{
return list_.word(idx);
}

View File

@ -435,7 +435,7 @@ public:
/// \return true if there is a Layout with latexname lay
bool hasLaTeXLayout(std::string const & lay) const;
/// A DocumentClass nevers count as loaded, since it is dynamic
virtual bool loaded() const { return false; }
bool loaded() const override { return false; }
/// \return the layout object of an inset given by name. If the name
/// is not found as such, the part after the ':' is stripped off, and
/// searched again. In this way, an error fallback can be provided:

View File

@ -238,11 +238,11 @@ public:
///
TransInitState();
///
virtual docstring const normalkey(char_type);
docstring const normalkey(char_type) override;
///
virtual bool backspace() { return true; }
bool backspace() override { return true; }
///
virtual docstring const deadkey(char_type, KmodInfo);
docstring const deadkey(char_type, KmodInfo) override;
};
@ -252,14 +252,14 @@ public:
///
TransDeadkeyState();
///
virtual docstring const normalkey(char_type);
docstring const normalkey(char_type) override;
///
virtual bool backspace() {
bool backspace() override {
currentState = init_state_;
return false;
}
///
virtual docstring const deadkey(char_type, KmodInfo);
docstring const deadkey(char_type, KmodInfo) override;
};
@ -269,9 +269,9 @@ public:
///
TransCombinedState();
///
virtual docstring const normalkey(char_type);
docstring const normalkey(char_type) override;
///
virtual bool backspace() {
bool backspace() override {
// cancel the second deadkey
deadkey2_ = 0;
deadkey2_info_.accent = TEX_NOACCENT;
@ -280,7 +280,7 @@ public:
return false;
}
///
virtual docstring const deadkey(char_type, KmodInfo);
docstring const deadkey(char_type, KmodInfo) override;
};

View File

@ -31,52 +31,52 @@ public:
/// draw a line from point to point
void line(int, int, int, int, Color,
line_style = line_solid, int = thin_line) {}
line_style = line_solid, int = thin_line) override {}
///
void lines(int const *, int const *, int, Color,
fill_style = fill_none, line_style = line_solid,
int = thin_line) {}
int = thin_line) override {}
///
void path(int const *, int const *, int const *, int const *,
int const *, int const *, int, Color,
fill_style = fill_none, line_style = line_solid, int = thin_line) {}
fill_style = fill_none, line_style = line_solid, int = thin_line) override {}
/// draw a rectangle
void rectangle(int, int, int, int, Color,
line_style = line_solid, int = thin_line) {}
line_style = line_solid, int = thin_line) override {}
/// draw a filled rectangle
void fillRectangle(int, int, int, int, Color) {}
void fillRectangle(int, int, int, int, Color) override {}
/// draw an arc
void arc(int, int, unsigned int, unsigned int, int, int, Color) {}
void arc(int, int, unsigned int, unsigned int, int, int, Color) override {}
/// draw a pixel
void point(int, int, Color) {}
void point(int, int, Color) override {}
/// draw an image from the image cache
void image(int, int, int, int, graphics::Image const &) {}
void image(int, int, int, int, graphics::Image const &) override {}
/// draw a string
void text(int, int, docstring const &, FontInfo const &) {}
void text(int, int, docstring const &, FontInfo const &) override {}
/// draw a char
void text(int, int, char_type, FontInfo const &) {}
void text(int, int, char_type, FontInfo const &) override {}
/// draw a string
void text(int, int, docstring const &, Font const &, double, double) {}
void text(int, int, docstring const &, Font const &, double, double) override {}
///
void text(int, int, docstring const &, Font const &,
Color, size_type, size_type, double, double) {}
Color, size_type, size_type, double, double) override {}
/// This painter does not paint
bool isNull() const { return true; }
bool isNull() const override { return true; }
/// draw the underbar, strikeout, xout, uuline and uwave font attributes
void textDecoration(FontInfo const &, int, int, int) {}
void textDecoration(FontInfo const &, int, int, int) override {}
/**
* Draw a string and enclose it inside a rectangle. If
@ -85,22 +85,22 @@ public:
* around the text with the given color.
*/
void rectText(int, int, docstring const &,
FontInfo const &, Color, Color) {}
FontInfo const &, Color, Color) override {}
/// draw a string and enclose it inside a button frame
void buttonText(int, int, docstring const &,
FontInfo const &, Color, Color, int) {}
FontInfo const &, Color, Color, int) override {}
/// draw a character of a preedit string for cjk support.
int preeditText(int, int, char_type, FontInfo const &,
preedit_style) { return 0; }
preedit_style) override { return 0; }
/// start monochrome painting mode, i.e. map every color a shade of \c blend.
void enterMonochromeMode(Color const &) {}
void enterMonochromeMode(Color const &) override {}
/// leave monochrome painting mode
void leaveMonochromeMode() {}
void leaveMonochromeMode() override {}
/// draws a wavy line that can be used for underlining.
void wavyHorizontalLine(int, int, int, ColorCode) {}
void wavyHorizontalLine(int, int, int, ColorCode) override {}
};
} // namespace frontend

View File

@ -49,13 +49,13 @@ public:
{}
///
void paint(QPainter * painter, QStyleOptionViewItem const & option,
QModelIndex const & index) const;
QModelIndex const & index) const override;
///
void drawDisplay(QPainter * painter, QStyleOptionViewItem const & opt,
const QRect & /*rect*/, const QString & text ) const;
const QRect & /*rect*/, const QString & text ) const override;
///
QSize sizeHint(QStyleOptionViewItem const & opt,
QModelIndex const & index) const;
QModelIndex const & index) const override;
private:
///

View File

@ -32,16 +32,16 @@ public:
/// \param title is the window title used for decoration.
DialogView(GuiView & lv, QString const & name, QString const & title);
virtual QWidget * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; }
QWidget * asQWidget() override { return this; }
QWidget const * asQWidget() const override { return this; }
protected:
/// \name Dialog inherited methods
//@{
void applyView() {}
bool initialiseParams(std::string const & /*data*/) { return true; }
void clearParams() {}
bool needBufferOpen() const { return isBufferDependent(); }
void applyView() override {}
bool initialiseParams(std::string const & /*data*/) override { return true; }
void clearParams() override {}
bool needBufferOpen() const override { return isBufferDependent(); }
//@}
/// Any dialog that overrides this method should make sure to call it.
void closeEvent(QCloseEvent * ev);
@ -49,7 +49,7 @@ protected:
void hideEvent(QHideEvent * ev);
protected Q_SLOTS:
void onBufferViewChanged() {};
void onBufferViewChanged() override {};
};
} // namespace frontend

View File

@ -42,23 +42,23 @@ public:
virtual ~DockView() {}
virtual QWidget * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; }
QWidget * asQWidget() override { return this; }
QWidget const * asQWidget() const override { return this; }
/// We don't want to restore geometry session for dock widgets.
void restoreSession() {}
void restoreSession() override {}
void keyPressEvent(QKeyEvent * ev);
/// Dialog inherited methods
//@{
void applyView() {}
bool isClosing() const { return false; }
bool needBufferOpen() const { return false; }
void applyView() override {}
bool isClosing() const override { return false; }
bool needBufferOpen() const override { return false; }
//@}
protected Q_SLOTS:
void onBufferViewChanged() {} //override
void onBufferViewChanged() override {}
};
} // namespace frontend

View File

@ -44,7 +44,7 @@ class FancyLineEditPrivate : public QObject {
public:
explicit FancyLineEditPrivate(FancyLineEdit *parent);
virtual bool eventFilter(QObject *obj, QEvent *event);
bool eventFilter(QObject *obj, QEvent *event) override;
FancyLineEdit *m_lineEdit;
QPixmap m_pixmap[2];

View File

@ -82,19 +82,19 @@ public:
~FindAndReplace();
bool initialiseParams(std::string const &);
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return false; }
bool canApplyToReadOnly() const { return true; }
bool initialiseParams(std::string const &) override;
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return false; }
bool canApplyToReadOnly() const override { return true; }
void selectAll();
/// update
void updateView();
void updateView() override;
//virtual void update_contents() {}
protected:
virtual bool wantInitialFocus() const { return true; }
bool wantInitialFocus() const override { return true; }
private:
/// The encapsulated widget.

View File

@ -33,12 +33,12 @@ public:
/// \name DialogView inherited methods
//@{
InsetCode insetCode() const { return FLOAT_CODE; }
FuncCode creationCode() const { return LFUN_FLOAT_INSERT; }
QString dialogTitle() const { return qt_("Float Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return FLOAT_CODE; }
FuncCode creationCode() const override { return LFUN_FLOAT_INSERT; }
QString dialogTitle() const override { return qt_("Float Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
///
void useWide();

View File

@ -34,9 +34,9 @@ private Q_SLOTS:
private:
/// Controller stuff
///@{
void updateView() {}
void dispatchParams() {}
bool isBufferDependent() const { return false; }
void updateView() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return false; }
///@}
struct Private;

View File

@ -638,12 +638,12 @@ public:
: QTranslator(parent)
{}
virtual QString translate(const char * /* context */,
QString translate(const char * /* context */,
const char *sourceText,
#if QT_VERSION >= 0x050000
const char * /* disambiguation */ = 0, int /* n */ = -1) const
const char * /* disambiguation */ = 0, int /* n */ = -1) const override
#else
const char * /*comment*/ = 0) const
const char * /*comment*/ = 0) const override
#endif
{
// Here we declare the strings that need to be translated from Qt own GUI
@ -761,13 +761,13 @@ public:
QWindowsMimeMetafile() {}
bool canConvertFromMime(FORMATETC const & /*formatetc*/,
QMimeData const * /*mimedata*/) const
QMimeData const * /*mimedata*/) const override
{
return false;
}
bool canConvertToMime(QString const & mimetype,
IDataObject * pDataObj) const
IDataObject * pDataObj) const override
{
if (mimetype != emfMimeType() && mimetype != wmfMimeType())
return false;
@ -776,13 +776,13 @@ public:
}
bool convertFromMime(FORMATETC const & /*formatetc*/,
const QMimeData * /*mimedata*/, STGMEDIUM * /*pmedium*/) const
const QMimeData * /*mimedata*/, STGMEDIUM * /*pmedium*/) const override
{
return false;
}
QVariant convertToMime(QString const & mimetype, IDataObject * pDataObj,
QVariant::Type /*preferredType*/) const
QVariant::Type /*preferredType*/) const override
{
QByteArray data;
if (!canConvertToMime(mimetype, pDataObj))
@ -813,7 +813,7 @@ public:
QVector<FORMATETC> formatsForMime(QString const & mimetype,
QMimeData const * /*mimedata*/) const
QMimeData const * /*mimedata*/) const override
{
QVector<FORMATETC> formats;
if (mimetype == emfMimeType() || mimetype == wmfMimeType())
@ -821,7 +821,7 @@ public:
return formats;
}
QString mimeForFormat(FORMATETC const & formatetc) const
QString mimeForFormat(FORMATETC const & formatetc) const override
{
switch (formatetc.cfFormat) {
case CF_ENHMETAFILE:
@ -861,7 +861,7 @@ public:
bool started() const {
return started_;
}
bool eventFilter(QObject *obj, QEvent *event) {
bool eventFilter(QObject *obj, QEvent *event) override {
LYXERR(Debug::ACTION, "Event Type: " << event->type());
switch (event->type()) {
case QEvent::Show:

View File

@ -31,12 +31,12 @@ public:
private:
/// \name DialogView inherited methods
//@{
InsetCode insetCode() const { return BIBITEM_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Bibliography Item Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return BIBITEM_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Bibliography Item Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -49,9 +49,9 @@ private Q_SLOTS:
private:
/// Apply changes
void applyView();
void applyView() override;
/// update
void updateContents();
void updateContents() override;
/// Browse for a .bib file
QString browseBib(QString const & in_name) const;
@ -91,13 +91,13 @@ private:
void setFileEncodings(std::vector<docstring> const & m);
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams() { params_.clear(); }
void clearParams() override { params_.clear(); }
/// clean-up on hide.
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
private:
///

View File

@ -39,12 +39,12 @@ private Q_SLOTS:
private:
/// \name DialogView inherited methods
//@{
InsetCode insetCode() const { return BOX_CODE; }
FuncCode creationCode() const { return LFUN_BOX_INSERT; }
QString dialogTitle() const { return qt_("Box Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return BOX_CODE; }
FuncCode creationCode() const override { return LFUN_BOX_INSERT; }
QString dialogTitle() const override { return qt_("Box Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
/// Fill the color combos

View File

@ -30,12 +30,12 @@ public:
private:
/// \name DialogView inherited methods
//@{
InsetCode insetCode() const { return BRANCH_CODE; }
FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
QString dialogTitle() const { return qt_("Branch Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return BRANCH_CODE; }
FuncCode creationCode() const override { return LFUN_BRANCH_INSERT; }
QString dialogTitle() const override { return qt_("Branch Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -42,18 +42,18 @@ protected Q_SLOTS:
private:
///
void updateContents();
void updateContents() override;
/// Nothing to initialise in this case.
bool initialiseParams(std::string const &) { return true; }
bool initialiseParams(std::string const &) override { return true; }
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
/// always true since dispatchParams() is empty
bool canApply() const { return true; }
bool canApply() const override { return true; }
};
} // namespace frontend

View File

@ -75,15 +75,15 @@ protected Q_SLOTS:
private:
/// \name Dialog inherited methods
//@{
void applyView();
void updateContents();
bool initialiseParams(std::string const & data);
void clearParams() {}
void dispatchParams();
bool isBufferDependent() const { return true; }
FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
void saveSession(QSettings & settings) const;
void restoreSession();
void applyView() override;
void updateContents() override;
bool initialiseParams(std::string const & data) override;
void clearParams() override {}
void dispatchParams() override;
bool isBufferDependent() const override { return true; }
FuncCode getLfun() const override { return LFUN_TEXTSTYLE_UPDATE; }
void saveSession(QSettings & settings) const override;
void restoreSession() override;
//@}
///

View File

@ -72,18 +72,18 @@ private Q_SLOTS:
private:
/// Dialog inherited methods
//@{
void applyView();
void updateView() {}
bool initialiseParams(std::string const & data);
void clearParams();
void dispatchParams();
bool isBufferDependent() const { return true; }
void saveSession(QSettings & settings) const;
void restoreSession();
void applyView() override;
void updateView() override {}
bool initialiseParams(std::string const & data) override;
void clearParams() override;
void dispatchParams() override;
bool isBufferDependent() const override { return true; }
void saveSession(QSettings & settings) const override;
void restoreSession() override;
/** Disconnect from the inset when the Apply button is pressed.
* Allows easy insertion of multiple citations.
*/
bool disconnectOnApply() const { return true; }
bool disconnectOnApply() const override { return true; }
//@}
///

View File

@ -56,7 +56,7 @@ public:
setAttribute(Qt::WA_DeleteOnClose);
}
protected:
bool event(QEvent * ev) {
bool event(QEvent * ev) override {
if (ev->type() == QEvent::MouseButtonPress) {
QMouseEvent * me = static_cast<QMouseEvent *>(ev);
if (me->x() < 0 || me->y() < 0
@ -67,7 +67,7 @@ protected:
return QListWidget::event(ev);
}
void keyPressEvent(QKeyEvent * ev) {
void keyPressEvent(QKeyEvent * ev) override {
if (ev->key() == Qt::Key_Escape) {
hide();
return;

View File

@ -61,19 +61,19 @@ private Q_SLOTS:
private:
///
void updateContents();
void updateContents() override;
///
bool isValid();
bool isValid() override;
///
bool initialiseParams(std::string const &);
bool initialiseParams(std::string const &) override;
///
bool isBufferDependent() const { return false; }
bool isBufferDependent() const override { return false; }
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams() {}
void dispatchParams() override {}
///
void apply() {}
void apply() override {}
/// enable or disable all controls and rename the Close/Cancel button

View File

@ -41,15 +41,15 @@ private Q_SLOTS:
void selectBetweenrev();
private:
///
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const &);
bool initialiseParams(std::string const &) override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams() {}
void dispatchParams() override {}
///
void enableControls();

View File

@ -59,7 +59,7 @@ public:
protected:
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const
const QModelIndex &index) const override
{
if (index.column() == 0) {
QItemDelegate::paint(painter, option, index);
@ -107,12 +107,12 @@ public:
return false;
}
///
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const
int columnCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
{
return 2;
}
///
int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const
int rowCount(const QModelIndex & /*parent*/ = QModelIndex()) const override
{
if (list_ == 0)
return 0;
@ -120,7 +120,7 @@ public:
}
///
QVariant data(const QModelIndex & index, int role) const
QVariant data(const QModelIndex & index, int role) const override
{
if (list_ == 0)
return QVariant();

View File

@ -32,13 +32,13 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return COUNTER_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Counters"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
bool initialiseParams(std::string const & data);
InsetCode insetCode() const override { return COUNTER_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Counters"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
bool initialiseParams(std::string const & data) override;
//@}
void processParams(InsetCommandParams const & icp);
///

View File

@ -28,10 +28,10 @@ class GuiDelimiter : public GuiDialog, public Ui::DelimiterUi
public:
GuiDelimiter(GuiView & lv);
bool initialiseParams(std::string const &) { return true; }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool initialiseParams(std::string const &) override { return true; }
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return true; }
public Q_SLOTS:
void on_buttonBox_clicked(QAbstractButton * button);

View File

@ -39,8 +39,8 @@ public:
/// \param title is the window title used for decoration.
GuiDialog(GuiView & lv, QString const & name, QString const & title);
virtual QWidget * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; }
QWidget * asQWidget() override { return this; }
QWidget const * asQWidget() const override { return this; }
public Q_SLOTS:
/** \name Buttons
@ -65,7 +65,7 @@ public Q_SLOTS:
void closeEvent(QCloseEvent * e);
protected Q_SLOTS:
void onBufferViewChanged() {};//override
void onBufferViewChanged() override {}
public:
/** Check whether we may apply our data.
@ -85,10 +85,10 @@ public:
/// the dialog has changed contents
virtual void changed();
virtual void enableView(bool enable);
void enableView(bool enable) override;
/// default: do nothing
virtual void applyView() {}
void applyView() override {}
/// default: do nothing
virtual void updateContents() {}
@ -101,13 +101,13 @@ public:
/** When applying, it's useful to know whether the dialog is about
* to close or not (no point refreshing the display for example).
*/
bool isClosing() const { return is_closing_; }
bool isClosing() const override { return is_closing_; }
///
bool needBufferOpen() const { return isBufferDependent(); }
bool needBufferOpen() const override { return isBufferDependent(); }
/// Update the display of the dialog whilst it is still visible.
virtual void updateView();
void updateView() override;
private:
ButtonController bc_;

View File

@ -289,13 +289,13 @@ public:
{ excluded_modules_ = em.list(); }
private:
///
virtual void updateAddPB();
void updateAddPB() override;
///
virtual void updateUpPB();
void updateUpPB() override;
///
virtual void updateDownPB();
void updateDownPB() override;
///
virtual void updateDelPB();
void updateDelPB() override;
/// returns availableModel as a GuiIdListModel
QStandardItemModel * getAvailableModel()
{

View File

@ -92,7 +92,7 @@ public:
BufferParams const & params() const { return bp_; }
public Q_SLOTS:
void onBufferViewChanged();//override
void onBufferViewChanged() override;
// OK button clicked
void slotOK();
// Apply button clicked
@ -204,9 +204,9 @@ private:
GuiIdListModel * selectedModel() { return &modules_sel_model_; }
/// Apply changes
void applyView();
void applyView() override;
/// update
void updateContents();
void updateContents() override;
///
void updateAvailableModules();
///
@ -238,24 +238,24 @@ private:
FancyLineEdit * filter_;
/// return false if validate_listings_params returns error
bool isValid();
bool isValid() override;
/// font family names for BufferParams::fonts_default_family
static char const * const fontfamilies[5];
/// GUI names corresponding fontfamilies
static char const * fontfamilies_gui[5];
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams();
void dispatchParams() override;
///
void modulesToParams(BufferParams &);
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
/// always true since we don't manipulate document contents
bool canApply() const { return true; }
bool canApply() const override { return true; }
///
DocumentClass const & documentClass() const;
///

View File

@ -28,12 +28,12 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return ERT_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("TeX Mode Inset Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return ERT_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("TeX Mode Inset Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -42,15 +42,15 @@ private:
///
void paramsToDialog();
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool canApply() const { return true; }
bool canApply() const override { return true; }
/// goto this error in the parent bv. Returns success.
bool goTo(int item);

View File

@ -49,22 +49,22 @@ private:
///
bool activateAspectratio() const;
/// Apply changes
void applyView();
void applyView() override;
/// update
void updateContents();
void updateContents() override;
/// Helper function called when the template is changed.
void updateTemplate();
///
bool usingScale() const;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams();
void clearParams() override;
/// clean-up on hide.
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
QString browse(QString const & input_file,

View File

@ -34,39 +34,39 @@ public:
virtual ~GuiFontMetrics() {}
virtual int maxAscent() const;
virtual int maxDescent() const;
virtual Dimension const defaultDimension() const;
virtual int em() const;
virtual int xHeight() const;
virtual int lineWidth() const;
virtual int underlinePos() const;
virtual int strikeoutPos() const;
virtual bool italic() const;
virtual double italicSlope() const;
virtual int width(char_type c) const;
virtual int ascent(char_type c) const;
virtual int descent(char_type c) const;
virtual int lbearing(char_type c) const;
virtual int rbearing(char_type c) const;
virtual int width(docstring const & s) const;
virtual int signedWidth(docstring const & s) const;
virtual int pos2x(docstring const & s, int pos, bool rtl, double ws) const;
virtual int x2pos(docstring const & s, int & x, bool rtl, double ws) const;
virtual bool breakAt(docstring & s, int & x, bool rtl, bool force) const;
virtual Dimension const dimension(char_type c) const;
int maxAscent() const override;
int maxDescent() const override;
Dimension const defaultDimension() const override;
int em() const override;
int xHeight() const override;
int lineWidth() const override;
int underlinePos() const override;
int strikeoutPos() const override;
bool italic() const override;
double italicSlope() const override;
int width(char_type c) const override;
int ascent(char_type c) const override;
int descent(char_type c) const override;
int lbearing(char_type c) const override;
int rbearing(char_type c) const override;
int width(docstring const & s) const override;
int signedWidth(docstring const & s) const override;
int pos2x(docstring const & s, int pos, bool rtl, double ws) const override;
int x2pos(docstring const & s, int & x, bool rtl, double ws) const override;
bool breakAt(docstring & s, int & x, bool rtl, bool force) const override;
Dimension const dimension(char_type c) const override;
virtual void rectText(docstring const & str,
void rectText(docstring const & str,
int & width,
int & ascent,
int & descent) const;
virtual void buttonText(docstring const & str,
int & descent) const override;
void buttonText(docstring const & str,
const int offset,
int & width,
int & ascent,
int & descent) const;
int & descent) const override;
int countExpanders(docstring const & str) const;
int countExpanders(docstring const & str) const override;
///
int width(QString const & str) const;

View File

@ -52,15 +52,15 @@ private Q_SLOTS:
private:
///
bool isValid();
bool isValid() override;
/// Dialog inherited methods
//@{
void applyView();
void updateContents() {}
bool initialiseParams(std::string const & data);
void clearParams();
void dispatchParams();
bool isBufferDependent() const { return true; }
void applyView() override;
void updateContents() override {}
bool initialiseParams(std::string const & data) override;
void clearParams() override;
void dispatchParams() override;
bool isBufferDependent() const override { return true; }
//@}
///

View File

@ -34,12 +34,12 @@ private Q_SLOTS:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Horizontal Space Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Horizontal Space Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
///
bool const math_mode_;

View File

@ -30,13 +30,13 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return HYPERLINK_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Hyperlink Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
bool initialiseParams(std::string const & data);
InsetCode insetCode() const override { return HYPERLINK_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Hyperlink Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
bool initialiseParams(std::string const & data) override;
//@}
};

View File

@ -47,15 +47,15 @@ private Q_SLOTS:
private:
///
bool initialiseParams(std::string const & sdata);
bool initialiseParams(std::string const & sdata) override;
///
void paramsToDialog(InsetCommandParams const & icp);
/// clean-up on hide.
void clearParams() { params_.clear(); }
void clearParams() override { params_.clear(); }
/// clean-up on hide.
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
enum Type {
@ -73,11 +73,11 @@ private:
/// validate listings parameters and return an error message, if any
docstring validate_listings_params();
///
bool isValid();
bool isValid() override;
/// Apply changes
void applyView();
void applyView() override;
/// update
void updateContents() {}
void updateContents() override {}
/// Browse for a file
QString browse(QString const &, Type) const;

View File

@ -34,17 +34,17 @@ private Q_SLOTS:
private:
/// Apply changes
void applyView();
void applyView() override;
/// Update dialog before showing it
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
InsetIndexParams params_;

View File

@ -35,13 +35,13 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return INFO_CODE; }
FuncCode creationCode() const { return LFUN_INFO_INSERT; }
QString dialogTitle() const { return qt_("Field Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool initialiseParams(std::string const &);
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return INFO_CODE; }
FuncCode creationCode() const override { return LFUN_INFO_INSERT; }
QString dialogTitle() const override { return qt_("Field Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool initialiseParams(std::string const &) override;
bool checkWidgets(bool readonly) const override;
//@}
InsetInfoParams params_;
};

View File

@ -30,13 +30,13 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return LABEL_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Label Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
bool initialiseParams(std::string const &);
InsetCode insetCode() const override { return LABEL_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Label Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
bool initialiseParams(std::string const &) override;
//@}
};

View File

@ -29,12 +29,12 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return LINE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Line Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return LINE_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Line Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -45,19 +45,19 @@ private Q_SLOTS:
void on_languageCO_currentIndexChanged(int);
private:
/// return false if validate_listings_params returns error
bool isValid();
bool isValid() override;
/// Apply changes
void applyView();
void applyView() override;
/// update
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams();
void clearParams() override;
/// clean-up on hide.
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
void setParams(InsetListingsParams const &);

View File

@ -62,7 +62,7 @@ public:
LogHighlighter(QTextDocument * parent);
private:
void highlightBlock(QString const & text);
void highlightBlock(QString const & text) override;
private:
QTextCharFormat infoFormat;

View File

@ -32,7 +32,7 @@ public:
GuiLog(GuiView & lv);
private Q_SLOTS:
void updateContents();
void updateContents() override;
/// find content
void find();
/// jump to next error message
@ -46,7 +46,7 @@ private Q_SLOTS:
private:
/// Apply changes
void applyView() {}
void applyView() override {}
/// log syntax highlighter
LogHighlighter * highlighter;
@ -54,13 +54,13 @@ private:
/** \param data should contain "<logtype> <logfile>"
* where <logtype> is one of "latex", "literate", "lyx2lyx", "vc".
*/
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
/// The title displayed by the dialog reflects the \c LogType
docstring title() const;

View File

@ -52,24 +52,24 @@ private Q_SLOTS:
private:
///
bool isValid();
bool isValid() override;
/// Apply from dialog
void applyView();
void applyView() override;
/// Update the dialog
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void paramsToDialog();
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return false; }
bool isBufferDependent() const override { return false; }
///
FuncCode getLfun() const;
FuncCode getLfun() const override;
///
QString const getSuffix();
///

View File

@ -28,10 +28,10 @@ class GuiMathMatrix : public GuiDialog, public Ui::MathMatrixUi
public:
GuiMathMatrix(GuiView & lv);
bool initialiseParams(std::string const &) { return true; }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool initialiseParams(std::string const &) override { return true; }
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return true; }
public Q_SLOTS:
void on_buttonBox_clicked(QAbstractButton *);

View File

@ -31,13 +31,13 @@ public:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return NOMENCL_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Nomenclature Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
bool initialiseParams(std::string const &);
InsetCode insetCode() const override { return NOMENCL_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Nomenclature Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
bool initialiseParams(std::string const &) override;
//@}
};

View File

@ -28,17 +28,17 @@ private Q_SLOTS:
void change_adaptor();
private:
/// Apply changes
void applyView();
void applyView() override;
/// Update dialog before showing it
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
private:
///
InsetNoteParams params_;

View File

@ -33,14 +33,14 @@ public:
/// Dialog inherited methods
//@{
void applyView();
void updateView();
void dispatchParams();
void enableView(bool enable);
bool isBufferDependent() const { return true; }
virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
void saveSession(QSettings & settings) const;
void restoreSession();
void applyView() override;
void updateView() override;
void dispatchParams() override;
void enableView(bool enable) override;
bool isBufferDependent() const override { return true; }
FuncCode getLfun() const override { return LFUN_PARAGRAPH_PARAMS_APPLY; }
void saveSession(QSettings & settings) const override;
void restoreSession() override;
//@}
private:

View File

@ -28,17 +28,17 @@ private Q_SLOTS:
void change_adaptor();
private:
/// Apply changes
void applyView();
void applyView() override;
/// Update dialog before showing it
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
private:
///
InsetPhantomParams params_;

View File

@ -1879,8 +1879,8 @@ class FormatValidator : public QValidator
{
public:
FormatValidator(QWidget *, Formats const & f);
void fixup(QString & input) const;
QValidator::State validate(QString & input, int & pos) const;
void fixup(QString & input) const override;
QValidator::State validate(QString & input, int & pos) const override;
private:
virtual QString toString(Format const & format) const = 0;
int nr() const;
@ -1946,7 +1946,7 @@ public:
: FormatValidator(parent, f)
{}
private:
QString toString(Format const & format) const
QString toString(Format const & format) const override
{
return toqstr(format.name());
}
@ -1966,7 +1966,7 @@ public:
: FormatValidator(parent, f)
{}
private:
QString toString(Format const & format) const
QString toString(Format const & format) const override
{
return toqstr(translateIfPossible(format.prettyname()));
}

View File

@ -76,18 +76,18 @@ Q_SIGNALS:
public:
/// Apply changes
void applyView();
void applyView() override;
std::vector<PrefModule *> modules_;
///
bool initialiseParams(std::string const &);
bool initialiseParams(std::string const &) override;
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return false; }
bool isBufferDependent() const override { return false; }
/// various file pickers
QString browsebind(QString const & file);

View File

@ -35,13 +35,13 @@ private Q_SLOTS:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return NOMENCL_PRINT_CODE; }
FuncCode creationCode() const { return LFUN_NOMENCL_PRINT; }
QString dialogTitle() const { return qt_("Nomenclature List Settings"); }
void paramsToDialog(Inset const *);
InsetCode insetCode() const override { return NOMENCL_PRINT_CODE; }
FuncCode creationCode() const override { return LFUN_NOMENCL_PRINT; }
QString dialogTitle() const override { return qt_("Nomenclature List Settings"); }
void paramsToDialog(Inset const *) override;
void paramsToDialog(InsetCommandParams const &);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -34,19 +34,19 @@ private Q_SLOTS:
private:
/// Apply changes
void applyView();
void applyView() override;
/// Update dialog before showing it
void updateContents();
void updateContents() override;
///
void paramsToDialog(InsetCommandParams const & icp);
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams() { params_.clear(); }
void clearParams() override { params_.clear(); }
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
InsetCommandParams params_;

View File

@ -52,16 +52,16 @@ public:
~GuiProgressView();
/// Controller inherited method.
///@{
bool initialiseParams(std::string const &) { return true; }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return false; }
bool canApply() const { return true; }
bool canApplyToReadOnly() const { return true; }
void updateView() {}
bool wantInitialFocus() const { return false; }
void restoreSession();
void saveSession(QSettings & settings) const;
bool initialiseParams(std::string const &) override { return true; }
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return false; }
bool canApply() const override { return true; }
bool canApplyToReadOnly() const override { return true; }
void updateView() override {}
bool wantInitialFocus() const override { return false; }
void restoreSession() override;
void saveSession(QSettings & settings) const override;
///@}
private Q_SLOTS:

View File

@ -33,7 +33,7 @@ public:
GuiRef(GuiView & lv);
/// Dialog inherited methods
//@{
void enableView(bool enable);
void enableView(bool enable) override;
//@}
private Q_SLOTS:
@ -54,10 +54,10 @@ private Q_SLOTS:
private:
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
/** disconnect from the inset when the Apply button is pressed.
Allows easy insertion of multiple references. */
bool disconnectOnApply() const { return true; }
bool disconnectOnApply() const override { return true; }
///
void gotoRef(std::string const &);
///
@ -65,11 +65,11 @@ private:
///
void closeEvent(QCloseEvent * e);
///
bool isValid();
bool isValid() override;
/// apply changes
void applyView();
void applyView() override;
/// update dialog
void updateContents();
void updateContents() override;
///
void enableBoxes();
@ -84,11 +84,11 @@ private:
/// update references
void updateRefs();
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams() { params_.clear(); }
void clearParams() override { params_.clear(); }
/// clean-up on hide.
void dispatchParams();
void dispatchParams() override;
private:
///

View File

@ -35,10 +35,10 @@ private Q_SLOTS:
private:
void showEvent(QShowEvent * e);
///
bool initialiseParams(std::string const &) { return true; }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool initialiseParams(std::string const &) override { return true; }
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return true; }
/// Searches occurrence of string
void find(docstring const & search,

View File

@ -40,24 +40,24 @@ private Q_SLOTS:
private:
///
bool isValid();
bool isValid() override;
/// Apply from dialog
void applyView();
void applyView() override;
/// Update the dialog
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void paramsToDialog(Format const * format, QString const & command);
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
FuncCode getLfun() const override { return LFUN_BUFFER_EXPORT_CUSTOM; }
private:
///

View File

@ -30,15 +30,15 @@ public:
private:
/// update
void updateContents();
void updateContents() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool isBufferDependent() const { return false; }
bool isBufferDependent() const override { return false; }
///
support::FileName filename_;

View File

@ -70,12 +70,12 @@ public:
private:
///{
void updateView();
bool initialiseParams(std::string const & sdata)
void updateView() override;
bool initialiseParams(std::string const & sdata) override
{ return widget_->initialiseParams(sdata); }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return false; }
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return false; }
///}
/// The encapsulated widget.
SpellcheckerWidget * widget_;

View File

@ -210,22 +210,22 @@ public:
: QAbstractListModel(parent), encoding_(0)
{}
QModelIndex index(int row, int column, QModelIndex const &) const
QModelIndex index(int row, int column, QModelIndex const &) const override
{
return createIndex(row, column);
}
QModelIndex parent(QModelIndex const &) const
QModelIndex parent(QModelIndex const &) const override
{
return QModelIndex();
}
int rowCount(QModelIndex const &) const
int rowCount(QModelIndex const &) const override
{
return symbols_.count();
}
QVariant data(QModelIndex const & index, int role) const
QVariant data(QModelIndex const & index, int role) const override
{
if (!index.isValid())
return QVariant();

View File

@ -31,11 +31,11 @@ public:
/// Dialog inherited methods
//@{
void updateView();
void dispatchParams();
void enableView(bool enable);
bool isBufferDependent() const { return true; }
FuncCode getLfun() const { return LFUN_SELF_INSERT; }
void updateView() override;
void dispatchParams() override;
void enableView(bool enable) override;
bool isBufferDependent() const override { return true; }
FuncCode getLfun() const override { return LFUN_SELF_INSERT; }
//@}
public Q_SLOTS:

View File

@ -43,12 +43,12 @@ private Q_SLOTS:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return TABULAR_CODE; }
FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
QString dialogTitle() const { return qt_("Tabular Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return TABULAR_CODE; }
FuncCode creationCode() const override { return LFUN_TABULAR_INSERT; }
QString dialogTitle() const override { return qt_("Tabular Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
///

View File

@ -35,17 +35,17 @@ private Q_SLOTS:
private:
/// Apply changes
void applyView();
void applyView() override;
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
/// clean-up on hide.
void clearParams();
void clearParams() override;
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
FuncCode getLfun() const;
FuncCode getLfun() const override;
///
typedef std::pair<size_t, size_t> rowsCols;

View File

@ -40,7 +40,7 @@ public:
public Q_SLOTS:
///
void updateView();
void updateView() override;
private Q_SLOTS:
///
@ -54,15 +54,15 @@ private Q_SLOTS:
private:
/// Nothing to initialise in this case.
bool initialiseParams(std::string const &) { return true; }
bool initialiseParams(std::string const &) override { return true; }
///
void clearParams() {}
void clearParams() override {}
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool isBufferDependent() const { return false; }
bool isBufferDependent() const override { return false; }
///
void apply() {}
void apply() override {}
///
void updateStyles(TexFileType);

View File

@ -28,7 +28,7 @@ class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
public:
GuiThesaurus(GuiView & lv);
void checkStatus();
void checkStatus() override;
private Q_SLOTS:
void change_adaptor();
@ -40,17 +40,17 @@ private Q_SLOTS:
private:
/// update
void updateContents();
void updateContents() override;
///
void updateLists();
///
bool initialiseParams(std::string const & data);
bool initialiseParams(std::string const & data) override;
///
void clearParams();
void clearParams() override;
///
void dispatchParams() {}
void dispatchParams() override {}
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
/// replace the particular string
void replace(docstring const & newstr);
@ -72,7 +72,7 @@ private:
docstring lang_;
/// not needed.
void apply() {}
void apply() override {}
};
} // namespace frontend

View File

@ -35,20 +35,20 @@ public:
Qt::WindowFlags flags = {});
///
bool initialiseParams(std::string const & data);
void updateView();
void enableView(bool enable);
bool wantInitialFocus() const { return false; }
bool initialiseParams(std::string const & data) override;
void updateView() override;
void enableView(bool enable) override;
bool wantInitialFocus() const override { return false; }
void closeEvent(QCloseEvent * event);
bool isClosing() const { return is_closing_; }
bool isClosing() const override { return is_closing_; }
public:
/// clean-up on hide.
void clearParams() {}
void clearParams() override {}
///
void dispatchParams();
void dispatchParams() override;
///
bool isBufferDependent() const { return true; }
bool isBufferDependent() const override { return true; }
///
void doDispatch(Cursor & cur, FuncRequest const & fr, DispatchResult & dr);
///

View File

@ -172,7 +172,7 @@ public:
setIcon(getIcon(*tbinfo->items.begin()->func, true));
}
void mousePressEvent(QMouseEvent * e)
void mousePressEvent(QMouseEvent * e) override
{
if (initialized_) {
QToolButton::mousePressEvent(e);

View File

@ -35,12 +35,12 @@ private Q_SLOTS:
private:
/// \name InsetParamsWidget inherited methods
//@{
InsetCode insetCode() const { return VSPACE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Vertical Space Settings"); }
void paramsToDialog(Inset const *);
docstring dialogToParams() const;
bool checkWidgets(bool readonly) const;
InsetCode insetCode() const override { return VSPACE_CODE; }
FuncCode creationCode() const override { return LFUN_INSET_INSERT; }
QString dialogTitle() const override { return qt_("Vertical Space Settings"); }
void paramsToDialog(Inset const *) override;
docstring dialogToParams() const override;
bool checkWidgets(bool readonly) const override;
//@}
};

View File

@ -236,7 +236,7 @@ public:
setFocusPolicy(Qt::StrongFocus);
}
void paintEvent(QPaintEvent *)
void paintEvent(QPaintEvent *) override
{
int const w = width_;
int const h = height_;
@ -250,7 +250,7 @@ public:
pain.drawPixmap(x, y, w, h, splash_);
}
void keyPressEvent(QKeyEvent * ev)
void keyPressEvent(QKeyEvent * ev) override
{
KeySymbol sym;
setKeySymbol(&sym, ev);

View File

@ -104,22 +104,22 @@ public:
/// Controller inherited method.
///@{
bool initialiseParams(std::string const & source);
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool canApply() const { return true; }
bool canApplyToReadOnly() const { return true; }
void updateView();
void enableView(bool enable);
void saveSession(QSettings & settings) const;
void restoreSession();
bool wantInitialFocus() const { return false; }
bool initialiseParams(std::string const & source) override;
void clearParams() override {}
void dispatchParams() override {}
bool isBufferDependent() const override { return true; }
bool canApply() const override { return true; }
bool canApplyToReadOnly() const override { return true; }
void updateView() override;
void enableView(bool enable) override;
void saveSession(QSettings & settings) const override;
void restoreSession() override;
bool wantInitialFocus() const override { return false; }
///@}
public Q_SLOTS:
///
void onBufferViewChanged();//override
void onBufferViewChanged() override;
private Q_SLOTS:
/// The title displayed by the dialog reflects source type.

View File

@ -289,7 +289,7 @@ private Q_SLOTS:
void ignore() const;
protected:
void mouseDoubleClickEvent(QMouseEvent * event); //override
void mouseDoubleClickEvent(QMouseEvent * event) override;
public:
/// wa != 0

View File

@ -33,12 +33,12 @@ private Q_SLOTS:
private:
/// Dialog inherited methods
//@{
void applyView();
void updateContents() {}
bool initialiseParams(std::string const & data);
void clearParams();
void dispatchParams();
bool isBufferDependent() const { return true; }
void applyView() override;
void updateContents() override {}
bool initialiseParams(std::string const & data) override;
void clearParams() override;
void dispatchParams() override;
bool isBufferDependent() const override { return true; }
//@}
///

View File

@ -100,7 +100,7 @@ public:
private:
void synchronousFunctionCall()
void synchronousFunctionCall() override
{
return_value_ = func_();
}
@ -163,7 +163,7 @@ public:
private:
void synchronousFunctionCall()
void synchronousFunctionCall() override
{
func_();
}

View File

@ -41,7 +41,7 @@ public:
protected Q_SLOTS:
void onWidget_changed();
void applyView();
void applyView() override;
void resetDialog();
void on_buttonBox_clicked(QAbstractButton *);
void on_immediateApplyCB_stateChanged(int state);
@ -50,11 +50,11 @@ protected Q_SLOTS:
private:
/// \name DialogView inherited methods
//@{
void updateView();
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool canApply() const { return true; }
bool initialiseParams(std::string const &);
void updateView() override;
void dispatchParams() override {}
bool isBufferDependent() const override { return true; }
bool canApply() const override { return true; }
bool initialiseParams(std::string const &) override;
//@}
///
void newInset();

View File

@ -63,13 +63,13 @@ public:
{}
///
void paint(QPainter * painter, QStyleOptionViewItem const & option,
QModelIndex const & index) const;
QModelIndex const & index) const override;
///
void drawDisplay(QPainter * painter, QStyleOptionViewItem const & opt,
const QRect & /*rect*/, const QString & text ) const;
const QRect & /*rect*/, const QString & text ) const override;
///
QSize sizeHint(QStyleOptionViewItem const & opt,
QModelIndex const & index) const;
QModelIndex const & index) const override;
private:
///

View File

@ -2079,7 +2079,7 @@ void Menu::Impl::populate(QMenu * qMenu, MenuDefinition const & menu)
class AlwaysMnemonicStyle : public QProxyStyle {
public:
int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0,
QStyleHintReturn *returnData = 0) const
QStyleHintReturn *returnData = 0) const override
{
if (hint == QStyle::SH_UnderlineShortcut)
return 1;

View File

@ -151,9 +151,9 @@ protected:
explicit ResizeCommand(ResizeData const & data_) : data(data_) {}
private:
virtual std::string const front_placeholder_impl() const
std::string const front_placeholder_impl() const override
{ return "$$ResizeFront"; }
virtual std::string const back_placeholder_impl() const
std::string const back_placeholder_impl() const override
{ return "$$ResizeBack"; }
};
@ -166,8 +166,8 @@ public:
private:
explicit ResizeLatexCommand(ResizeData const & data_)
: ResizeCommand(data_) {}
virtual std::string const front_impl() const;
virtual std::string const back_impl() const;
std::string const front_impl() const override;
std::string const back_impl() const override;
};
@ -177,9 +177,9 @@ protected:
explicit RotationCommand(RotationData const & data_) : data(data_) {}
private:
virtual std::string const front_placeholder_impl() const
std::string const front_placeholder_impl() const override
{ return "$$RotateFront"; }
virtual std::string const back_placeholder_impl() const
std::string const back_placeholder_impl() const override
{ return "$$RotateBack"; }
};
@ -192,8 +192,8 @@ public:
private:
explicit RotationLatexCommand(RotationData const & data_)
: RotationCommand(data_) {}
virtual std::string const front_impl() const;
virtual std::string const back_impl() const;
std::string const front_impl() const override;
std::string const back_impl() const override;
};
@ -223,7 +223,7 @@ protected:
explicit ClipOption(ClipData const & data_) : data(data_) {}
private:
virtual std::string const placeholder_impl() const
std::string const placeholder_impl() const override
{ return "$$Clip"; }
};
@ -236,7 +236,7 @@ public:
private:
explicit ClipLatexOption(ClipData const & data_)
: ClipOption(data_) {}
virtual std::string const option_impl() const;
std::string const option_impl() const override;
};
@ -248,9 +248,9 @@ public:
private:
explicit ExtraOption(std::string const & data_) : data(data_) {}
virtual std::string const placeholder_impl() const
std::string const placeholder_impl() const override
{ return "$$Extra"; }
virtual std::string const option_impl() const
std::string const option_impl() const override
{ return data; }
std::string data;
};
@ -262,7 +262,7 @@ protected:
explicit ResizeOption(ResizeData const & data_) : data(data_) {}
private:
virtual std::string const placeholder_impl() const
std::string const placeholder_impl() const override
{ return "$$Resize"; }
};
@ -275,7 +275,7 @@ public:
private:
explicit ResizeLatexOption(ResizeData const & data_)
: ResizeOption(data_) {}
virtual std::string const option_impl() const;
std::string const option_impl() const override;
};
@ -285,7 +285,7 @@ protected:
explicit RotationOption(RotationData const & data_) : data(data_) {}
private:
virtual std::string const placeholder_impl() const
std::string const placeholder_impl() const override
{ return "$$Rotate"; }
};
@ -298,7 +298,7 @@ public:
private:
explicit RotationLatexOption(RotationData const & data_)
: RotationOption(data_) {}
virtual std::string const option_impl() const;
std::string const option_impl() const override;
};

View File

@ -593,7 +593,7 @@ public:
/// returns whether this inset is allowed in other insets of given mode
virtual bool allowedIn(mode_type) const { return true; }
/// returns whether paragraph breaks can occur inside this inset
virtual bool allowMultiPar() const { return false; }
virtual bool allowMultiPar() const { return false; }
/**
* The font is inherited from the parent for LaTeX export if this
* method returns true. No open font changes are closed in front of

View File

@ -30,7 +30,7 @@ public:
InsetArgument(Buffer *, std::string const &);
///
InsetArgument const * asInsetArgument() const { return this; }
InsetArgument const * asInsetArgument() const override { return this; }
/// Outputting the parameter of a LaTeX command
void latexArgument(otexstream & os, OutputParams const & runparams_in,
@ -42,59 +42,59 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
bool hasSettings() const { return false; }
bool hasSettings() const override { return false; }
///
InsetCode lyxCode() const { return ARG_CODE; }
InsetCode lyxCode() const override { return ARG_CODE; }
///
docstring layoutName() const { return from_ascii("Argument"); }
docstring layoutName() const override { return from_ascii("Argument"); }
/// Update the label string of this inset
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
///
void latex(otexstream &, OutputParams const &) const { }
void latex(otexstream &, OutputParams const &) const override { }
///
int plaintext(odocstringstream &, OutputParams const &, size_t) const { return 0; }
int plaintext(odocstringstream &, OutputParams const &, size_t) const override { return 0; }
///
void docbook(XMLStream &, OutputParams const &) const { return; }
void docbook(XMLStream &, OutputParams const &) const override { return; }
///
docstring xhtml(XMLStream &, OutputParams const &) const
docstring xhtml(XMLStream &, OutputParams const &) const override
{ return docstring(); }
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
bool neverIndent() const { return true; }
bool neverIndent() const override { return true; }
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
bool isPassThru() const { return pass_thru_; }
bool isPassThru() const override { return pass_thru_; }
///
bool isFreeSpacing() const { return free_spacing_; }
bool isFreeSpacing() const override { return free_spacing_; }
///
bool isTocCaption() const { return is_toc_caption_; }
///
bool resetFontEdit() const { return false; }
bool resetFontEdit() const override { return false; }
//@}
/// \name Public functions inherited from InsetCollapsible class
//@{
///
InsetLayout::InsetDecoration decoration() const;
InsetLayout::InsetDecoration decoration() const override;
///
FontInfo getFont() const;
FontInfo getFont() const override;
///
FontInfo getLabelfont() const;
FontInfo getLabelfont() const override;
///
ColorCode labelColor() const;
ColorCode labelColor() const override;
///
void setButtonLabel();
void setButtonLabel() override;
//@}
///
void addToToc(DocIterator const & dit, bool output_active,
UpdateType utype, TocBackend & backend) const; //override
UpdateType utype, TocBackend & backend) const override;
private:
///
docstring toolTip(BufferView const & bv, int, int) const;
docstring toolTip(BufferView const & bv, int, int) const override;
///
void fixParagraphLanguage(Language const *);
///
@ -130,13 +130,13 @@ protected:
/// \name Protected functions inherited from Inset class
//@{
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetArgument(*this); }
Inset * clone() const override { return new InsetArgument(*this); }
/// Is the content of this inset part of the immediate (visible) text sequence?
bool isPartOfTextSequence() const { return false; }
bool isPartOfTextSequence() const override { return false; }
//@}
};

View File

@ -44,27 +44,27 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
InsetCode lyxCode() const { return BIBITEM_CODE; }
InsetCode lyxCode() const override { return BIBITEM_CODE; }
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
/// \copydoc Inset::initView()
/// verify label and update references.
void initView();
void initView() override;
///
bool isLabeled() const { return true; }
bool isLabeled() const override { return true; }
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
int plaintext(odocstringstream &, OutputParams const &,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
void collectBibKeys(InsetIterator const &, support::FileNameList &) const;
void collectBibKeys(InsetIterator const &, support::FileNameList &) const override;
/// update the counter of this inset
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
///@}
/// \name Static public methods obligated for InsetCommand derived classes
@ -84,17 +84,17 @@ private:
/// \name Private functions inherited from Inset class
//@{
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetBibitem(*this); }
Inset * clone() const override { return new InsetBibitem(*this); }
/// Is the content of this inset part of the immediate (visible) text sequence?
bool isPartOfTextSequence() const { return false; }
bool isPartOfTextSequence() const override { return false; }
///@}
/// \name Private functions inherited from InsetCommand class
//@{
///
docstring screenLabel() const;
docstring screenLabel() const override;
//@}
friend docstring bibitemWidest(Buffer const & buffer, OutputParams const &);

View File

@ -37,38 +37,38 @@ public:
///
bool delDatabase(docstring const &);
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
/// \name Public functions inherited from Inset class
//@{
///
docstring toolTip(BufferView const & bv, int x, int y) const;
docstring toolTip(BufferView const & bv, int x, int y) const override;
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
///
InsetCode lyxCode() const { return BIBTEX_CODE; }
InsetCode lyxCode() const override { return BIBTEX_CODE; }
///
RowFlags rowFlags() const { return Display; }
RowFlags rowFlags() const override { return Display; }
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype, TocBackend & backend) const;
UpdateType utype, TocBackend & backend) const override;
///
void collectBibKeys(InsetIterator const &, support::FileNameList &) const;
void collectBibKeys(InsetIterator const &, support::FileNameList &) const override;
///
void validate(LaTeXFeatures &) const;
void validate(LaTeXFeatures &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
@ -98,17 +98,17 @@ private:
//@{
///
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
FuncStatus & flag) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetBibtex(*this); }
Inset * clone() const override { return new InsetBibtex(*this); }
//@}
/// \name Private functions inherited from InsetCommand class
//@{
///
docstring screenLabel() const;
docstring screenLabel() const override;
//@}
};

View File

@ -102,64 +102,64 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
InsetCode lyxCode() const { return BOX_CODE; }
InsetCode lyxCode() const override { return BOX_CODE; }
///
docstring layoutName() const;
docstring layoutName() const override;
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
void metrics(MetricsInfo &, Dimension &) const;
void metrics(MetricsInfo &, Dimension &) const override;
///
ColorCode backgroundColor(PainterInfo const &) const;
ColorCode backgroundColor(PainterInfo const &) const override;
///
LyXAlignment contentAlignment() const;
LyXAlignment contentAlignment() const override;
///
bool allowParagraphCustomization(idx_type = 0) const { return !forcePlainLayout(); }
bool allowParagraphCustomization(idx_type = 0) const override { return !forcePlainLayout(); }
///
bool allowMultiPar() const;
bool allowMultiPar() const override;
///
bool forcePlainLayout(idx_type = 0) const;
bool forcePlainLayout(idx_type = 0) const override;
///
bool needsCProtection(bool const maintext = false,
bool const fragile = false) const;
bool const fragile = false) const override;
///
bool neverIndent() const { return true; }
bool neverIndent() const override { return true; }
///
bool inheritFont() const { return false; }
bool inheritFont() const override { return false; }
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void validate(LaTeXFeatures &) const;
void validate(LaTeXFeatures &) const override;
///
bool hasFixedWidth() const;
bool hasFixedWidth() const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
//@}
/// \name Public functions inherited from InsetCollapsible class
//@{
///
void setButtonLabel();
void setButtonLabel() override;
//@}
protected:
/// \name Protected functions inherited from Inset class
//@{
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetBox(*this); }
Inset * clone() const override { return new InsetBox(*this); }
//@}
private:

View File

@ -61,34 +61,34 @@ public:
private:
///
InsetCode lyxCode() const { return BRANCH_CODE; }
InsetCode lyxCode() const override { return BRANCH_CODE; }
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
docstring const buttonLabel(BufferView const &) const;
docstring const buttonLabel(BufferView const &) const override;
///
ColorCode backgroundColor(PainterInfo const &) const;
ColorCode backgroundColor(PainterInfo const &) const override;
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void toString(odocstream &) const;
void toString(odocstream &) const override;
///
void forOutliner(docstring &, size_t const, bool const) const;
void forOutliner(docstring &, size_t const, bool const) const override;
///
void validate(LaTeXFeatures &) const;
void validate(LaTeXFeatures &) const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false);
void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
/** \returns true if params_.branch is listed as 'selected' in
\c buffer. \p child only checks within child documents.
@ -100,21 +100,21 @@ private:
* Note that Branch insets are considered part of the
* document when they are selected XOR inverted.
*/
bool producesOutput() const;
bool producesOutput() const override;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
bool isMacroScope() const;
bool isMacroScope() const override;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
docstring toolTip(BufferView const & bv, int x, int y) const override;
///
bool usePlainLayout() const { return false; }
bool usePlainLayout() const override { return false; }
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
docstring layoutName() const { return from_ascii("Branch:") + branch(); }
docstring layoutName() const override { return from_ascii("Branch:") + branch(); }
///
Inset * clone() const { return new InsetBranch(*this); }
Inset * clone() const override { return new InsetBranch(*this); }
///
friend class InsetBranchParams;

View File

@ -25,7 +25,7 @@ public:
///
std::string const & floattype() const { return floattype_; }
///
docstring layoutName() const;
docstring layoutName() const override;
/// return the mandatory argument (LaTeX format) only
void getArgument(otexstream & os, OutputParams const &) const;
/// return the caption text
@ -35,61 +35,61 @@ public:
/// return the caption text as HTML
docstring getCaptionAsHTML(XMLStream & os, OutputParams const &) const;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
private:
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
RowFlags rowFlags() const { return Display; }
RowFlags rowFlags() const override { return Display; }
///
bool neverIndent() const { return true; }
bool neverIndent() const override { return true; }
///
bool forceLocalFontSwitch() const { return true; }
bool forceLocalFontSwitch() const override { return true; }
///
InsetCode lyxCode() const { return CAPTION_CODE; }
InsetCode lyxCode() const override { return CAPTION_CODE; }
///
void cursorPos(BufferView const & bv,
CursorSlice const & sl, bool boundary, int & x, int & y) const;
CursorSlice const & sl, bool boundary, int & x, int & y) const override;
///
bool descendable(BufferView const &) const { return true; }
bool descendable(BufferView const &) const override { return true; }
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
void metrics(MetricsInfo & mi, Dimension & dim) const override;
///
void drawBackground(PainterInfo & pi, int x, int y) const;
void drawBackground(PainterInfo & pi, int x, int y) const override;
///
void draw(PainterInfo & pi, int x, int y) const;
void draw(PainterInfo & pi, int x, int y) const override;
/// Strike out the inset when deleted.
bool canPaintChange(BufferView const &) const { return true; }
bool canPaintChange(BufferView const &) const override { return true; }
///
void edit(Cursor & cur, bool front, EntryDirection entry_from);
void edit(Cursor & cur, bool front, EntryDirection entry_from) override;
///
Inset * editXY(Cursor & cur, int x, int y);
Inset * editXY(Cursor & cur, int x, int y) override;
///
bool insetAllowed(InsetCode code) const;
bool insetAllowed(InsetCode code) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
// Update the counters of this inset and of its contents
void updateBuffer(ParIterator const &, UpdateType, bool const deleted);
void updateBuffer(ParIterator const &, UpdateType, bool const deleted) override;
///
void latex(otexstream & os, OutputParams const &) const;
void latex(otexstream & os, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream & os, OutputParams const & runparams) const;
docstring xhtml(XMLStream & os, OutputParams const & runparams) const override;
///
void addToToc(DocIterator const & di, bool output_active, UpdateType utype,
TocBackend & backend) const;
TocBackend & backend) const override;
///
virtual bool forcePlainLayout(idx_type = 0) const { return true; }
bool forcePlainLayout(idx_type = 0) const override { return true; }
/// Captions don't accept alignment, spacing, etc.
virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
bool allowParagraphCustomization(idx_type = 0) const override { return false; }
///
Inset * clone() const { return new InsetCaption(*this); }
Inset * clone() const override { return new InsetCaption(*this); }
///
mutable docstring full_label_;

View File

@ -45,11 +45,11 @@ protected:
virtual bool hasSubCaptions(ParIterator const &) const { return false; }
///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype, TocBackend & backend) const;
UpdateType utype, TocBackend & backend) const override;
/// Update the counters of this inset and of its contents
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
///
bool insetAllowed(InsetCode) const;
bool insetAllowed(InsetCode) const override;
private:
///
std::string caption_type_;

View File

@ -39,39 +39,39 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
bool isLabeled() const { return true; }
bool isLabeled() const override { return true; }
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
///
docstring toolTip(BufferView const & bv, int x, int y) const;
docstring toolTip(BufferView const & bv, int x, int y) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
///
InsetCode lyxCode() const { return CITE_CODE; }
InsetCode lyxCode() const override { return CITE_CODE; }
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void toString(odocstream &) const;
void toString(odocstream &) const override;
///
void forOutliner(docstring &, size_t const, bool const) const;
void forOutliner(docstring &, size_t const, bool const) const override;
///
void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false);
void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override;
///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype, TocBackend & backend) const;
UpdateType utype, TocBackend & backend) const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
bool forceLTR(OutputParams const &) const;
bool forceLTR(OutputParams const &) const override;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
@ -111,13 +111,13 @@ private:
/// \name Private functions inherited from Inset class
//@{
///
Inset * clone() const { return new InsetCitation(*this); }
Inset * clone() const override { return new InsetCitation(*this); }
//@}
/// \name Private functions inherited from InsetCommand class
//@{
///
docstring screenLabel() const;
docstring screenLabel() const override;
//@}
///

View File

@ -43,45 +43,45 @@ public:
///
virtual ~InsetCollapsible();
///
InsetCollapsible * asInsetCollapsible() { return this; }
InsetCollapsible * asInsetCollapsible() override { return this; }
///
InsetCollapsible const * asInsetCollapsible() const { return this; }
InsetCollapsible const * asInsetCollapsible() const override { return this; }
///
docstring toolTip(BufferView const & bv, int x, int y) const;
docstring toolTip(BufferView const & bv, int x, int y) const override;
///
docstring layoutName() const { return from_ascii("Collapsible"); }
docstring layoutName() const override { return from_ascii("Collapsible"); }
///
void read(Lexer &);
void read(Lexer &) override;
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
///
int topOffset(BufferView const * bv) const;
int topOffset(BufferView const * bv) const override;
///
int bottomOffset(BufferView const * bv) const;
int bottomOffset(BufferView const * bv) const override;
///
void metrics(MetricsInfo &, Dimension &) const;
void metrics(MetricsInfo &, Dimension &) const override;
///
void draw(PainterInfo & pi, int x, int y) const;
void draw(PainterInfo & pi, int x, int y) const override;
///
virtual void drawBackground(PainterInfo &, int, int) const {}
void drawBackground(PainterInfo &, int, int) const override {}
/// return x,y of given position relative to the inset's baseline
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
bool boundary, int & x, int & y) const override;
///
docstring const getNewLabel(docstring const & l) const;
///
bool editable() const;
bool editable() const override;
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
/// Returns true if coordinates are over the inset's button.
/// Always returns false when the inset does not have a
/// button.
bool clickable(BufferView const & bv, int x, int y) const;
bool clickable(BufferView const & bv, int x, int y) const override;
/// can we go further down on mouse click?
bool descendable(BufferView const & bv) const;
bool descendable(BufferView const & bv) const override;
///
void setLabel(docstring const & l);
///
@ -141,37 +141,37 @@ public:
/// and of course decoration().
Geometry geometry(BufferView const & bv) const;
///
bool canPaintChange(BufferView const & bv) const;
bool canPaintChange(BufferView const & bv) const override;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
bool setMouseHover(BufferView const * bv, bool mouse_hover) const override;
///
ColorCode backgroundColor(PainterInfo const &) const
ColorCode backgroundColor(PainterInfo const &) const override
{ return getLayout().bgcolor(); }
///
ColorCode labelColor() const { return getLayout().labelfont().color(); }
ColorCode labelColor() const override { return getLayout().labelfont().color(); }
///
InsetCode lyxCode() const { return COLLAPSIBLE_CODE; }
InsetCode lyxCode() const override { return COLLAPSIBLE_CODE; }
///
virtual bool usePlainLayout() const { return true; }
bool usePlainLayout() const override { return true; }
///
std::string contextMenu(BufferView const & bv, int x, int y) const;
std::string contextMenu(BufferView const & bv, int x, int y) const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
void addToToc(DocIterator const & dit, bool output_active,
UpdateType utype, TocBackend & backend) const; //override
UpdateType utype, TocBackend & backend) const override;
protected:
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
void edit(Cursor & cur, bool front,
EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override;
///
Inset * editXY(Cursor & cur, int x, int y);
Inset * editXY(Cursor & cur, int x, int y) override;
///
mutable CollapseStatus status_;
///

View File

@ -43,9 +43,9 @@ public:
///
virtual ~InsetCommand();
///
InsetCommand * asInsetCommand() { return this; }
InsetCommand * asInsetCommand() override { return this; }
///
InsetCommand const * asInsetCommand() const { return this; }
InsetCommand const * asInsetCommand() const override { return this; }
/// \return true if params are successfully read
static bool string2params(std::string const & data,
@ -70,41 +70,41 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
void write(std::ostream & os) const { p_.write(os); }
void write(std::ostream & os) const override { p_.write(os); }
///
void read(Lexer & lex) { p_.Read(lex, &buffer()); }
void read(Lexer & lex) override { p_.Read(lex, &buffer()); }
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
///
void metrics(MetricsInfo &, Dimension &) const;
void metrics(MetricsInfo &, Dimension &) const override;
///
void draw(PainterInfo & pi, int x, int y) const;
void draw(PainterInfo & pi, int x, int y) const override;
///
virtual void drawBackground(PainterInfo &, int, int) const {}
void drawBackground(PainterInfo &, int, int) const override {}
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
void validate(LaTeXFeatures & features) const;
void validate(LaTeXFeatures & features) const override;
///
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
bool setMouseHover(BufferView const * bv, bool mouse_hover) const override;
///
bool clickable(BufferView const &, int, int) const { return hasSettings(); }
bool clickable(BufferView const &, int, int) const override { return hasSettings(); }
//@}
protected:
/// \name Methods relaying to the InsetCommandParams p_
//@{
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
bool showInsetDialog(BufferView * bv) const;
bool showInsetDialog(BufferView * bv) const override;
//@}
protected:

View File

@ -25,31 +25,31 @@ public:
/// \name Public functions inherited from Inset class
//@{
///
bool isLabeled() const { return true; }
bool isLabeled() const override { return true; }
///
docstring toolTip(BufferView const &, int, int) const
docstring toolTip(BufferView const &, int, int) const override
{ return tooltip_; }
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
///
InsetCode lyxCode() const { return COUNTER_CODE; }
InsetCode lyxCode() const override { return COUNTER_CODE; }
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void toString(odocstream &) const;
void toString(odocstream &) const override;
///
void validate(LaTeXFeatures & features) const;
void validate(LaTeXFeatures & features) const override;
///
void updateBuffer(ParIterator const & it, UpdateType, bool const);
void updateBuffer(ParIterator const & it, UpdateType, bool const) override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
//@}
/// \name Static public methods obligated for InsetCommand derived classes
@ -73,13 +73,13 @@ private:
/// \name Private functions inherited from Inset class
//@{
///
Inset * clone() const { return new InsetCounter(*this); }
Inset * clone() const override { return new InsetCounter(*this); }
//@}
/// \name Private functions inherited from InsetCommand class
//@{
///
docstring screenLabel() const { return screen_label_; }
docstring screenLabel() const override { return screen_label_; }
//@}
///
docstring lyxSaveCounter() const;

View File

@ -39,38 +39,38 @@ public:
///
static std::string params2string(CollapseStatus);
std::string contextMenuName() const
std::string contextMenuName() const override
{ return "context-ert"; }
private:
///
InsetCode lyxCode() const { return ERT_CODE; }
InsetCode lyxCode() const override { return ERT_CODE; }
///
docstring layoutName() const { return from_ascii("ERT"); }
docstring layoutName() const override { return from_ascii("ERT"); }
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
void validate(LaTeXFeatures &) const {}
void validate(LaTeXFeatures &) const override {}
/// should paragraph indentation be omitted in any case?
bool neverIndent() const { return true; }
bool neverIndent() const override { return true; }
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
///
Inset * clone() const { return new InsetERT(*this); }
Inset * clone() const override { return new InsetERT(*this); }
///
docstring const buttonLabel(BufferView const & bv) const;
docstring const buttonLabel(BufferView const & bv) const override;
///
bool allowSpellCheck() const { return false; }
bool allowSpellCheck() const override { return false; }
///
bool insetAllowed(InsetCode code) const { return code == QUOTE_CODE; }
bool insetAllowed(InsetCode code) const override { return code == QUOTE_CODE; }
};

View File

@ -110,60 +110,60 @@ public:
/// Update not loaded previews
void updatePreview() const;
/// \returns the number of rows (\n's) of generated code.
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
std::string contextMenuName() const;
std::string contextMenuName() const override;
///
bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
bool setMouseHover(BufferView const * bv, bool mouse_hover) const override;
///
bool clickable(BufferView const &, int, int) const { return true; }
bool clickable(BufferView const &, int, int) const override { return true; }
///
void addToToc(DocIterator const & di, bool output_active,
UpdateType utype, TocBackend & backend) const;
UpdateType utype, TocBackend & backend) const override;
///
InsetCode lyxCode() const { return EXTERNAL_CODE; }
InsetCode lyxCode() const override { return EXTERNAL_CODE; }
///
bool hasSettings() const { return true; }
bool hasSettings() const override { return true; }
///
int topOffset(BufferView const *) const { return 0; }
int topOffset(BufferView const *) const override { return 0; }
///
int bottomOffset(BufferView const *) const { return 0; }
int bottomOffset(BufferView const *) const override { return 0; }
///
int leftOffset(BufferView const *) const { return 0; }
int leftOffset(BufferView const *) const override { return 0; }
///
int rightOffset(BufferView const *) const { return 0; }
int rightOffset(BufferView const *) const override { return 0; }
///
void metrics(MetricsInfo &, Dimension &) const;
void metrics(MetricsInfo &, Dimension &) const override;
///
void draw(PainterInfo & pi, int x, int y) const;
void draw(PainterInfo & pi, int x, int y) const override;
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void generateXML(XMLStream &, OutputParams const &, std::string const &) const;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
/// For now, this does nothing. Someone who knows about this
/// should see what needs doing for XHTML output.
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
/// Update needed features for this inset.
void validate(LaTeXFeatures & features) const;
void validate(LaTeXFeatures & features) const override;
///
void addPreview(DocIterator const &, graphics::PreviewLoader &) const;
void addPreview(DocIterator const &, graphics::PreviewLoader &) const override;
///
bool showInsetDialog(BufferView * bv) const;
bool showInsetDialog(BufferView * bv) const override;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetExternal(*this); }
Inset * clone() const override { return new InsetExternal(*this); }
/** Slot receiving a signal that the external file has changed
* and the preview should be regenerated.
*/

View File

@ -25,26 +25,26 @@ public:
///
InsetFlex(Buffer *, std::string const & layoutName);
///
docstring layoutName() const { return from_utf8("Flex:" + name_); }
docstring layoutName() const override { return from_utf8("Flex:" + name_); }
///
InsetLayout const & getLayout() const;
InsetLayout const & getLayout() const override;
///
InsetCode lyxCode() const { return FLEX_CODE; }
InsetCode lyxCode() const override { return FLEX_CODE; }
/// Default looks
InsetLayout::InsetDecoration decoration() const;
InsetLayout::InsetDecoration decoration() const override;
///
void write(std::ostream &) const;
void write(std::ostream &) const override;
/// should paragraph indentation be omitted in any case?
bool neverIndent() const { return true; }
bool neverIndent() const override { return true; }
///
bool hasSettings() const { return false; }
bool hasSettings() const override { return false; }
///
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus &) const;
FuncStatus &) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false);
void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
protected:
///
@ -52,7 +52,7 @@ protected:
private:
///
Inset * clone() const { return new InsetFlex(*this); }
Inset * clone() const override { return new InsetFlex(*this); }
///
std::string name_;
};

View File

@ -73,57 +73,57 @@ public:
///
InsetFloatParams const & params() const { return params_; }
///
bool allowsCaptionVariation(std::string const &) const;
bool allowsCaptionVariation(std::string const &) const override;
///
LyXAlignment contentAlignment() const;
LyXAlignment contentAlignment() const override;
///
bool forceParDirectionSwitch() const { return true; }
bool forceParDirectionSwitch() const override { return true; }
private:
///
void setCaptionType(std::string const & type);
void setCaptionType(std::string const & type) override;
///
docstring layoutName() const;
docstring layoutName() const override;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
docstring toolTip(BufferView const & bv, int x, int y) const override;
///
void write(std::ostream & os) const;
void write(std::ostream & os) const override;
///
void read(Lexer & lex);
void read(Lexer & lex) override;
///
void validate(LaTeXFeatures & features) const;
void validate(LaTeXFeatures & features) const override;
///
InsetCode lyxCode() const { return FLOAT_CODE; }
InsetCode lyxCode() const override { return FLOAT_CODE; }
///
void latex(otexstream &, OutputParams const &) const;
void latex(otexstream &, OutputParams const &) const override;
///
int plaintext(odocstringstream & ods, OutputParams const & op,
size_t max_length = INT_MAX) const;
size_t max_length = INT_MAX) const override;
///
void docbook(XMLStream &, OutputParams const &) const;
void docbook(XMLStream &, OutputParams const &) const override;
///
docstring xhtml(XMLStream &, OutputParams const &) const;
docstring xhtml(XMLStream &, OutputParams const &) const override;
///
bool insetAllowed(InsetCode) const;
bool insetAllowed(InsetCode) const override;
/** returns false if, when outputting LaTeX, font changes should
be closed before generating this inset. This is needed for
insets that may contain several paragraphs */
bool inheritFont() const { return false; }
bool inheritFont() const override { return false; }
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
///
bool hasSubCaptions(ParIterator const & it) const;
bool hasSubCaptions(ParIterator const & it) const override;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
void doDispatch(Cursor & cur, FuncRequest & cmd) override;
///
Inset * clone() const { return new InsetFloat(*this); }
Inset * clone() const override { return new InsetFloat(*this); }
/// Is the content of this inset part of the immediate (visible) text sequence?
bool isPartOfTextSequence() const { return false; }
bool isPartOfTextSequence() const override { return false; }
///
TexString getCaption(OutputParams const &) const;
///
std::string getAlignment() const;
///
OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_OMITOBJECT; }
OutputParams::CtObject CtObject(OutputParams const &) const override { return OutputParams::CT_OMITOBJECT; }
InsetFloatParams params_;
};

Some files were not shown because too many files have changed in this diff Show More