2 * \file tabularcreatedlgimpl.C
3 * Copyright 2001 LyX Team
6 * \author John Levon, moz@compsoc.man.ac.uk
7 * \author Edwin Leuven, leuven@fee.uva.nl
10 #include "tabularcreatedlg.h"
16 #include "tabularcreatedlgimpl.h"
17 #include "FormTabularCreate.h"
18 #include "support/lstrings.h"
20 #include "qpushbutton.h"
22 #include "emptytable.h"
24 #include "qtableview.h"
27 TabularCreateDlgImpl::TabularCreateDlgImpl(FormTabularCreate* form, QWidget* parent, const char* name, bool modal, WFlags fl )
28 : InsertTabularDlg( parent, name, modal, fl ), form_(form)
31 table->setMinimumSize(100,100);
34 QToolTip::add(table, _("Drag with left mouse button to resize"));
37 TabularCreateDlgImpl::~TabularCreateDlgImpl()
39 // no need to delete child widgets, Qt does it all for us
42 void TabularCreateDlgImpl::insert_tabular()
44 form_->apply((rows->text()).toInt(), (columns->text()).toInt());
49 void TabularCreateDlgImpl::cancel_adaptor()
55 void TabularCreateDlgImpl::colsChanged(int nr_cols)
57 if (nr_cols != (columns->text()).toInt())
58 columns->setValue(nr_cols);
61 void TabularCreateDlgImpl::rowsChanged(int nr_rows)
63 if (nr_rows != (rows->text()).toInt())
64 rows->setValue(nr_rows);