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"
24 #include <qpushbutton.h>
25 #include <qlineedit.h>
26 #include <qcheckbox.h>
27 #include <qfiledialog.h>
28 #include <qcombobox.h>
30 #include "QGraphicsDialog.h"
31 #include "QGraphics.h"
36 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
37 : QGraphicsDialogBase(0, 0, false, 0),
40 connect(okPB, SIGNAL(clicked()),
41 form, SLOT(slotOK()));
42 connect(applyPB, SIGNAL(clicked()),
43 form, SLOT(slotApply()));
44 connect(closePB, SIGNAL(clicked()),
45 form, SLOT(slotClose()));
46 connect(restorePB, SIGNAL(clicked()),
47 form, SLOT(slotRestore()));
51 void QGraphicsDialog::show()
53 QGraphicsDialogBase::show();
58 void QGraphicsDialog::change_adaptor()
64 void QGraphicsDialog::change_bb()
66 form_->controller().bbChanged = true;
71 void QGraphicsDialog::change_WUnit()
73 bool useHeight = (widthUnit->currentItem() > 0);
74 height->setEnabled(useHeight);
75 heightUnit->setEnabled(useHeight);
79 void QGraphicsDialog::closeEvent(QCloseEvent * e)
86 void QGraphicsDialog::browse_clicked()
88 QString file = QFileDialog::getOpenFileName(
89 QString::null, _("Files (*)"),
90 this, 0, _("Select a graphic file"));
92 string const name = file.latin1();
93 filename->setText(name.c_str());
99 void QGraphicsDialog::getBB_clicked()