]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/formurldialog.h
Applied John's KDE patch
[lyx.git] / src / frontends / kde / formurldialog.h
1 /*
2  * formurldialog.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 FORMURLDIALOG_H
17 #define FORMURLDIALOG_H
18
19 #include <config.h>
20 #include <gettext.h>
21
22 // to connect apply() and hide()
23 #include "FormUrl.h"
24
25 #include <qdialog.h>
26 #include <qlayout.h>
27 #include <qlabel.h>
28 #include <qtooltip.h>
29 #include <qcheckbox.h>
30 #include <qlineedit.h>
31 #include <qpushbutton.h>
32
33 class FormUrlDialog : public QDialog  {
34    Q_OBJECT
35 public:
36         FormUrlDialog(FormUrl *form, QWidget *parent=0, const char *name=0,
37                             bool modal=false, WFlags f=0);
38         ~FormUrlDialog();
39
40         // widgets
41  
42         QLabel *labelurl;
43         QLabel *labelurlname;
44         QLineEdit *url;
45         QLineEdit *urlname;
46         QCheckBox *htmlurl;
47         QPushButton *buttonOk;
48         QPushButton *buttonCancel;
49
50 protected:
51         void closeEvent(QCloseEvent *e);
52  
53 private:
54         FormUrl *form_;
55
56         // layouts
57  
58         QHBoxLayout *topLayout;
59         QVBoxLayout *layout;
60         QHBoxLayout *urlLayout;
61         QBoxLayout *urlnameLayout;
62         QBoxLayout *htmlurlLayout;
63         QHBoxLayout *buttonLayout;
64
65 private slots:
66         /// adaptor to FormUrl::apply
67         void apply_adaptor(void) {
68                 form_->apply();
69                 form_->close();
70                 hide();
71         }
72
73         /// adaptor to FormUrl::close
74         void close_adaptor(void) {
75                 form_->close();
76                 hide();
77         }
78 };
79
80 #endif