]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QURLDialog.cpp
* src/frontends/qt4/ui/TextLayoutUi.ui:
[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()),
29                 form_, SLOT(slotOK()));
30         connect(closePB, SIGNAL(clicked()),
31                 form_, SLOT(slotClose()));
32
33     connect( urlED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed_adaptor() ) );
34     connect( hyperlinkCB, SIGNAL( clicked() ), this, SLOT( changed_adaptor() ) );
35     connect( nameED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed_adaptor() ) );
36
37         setFocusProxy(urlED);
38 }
39
40
41 QURLDialog::~QURLDialog()
42 {
43 }
44
45
46 void QURLDialog::show()
47 {
48         QDialog::show();
49 }
50
51
52 void QURLDialog::changed_adaptor()
53 {
54         form_->changed();
55 }
56
57
58 void QURLDialog::closeEvent(QCloseEvent * e)
59 {
60         form_->slotWMHide();
61         e->accept();
62 }
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #include "QURLDialog_moc.cpp"