2 * \file QExternalDialog.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
12 #include "ControlExternal.h"
15 #include <qpushbutton.h>
16 #include <qfiledialog.h>
17 #include <qcombobox.h>
18 #include <qtextview.h>
19 #include <qlineedit.h>
21 #include "QExternalDialog.h"
22 #include "QExternal.h"
24 QExternalDialog::QExternalDialog(QExternal * form)
25 : QExternalDialogBase(0, 0, false, 0),
28 connect(okPB, SIGNAL(clicked()),
29 form, SLOT(slotOK()));
30 connect(closePB, SIGNAL(clicked()),
31 form, SLOT(slotClose()));
35 void QExternalDialog::show()
37 QExternalDialogBase::show();
42 void QExternalDialog::change_adaptor()
48 void QExternalDialog::closeEvent(QCloseEvent * e)
55 void QExternalDialog::editClicked()
58 form_->controller().editExternal();
62 void QExternalDialog::viewClicked()
65 form_->controller().viewExternal();
69 void QExternalDialog::updateClicked()
72 form_->controller().updateExternal();
76 void QExternalDialog::browseClicked()
78 QString file = QFileDialog::getOpenFileName(QString::null,
79 _("External material (*)"), this, 0, _("Select external material"));
81 fileED->setText(file.latin1());
87 void QExternalDialog::templateChanged()
89 externalTV->setText(form_->helpText().c_str());
91 updatePB->setEnabled(!form_->controller().params().templ.automaticProduction);