]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QGraphicsDialog.C
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / QGraphicsDialog.C
index a391702110b239e1fabbff96e5df5059cca34542..99fee73aad16b608f62b32cfac915fe745b65da9 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "ControlGraphics.h"
 #include "debug.h"
-#include "gettext.h"
+#include "qt_helpers.h"
 #include "LString.h"
 
 #include <qwidget.h>
@@ -27,6 +24,8 @@
 #include <qfiledialog.h>
 #include <qcombobox.h>
 
+#include "lengthcombo.h"
+
 #include "QGraphicsDialog.h"
 #include "QGraphics.h"
 
@@ -64,6 +63,8 @@ void QGraphicsDialog::change_adaptor()
 void QGraphicsDialog::change_bb()
 {
        form_->controller().bbChanged = true;
+       lyxerr[Debug::GRAPHICS]
+               << "[controller().bb_Changed set to true]\n";
        form_->changed();
 }
 
@@ -73,6 +74,7 @@ void QGraphicsDialog::change_WUnit()
        bool useHeight = (widthUnit->currentItem() > 0);
        height->setEnabled(useHeight);
        heightUnit->setEnabled(useHeight);
+       form_->changed();
 }
 
 
@@ -85,14 +87,10 @@ void QGraphicsDialog::closeEvent(QCloseEvent * e)
 
 void QGraphicsDialog::browse_clicked()
 {
-       QString file = QFileDialog::getOpenFileName(
-               QString::null, _("Files (*)"),
-               this, 0, _("Select a graphic file"));
-       if (!file.isNull()) {
-               string const name = file.latin1();
-               filename->setText(name.c_str());
-               form_->changed();
-       }
+       string const str = 
+               form_->controller().Browse(fromqstr(filename->text()));
+       filename->setText(toqstr(str));
+       form_->changed();
 }