2 * \file QTabularCreateDialog.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon, moz@compsoc.man.ac.uk
7 * \author Edwin Leuven, leuven@fee.uva.nl
13 #include "QTabularCreateDialog.h"
14 #include "QTabularCreate.h"
16 #include "support/lstrings.h"
18 #include <qpushbutton.h>
20 #include "emptytable.h"
22 #include <qtableview.h>
25 QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form, QWidget * parent, const char * name, bool modal, WFlags fl)
26 : QTabularCreateDialogBase(parent, name, modal, fl),
30 table->setMinimumSize(100,100);
33 QToolTip::add(table, _("Drag with left mouse button to resize"));
37 QTabularCreateDialog::~QTabularCreateDialog()
39 // no need to delete child widgets, Qt does it all for us
43 void QTabularCreateDialog::insert_tabular()
45 form_->apply((rows->text()).toInt(), (columns->text()).toInt());
51 void QTabularCreateDialog::cancel_adaptor()
58 void QTabularCreateDialog::colsChanged(int nr_cols)
60 if (nr_cols != (columns->text()).toInt())
61 columns->setValue(nr_cols);
65 void QTabularCreateDialog::rowsChanged(int nr_rows)
67 if (nr_rows != (rows->text()).toInt())
68 rows->setValue(nr_rows);