]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/refdlg.h
implement getLabelList
[lyx.git] / src / frontends / kde / refdlg.h
1 /**
2  * \file refdlg.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #ifndef REFDLG_H
10 #define REFDLG_H
11
12 #include <config.h>
13 #include <gettext.h>
14
15 #include "FormRef.h"
16
17 #include <qdialog.h>
18 #include <qlayout.h>
19 #include <qcombobox.h> 
20 #include <qcheckbox.h>
21 #include <qlistbox.h>
22 #include <qlabel.h>
23 #include <qtooltip.h>
24 #include <qlineedit.h>
25 #include <qpushbutton.h>
26
27 class RefDialog : public QDialog {
28         Q_OBJECT
29 public:
30         RefDialog(FormRef * form, QWidget * parent=0, char const * name=0,
31                             bool modal=false, WFlags f=0);
32         ~RefDialog();
33
34         // widgets
35  
36         QListBox * refs;
37         QLabel * labelrefs;
38         QLineEdit * refname;
39         QLineEdit * reference;
40         QLabel * labelrefname;
41         QLabel * labelreference;
42         QCheckBox * sort;
43         QComboBox * type; 
44         QLabel * labeltype; 
45         QPushButton * buttonGoto;
46         QPushButton * buttonUpdate;
47         QPushButton * buttonOk;
48         QPushButton * buttonCancel;
49  
50 protected:
51         void closeEvent(QCloseEvent * e);
52  
53 private:
54         FormRef * form_;
55
56         // layouts
57  
58         QHBoxLayout * topLayout;
59         QVBoxLayout * layout;
60         QHBoxLayout * upperLayout;
61         QVBoxLayout * browserLayout;
62         QVBoxLayout * rightLayout;
63         QHBoxLayout * nameLayout;
64         QHBoxLayout * referenceLayout; 
65         QHBoxLayout * buttonLayout;
66
67 private slots:
68         /// adaptor to FormRef::select
69         void select_adaptor(const char * sel) {
70                 form_->select(sel);
71         }
72
73         /// adaptor to FormRef::highlight
74         void highlight_adaptor(const char * sel) {
75                 form_->highlight(sel); 
76         }
77
78         /// adaptor to FormRef::set_sort
79         void sort_adaptor(bool sort) {
80                 form_->set_sort(sort);
81         } 
82
83         /// adaptor to FormRef::gotoRef
84         void goto_adaptor(void) {
85                 form_->goto_ref();
86         }
87  
88         /// adaptor to FormRef::update
89         void update_adaptor(void) {
90                 form_->do_ref_update();
91         }
92  
93         /// adaptor to FormRef::apply
94         void apply_adaptor(void) {
95                 form_->ApplyButton(); 
96         }
97
98         /// adaptor to FormRef::close
99         void close_adaptor(void) {
100                 form_->CancelButton();
101         }
102 };
103
104 #endif // REFDLG_H