]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiCharacter.cpp
Start using QDialogButtonGroup rather than manual OK etc. buttons
[features.git] / src / frontends / qt4 / GuiCharacter.cpp
index e506b98dbbc7f723149e582d3cf06626d00d267f..8b7f3e83d37ce5e3e5e455a61421066e2c318927 100644 (file)
@@ -211,9 +211,8 @@ GuiCharacter::GuiCharacter(GuiView & lv)
 {
        setupUi(this);
 
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+               this, SLOT(slotButtonBox(QAbstractButton *)));
        connect(autoapplyCB, SIGNAL(stateChanged(int)), this,
                SLOT(slotAutoApply()));
 
@@ -249,9 +248,9 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        fillCombo(langCO, language);
 
        bc().setPolicy(ButtonPolicy::OkApplyCancelAutoReadOnlyPolicy);
-       bc().setOK(okPB);
-       bc().setApply(applyPB);
-       bc().setCancel(closePB);
+       bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+       bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
        bc().setAutoApply(autoapplyCB);
        bc().addReadOnly(familyCO);
        bc().addReadOnly(seriesCO);