X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiTabular.h;h=e546e831ab10868a0f3a0d5c227a2e6a31b326ab;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=79913f07acff98facbb4df9a30e25eab416fb6ad;hpb=a1cec91afaca91968b46e695533c10ad2a3f73d3;p=lyx.git diff --git a/src/frontends/qt4/GuiTabular.h b/src/frontends/qt4/GuiTabular.h index 79913f07ac..e546e831ab 100644 --- a/src/frontends/qt4/GuiTabular.h +++ b/src/frontends/qt4/GuiTabular.h @@ -6,105 +6,76 @@ * * \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. */ -#ifndef QTABULAR_H -#define QTABULAR_H - -#include "GuiDialogView.h" +#ifndef GUITABULAR_H +#define GUITABULAR_H +#include "GuiDialog.h" #include "ui_TabularUi.h" - -#include -#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 ControlTabular; - -class GuiTabular : - public QController > -{ public: - friend class GuiTabularDialog; + GuiTabular(GuiView & lv); + ~GuiTabular(); - GuiTabular(Dialog &); +private Q_SLOTS: + void change_adaptor(); -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 } // namespace lyx -#endif // QTABULAR_H +#endif // GUITABULAR_H