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