]> git.lyx.org Git - features.git/blobdiff - src/frontends/kde/tabcreatedlg.C
Update to MVC. Ref,Toc and citation don't work at all currently.
[features.git] / src / frontends / kde / tabcreatedlg.C
index c563cb23b227e13172c8b63def555a814ee40bfb..1cd0eba550198e8f9a2b20cf9a2835ededbe94ee 100644 (file)
@@ -18,10 +18,10 @@ TabularCreateDialog::TabularCreateDialog (FormTabularCreate * form, QWidget * pa
 {
        setCaption(name);
        table->setMinimumSize(100,100); 
-       rows->setValue(5);
-       cols->setValue(5);
-       connect(rows,SIGNAL(valueChanged(int)),table,SLOT(setNumberRows(int)));
-       connect(cols,SIGNAL(valueChanged(int)),table,SLOT(setNumberColumns(int)));
+       spin_rows->setValue(5);
+       spin_cols->setValue(5);
+       connect(spin_rows,SIGNAL(valueChanged(int)),table,SLOT(setNumberRows(int)));
+       connect(spin_cols,SIGNAL(valueChanged(int)),table,SLOT(setNumberColumns(int)));
        connect(table,SIGNAL(colsChanged(unsigned int)),this,SLOT(colsChanged(unsigned int))); 
        connect(table,SIGNAL(rowsChanged(unsigned int)),this,SLOT(rowsChanged(unsigned int))); 
        QToolTip::add(table, _("Drag with left mouse button to resize")); 
@@ -35,28 +35,25 @@ TabularCreateDialog::~TabularCreateDialog()
 
 void TabularCreateDialog::colsChanged(unsigned int nr_cols)
 {
-       if (nr_cols != strToUnsignedInt(cols->text()))
-               cols->setValue(nr_cols);
+       if (nr_cols != strToUnsignedInt(spin_cols->text()))
+               spin_cols->setValue(nr_cols);
 }
 
 
 void TabularCreateDialog::rowsChanged(unsigned int nr_rows)
 {
-       if (nr_rows != strToUnsignedInt(rows->text()))
-               rows->setValue(nr_rows);
+       if (nr_rows != strToUnsignedInt(spin_rows->text()))
+               spin_rows->setValue(nr_rows);
 }
 
 
 void TabularCreateDialog::clickedInsert()
 {
-       form_->apply(strToInt(rows->text()), strToInt(cols->text()));
-       form_->close();
-       hide();
+       form_->OKButton();
 }
 
  
 void TabularCreateDialog::clickedCancel()
 {
-       form_->close();
-       hide();
+       form_->CancelButton(); 
 }