#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
+class GuiTabular : public InsetParamsWidget, public Ui::TabularUi
{
Q_OBJECT
public:
- GuiTabular(GuiView & 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 checkEnabled();
void borderSet_clicked();
void borderUnset_clicked();
+ void on_topspaceCO_activated(int index);
+ void on_bottomspaceCO_activated(int index);
+ void on_interlinespaceCO_activated(int index);
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;
+ //@}
+
///
- bool isValid() { return true; }
- /// update borders
- void update_borders();
- ///
- void applyView();
- /// update
- void updateContents();
+ void setHAlign(std::string & param_str) const;
///
- bool initialiseParams(std::string const & data);
- /// clean-up on hide.
- void clearParams();
- /// We use set() instead.
- void dispatchParams() {};
+ void setVAlign(std::string & param_str) const;
///
- bool isBufferDependent() const { return true; }
+ void setTableAlignment(std::string & param_str) const;
///
- FuncCode getLfun() const { return LFUN_TABULAR_FEATURE; }
-
+ void setWidthAndAlignment();
///
- 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 firstheader_suppressable_;
///
- bool applying_;
+ bool lastfooter_suppressable_;
};
} // namespace frontend