]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/urldlg.h
FormDocument and various fixes.
[lyx.git] / src / frontends / kde / urldlg.h
1 /*
2  * urldlg.h
3  * (C) 2000 LyX Team
4  * John Levon, moz@compsoc.man.ac.uk
5  */
6
7 /***************************************************************************
8  *                                                                         *
9  *   This program is free software; you can redistribute it and/or modify  *
10  *   it under the terms of the GNU General Public License as published by  *
11  *   the Free Software Foundation; either version 2 of the License, or     *
12  *   (at your option) any later version.                                   *
13  *                                                                         *
14  ***************************************************************************/
15
16 #ifndef URLDLG_H
17 #define URLDLG_H
18
19 #include <config.h>
20 #include <gettext.h>
21
22 // to connect apply() and hide()
23 #include "FormUrl.h"
24
25 #include <qlayout.h>
26 #include <qlabel.h>
27 #include <qtooltip.h>
28 #include <qcheckbox.h>
29 #include <qlineedit.h>
30 #include <qpushbutton.h>
31
32 class UrlDialog : public QWidget {
33    Q_OBJECT
34 public:
35         UrlDialog(FormUrl *form, QWidget *parent=0, const char *name=0,
36                             bool modal=false, WFlags f=0);
37         ~UrlDialog();
38
39         // widgets
40  
41         QLabel *labelurl;
42         QLabel *labelurlname;
43         QLineEdit *url;
44         QLineEdit *urlname;
45         QCheckBox *htmlurl;
46         QPushButton *buttonOk;
47         QPushButton *buttonCancel;
48
49 protected:
50         void closeEvent(QCloseEvent *e);
51  
52 private:
53         FormUrl *form_;
54
55         // layouts
56  
57         QHBoxLayout *topLayout;
58         QVBoxLayout *layout;
59         QHBoxLayout *urlLayout;
60         QBoxLayout *urlnameLayout;
61         QBoxLayout *htmlurlLayout;
62         QHBoxLayout *buttonLayout;
63
64 private slots:
65         /// adaptor to FormUrl::apply
66         void apply_adaptor(void) {
67                 form_->apply();
68                 form_->close();
69                 hide();
70         }
71
72         /// adaptor to FormUrl::close
73         void close_adaptor(void) {
74                 form_->close();
75                 hide();
76         }
77 };
78
79 #endif