]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/formindexdialog.h
add a setDefaults to GUIRuntime + some const changes in tabular + some c_str to work...
[lyx.git] / src / frontends / kde / formindexdialog.h
1 /*
2  * formindexdialog.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 FORMINDEXDIALOG_H
17 #define FORMINDEXDIALOG_H
18
19 #include <config.h>
20 #include <gettext.h>
21
22 // to connect apply() and hide()
23 #include "FormIndex.h"
24
25 #include <qdialog.h>
26 #include <qlayout.h>
27 #include <qlabel.h>
28 #include <qtooltip.h>
29 #include <qlineedit.h>
30 #include <qpushbutton.h>
31
32 class FormIndexDialog : public QDialog  {
33    Q_OBJECT
34 public:
35         FormIndexDialog(FormIndex *form, QWidget *parent=0, const char *name=0,
36                             bool modal=false, WFlags f=0);
37         ~FormIndexDialog();
38
39         // widgets
40  
41         QLabel *labelindex;
42         QLineEdit *index;
43         QPushButton *buttonOk;
44         QPushButton *buttonCancel;
45  
46
47 protected:
48         void closeEvent(QCloseEvent *e);
49  
50 private:
51         FormIndex *form_;
52
53         // layouts
54  
55         QHBoxLayout *topLayout;
56         QVBoxLayout *layout;
57         QHBoxLayout *indexLayout;
58         QHBoxLayout *buttonLayout;
59
60 private slots:
61         /// adaptor to FormIndex::apply
62         void apply_adaptor(void) {
63                 form_->apply();
64                 form_->close();
65                 hide();
66         }
67
68         /// adaptor to FormIndex::close
69         void close_adaptor(void) {
70                 form_->close();
71                 hide();
72         }
73 };
74
75 #endif