3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
10 #include "tabcreatedlg.h"
11 #include "support/lstrings.h"
16 TabularCreateDialog::TabularCreateDialog (FormTabularCreate * form, QWidget * parent, char const * name)
17 : TabularCreateDialogData(parent, name), form_(form)
20 table->setMinimumSize(100,100);
21 spin_rows->setValue(5);
22 spin_cols->setValue(5);
23 connect(spin_rows,SIGNAL(valueChanged(int)),table,SLOT(setNumberRows(int)));
24 connect(spin_cols,SIGNAL(valueChanged(int)),table,SLOT(setNumberColumns(int)));
25 connect(table,SIGNAL(colsChanged(unsigned int)),this,SLOT(colsChanged(unsigned int)));
26 connect(table,SIGNAL(rowsChanged(unsigned int)),this,SLOT(rowsChanged(unsigned int)));
27 QToolTip::add(table, _("Drag with left mouse button to resize"));
31 TabularCreateDialog::~TabularCreateDialog()
36 void TabularCreateDialog::colsChanged(unsigned int nr_cols)
38 if (nr_cols != strToUnsignedInt(spin_cols->text()))
39 spin_cols->setValue(nr_cols);
43 void TabularCreateDialog::rowsChanged(unsigned int nr_rows)
45 if (nr_rows != strToUnsignedInt(spin_rows->text()))
46 spin_rows->setValue(nr_rows);
50 void TabularCreateDialog::clickedInsert()
56 void TabularCreateDialog::clickedCancel()
58 form_->CancelButton();