]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiGraphics.cpp
More QDialogButtonBox transformation
[lyx.git] / src / frontends / qt4 / GuiGraphics.cpp
index d2467cdd93441f59d2de75c2e9d5d3d42ab5f123..b6bbaeac3fb13860c7a7049a4b0b01ec7c378af7 100644 (file)
@@ -115,10 +115,8 @@ GuiGraphics::GuiGraphics(GuiView & lv)
        setupUi(this);
 
        //main buttons
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
-       connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+                       this, SLOT(slotButtonBox(QAbstractButton *)));
 
        //graphics pane
        connect(filename, SIGNAL(textChanged(const QString &)),
@@ -212,10 +210,10 @@ GuiGraphics::GuiGraphics(GuiView & lv)
        displayscale->setValidator(new QIntValidator(displayscale));
 
        bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
-       bc().setOK(okPB);
-       bc().setApply(applyPB);
-       bc().setRestore(restorePB);
-       bc().setCancel(closePB);
+       bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+       bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
+       bc().setRestore(buttonBox->button(QDialogButtonBox::Reset));
 
        bc().addReadOnly(latexoptions);
        bc().addReadOnly(filenameL);
@@ -789,8 +787,8 @@ QString GuiGraphics::browse(QString const & in_name) const
 
        return browseRelToParent(in_name, bufferFilePath(),
                title, fileFilters(QString()), false,
-               qt_("Clipart|#C#c"), toqstr(clipdir),
-               qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+               qt_("&Clipart"), toqstr(clipdir),
+               qt_("D&ocuments"), toqstr(lyxrc.document_path));
 }