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>
30 GuiTabularCreate::GuiTabularCreate(GuiView & lv)
31 : GuiDialog(lv, "tabularcreate")
34 setViewTitle(_("Insert Table"));
37 columnsSB->setValue(5);
39 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
40 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
42 connect(rowsSB, SIGNAL(valueChanged(int)),
43 this, SLOT(rowsChanged(int)));
44 connect(columnsSB, SIGNAL(valueChanged(int)),
45 this, SLOT(columnsChanged(int)));
47 bc().setPolicy(ButtonPolicy::IgnorantPolicy);
49 bc().setCancel(closePB);
53 void GuiTabularCreate::columnsChanged(int)
59 void GuiTabularCreate::rowsChanged(int)
65 void GuiTabularCreate::applyView()
67 params_.first = rowsSB->value();
68 params_.second = columnsSB->value();
72 bool GuiTabularCreate::initialiseParams(string const &)
80 void GuiTabularCreate::clearParams()
87 void GuiTabularCreate::dispatchParams()
89 string const data = convert<string>(params().first) + ' ' + convert<string>(params().second);
90 dispatch(FuncRequest(getLfun(), data));
94 Dialog * createGuiTabularCreate(GuiView & lv)
96 return new GuiTabularCreate(lv);
100 } // namespace frontend
103 #include "GuiTabularCreate_moc.cpp"