]> git.lyx.org Git - features.git/blob - src/frontends/kde/citationdlg.h
Update to MVC. Ref,Toc and citation don't work at all currently.
[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
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_->OKButton();
72         }
73
74         void close_adaptor(void) {
75                 form_->CancelButton();
76         }
77
78         void add_adaptor(void) {
79                 form_->bc().valid(form_->add());
80         }
81
82         void up_adaptor(void) {
83                 form_->bc().valid(form_->up());
84         }
85
86         void down_adaptor(void) {
87                 form_->bc().valid(form_->down());
88         }
89
90         void remove_adaptor(void) {
91                 form_->bc().valid(form_->remove());
92         }
93
94         void select_key_adaptor(const char * key) {
95                 form_->bc().valid(form_->select_key(key));
96         }
97
98         void highlight_key_adaptor(const char * key) {
99                 form_->highlight_key(key);
100         }
101
102         void highlight_chosen_adaptor(const char * key) {
103                 form_->highlight_chosen(key);
104         }
105 };
106
107 #endif // CITATIONDLG_H