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")
33 setViewTitle(_("Insert Table"));
36 columnsSB->setValue(5);
38 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
39 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
41 connect(rowsSB, SIGNAL(valueChanged(int)),
42 this, SLOT(rowsChanged(int)));
43 connect(columnsSB, SIGNAL(valueChanged(int)),
44 this, SLOT(columnsChanged(int)));
46 bc().setPolicy(ButtonPolicy::IgnorantPolicy);
48 bc().setCancel(closePB);
52 void GuiTabularCreate::columnsChanged(int)
58 void GuiTabularCreate::rowsChanged(int)
64 void GuiTabularCreate::applyView()
66 params_.first = rowsSB->value();
67 params_.second = columnsSB->value();
71 bool GuiTabularCreate::initialiseParams(string const &)
79 void GuiTabularCreate::clearParams()
86 void GuiTabularCreate::dispatchParams()
88 string const data = convert<string>(params().first) + ' ' + convert<string>(params().second);
89 dispatch(FuncRequest(getLfun(), data));
93 Dialog * createGuiTabularCreate(GuiView & lv)
95 return new GuiTabularCreate(lv);
99 } // namespace frontend
102 #include "GuiTabularCreate_moc.cpp"