]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/refdlg.h
Move LaTeX and VC logs to GUI-I on xforms
[lyx.git] / src / frontends / kde / refdlg.h
1 /*
2  * refdlg.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 REFDLG_H
17 #define REFDLG_H
18
19 #include <config.h>
20 #include <gettext.h>
21
22 #include "FormRef.h"
23
24 #include <qlayout.h>
25 #include <qcombobox.h> 
26 #include <qcheckbox.h>
27 #include <qlistbox.h>
28 #include <qlabel.h>
29 #include <qtooltip.h>
30 #include <qlineedit.h>
31 #include <qpushbutton.h>
32
33 class RefDialog : public QWidget {
34    Q_OBJECT
35 public:
36         RefDialog(FormRef *form, QWidget *parent=0, const char *name=0,
37                             bool modal=false, WFlags f=0);
38         ~RefDialog();
39
40         // widgets
41  
42         QListBox *refs;
43         QLabel *labelrefs;
44         QLineEdit *refname;
45         QLineEdit *reference;
46         QLabel *labelrefname;
47         QLabel *labelreference;
48         QCheckBox *sort;
49         QComboBox *type; 
50         QLabel *labeltype; 
51         QPushButton *buttonGoto;
52         QPushButton *buttonUpdate;
53         QPushButton *buttonOk;
54         QPushButton *buttonCancel;
55  
56 protected:
57         void closeEvent(QCloseEvent *e);
58  
59 private:
60         FormRef *form_;
61
62         // layouts
63  
64         QHBoxLayout *topLayout;
65         QVBoxLayout *layout;
66         QHBoxLayout *upperLayout;
67         QVBoxLayout *browserLayout;
68         QVBoxLayout *rightLayout;
69         QHBoxLayout *nameLayout;
70         QHBoxLayout *referenceLayout; 
71         QHBoxLayout *buttonLayout;
72
73 private slots:
74         /// adaptor to FormRef::select
75         void select_adaptor(const char *sel) {
76                 form_->select(sel);
77         }
78
79         /// adaptor to FormRef::highlight
80         void highlight_adaptor(const char *sel) {
81                 form_->highlight(sel); 
82         }
83
84         /// adaptor to FormRef::set_sort
85         void sort_adaptor(bool sort) {
86                 form_->set_sort(sort);
87         } 
88
89         /// adaptor to FormRef::gotoRef
90         void goto_adaptor(void) {
91                 form_->goto_ref();
92         }
93  
94         /// adaptor to FormRef::update
95         void update_adaptor(void) {
96                 form_->do_ref_update();
97         }
98  
99         /// adaptor to FormRef::apply
100         void apply_adaptor(void) {
101                 form_->apply();
102                 form_->close();
103                 hide();
104         }
105
106         /// adaptor to FormRef::close
107         void close_adaptor(void) {
108                 form_->close();
109                 hide();
110         }
111 };
112
113 #endif