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