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 #include "ControlGraphics.h"
17 #include "qt_helpers.h"
21 #include <qpushbutton.h>
22 #include <qlineedit.h>
23 #include <qcheckbox.h>
24 #include <qfiledialog.h>
25 #include <qcombobox.h>
27 #include "lengthcombo.h"
29 #include "QGraphicsDialog.h"
30 #include "QGraphics.h"
35 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
36 : QGraphicsDialogBase(0, 0, false, 0),
39 connect(okPB, SIGNAL(clicked()),
40 form, SLOT(slotOK()));
41 connect(applyPB, SIGNAL(clicked()),
42 form, SLOT(slotApply()));
43 connect(closePB, SIGNAL(clicked()),
44 form, SLOT(slotClose()));
45 connect(restorePB, SIGNAL(clicked()),
46 form, SLOT(slotRestore()));
50 void QGraphicsDialog::show()
52 QGraphicsDialogBase::show();
57 void QGraphicsDialog::change_adaptor()
63 void QGraphicsDialog::change_bb()
65 form_->controller().bbChanged = true;
66 lyxerr[Debug::GRAPHICS]
67 << "[controller().bb_Changed set to true]\n";
72 void QGraphicsDialog::change_WUnit()
74 bool useHeight = (widthUnit->currentItem() > 0);
75 height->setEnabled(useHeight);
76 heightUnit->setEnabled(useHeight);
81 void QGraphicsDialog::closeEvent(QCloseEvent * e)
88 void QGraphicsDialog::browse_clicked()
90 QString file = QFileDialog::getOpenFileName(
91 QString::null, qt_("Files (*)"),
92 this, 0, qt_("Select graphics file"));
94 filename->setText(file);
100 void QGraphicsDialog::getBB_clicked()