2 * \file QTabularCreate.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
11 #include "QTabularCreateDialog.h"
13 #include "QTabularCreate.h"
15 #include "QtLyXView.h"
17 #include "BufferView.h"
18 #include "insets/insettabular.h"
19 #include "support/lstrings.h"
23 QTabularCreate::QTabularCreate(LyXView *v, Dialogs *d)
24 : dialog_(0), lv_(v), d_(d), h_(0)
26 d->showTabularCreate.connect(slot(this, &QTabularCreate::show));
30 QTabularCreate::~QTabularCreate()
36 void QTabularCreate::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);
46 void QTabularCreate::show()
49 dialog_ = new QTabularCreateDialog(this, 0, _("LyX: Insert Table"));
51 if (!dialog_->isVisible()) {
52 h_ = d_->hideBufferDependent.connect(slot(this, &QTabularCreate::hide));
56 dialog_->setActiveWindow();
63 void QTabularCreate::close()
69 void QTabularCreate::hide()