142 return d->blocks.count();
153 if (i < 0 || i >=
d->blocks.size())
155 return d->blocks.at(i);
188 return d->blocks.indexOf(blockIt);
202 int item =
d->blocks.indexOf(blockIt) + 1;
245 static const char romanSymbolsLower[] =
"iiivixxxlxcccdcmmmm";
246 static const char romanSymbolsUpper[] =
"IIIVIXXXLXCCCDCMMMM";
253 int c[] = { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000 };
255 for (
int i = 12; i >= 0; n %= c[i], i--) {
258 int startDigit = i + (i+3)/4;
276 romanNumeral.
append(romanSymbols.
mid(startDigit, numDigits));
291 return numberSuffix + result + numberPrefix;
293 return numberPrefix + result + numberSuffix;
306 if (i < 0 || i >=
d->blocks.size())
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
#define QT_END_NAMESPACE
This macro expands to.
int count() const
Returns the number of items in the list.
QByteArray & append(char c)
Appends the character ch to this byte array.
The QByteArray class provides an array of bytes.
QString & prepend(QChar c)
QTextListPrivate(QTextDocument *doc)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void setBlockFormat(const QTextBlock &from, const QTextBlock &to, const QTextBlockFormat &newFormat, FormatChangeMode mode=SetFormat)
The QString class provides a Unicode character string.
int indent() const
Returns the paragraph's indent.
The QChar class provides a 16-bit Unicode character.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Style style() const
Returns the list format's style.
int objectIndex() const
Returns the object index of this object.
QTextList(QTextDocument *doc)
QString numberSuffix() const
Returns the list format's number suffix.
static int numDigits(qlonglong n)
static QByteArray fromRawData(const char *, int size)
Constructs a QByteArray that uses the first size bytes of the data array.
The QTextBlock class provides a container for text fragments in a QTextDocument.
QString itemText(const QTextBlock &) const
Returns the text of the list item that corresponds to the given block.
int itemNumber(const QTextBlock &) const
Returns the index of the list item that corresponds to the given block.
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
void remove(const QTextBlock &)
Removes the given block from the list.
QString numberPrefix() const
Returns the list format's number prefix.
The QTextBlockGroup class provides a container for text blocks within a QTextDocument.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument...
void add(const QTextBlock &block)
Makes the given block part of the list.
void setIndent(int indent)
Sets the paragraph's indentation.
Qt::LayoutDirection textDirection() const
Returns the resolved text direction.
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
The QTextList class provides a decorated list of items in a QTextDocument.
QTextDocumentPrivate * docHandle() const
void setObjectIndex(int object)
Sets the format object's object index.
int indent() const
Returns the list format's indentation.
QTextBlockFormat blockFormat() const
Returns the QTextBlockFormat that describes block-specific properties.
QTextBlock item(int i) const
Returns the {i}-th text block in the list.
void removeItem(int i)
Removes the item at item position i from the list.
QTextListFormat format() const
Returns the list's format.