]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabularCreate.cpp
Use QMessageBox for toggleWarning if possible
[lyx.git] / src / frontends / qt4 / GuiTabularCreate.cpp
index 2a8b5f6436f48815f96b13a7ce5da504e7ab5fc4..96bbe1a790314f9d34093e5b23f9feb16e363203 100644 (file)
 
 #include "support/convert.h"
 
-#include <QCloseEvent>
 #include <QSpinBox>
 #include <QPushButton>
 
-using std::string;
-
+using namespace std;
 
 namespace lyx {
 namespace frontend {
 
 GuiTabularCreate::GuiTabularCreate(GuiView & lv)
-       : GuiDialog(lv, "tabularcreate")
+       : GuiDialog(lv, "tabularcreate", qt_("Insert Table"))
 {
        setupUi(this);
-       setViewTitle(_("Insert Table"));
 
        rowsSB->setValue(5);
        columnsSB->setValue(5);
+       table->setMinimumSize(100, 100);
+
+       connect(table, SIGNAL(rowsChanged(int)),
+               rowsSB, SLOT(setValue(int)));
+       connect(table, SIGNAL(colsChanged(int)),
+               columnsSB, SLOT(setValue(int)));
+       connect(rowsSB, SIGNAL(valueChanged(int)),
+               table, SLOT(setNumberRows(int)));
+       connect(columnsSB, SIGNAL(valueChanged(int)),
+               table, SLOT(setNumberColumns(int)));
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
@@ -100,4 +107,4 @@ Dialog * createGuiTabularCreate(GuiView & lv)
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiTabularCreate_moc.cpp"
+#include "moc_GuiTabularCreate.cpp"