]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiGraphics.cpp
header cleanup
[lyx.git] / src / frontends / qt4 / GuiGraphics.cpp
index 789d38db2f8321f26113d280a4d123745cefc4f0..b48c2fd06f0c2231cc1d088a744e711538d37165 100644 (file)
@@ -43,7 +43,6 @@
 #include <boost/bind.hpp>
 
 #include <QCheckBox>
-#include <QCloseEvent>
 #include <QLabel>
 #include <QLineEdit>
 #include <QPushButton>
@@ -113,11 +112,10 @@ vector<RotationOriginPair> getRotationOriginData();
 
 
 GuiGraphics::GuiGraphics(GuiView & lv)
-       : GuiDialog(lv, "graphics")
+       : GuiDialog(lv, "graphics", qt_("Graphics"))
 {
        setupUi(this);
-       setViewTitle(_("Graphics"));
-
+       
        //main buttons
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
@@ -127,6 +125,8 @@ GuiGraphics::GuiGraphics(GuiView & lv)
        //graphics pane
        connect(filename, SIGNAL(textChanged(const QString &)),
                this, SLOT(change_adaptor()));
+       connect(embedCB, SIGNAL(toggled(bool)),
+               this, SLOT(change_adaptor()));
        connect(WidthCB, SIGNAL( clicked()),
                this, SLOT(change_adaptor()));
        connect(HeightCB, SIGNAL( clicked()),
@@ -267,13 +267,6 @@ void GuiGraphics::change_bb()
 }
 
 
-void GuiGraphics::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       GuiDialog::closeEvent(e);
-}
-
-
 void GuiGraphics::on_browsePB_clicked()
 {
        docstring const str = browse(qstring_to_ucs4(filename->text()));
@@ -300,16 +293,6 @@ void GuiGraphics::on_filename_textChanged(const QString & filename)
 {
        editPB->setDisabled(filename.isEmpty());
        EmbeddedFile file = EmbeddedFile(fromqstr(filename), bufferFilepath());
-       if (!file.embeddable()) {
-               embedCB->setCheckState(Qt::Unchecked);
-               embedCB->setDisabled(true);
-       }
-}
-
-
-void GuiGraphics::on_embedCB_toggled(bool)
-{
-       changed();
 }
 
 
@@ -459,7 +442,6 @@ void GuiGraphics::updateContents()
        string const name =
                igp.filename.outputFilename(bufferFilepath());
        filename->setText(toqstr(name));
-       embedCB->setEnabled(igp.filename.embeddable());
        embedCB->setCheckState(igp.filename.embedded() ? Qt::Checked : Qt::Unchecked);
 
        // set the bounding box values