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"
21 #include <QPushButton>
28 GuiTabularCreate::GuiTabularCreate(GuiView & lv)
29 : GuiDialog(lv, "tabularcreate", qt_("Insert Table"))
34 columnsSB->setValue(5);
36 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
37 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
39 connect(rowsSB, SIGNAL(valueChanged(int)),
40 this, SLOT(rowsChanged(int)));
41 connect(columnsSB, SIGNAL(valueChanged(int)),
42 this, SLOT(columnsChanged(int)));
44 bc().setPolicy(ButtonPolicy::IgnorantPolicy);
46 bc().setCancel(closePB);
50 void GuiTabularCreate::columnsChanged(int)
56 void GuiTabularCreate::rowsChanged(int)
62 void GuiTabularCreate::applyView()
64 params_.first = rowsSB->value();
65 params_.second = columnsSB->value();
69 bool GuiTabularCreate::initialiseParams(string const &)
77 void GuiTabularCreate::clearParams()
84 void GuiTabularCreate::dispatchParams()
86 string const data = convert<string>(params().first) + ' ' + convert<string>(params().second);
87 dispatch(FuncRequest(getLfun(), data));
91 Dialog * createGuiTabularCreate(GuiView & lv)
93 return new GuiTabularCreate(lv);
97 } // namespace frontend
100 #include "moc_GuiTabularCreate.cpp"