2 * \file QGraphicsDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
15 #pragma implementation
18 #include "ControlGraphics.h"
20 #include "qt_helpers.h"
24 #include <qpushbutton.h>
25 #include <qlineedit.h>
26 #include <qcheckbox.h>
27 #include <qfiledialog.h>
28 #include <qcombobox.h>
30 #include "lengthcombo.h"
32 #include "QGraphicsDialog.h"
33 #include "QGraphics.h"
38 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
39 : QGraphicsDialogBase(0, 0, false, 0),
42 connect(okPB, SIGNAL(clicked()),
43 form, SLOT(slotOK()));
44 connect(applyPB, SIGNAL(clicked()),
45 form, SLOT(slotApply()));
46 connect(closePB, SIGNAL(clicked()),
47 form, SLOT(slotClose()));
48 connect(restorePB, SIGNAL(clicked()),
49 form, SLOT(slotRestore()));
53 void QGraphicsDialog::show()
55 QGraphicsDialogBase::show();
60 void QGraphicsDialog::change_adaptor()
66 void QGraphicsDialog::change_bb()
68 form_->controller().bbChanged = true;
69 lyxerr[Debug::GRAPHICS]
70 << "[controller().bb_Changed set to true]\n";
75 void QGraphicsDialog::change_WUnit()
77 bool useHeight = (widthUnit->currentItem() > 0);
78 height->setEnabled(useHeight);
79 heightUnit->setEnabled(useHeight);
84 void QGraphicsDialog::closeEvent(QCloseEvent * e)
91 void QGraphicsDialog::browse_clicked()
93 QString file = QFileDialog::getOpenFileName(
94 QString::null, qt_("Files (*)"),
95 this, 0, qt_("Select a graphic file"));
97 filename->setText(file);
103 void QGraphicsDialog::getBB_clicked()