]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiMathMatrix.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiMathMatrix.cpp
index 457b749f5b397df81b3c210ea2cd40924def9874..3a9768b0943bd4491baa21a3b27b9fa63971deb8 100644 (file)
@@ -74,9 +74,6 @@ GuiMathMatrix::GuiMathMatrix(GuiView & lv)
        valignCO->setCurrentIndex(1);
        decorationCO->setCurrentIndex(0);
 
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
-
        connect(table, SIGNAL(rowsChanged(int)),
                rowsSB, SLOT(setValue(int)));
        connect(table, SIGNAL(colsChanged(int)),
@@ -124,6 +121,21 @@ void GuiMathMatrix::change_adaptor()
 }
 
 
+void GuiMathMatrix::on_buttonBox_clicked(QAbstractButton * button)
+{
+       switch (buttonBox->standardButton(button)) {
+       case QDialogButtonBox::Ok:
+               slotOK();
+               break;
+       case QDialogButtonBox::Cancel:
+               slotClose();
+               break;
+       default:
+               break;
+       }
+}
+
+
 void GuiMathMatrix::slotOK()
 {
        int const nx = columnsSB->value();
@@ -131,7 +143,7 @@ void GuiMathMatrix::slotOK()
        // a matrix without a decoration is an array,
        // otherwise it is an AMS matrix
        // decorated matrices cannot have a vertical alignment
-       
+
        char const c = v_align_c[valignCO->currentIndex()];
        QString const sh = halignED->text();
        string const str = fromqstr(