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"
17 #include "controllers/ControlTabularCreate.h"
20 #include <QPushButton>
25 /////////////////////////////////////////////////////////////////////
27 // GuiTabularCreateDialog
29 /////////////////////////////////////////////////////////////////////
31 GuiTabularCreateDialog::GuiTabularCreateDialog(GuiTabularCreate * form)
37 columnsSB->setValue(5);
39 connect(okPB, SIGNAL(clicked()), form_, SLOT(slotOK()));
40 connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose()));
42 connect(rowsSB, SIGNAL(valueChanged(int)),
43 this, SLOT(rowsChanged(int)));
44 connect(columnsSB, SIGNAL(valueChanged(int)),
45 this, SLOT(columnsChanged(int)));
49 void GuiTabularCreateDialog::columnsChanged(int)
55 void GuiTabularCreateDialog::rowsChanged(int)
61 /////////////////////////////////////////////////////////////////////
65 /////////////////////////////////////////////////////////////////////
67 typedef QController<ControlTabularCreate, GuiView<GuiTabularCreateDialog> >
71 GuiTabularCreate::GuiTabularCreate(Dialog & parent)
72 : TabularCreateBase(parent, _("Insert Table"))
77 void GuiTabularCreate::build_dialog()
79 dialog_.reset(new GuiTabularCreateDialog(this));
81 bcview().setOK(dialog_->okPB);
82 bcview().setCancel(dialog_->closePB);
86 void GuiTabularCreate::apply()
88 controller().params().first = dialog_->rowsSB->value();
89 controller().params().second = dialog_->columnsSB->value();
92 } // namespace frontend
95 #include "GuiTabularCreate_moc.cpp"