]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.cpp
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / GuiTabular.cpp
index 7f1277f3eb450a363331c5e4f1e6ddb434a87f56..8174570e67688fa85a2214e2409f4247db4674fc 100644 (file)
 
 #include "insets/InsetTabular.h"
 
-#include <QCloseEvent>
 #include <QCheckBox>
 #include <QPushButton>
 #include <QRadioButton>
 #include <QLineEdit>
 
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
-GuiTabular::GuiTabular(LyXView & lv)
-       : GuiDialog(lv, "tabular"), Controller(this)
+GuiTabular::GuiTabular(GuiView & lv)
+       : GuiDialog(lv, "tabular", qt_("Table Settings"))
 {
        active_cell_ = Tabular::npos;
 
        setupUi(this);
-       setViewTitle(_("Table Settings"));
-       setController(this, false);
 
        widthED->setValidator(unsignedLengthValidator(widthED));
        topspaceED->setValidator(new LengthValidator(topspaceED));
@@ -164,13 +160,6 @@ void GuiTabular::change_adaptor()
 }
 
 
-void GuiTabular::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       GuiDialog::closeEvent(e);
-}
-
-
 void GuiTabular::booktabsChanged(bool)
 {
        changed();
@@ -942,6 +931,7 @@ void GuiTabular::closeGUI()
 */
 }
 
+
 bool GuiTabular::initialiseParams(string const & data)
 {
        // try to get the current cell
@@ -952,7 +942,7 @@ bool GuiTabular::initialiseParams(string const & data)
                // get the innermost tabular inset;
                // assume that it is "ours"
                for (int i = cur.depth() - 1; i >= 0; --i)
-                       if (cur[i].inset().lyxCode() == Inset::TABULAR_CODE) {
+                       if (cur[i].inset().lyxCode() == TABULAR_CODE) {
                                current_inset = static_cast<InsetTabular const *>(&cur[i].inset());
                                active_cell_ = cur[i].idx();
                                break;
@@ -1050,14 +1040,14 @@ void GuiTabular::setWidth(string const & width)
        else
                set(Tabular::SET_PWIDTH, width);
 
-       dialog().updateView();
+       updateView();
 }
 
 
 void GuiTabular::toggleMultiColumn()
 {
        set(Tabular::MULTICOLUMN);
-       dialog().updateView();
+       updateView();
 }
 
 
@@ -1155,7 +1145,7 @@ void GuiTabular::longTabular(bool yes)
 }
 
 
-Dialog * createGuiTabular(LyXView & lv) { return new GuiTabular(lv); }
+Dialog * createGuiTabular(GuiView & lv) { return new GuiTabular(lv); }
 
 
 } // namespace frontend