]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.h
If we are in a closeEvent, we don't want to close all buffers, because these may...
[lyx.git] / src / frontends / qt4 / GuiTabular.h
index 41893feda34be95944da80c43c5bae241b45f63c..158a0ad6f1434842904c5f32203a4fde510f7773 100644 (file)
@@ -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.
  */
 #define GUITABULAR_H
 
 #include "GuiDialog.h"
-#include "ControlTabular.h"
 #include "ui_TabularUi.h"
+#include "insets/InsetTabular.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiTabularDialog : public GuiDialog, public Ui::TabularUi
+class GuiTabular : public GuiDialog, public Ui::TabularUi
 {
        Q_OBJECT
 
 public:
-       GuiTabularDialog(LyXView & lv);
+       GuiTabular(GuiView & lv);
+       ~GuiTabular();
 
 private Q_SLOTS:
        void change_adaptor();
@@ -48,6 +49,7 @@ private Q_SLOTS:
        void rotateCell();
        void hAlign_changed(int align);
        void vAlign_changed(int align);
+       void tableAlignment_changed(int align);
        void specialAlignment_changed();
        void width_changed();
        void longTabular();
@@ -66,20 +68,61 @@ private Q_SLOTS:
        void ltLastFooterBorderAbove_clicked();
        void ltLastFooterBorderBelow_clicked();
        void ltLastFooterEmpty_clicked();
+       void ltAlignment_clicked();
+       void on_captionStatusCB_toggled();
 
 private:
-       ///
-       void closeEvent(QCloseEvent * e);
-       /// parent controller
-       ControlTabular & controller() const;
        ///
        bool isValid() { return true; }
        /// update borders
        void update_borders();
        /// update
-       void update_contents();
+       void updateContents();
        /// save some values before closing the gui
        void closeGUI();
+       ///
+       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());
+
+       void setSpecial(std::string const & special);
+
+       void setWidth(std::string const & width);
+
+       void toggleMultiColumn();
+
+       void rotateTabular(bool yes);
+       void rotateCell(bool yes);
+
+       enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
+
+       void halign(HALIGN h);
+
+       enum VALIGN { TOP, MIDDLE, BOTTOM };
+
+       void valign(VALIGN h);
+
+       void booktabs(bool yes);
+
+       void longTabular(bool yes);
+
+       bool funcEnabled(Tabular::Feature f) const;
+
+       ///
+       Tabular::idx_type active_cell_;
+       ///
+       Tabular tabular_;
 };
 
 } // namespace frontend