]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QParagraphDialog.h
support for Qt3
[lyx.git] / src / frontends / qt2 / QParagraphDialog.h
1 /**
2  * \file QParagraphDialog.h
3  * Copyright 2001 LyX Team
4  * see the file COPYING
5  *
6  * \author John Levon, moz@compsoc.man.ac.uk
7  * \author Edwin Leuven, leuven@fee.uva.nl
8  */
9
10 #ifndef QPARAGRAPHDIALOG_H
11 #define QPARAGRAPHDIALOG_H
12
13 #include <config.h>
14  
15 #include "ui/QParagraphDialogBase.h"
16 #include "vspace.h"
17 #include "paragraph.h"
18 #include "layout.h"
19
20
21 class QParagraph;
22
23 class QParagraphDialog : public QParagraphDialogBase
24 { Q_OBJECT
25           
26 public:
27         QParagraphDialog(QParagraph * form, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0);
28         ~QParagraphDialog();
29         
30         void setReadOnly(bool);
31         void setLabelWidth(const char *);
32         void setAlign(int);
33         void setChecks(bool, bool, bool, bool, bool);
34         void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
35         void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
36         void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
37         void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, Paragraph::PEXTRA_TYPE);
38         LyXGlueLength getAboveLength() const;
39         LyXGlueLength getBelowLength() const;
40         LyXLength getExtraWidth() const;
41         string getExtraWidthPercent() const;
42         // FIXME: return a std::string ! 
43         const char * getLabelWidth() const;
44         LyXAlignment getAlign() const;
45         bool getAboveKeep() const;
46         bool getBelowKeep() const;
47         bool getLineAbove() const;
48         bool getLineBelow() const;
49         bool getPagebreakAbove() const;
50         bool getPagebreakBelow() const;
51         bool getNoIndent() const;
52         VSpace::vspace_kind getSpaceAboveKind() const;
53         VSpace::vspace_kind getSpaceBelowKind() const;
54         Paragraph::PEXTRA_TYPE getExtraType() const;
55         Paragraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
56         bool getHfillBetween() const;
57         bool getStartNewMinipage() const;
58         
59 protected:
60         void closeEvent (QCloseEvent * e);
61         
62 private:
63         QParagraph * form_;
64         VSpace::vspace_kind getSpaceKind(int val) const;
65         LyXLength::UNIT getLyXLength(int val) const;
66         int getItem(LyXLength::UNIT unit) const;
67         
68         
69 protected slots:
70         void apply_adaptor();
71         void cancel_adaptor();
72         void enable_extraOptions(int);
73         void enable_minipageOptions(int);
74         void enable_spacingAbove(int);
75         void enable_spacingBelow(int);
76         void ok_adaptor();
77         void restore_adaptor();
78 };
79
80 #endif // QPARAGRAPHDIALOG_H