2 * \file FormTabularCreate.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
11 #include "tabcreatedlg.h"
13 #include "FormTabularCreate.h"
15 #include "QtLyXView.h"
16 #include "BufferView.h"
17 #include "insets/insettabular.h"
18 #include "support/lstrings.h"
20 FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d)
21 : dialog_(0), lv_(v), d_(d), h_(0)
23 d->showTabularCreate.connect(slot(this, &FormTabularCreate::show));
27 FormTabularCreate::~FormTabularCreate()
33 void FormTabularCreate::apply(unsigned int rows, unsigned cols)
35 if (!lv_->view()->available())
38 string tmp = tostr(rows) + " " + tostr(cols);
39 lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp);
43 void FormTabularCreate::show()
46 dialog_ = new TabularCreateDialog(this, 0, _("LyX: Insert Table"));
48 if (!dialog_->isVisible()) {
49 h_ = d_->hideBufferDependent.connect(slot(this, &FormTabularCreate::hide));
53 dialog_->setActiveWindow();
60 void FormTabularCreate::close()
66 void FormTabularCreate::hide()