]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QParagraphDialog.h
a448ea8a17ab844f5654f9498e4a9993f24cd23e
[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 #include "lyxgluelength.h"
20
21
22 class QParagraph;
23
24 class QParagraphDialog : public QParagraphDialogBase
25 { Q_OBJECT
26           
27 public:
28         QParagraphDialog(QParagraph * form, QWidget * parent = 0, const char * name = 0, bool modal = FALSE, WFlags fl = 0);
29         ~QParagraphDialog();
30         
31         void setReadOnly(bool);
32         void setLabelWidth(const char *);
33         void setAlign(int);
34         void setChecks(bool, bool, bool, bool, bool);
35         void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
36         void setAboveLength(float, float, float, LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT);
37         void setBelowLength(float, float, float, LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT);
38         void setExtra(float, LyXLength::UNIT, const string, int, bool, bool, Paragraph::PEXTRA_TYPE);
39         LyXGlueLength getAboveLength() const;
40         LyXGlueLength getBelowLength() const;
41         LyXLength getExtraWidth() const;
42         string getExtraWidthPercent() const;
43         // FIXME: return a std::string ! 
44         const char * getLabelWidth() const;
45         LyXAlignment getAlign() const;
46         bool getAboveKeep() const;
47         bool getBelowKeep() const;
48         bool getLineAbove() const;
49         bool getLineBelow() const;
50         bool getPagebreakAbove() const;
51         bool getPagebreakBelow() const;
52         bool getNoIndent() const;
53         VSpace::vspace_kind getSpaceAboveKind() const;
54         VSpace::vspace_kind getSpaceBelowKind() const;
55         Paragraph::PEXTRA_TYPE getExtraType() const;
56         Paragraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
57         bool getHfillBetween() const;
58         bool getStartNewMinipage() const;
59         
60 protected:
61         void closeEvent (QCloseEvent * e);
62         
63 private:
64         QParagraph * form_;
65         VSpace::vspace_kind getSpaceKind(int val) const;
66         LyXLength::UNIT getLyXLength(int val) const;
67         int getItem(LyXLength::UNIT unit) const;
68         
69         
70 protected slots:
71         void apply_adaptor();
72         void cancel_adaptor();
73         void enable_extraOptions(int);
74         void enable_minipageOptions(int);
75         void enable_spacingAbove(int);
76         void enable_spacingBelow(int);
77         void ok_adaptor();
78         void restore_adaptor();
79 };
80
81 #endif // QPARAGRAPHDIALOG_H