X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiCharacter.h;h=599807f0ae8a6b1a386a09593256e3cb453a88dc;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=512a3e331e1d9751761b504b34043068021bf7cf;hpb=c9ea6e6eef090b863fb54445010f24443b15eb23;p=lyx.git diff --git a/src/frontends/qt4/GuiCharacter.h b/src/frontends/qt4/GuiCharacter.h index 512a3e331e..599807f0ae 100644 --- a/src/frontends/qt4/GuiCharacter.h +++ b/src/frontends/qt4/GuiCharacter.h @@ -4,6 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * + * \author Angus Leeming * \author Edwin Leuven * \author John Levon * @@ -14,40 +15,89 @@ #define GUICHARACTER_H #include "GuiDialog.h" -#include "ControlCharacter.h" #include "ui_CharacterUi.h" +#include "Font.h" -#include +#include + +#ifdef IGNORE +#undef IGNORE +#endif namespace lyx { namespace frontend { -class GuiCharacterDialog : public GuiDialog, public Ui::CharacterUi +enum FontState { + /// + IGNORE, + /// + EMPH_TOGGLE, + /// + UNDERBAR_TOGGLE, + /// + NOUN_TOGGLE, + /// + STRIKEOUT_TOGGLE, + /// + UULINE_TOGGLE, + /// + UWAVE_TOGGLE, + /// + INHERIT +}; + +typedef std::pair FamilyPair; +typedef std::pair FamilyPair; +typedef std::pair SeriesPair; +typedef std::pair ShapePair; +typedef std::pair SizePair; +typedef std::pair BarPair; +typedef std::pair ColorPair; +typedef std::pair LanguagePair; + +class GuiCharacter : public GuiDialog, public Ui::CharacterUi { Q_OBJECT public: - GuiCharacterDialog(LyXView & lv); + GuiCharacter(GuiView & lv); protected Q_SLOTS: void change_adaptor(); private: - void closeEvent(QCloseEvent * e); - /// parent controller - ControlCharacter & controller() const; - /// Apply changes + /// \name Dialog inherited methods + //@{ void applyView(); - /// update - void update_contents(); - - std::vector family; - std::vector series; - std::vector shape; - std::vector size; - std::vector bar; - std::vector color; - std::vector language; + 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() const; + void restoreSession(); + //@} + + /// + void paramsToDialog(Font const & font); + + QList family; + QList series; + QList shape; + QList size; + QList bar; + QList color; + QList language; + + /// + /// + Font font_; + /// + bool toggleall_; + /// If true the language should be reset. + /// If false the language of font_ is used. + bool reset_lang_; }; } // namespace frontend