*
* \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 "ControlTabular.h"
+#include "InsetParamsWidget.h"
#include "ui_TabularUi.h"
+#include "insets/InsetTabular.h"
namespace lyx {
namespace frontend {
-class GuiTabularDialog : public GuiDialog, public Ui::TabularUi
+class GuiTabular : public InsetParamsWidget, public Ui::TabularUi
{
Q_OBJECT
public:
- GuiTabularDialog(LyXView & lv);
+ 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();
+ 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; }
+ QString dialogTitle() const { return qt_("Tabular Settings"); }
+ void paramsToDialog(Inset const *);
+ docstring dialogToParams() const;
+ bool checkWidgets(bool readonly) const;
+ //@}
+
+ ///
+ void enableWidgets() const;
+ ///
+ void setHAlign(std::string & param_str) const;
+ ///
+ void setVAlign(std::string & param_str) const;
+ ///
+ void setTableAlignment(std::string & param_str) const;
+ ///
+ void setWidthAndAlignment();
+ ///
+ bool funcEnabled(Tabular::Feature f) const;
///
- void closeEvent(QCloseEvent * e);
- /// parent controller
- ControlTabular & controller();
+ bool firstheader_suppressable_;
///
- bool isValid() { return true; }
- /// update borders
- void update_borders();
- /// update
- void updateContents();
- /// save some values before closing the gui
- void closeGUI();
+ bool lastfooter_suppressable_;
};
} // namespace frontend