]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabularCreate.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiTabularCreate.cpp
index 96bbe1a790314f9d34093e5b23f9feb16e363203..f2c4f98264284d77e3cc23643c68977cfd6c8a2a 100644 (file)
@@ -43,17 +43,19 @@ GuiTabularCreate::GuiTabularCreate(GuiView & lv)
        connect(columnsSB, SIGNAL(valueChanged(int)),
                table, SLOT(setNumberColumns(int)));
 
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+               this, SLOT(slotButtonBox(QAbstractButton *)));
 
        connect(rowsSB, SIGNAL(valueChanged(int)),
                this, SLOT(rowsChanged(int)));
        connect(columnsSB, SIGNAL(valueChanged(int)),
                this, SLOT(columnsChanged(int)));
 
-       bc().setPolicy(ButtonPolicy::IgnorantPolicy);
-       bc().setOK(okPB);
-       bc().setCancel(closePB);
+       bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy);
+       bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+       bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
+       bc().setValid(isValid());
 }
 
 
@@ -93,8 +95,9 @@ void GuiTabularCreate::clearParams()
 
 void GuiTabularCreate::dispatchParams()
 {
-       string const data = convert<string>(params().first) + ' ' + convert<string>(params().second);
-       dispatch(FuncRequest(getLfun(), data));
+       string const sdata = 
+               convert<string>(params().first) + ' ' + convert<string>(params().second);
+       dispatch(FuncRequest(getLfun(), sdata));
 }