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