]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormDocument.h
Another quick fix to get qt2 frontend to compile
[lyx.git] / src / frontends / qt2 / FormDocument.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright (C) 2000 The LyX Team.
8  *
9  *           @author Jürgen Vigna, Kalle Dalheimer
10  *
11  *======================================================*/
12
13 #ifndef FORM_DOCUMENT_H
14 #define FORM_DOCUMENT_H
15
16 #ifdef HAVE_CONFIG_H
17 #include <config.h>
18 #endif
19 #include "FormBase.h"
20 #include <vector>
21
22 #ifdef __GNUG_
23 #pragma interface
24 #endif
25
26 class LyXView;
27 class Dialogs;
28 class Combox;
29 class BufferParams;
30
31 class QWidget;
32 class FormDocumentDialog;
33
34 #ifdef SIGC_CXX_NAMESPACES
35 using SigC::Connection;
36 #endif
37
38 class QComboBox;
39
40 #include <qpixmap.h>
41
42 /** This class provides an Qt2 implementation of the FormDocument Popup.
43     The table-layout-form here changes values for latex-tabulars
44  */
45 class FormDocument : public DialogBase {
46 public:
47     /// #FormDocument x(Communicator ..., Popups ...);#
48     FormDocument(LyXView *, Dialogs *);
49     ///
50     ~FormDocument();
51     ///
52     enum EnumPopupStatus {
53         ///
54         POPUP_UNMODIFIED,
55         ///
56         POPUP_MODIFIED,
57         ///
58         POPUP_READONLY
59     };
60
61 private:
62   /// Show the dialog.
63    void show();
64    /// Hide the dialog.
65    void hide();
66
67     void checkMarginValues();
68     ///
69     void checkReadOnly();
70     ///
71     void UpdateLayoutDocument(BufferParams const & params);
72
73 public:
74     ///
75      void checkChoiceClass(QComboBox* cb);
76 //     ///
77      bool checkDocumentInput(QWidget* w);
78 //     ///
79   void bulletDepth( int );
80     /// 
81  void choiceBulletSize();
82 //     ///
83   void inputBulletLaTeX();
84 //     ///
85   void setBulletPics();
86 //     ///
87   void bulletBMTable( int );
88
89     /// Update the popup.
90     void update();
91     ///
92     void paper_update(BufferParams const &);
93     ///
94     void class_update(BufferParams const &);
95     ///
96     void language_update(BufferParams const &);
97     ///
98     void options_update(BufferParams const &);
99     ///
100     void bullets_update(BufferParams const &);
101     /// Apply from popup
102     void apply();
103     ///
104     void paper_apply();
105     ///
106     bool class_apply();
107     ///
108     bool language_apply();
109     ///
110     bool options_apply();
111     ///
112     void bullets_apply();
113     /// Cancel from popup
114     void cancel();
115     /// Build the popup
116     void build();
117     /// Explicitly free the popup.
118     void free();
119
120 //     /// Typedefinitions from the fdesign produced Header file
121 //     FD_form_tabbed_document * build_tabbed_document();
122 //     ///
123 //     FD_form_doc_paper * build_doc_paper();
124 //     ///
125 //     FD_form_doc_class * build_doc_class();
126 //     ///
127 //     FD_form_doc_language * build_doc_language();
128 //     ///
129 //     FD_form_doc_options * build_doc_options();
130 //     ///
131 //     FD_form_doc_bullet * build_doc_bullet();
132
133 //     /// Real GUI implementation.
134   FormDocumentDialog* dialog_;
135
136     /// Which LyXView do we belong to?
137     LyXView * lv_;
138     ///
139     Dialogs * d_;
140     /// Update connection.
141     Connection u_;
142     /// Hide connection.
143     Connection h_;
144     /// has form contents changed? Used to control OK/Apply
145     EnumPopupStatus status;
146     ///
147     int ActCell;
148     ///
149     int Confirmed;
150     ///
151     int currentBulletPanel;
152     ///
153     int currentBulletDepth;
154     ///
155
156   QPixmap* standardpix;
157   QPixmap* amssymbpix;
158   QPixmap* psnfss1pix;
159   QPixmap* psnfss2pix;
160   QPixmap* psnfss3pix;
161   QPixmap* psnfss4pix;
162   QPixmap bulletpics[36];
163 };
164
165 #endif