]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.h
I assume this was a c&p error
[lyx.git] / src / frontends / qt4 / GuiTabular.h
index 8b32715b26182a2cbee81003dc6cd271a9529ae5..9b31a94c79d4266e02a579cd67c8833b6b48cf65 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.
  */
 #ifndef GUITABULAR_H
 #define GUITABULAR_H
 
-#include "GuiDialog.h"
+#include "InsetParamsWidget.h"
 #include "ui_TabularUi.h"
 #include "insets/InsetTabular.h"
 
 namespace lyx {
 namespace frontend {
 
-class GuiTabular : public GuiDialog, public Ui::TabularUi, public Controller
+class GuiTabular : public InsetParamsWidget, public Ui::TabularUi
 {
        Q_OBJECT
 
 public:
-       GuiTabular(LyXView & lv);
-       ~GuiTabular();
+       GuiTabular(QWidget * parent = 0);
 
 private Q_SLOTS:
-       void change_adaptor();
-
-       void topspace_changed();
-       void bottomspace_changed();
-       void interlinespace_changed();
-       void booktabsChanged(bool);
-       void close_clicked();
+       void checkEnabled();
        void borderSet_clicked();
        void borderUnset_clicked();
-       void leftBorder_changed();
-       void rightBorder_changed();
-       void topBorder_changed();
-       void bottomBorder_changed();
-       void multicolumn_clicked();
-       void rotateTabular();
-       void rotateCell();
-       void hAlign_changed(int align);
-       void vAlign_changed(int align);
-       void specialAlignment_changed();
-       void width_changed();
-       void longTabular();
-       void ltNewpage_clicked();
-       void ltHeaderStatus_clicked();
-       void ltHeaderBorderAbove_clicked();
-       void ltHeaderBorderBelow_clicked();
-       void ltFirstHeaderStatus_clicked();
-       void ltFirstHeaderBorderAbove_clicked();
-       void ltFirstHeaderBorderBelow_clicked();
-       void ltFirstHeaderEmpty_clicked();
-       void ltFooterStatus_clicked();
-       void ltFooterBorderAbove_clicked();
-       void ltFooterBorderBelow_clicked();
-       void ltLastFooterStatus_clicked();
-       void ltLastFooterBorderAbove_clicked();
-       void ltLastFooterBorderBelow_clicked();
-       void ltLastFooterEmpty_clicked();
 
 private:
+       /// \name InsetParamsWidget inherited methods
+       //@{
+       InsetCode insetCode() const { return TABULAR_CODE; }
+       FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
+       void paramsToDialog(Inset const *);
+       docstring dialogToParams() const;
+       //@}
+
        ///
-       void closeEvent(QCloseEvent * e);
-       /// parent controller
-       Controller & controller() { return *this; }
-       ///
-       bool isValid() { return true; }
-       /// update borders
-       void update_borders();
-       /// update
-       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() {};
+       void setHAlign(std::string & param_str) const;
        ///
-       bool isBufferDependent() const { return true; }
+       void setVAlign(std::string & param_str) const;
        ///
-       kb_action getLfun() const { return LFUN_TABULAR_FEATURE; }
-
-       ///
-       Tabular::idx_type getActiveCell() const;
-       /// return true if units should default to metric
-       bool useMetricUnits() const;
-       /// set a parameter
-       void set(Tabular::Feature, std::string const & arg = std::string());
-
-       /// borders
-       void toggleTopLine();
-       void toggleBottomLine();
-       void toggleLeftLine();
-       void toggleRightLine();
-
-       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);
-
+       void setTableAlignment(std::string & param_str) const;
        ///
-       Tabular::idx_type active_cell_;
+       void setWidthAndAlignment();
        ///
-       Tabular tabular_;
+       bool funcEnabled(Tabular::Feature f) const;
 };
 
 } // namespace frontend