summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextformat.h
diff options
context:
space:
mode:
authorNils Jeisecke <jeisecke@saltation.de>2010-08-31 13:39:43 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-08-31 13:39:43 (GMT)
commitaf1af7a14c7d89a34267d955ca75ddd7abf5a370 (patch)
tree6d4b1a0bea14c0a9b0902da10d4f6b2d08196f55 /src/gui/text/qtextformat.h
parentaf2b8878ba7bd153876a5531a8119a4bdbc6b257 (diff)
downloadQt-af1af7a14c7d89a34267d955ca75ddd7abf5a370.zip
Qt-af1af7a14c7d89a34267d955ca75ddd7abf5a370.tar.gz
Qt-af1af7a14c7d89a34267d955ca75ddd7abf5a370.tar.bz2
Implemented suffix and prefix strings for the numbering in ordered lists as supported by ODF. Works also with HTML import/export by using Qt CSS properties extensions.
Merge-request: 1642 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qtextformat.h')
-rw-r--r--src/gui/text/qtextformat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index ecf48a2..1de83bf 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -202,6 +202,8 @@ public:
// list properties
ListStyle = 0x3000,
ListIndent = 0x3001,
+ ListNumberPrefix = 0x3002,
+ ListNumberSuffix = 0x3003,
// table and frame properties
FrameBorder = 0x4000,
@@ -617,6 +619,14 @@ public:
inline int indent() const
{ return intProperty(ListIndent); }
+ inline void setNumberPrefix(const QString &numberPrefix);
+ inline QString numberPrefix() const
+ { return stringProperty(ListNumberPrefix); }
+
+ inline void setNumberSuffix(const QString &numberSuffix);
+ inline QString numberSuffix() const
+ { return stringProperty(ListNumberSuffix); }
+
protected:
explicit QTextListFormat(const QTextFormat &fmt);
friend class QTextFormat;
@@ -628,6 +638,12 @@ inline void QTextListFormat::setStyle(Style astyle)
inline void QTextListFormat::setIndent(int aindent)
{ setProperty(ListIndent, aindent); }
+inline void QTextListFormat::setNumberPrefix(const QString &numberPrefix)
+{ setProperty(ListNumberPrefix, numberPrefix); }
+
+inline void QTextListFormat::setNumberSuffix(const QString &numberSuffix)
+{ setProperty(ListNumberSuffix, numberSuffix); }
+
class Q_GUI_EXPORT QTextImageFormat : public QTextCharFormat
{
public: