2002-03-11 22:47:41 +00:00
|
|
|
// -*- C++ -*-
|
2001-02-14 19:43:56 +00:00
|
|
|
/**
|
2001-08-19 13:25:15 +00:00
|
|
|
* \file QParagraphDialog.h
|
2001-02-14 19:43:56 +00:00
|
|
|
* Copyright 2001 LyX Team
|
|
|
|
* see the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
|
|
|
*/
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#ifndef QPARAGRAPHDIALOG_H
|
|
|
|
#define QPARAGRAPHDIALOG_H
|
2001-02-14 19:43:56 +00:00
|
|
|
|
2001-06-05 17:05:51 +00:00
|
|
|
#include <config.h>
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#include "ui/QParagraphDialogBase.h"
|
2001-02-14 19:43:56 +00:00
|
|
|
#include "vspace.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "paragraph.h"
|
2001-12-01 02:24:28 +00:00
|
|
|
#include "layout.h"
|
2001-12-05 18:32:49 +00:00
|
|
|
#include "lyxgluelength.h"
|
2001-02-14 19:43:56 +00:00
|
|
|
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
class QParagraph;
|
2001-02-14 19:43:56 +00:00
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
class QParagraphDialog : public QParagraphDialogBase
|
|
|
|
{ Q_OBJECT
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-06-05 17:05:51 +00:00
|
|
|
public:
|
2002-03-11 22:47:41 +00:00
|
|
|
QParagraphDialog(QParagraph * form, QWidget * parent = 0,
|
|
|
|
char const * name = 0, bool modal = FALSE,
|
|
|
|
WFlags fl = 0);
|
2001-08-19 13:25:15 +00:00
|
|
|
~QParagraphDialog();
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-06-05 17:05:51 +00:00
|
|
|
void setReadOnly(bool);
|
2002-03-11 22:47:41 +00:00
|
|
|
void setLabelWidth(char const *);
|
2001-06-05 17:05:51 +00:00
|
|
|
void setAlign(int);
|
|
|
|
void setChecks(bool, bool, bool, bool, bool);
|
|
|
|
void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
|
2002-03-11 22:47:41 +00:00
|
|
|
void setAboveLength(float, float, float,
|
|
|
|
LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT);
|
|
|
|
void setBelowLength(float, float, float,
|
|
|
|
LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT);
|
|
|
|
void setExtra(float, LyXLength::UNIT,
|
|
|
|
string const &, int, bool, bool, Paragraph::PEXTRA_TYPE);
|
2001-06-05 17:05:51 +00:00
|
|
|
LyXGlueLength getAboveLength() const;
|
|
|
|
LyXGlueLength getBelowLength() const;
|
|
|
|
LyXLength getExtraWidth() const;
|
|
|
|
string getExtraWidthPercent() const;
|
2002-03-21 21:21:28 +00:00
|
|
|
// FIXME: return a std::string !
|
2002-03-11 22:47:41 +00:00
|
|
|
char const * getLabelWidth() const;
|
2001-06-05 17:05:51 +00:00
|
|
|
LyXAlignment getAlign() const;
|
|
|
|
bool getAboveKeep() const;
|
|
|
|
bool getBelowKeep() const;
|
|
|
|
bool getLineAbove() const;
|
|
|
|
bool getLineBelow() const;
|
|
|
|
bool getPagebreakAbove() const;
|
|
|
|
bool getPagebreakBelow() const;
|
|
|
|
bool getNoIndent() const;
|
|
|
|
VSpace::vspace_kind getSpaceAboveKind() const;
|
|
|
|
VSpace::vspace_kind getSpaceBelowKind() const;
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph::PEXTRA_TYPE getExtraType() const;
|
|
|
|
Paragraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
|
2001-06-05 17:05:51 +00:00
|
|
|
bool getHfillBetween() const;
|
|
|
|
bool getStartNewMinipage() const;
|
|
|
|
protected:
|
|
|
|
void closeEvent (QCloseEvent * e);
|
|
|
|
private:
|
2001-08-19 13:25:15 +00:00
|
|
|
QParagraph * form_;
|
2001-06-05 17:05:51 +00:00
|
|
|
VSpace::vspace_kind getSpaceKind(int val) const;
|
|
|
|
LyXLength::UNIT getLyXLength(int val) const;
|
|
|
|
int getItem(LyXLength::UNIT unit) const;
|
|
|
|
protected slots:
|
|
|
|
void apply_adaptor();
|
|
|
|
void cancel_adaptor();
|
|
|
|
void enable_extraOptions(int);
|
|
|
|
void enable_minipageOptions(int);
|
|
|
|
void enable_spacingAbove(int);
|
|
|
|
void enable_spacingBelow(int);
|
|
|
|
void ok_adaptor();
|
|
|
|
void restore_adaptor();
|
2001-02-14 19:43:56 +00:00
|
|
|
};
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#endif // QPARAGRAPHDIALOG_H
|