2 * \file GuiTabularCreate.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "GuiTabularCreate.h"
15 #include "EmptyTable.h"
16 #include "FuncRequest.h"
18 #include "support/convert.h"
20 #include <QCloseEvent>
22 #include <QPushButton>
29 GuiTabularCreate::GuiTabularCreate(GuiView & lv)
30 : GuiDialog(lv, "tabularcreate", qt_("Insert Table"))
35 columnsSB->setValue(5);
37 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
38 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
40 connect(rowsSB, SIGNAL(valueChanged(int)),
41 this, SLOT(rowsChanged(int)));
42 connect(columnsSB, SIGNAL(valueChanged(int)),
43 this, SLOT(columnsChanged(int)));
45 bc().setPolicy(ButtonPolicy::IgnorantPolicy);
47 bc().setCancel(closePB);
51 void GuiTabularCreate::columnsChanged(int)
57 void GuiTabularCreate::rowsChanged(int)
63 void GuiTabularCreate::applyView()
65 params_.first = rowsSB->value();
66 params_.second = columnsSB->value();
70 bool GuiTabularCreate::initialiseParams(string const &)
78 void GuiTabularCreate::clearParams()
85 void GuiTabularCreate::dispatchParams()
87 string const data = convert<string>(params().first) + ' ' + convert<string>(params().second);
88 dispatch(FuncRequest(getLfun(), data));
92 Dialog * createGuiTabularCreate(GuiView & lv)
94 return new GuiTabularCreate(lv);
98 } // namespace frontend
101 #include "GuiTabularCreate_moc.cpp"