2 * \file FormTabularCreate.C
3 * Copyright 2001 LyX Team
6 * \author John Levon, moz@compsoc.man.ac.uk
11 #include "tabularcreatedlgimpl.h"
13 #include "FormTabularCreate.h"
15 #include "QtLyXView.h"
16 #include "BufferView.h"
17 #include "insets/insettabular.h"
18 #include "support/lstrings.h"
22 FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d)
23 : dialog_(0), lv_(v), d_(d), h_(0)
25 // let the dialog be shown
26 // This is a permanent connection so we won't bother
27 // storing a copy because we won't be disconnecting.
28 d->showTabularCreate.connect(slot(this, &FormTabularCreate::show));
31 FormTabularCreate::~FormTabularCreate()
36 void FormTabularCreate::apply(int rows, int cols)
38 if (!lv_->view()->available())
41 string tmp = tostr(rows) + " " + tostr(cols);
42 lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp);
45 void FormTabularCreate::show()
48 dialog_ = new TabularCreateDlgImpl(this, 0, _("LyX: Insert Table"));
50 if (!dialog_->isVisible()) {
51 h_ = d_->hideBufferDependent.connect(slot(this, &FormTabularCreate::hide));
55 dialog_->setActiveWindow();
61 void FormTabularCreate::close()
66 void FormTabularCreate::hide()