]> git.lyx.org Git - features.git/blob - src/frontends/kde/citationdlg.h
8c4cf2a3a6b77aeb7f70f2e6adf10684ecc70c7e
[features.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 #include "kdeBC.h"
18
19 #include <qdialog.h> 
20 #include <qlistbox.h>
21 #include <qlayout.h>
22 #include <qlabel.h>
23 #include <qtooltip.h>
24 #include <qlineedit.h>
25 #include <qmultilinedit.h>
26 #include <qpushbutton.h>
27
28 class CitationDialog : public QDialog {
29    Q_OBJECT
30 public:
31         CitationDialog(FormCitation *form, QWidget *parent=0, char const * name=0,
32                             bool modal=false, WFlags f=0);
33         ~CitationDialog();
34
35         // widgets
36
37         QLabel * labelchosen;
38         QListBox * chosen;
39         QLabel * labelkeys;
40         QListBox * keys;
41         QLabel * labelentry;
42         QMultiLineEdit * entry;
43         QLabel * labelafter;
44         QLineEdit * after;
45         QPushButton * add;
46         QPushButton * up;
47         QPushButton * down;
48         QPushButton * remove;
49         QPushButton * buttonOk;
50         QPushButton * buttonCancel;
51
52 protected:
53         void closeEvent(QCloseEvent * e);
54
55 private:
56         FormCitation * form_;
57
58         // layouts
59
60         QHBoxLayout * topLayout;
61         QVBoxLayout * layout;
62         QHBoxLayout * browserLayout;
63         QVBoxLayout * chosenLayout;
64         QVBoxLayout * iconLayout;
65         QVBoxLayout * keysLayout;
66         QVBoxLayout * entryLayout;
67         QHBoxLayout * afterLayout;
68         QHBoxLayout * buttonLayout;
69
70 private slots:
71         void apply_adaptor(void) {
72                 form_->OKButton();
73         }
74
75         void close_adaptor(void) {
76                 form_->CancelButton();
77         }
78
79         void add_adaptor(void) {
80                 form_->bc().valid(form_->add());
81         }
82
83         void up_adaptor(void) {
84                 form_->bc().valid(form_->up());
85         }
86
87         void down_adaptor(void) {
88                 form_->bc().valid(form_->down());
89         }
90
91         void remove_adaptor(void) {
92                 form_->bc().valid(form_->remove());
93         }
94
95         void select_key_adaptor(const char * key) {
96                 form_->bc().valid(form_->select_key(key));
97         }
98
99         void highlight_key_adaptor(const char * key) {
100                 form_->highlight_key(key);
101         }
102
103         void highlight_chosen_adaptor(const char * key) {
104                 form_->highlight_chosen(key);
105         }
106 };
107
108 #endif // CITATIONDLG_H