4 * John Levon, <moz@compsoc.man.ac.uk>
8 #include "tabcreatedlg.h"
9 #include "support/lstrings.h"
11 TabularCreateDialog::TabularCreateDialog (FormTabularCreate *form, QWidget *parent, const char* name)
12 : TabularCreateDialogData(parent, name), form_(form)
15 table->setMinimumSize(100,100);
18 connect(rows,SIGNAL(valueChanged(int)),table,SLOT(setNumberRows(int)));
19 connect(cols,SIGNAL(valueChanged(int)),table,SLOT(setNumberColumns(int)));
20 connect(table,SIGNAL(colsChanged(unsigned int)),this,SLOT(colsChanged(unsigned int)));
21 connect(table,SIGNAL(rowsChanged(unsigned int)),this,SLOT(rowsChanged(unsigned int)));
24 TabularCreateDialog::~TabularCreateDialog()
28 void TabularCreateDialog::colsChanged(unsigned int nr_cols)
30 if (nr_cols != strToUnsignedInt(cols->text()))
31 cols->setValue(nr_cols);
34 void TabularCreateDialog::rowsChanged(unsigned int nr_rows)
36 if (nr_rows != strToUnsignedInt(rows->text()))
37 rows->setValue(nr_rows);
40 void TabularCreateDialog::clickedInsert()
42 form_->apply(strToInt(rows->text()), strToInt(cols->text()));
47 void TabularCreateDialog::clickedCancel()