X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiTabular.h;h=e546e831ab10868a0f3a0d5c227a2e6a31b326ab;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=d9bcc9abe25d429ce51be56e4a4e14135f6f875c;hpb=fc36725282df43059aee9a821f098309ccdbd523;p=lyx.git diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index d9bcc9abe2..e546e831ab 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -6,8 +6,8 @@ * * \author John Levon * \author Kalle Dalheimer - * \author Jürgen Spitzmüller - * \author Herbert Voß + * \author Jürgen Spitzmüller + * \author Herbert Voß * * Full author contact details are available in file CREDITS. */ @@ -15,96 +15,64 @@ #ifndef GUITABULAR_H #define GUITABULAR_H -#include "GuiDialogView.h" -#include "ControlTabular.h" +#include "GuiDialog.h" #include "ui_TabularUi.h" - -#include +#include "insets/InsetTabular.h" namespace lyx { namespace frontend { -class GuiTabular; - -class GuiTabularDialog : public QDialog, public Ui::TabularUi +class GuiTabular : public GuiDialog, public Ui::TabularUi { Q_OBJECT -public: - GuiTabularDialog(GuiTabular * form); - -protected Q_SLOTS: - virtual void change_adaptor(); - - virtual void topspace_changed(); - virtual void bottomspace_changed(); - virtual void interlinespace_changed(); - virtual void booktabsChanged(bool); - virtual void close_clicked(); - virtual void borderSet_clicked(); - virtual void borderUnset_clicked(); - virtual void leftBorder_changed(); - virtual void rightBorder_changed(); - virtual void topBorder_changed(); - virtual void bottomBorder_changed(); - virtual void multicolumn_clicked(); - virtual void rotateTabular(); - virtual void rotateCell(); - virtual void hAlign_changed(int align); - virtual void vAlign_changed(int align); - virtual void specialAlignment_changed(); - virtual void width_changed(); - virtual void longTabular(); - virtual void ltNewpage_clicked(); - virtual void ltHeaderStatus_clicked(); - virtual void ltHeaderBorderAbove_clicked(); - virtual void ltHeaderBorderBelow_clicked(); - virtual void ltFirstHeaderStatus_clicked(); - virtual void ltFirstHeaderBorderAbove_clicked(); - virtual void ltFirstHeaderBorderBelow_clicked(); - virtual void ltFirstHeaderEmpty_clicked(); - virtual void ltFooterStatus_clicked(); - virtual void ltFooterBorderAbove_clicked(); - virtual void ltFooterBorderBelow_clicked(); - virtual void ltLastFooterStatus_clicked(); - virtual void ltLastFooterBorderAbove_clicked(); - virtual void ltLastFooterBorderBelow_clicked(); - virtual void ltLastFooterEmpty_clicked(); - -protected: - virtual void closeEvent(QCloseEvent * e); -private: - GuiTabular * form_; -}; - - -class GuiTabular : public GuiView -{ public: - friend class GuiTabularDialog; + GuiTabular(GuiView & lv); + ~GuiTabular(); - GuiTabular(Dialog &); +private Q_SLOTS: + void change_adaptor(); - /// parent controller - ControlTabular & controller() - { return static_cast(this->getController()); } - /// parent controller - ControlTabular const & controller() const - { return static_cast(this->getController()); } -protected: - virtual bool isValid(); + void topspace_changed(); + void bottomspace_changed(); + void interlinespace_changed(); + void booktabsChanged(bool); + void borderSet_clicked(); + void borderUnset_clicked(); private: - /// We can't use this ... - virtual void apply() {} + /// + bool isValid() { return true; } /// update borders - virtual void update_borders(); + void update_borders(); + /// + void applyView(); /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); - /// save some values before closing the gui - virtual void closeGUI(); + void updateContents(); + /// + bool initialiseParams(std::string const & data); + /// clean-up on hide. + void clearParams(); + /// We use set() instead. + void dispatchParams() {}; + /// + bool isBufferDependent() const { return true; } + /// + FuncCode getLfun() const { return LFUN_TABULAR_FEATURE; } + + /// + Tabular::idx_type getActiveCell() const; + /// set a parameter + void set(Tabular::Feature, std::string const & arg = std::string()); + + bool funcEnabled(Tabular::Feature f) const; + + /// + Tabular::idx_type active_cell_; + /// + Tabular tabular_; + /// + bool applying_; }; } // namespace frontend