]> git.lyx.org Git - lyx.git/blob - src/frontends/kde/citationdlg.h
small cleanup, doxygen, formatting changes
[lyx.git] / src / frontends / kde / citationdlg.h
1 /**
2  * \file citationdlg.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #ifndef CITATIONDLG_H
10 #define CITATIONDLG_H
11
12 #include <config.h>
13 #include <gettext.h>
14
15 // to connect apply() and hide()
16 #include "FormCitation.h"
17
18 #include <qdialog.h> 
19 #include <qlistbox.h>
20 #include <qlayout.h>
21 #include <qlabel.h>
22 #include <qtooltip.h>
23 #include <qlineedit.h>
24 #include <qmultilinedit.h>
25 #include <qpushbutton.h>
26
27 class CitationDialog : public QDialog {
28    Q_OBJECT
29 public:
30         CitationDialog(FormCitation *form, QWidget *parent=0, char const * name=0,
31                             bool modal=false, WFlags f=0);
32         ~CitationDialog();
33
34         // widgets
35
36         QLabel * labelchosen;
37         QListBox * chosen;
38         QLabel * labelkeys;
39         QListBox * keys;
40         QLabel * labelentry;
41         QMultiLineEdit * entry;
42         QLabel * labelafter;
43         QLineEdit * after;
44         QPushButton * add;
45         QPushButton * up;
46         QPushButton * down;
47         QPushButton * remove;
48         QPushButton * buttonOk;
49         QPushButton * buttonCancel;
50
51 protected:
52         void closeEvent(QCloseEvent * e);
53
54 private:
55         FormCitation * form_;
56
57         // layouts
58
59         QHBoxLayout * topLayout;
60         QVBoxLayout * layout;
61         QHBoxLayout * browserLayout;
62         QVBoxLayout * chosenLayout;
63         QVBoxLayout * iconLayout;
64         QVBoxLayout * keysLayout;
65         QVBoxLayout * entryLayout;
66         QHBoxLayout * afterLayout;
67         QHBoxLayout * buttonLayout;
68
69 private slots:
70         void apply_adaptor(void) {
71                 form_->apply();
72                 form_->close();
73                 hide();
74         }
75
76         void close_adaptor(void) {
77                 form_->close();
78                 hide();
79         }
80
81         void add_adaptor(void) {
82                 form_->add();
83         }
84
85         void up_adaptor(void) {
86                 form_->up();
87         }
88
89         void down_adaptor(void) {
90                 form_->down();
91         }
92
93         void remove_adaptor(void) {
94                 form_->remove();
95         }
96
97         void select_key_adaptor(const char * key) {
98                 form_->select_key(key);
99         }
100
101         void highlight_key_adaptor(const char * key) {
102                 form_->highlight_key(key);
103         }
104
105         void highlight_chosen_adaptor(const char * key) {
106                 form_->highlight_chosen(key);
107         }
108 };
109
110 #endif // CITATIONDLG_H