]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QURLDialog.cpp
Transfer Text::drawSelection() from InsetText::drawSelection() to InsetText::draw...
[lyx.git] / src / frontends / qt4 / QURLDialog.cpp
1 /**
2  * \file QURLDialog.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QURLDialog.h"
14 #include "UrlView.h"
15
16 #include <QLineEdit>
17 #include <QPushButton>
18 #include <QCloseEvent>
19
20 namespace lyx {
21 namespace frontend {
22
23 QURLDialog::QURLDialog(UrlView * form)
24         : form_(form)
25 {
26         setupUi(this);
27
28         connect(okPB, SIGNAL(clicked()), form_, SLOT(slotOK()));
29         connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose()));
30         connect(urlED, SIGNAL(textChanged(const QString &)),
31                 this, SLOT(changed_adaptor()));
32         connect(hyperlinkCB, SIGNAL(clicked()),
33                 this, SLOT(changed_adaptor()));
34         connect(nameED, SIGNAL(textChanged(const QString &)),
35                 this, SLOT(changed_adaptor()));
36
37         setFocusProxy(urlED);
38 }
39
40
41 void QURLDialog::changed_adaptor()
42 {
43         form_->changed();
44 }
45
46
47 void QURLDialog::closeEvent(QCloseEvent * e)
48 {
49         form_->slotWMHide();
50         e->accept();
51 }
52
53 } // namespace frontend
54 } // namespace lyx
55
56 #include "QURLDialog_moc.cpp"