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 #pragma implementation
18 #include "ControlExternal.h"
21 #include <qpushbutton.h>
22 #include <qfiledialog.h>
23 #include <qcombobox.h>
24 #include <qtextview.h>
25 #include <qlineedit.h>
27 #include "QExternalDialog.h"
28 #include "QExternal.h"
30 QExternalDialog::QExternalDialog(QExternal * form)
31 : QExternalDialogBase(0, 0, false, 0),
34 connect(okPB, SIGNAL(clicked()),
35 form, SLOT(slotOK()));
36 connect(closePB, SIGNAL(clicked()),
37 form, SLOT(slotClose()));
41 void QExternalDialog::show()
43 QExternalDialogBase::show();
48 void QExternalDialog::change_adaptor()
54 void QExternalDialog::closeEvent(QCloseEvent * e)
61 void QExternalDialog::editClicked()
64 form_->controller().editExternal();
68 void QExternalDialog::viewClicked()
71 form_->controller().viewExternal();
75 void QExternalDialog::updateClicked()
78 form_->controller().updateExternal();
82 void QExternalDialog::browseClicked()
84 QString file = QFileDialog::getOpenFileName(QString::null,
85 _("External material (*)"), this, 0, _("Select external material"));
87 fileED->setText(file.latin1());
93 void QExternalDialog::templateChanged()
95 externalTV->setText(form_->helpText().c_str());
97 updatePB->setEnabled(!form_->controller().params().templ.automaticProduction);