2 * \file QExternalDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
14 #include "qt_helpers.h"
15 #include "ControlExternal.h"
18 #include <qpushbutton.h>
19 #include <qfiledialog.h>
20 #include <qcombobox.h>
21 #include <qtextview.h>
22 #include <qlineedit.h>
23 #include <qvalidator.h>
25 #include "QExternalDialog.h"
26 #include "QExternal.h"
29 QExternalDialog::QExternalDialog(QExternal * form)
30 : QExternalDialogBase(0, 0, false, 0),
33 connect(okPB, SIGNAL(clicked()),
34 form, SLOT(slotOK()));
35 connect(applyPB, SIGNAL(clicked()),
36 form, SLOT(slotApply()));
37 connect(closePB, SIGNAL(clicked()),
38 form, SLOT(slotClose()));
40 QIntValidator * validator = new QIntValidator(displayscale);
41 validator->setBottom(1);
42 displayscale->setValidator(validator);
46 void QExternalDialog::show()
48 QExternalDialogBase::show();
53 void QExternalDialog::change_adaptor()
59 void QExternalDialog::closeEvent(QCloseEvent * e)
66 void QExternalDialog::editClicked()
69 form_->controller().editExternal();
73 void QExternalDialog::browseClicked()
76 QFileDialog::getOpenFileName(QString::null,
77 qt_("External material (*)"),
79 qt_("Select external material"));
81 fileED->setText(file);
87 void QExternalDialog::templateChanged()
89 externalTV->setText(toqstr(form_->helpText()));