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