|
@ -30,8 +30,7 @@ |
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE_XLSX |
|
|
QT_BEGIN_NAMESPACE_XLSX |
|
|
|
|
|
|
|
|
FormatPrivate::FormatPrivate(Format *p) : |
|
|
FormatPrivate::FormatPrivate() |
|
|
q_ptr(p) |
|
|
|
|
|
{ |
|
|
{ |
|
|
dirty = true; |
|
|
dirty = true; |
|
|
|
|
|
|
|
@ -44,6 +43,23 @@ FormatPrivate::FormatPrivate(Format *p) : |
|
|
theme = 0; |
|
|
theme = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FormatPrivate::FormatPrivate(const FormatPrivate &other) |
|
|
|
|
|
: QSharedData(other) |
|
|
|
|
|
, numberData(other.numberData), fontData(other.fontData), alignmentData(other.alignmentData) |
|
|
|
|
|
, borderData(other.borderData), fillData(other.fillData), protectionData(other.protectionData) |
|
|
|
|
|
, dirty(other.dirty), formatKey(other.formatKey) |
|
|
|
|
|
, xf_index(other.xf_index), xf_indexValid(other.xf_indexValid) |
|
|
|
|
|
, is_dxf_fomat(other.is_dxf_fomat), dxf_index(other.dxf_index), dxf_indexValid(other.dxf_indexValid) |
|
|
|
|
|
, theme(other.theme) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FormatPrivate::~FormatPrivate() |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/*!
|
|
|
/*!
|
|
|
* \class Format |
|
|
* \class Format |
|
|
* \inmodule QtXlsx |
|
|
* \inmodule QtXlsx |
|
@ -52,20 +68,38 @@ FormatPrivate::FormatPrivate(Format *p) : |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
/*!
|
|
|
* \internal |
|
|
* Creates a new format. |
|
|
*/ |
|
|
*/ |
|
|
Format::Format() : |
|
|
Format::Format() : |
|
|
d_ptr(new FormatPrivate(this)) |
|
|
d(new FormatPrivate) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*!
|
|
|
/*!
|
|
|
* \internal |
|
|
Creates a new format with the same attributes as the \a other format. |
|
|
|
|
|
*/ |
|
|
|
|
|
Format::Format(const Format &other) |
|
|
|
|
|
:d(other.d) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
Assigns the \a other format to this format, and returns a |
|
|
|
|
|
reference to this format. |
|
|
|
|
|
*/ |
|
|
|
|
|
Format &Format::operator =(const Format &other) |
|
|
|
|
|
{ |
|
|
|
|
|
d = other.d; |
|
|
|
|
|
return *this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
|
* Destroys this format. |
|
|
*/ |
|
|
*/ |
|
|
Format::~Format() |
|
|
Format::~Format() |
|
|
{ |
|
|
{ |
|
|
delete d_ptr; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*!
|
|
|
/*!
|
|
@ -73,7 +107,6 @@ Format::~Format() |
|
|
*/ |
|
|
*/ |
|
|
int Format::numberFormatIndex() const |
|
|
int Format::numberFormatIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->numberData.formatIndex; |
|
|
return d->numberData.formatIndex; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -84,7 +117,6 @@ int Format::numberFormatIndex() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setNumberFormatIndex(int format) |
|
|
void Format::setNumberFormatIndex(int format) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
|
d->numberData.formatIndex = format; |
|
|
d->numberData.formatIndex = format; |
|
|
d->numberData._valid = true; |
|
|
d->numberData._valid = true; |
|
@ -97,7 +129,6 @@ void Format::setNumberFormatIndex(int format) |
|
|
*/ |
|
|
*/ |
|
|
QString Format::numberFormat() const |
|
|
QString Format::numberFormat() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->numberData.formatString; |
|
|
return d->numberData.formatString; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -107,7 +138,6 @@ QString Format::numberFormat() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setNumberFormat(const QString &format) |
|
|
void Format::setNumberFormat(const QString &format) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (format.isEmpty()) |
|
|
if (format.isEmpty()) |
|
|
return; |
|
|
return; |
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
@ -120,7 +150,6 @@ void Format::setNumberFormat(const QString &format) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::isDateTimeFormat() const |
|
|
bool Format::isDateTimeFormat() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (d->numberData._valid && d->numberData.formatString.isEmpty()) { |
|
|
if (d->numberData._valid && d->numberData.formatString.isEmpty()) { |
|
|
int idx = d->numberData.formatIndex; |
|
|
int idx = d->numberData.formatIndex; |
|
|
//Built in date time number index
|
|
|
//Built in date time number index
|
|
@ -141,7 +170,6 @@ bool Format::isDateTimeFormat() const |
|
|
*/ |
|
|
*/ |
|
|
bool Format::numFmtIndexValid() const |
|
|
bool Format::numFmtIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->numberData._valid; |
|
|
return d->numberData._valid; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -150,7 +178,6 @@ bool Format::numFmtIndexValid() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setNumFmt(int index, const QString &string) |
|
|
void Format::setNumFmt(int index, const QString &string) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->numberData.formatIndex = index; |
|
|
d->numberData.formatIndex = index; |
|
|
d->numberData.formatString = string; |
|
|
d->numberData.formatString = string; |
|
|
d->numberData._valid = true; |
|
|
d->numberData._valid = true; |
|
@ -161,7 +188,6 @@ void Format::setNumFmt(int index, const QString &string) |
|
|
*/ |
|
|
*/ |
|
|
int Format::fontSize() const |
|
|
int Format::fontSize() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.size; |
|
|
return d->fontData.size; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -170,7 +196,6 @@ int Format::fontSize() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontSize(int size) |
|
|
void Format::setFontSize(int size) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.size = size; |
|
|
d->fontData.size = size; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -180,7 +205,6 @@ void Format::setFontSize(int size) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontItalic() const |
|
|
bool Format::fontItalic() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.italic; |
|
|
return d->fontData.italic; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -189,7 +213,6 @@ bool Format::fontItalic() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontItalic(bool italic) |
|
|
void Format::setFontItalic(bool italic) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.italic = italic; |
|
|
d->fontData.italic = italic; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -199,7 +222,6 @@ void Format::setFontItalic(bool italic) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontStrikeOut() const |
|
|
bool Format::fontStrikeOut() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.strikeOut; |
|
|
return d->fontData.strikeOut; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -208,7 +230,6 @@ bool Format::fontStrikeOut() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontStrikeOut(bool strikeOut) |
|
|
void Format::setFontStrikeOut(bool strikeOut) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.strikeOut = strikeOut; |
|
|
d->fontData.strikeOut = strikeOut; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -218,7 +239,6 @@ void Format::setFontStrikeOut(bool strikeOut) |
|
|
*/ |
|
|
*/ |
|
|
QColor Format::fontColor() const |
|
|
QColor Format::fontColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (!d->fontData.color.isValid() && !d->fontData.themeColor.isEmpty()) { |
|
|
if (!d->fontData.color.isValid() && !d->fontData.themeColor.isEmpty()) { |
|
|
//!Todo, get the real color from the theme{1}.xml file
|
|
|
//!Todo, get the real color from the theme{1}.xml file
|
|
|
//The same is ture for border and fill colord
|
|
|
//The same is ture for border and fill colord
|
|
@ -232,7 +252,6 @@ QColor Format::fontColor() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontColor(const QColor &color) |
|
|
void Format::setFontColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.color = color; |
|
|
d->fontData.color = color; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -242,7 +261,6 @@ void Format::setFontColor(const QColor &color) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontBold() const |
|
|
bool Format::fontBold() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.bold; |
|
|
return d->fontData.bold; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -251,7 +269,6 @@ bool Format::fontBold() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontBold(bool bold) |
|
|
void Format::setFontBold(bool bold) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.bold = bold; |
|
|
d->fontData.bold = bold; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -261,7 +278,6 @@ void Format::setFontBold(bool bold) |
|
|
*/ |
|
|
*/ |
|
|
Format::FontScript Format::fontScript() const |
|
|
Format::FontScript Format::fontScript() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.scirpt; |
|
|
return d->fontData.scirpt; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -270,7 +286,6 @@ Format::FontScript Format::fontScript() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontScript(FontScript script) |
|
|
void Format::setFontScript(FontScript script) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.scirpt = script; |
|
|
d->fontData.scirpt = script; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -280,7 +295,6 @@ void Format::setFontScript(FontScript script) |
|
|
*/ |
|
|
*/ |
|
|
Format::FontUnderline Format::fontUnderline() const |
|
|
Format::FontUnderline Format::fontUnderline() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.underline; |
|
|
return d->fontData.underline; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -289,7 +303,6 @@ Format::FontUnderline Format::fontUnderline() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontUnderline(FontUnderline underline) |
|
|
void Format::setFontUnderline(FontUnderline underline) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.underline = underline; |
|
|
d->fontData.underline = underline; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -299,7 +312,6 @@ void Format::setFontUnderline(FontUnderline underline) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontOutline() const |
|
|
bool Format::fontOutline() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.outline; |
|
|
return d->fontData.outline; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -308,7 +320,6 @@ bool Format::fontOutline() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontOutline(bool outline) |
|
|
void Format::setFontOutline(bool outline) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.outline = outline; |
|
|
d->fontData.outline = outline; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -318,7 +329,6 @@ void Format::setFontOutline(bool outline) |
|
|
*/ |
|
|
*/ |
|
|
QString Format::fontName() const |
|
|
QString Format::fontName() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.name; |
|
|
return d->fontData.name; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -327,7 +337,6 @@ QString Format::fontName() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontName(const QString &name) |
|
|
void Format::setFontName(const QString &name) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.name = name; |
|
|
d->fontData.name = name; |
|
|
d->fontData._dirty = true; |
|
|
d->fontData._dirty = true; |
|
|
} |
|
|
} |
|
@ -337,7 +346,6 @@ void Format::setFontName(const QString &name) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontIndexValid() const |
|
|
bool Format::fontIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.indexValid(); |
|
|
return d->fontData.indexValid(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -346,7 +354,6 @@ bool Format::fontIndexValid() const |
|
|
*/ |
|
|
*/ |
|
|
int Format::fontIndex() const |
|
|
int Format::fontIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.index(); |
|
|
return d->fontData.index(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -355,7 +362,6 @@ int Format::fontIndex() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setFontIndex(int index) |
|
|
void Format::setFontIndex(int index) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fontData.setIndex(index); |
|
|
d->fontData.setIndex(index); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -364,7 +370,6 @@ void Format::setFontIndex(int index) |
|
|
*/ |
|
|
*/ |
|
|
int Format::fontFamily() const |
|
|
int Format::fontFamily() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.family; |
|
|
return d->fontData.family; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -373,7 +378,6 @@ int Format::fontFamily() const |
|
|
*/ |
|
|
*/ |
|
|
bool Format::fontShadow() const |
|
|
bool Format::fontShadow() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.shadow; |
|
|
return d->fontData.shadow; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -382,7 +386,6 @@ bool Format::fontShadow() const |
|
|
*/ |
|
|
*/ |
|
|
QString Format::fontScheme() const |
|
|
QString Format::fontScheme() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fontData.scheme; |
|
|
return d->fontData.scheme; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -390,9 +393,8 @@ QString Format::fontScheme() const |
|
|
*/ |
|
|
*/ |
|
|
QByteArray Format::fontKey() const |
|
|
QByteArray Format::fontKey() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (d->fontData._dirty) |
|
|
if (d->fontData._dirty) |
|
|
const_cast<FormatPrivate*>(d)->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
d->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
return d->fontData.key(); |
|
|
return d->fontData.key(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -401,7 +403,6 @@ QByteArray Format::fontKey() const |
|
|
*/ |
|
|
*/ |
|
|
Format::HorizontalAlignment Format::horizontalAlignment() const |
|
|
Format::HorizontalAlignment Format::horizontalAlignment() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.alignH; |
|
|
return d->alignmentData.alignH; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -410,7 +411,6 @@ Format::HorizontalAlignment Format::horizontalAlignment() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setHorizontalAlignment(HorizontalAlignment align) |
|
|
void Format::setHorizontalAlignment(HorizontalAlignment align) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (d->alignmentData.indent &&(align != AlignHGeneral && align != AlignLeft && |
|
|
if (d->alignmentData.indent &&(align != AlignHGeneral && align != AlignLeft && |
|
|
align != AlignRight && align != AlignHDistributed)) { |
|
|
align != AlignRight && align != AlignHDistributed)) { |
|
|
d->alignmentData.indent = 0; |
|
|
d->alignmentData.indent = 0; |
|
@ -430,7 +430,6 @@ void Format::setHorizontalAlignment(HorizontalAlignment align) |
|
|
*/ |
|
|
*/ |
|
|
Format::VerticalAlignment Format::verticalAlignment() const |
|
|
Format::VerticalAlignment Format::verticalAlignment() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.alignV; |
|
|
return d->alignmentData.alignV; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -439,7 +438,6 @@ Format::VerticalAlignment Format::verticalAlignment() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setVerticalAlignment(VerticalAlignment align) |
|
|
void Format::setVerticalAlignment(VerticalAlignment align) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->alignmentData.alignV = align; |
|
|
d->alignmentData.alignV = align; |
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
|
} |
|
|
} |
|
@ -449,7 +447,6 @@ void Format::setVerticalAlignment(VerticalAlignment align) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::textWrap() const |
|
|
bool Format::textWrap() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.wrap; |
|
|
return d->alignmentData.wrap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -458,7 +455,6 @@ bool Format::textWrap() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setTextWarp(bool wrap) |
|
|
void Format::setTextWarp(bool wrap) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (wrap && d->alignmentData.shinkToFit) |
|
|
if (wrap && d->alignmentData.shinkToFit) |
|
|
d->alignmentData.shinkToFit = false; |
|
|
d->alignmentData.shinkToFit = false; |
|
|
|
|
|
|
|
@ -471,7 +467,6 @@ void Format::setTextWarp(bool wrap) |
|
|
*/ |
|
|
*/ |
|
|
int Format::rotation() const |
|
|
int Format::rotation() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.rotation; |
|
|
return d->alignmentData.rotation; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -480,7 +475,6 @@ int Format::rotation() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setRotation(int rotation) |
|
|
void Format::setRotation(int rotation) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->alignmentData.rotation = rotation; |
|
|
d->alignmentData.rotation = rotation; |
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
|
} |
|
|
} |
|
@ -490,7 +484,6 @@ void Format::setRotation(int rotation) |
|
|
*/ |
|
|
*/ |
|
|
int Format::indent() const |
|
|
int Format::indent() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.indent; |
|
|
return d->alignmentData.indent; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -499,7 +492,6 @@ int Format::indent() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setIndent(int indent) |
|
|
void Format::setIndent(int indent) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (indent && (d->alignmentData.alignH != AlignHGeneral |
|
|
if (indent && (d->alignmentData.alignH != AlignHGeneral |
|
|
&& d->alignmentData.alignH != AlignLeft |
|
|
&& d->alignmentData.alignH != AlignLeft |
|
|
&& d->alignmentData.alignH != AlignRight |
|
|
&& d->alignmentData.alignH != AlignRight |
|
@ -515,7 +507,6 @@ void Format::setIndent(int indent) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::shrinkToFit() const |
|
|
bool Format::shrinkToFit() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.shinkToFit; |
|
|
return d->alignmentData.shinkToFit; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -524,7 +515,6 @@ bool Format::shrinkToFit() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setShrinkToFit(bool shink) |
|
|
void Format::setShrinkToFit(bool shink) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (shink && d->alignmentData.wrap) |
|
|
if (shink && d->alignmentData.wrap) |
|
|
d->alignmentData.wrap = false; |
|
|
d->alignmentData.wrap = false; |
|
|
if (shink && (d->alignmentData.alignH == AlignHFill |
|
|
if (shink && (d->alignmentData.alignH == AlignHFill |
|
@ -542,7 +532,6 @@ void Format::setShrinkToFit(bool shink) |
|
|
*/ |
|
|
*/ |
|
|
bool Format::alignmentChanged() const |
|
|
bool Format::alignmentChanged() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->alignmentData.alignH != AlignHGeneral |
|
|
return d->alignmentData.alignH != AlignHGeneral |
|
|
|| d->alignmentData.alignV != AlignBottom |
|
|
|| d->alignmentData.alignV != AlignBottom |
|
|
|| d->alignmentData.indent != 0 |
|
|
|| d->alignmentData.indent != 0 |
|
@ -553,7 +542,6 @@ bool Format::alignmentChanged() const |
|
|
|
|
|
|
|
|
QString Format::horizontalAlignmentString() const |
|
|
QString Format::horizontalAlignmentString() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
QString alignH; |
|
|
QString alignH; |
|
|
switch (d->alignmentData.alignH) { |
|
|
switch (d->alignmentData.alignH) { |
|
|
case Format::AlignLeft: |
|
|
case Format::AlignLeft: |
|
@ -585,7 +573,6 @@ QString Format::horizontalAlignmentString() const |
|
|
|
|
|
|
|
|
QString Format::verticalAlignmentString() const |
|
|
QString Format::verticalAlignmentString() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
QString align; |
|
|
QString align; |
|
|
switch (d->alignmentData.alignV) { |
|
|
switch (d->alignmentData.alignV) { |
|
|
case AlignTop: |
|
|
case AlignTop: |
|
@ -633,7 +620,6 @@ void Format::setBorderColor(const QColor &color) |
|
|
*/ |
|
|
*/ |
|
|
Format::BorderStyle Format::leftBorderStyle() const |
|
|
Format::BorderStyle Format::leftBorderStyle() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.left; |
|
|
return d->borderData.left; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -642,7 +628,6 @@ Format::BorderStyle Format::leftBorderStyle() const |
|
|
*/ |
|
|
*/ |
|
|
void Format::setLeftBorderStyle(BorderStyle style) |
|
|
void Format::setLeftBorderStyle(BorderStyle style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.left = style; |
|
|
d->borderData.left = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
@ -652,149 +637,126 @@ void Format::setLeftBorderStyle(BorderStyle style) |
|
|
*/ |
|
|
*/ |
|
|
QColor Format::leftBorderColor() const |
|
|
QColor Format::leftBorderColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.leftColor; |
|
|
return d->borderData.leftColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setLeftBorderColor(const QColor &color) |
|
|
void Format::setLeftBorderColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.leftColor = color; |
|
|
d->borderData.leftColor = color; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::BorderStyle Format::rightBorderStyle() const |
|
|
Format::BorderStyle Format::rightBorderStyle() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.right; |
|
|
return d->borderData.right; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setRightBorderStyle(BorderStyle style) |
|
|
void Format::setRightBorderStyle(BorderStyle style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.right = style; |
|
|
d->borderData.right = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QColor Format::rightBorderColor() const |
|
|
QColor Format::rightBorderColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.rightColor; |
|
|
return d->borderData.rightColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setRightBorderColor(const QColor &color) |
|
|
void Format::setRightBorderColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.rightColor = color; |
|
|
d->borderData.rightColor = color; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::BorderStyle Format::topBorderStyle() const |
|
|
Format::BorderStyle Format::topBorderStyle() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.top; |
|
|
return d->borderData.top; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setTopBorderStyle(BorderStyle style) |
|
|
void Format::setTopBorderStyle(BorderStyle style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.top = style; |
|
|
d->borderData.top = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QColor Format::topBorderColor() const |
|
|
QColor Format::topBorderColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.topColor; |
|
|
return d->borderData.topColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setTopBorderColor(const QColor &color) |
|
|
void Format::setTopBorderColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.topColor = color; |
|
|
d->borderData.topColor = color; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::BorderStyle Format::bottomBorderStyle() const |
|
|
Format::BorderStyle Format::bottomBorderStyle() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.bottom; |
|
|
return d->borderData.bottom; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setBottomBorderStyle(BorderStyle style) |
|
|
void Format::setBottomBorderStyle(BorderStyle style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.bottom = style; |
|
|
d->borderData.bottom = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QColor Format::bottomBorderColor() const |
|
|
QColor Format::bottomBorderColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.bottomColor; |
|
|
return d->borderData.bottomColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setBottomBorderColor(const QColor &color) |
|
|
void Format::setBottomBorderColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.bottomColor = color; |
|
|
d->borderData.bottomColor = color; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::BorderStyle Format::diagonalBorderStyle() const |
|
|
Format::BorderStyle Format::diagonalBorderStyle() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.diagonal; |
|
|
return d->borderData.diagonal; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setDiagonalBorderStyle(BorderStyle style) |
|
|
void Format::setDiagonalBorderStyle(BorderStyle style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.diagonal = style; |
|
|
d->borderData.diagonal = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::DiagonalBorderType Format::diagonalBorderType() const |
|
|
Format::DiagonalBorderType Format::diagonalBorderType() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.diagonalType; |
|
|
return d->borderData.diagonalType; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setDiagonalBorderType(DiagonalBorderType style) |
|
|
void Format::setDiagonalBorderType(DiagonalBorderType style) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.diagonalType = style; |
|
|
d->borderData.diagonalType = style; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QColor Format::diagonalBorderColor() const |
|
|
QColor Format::diagonalBorderColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.diagonalColor; |
|
|
return d->borderData.diagonalColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setDiagonalBorderColor(const QColor &color) |
|
|
void Format::setDiagonalBorderColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.diagonalColor = color; |
|
|
d->borderData.diagonalColor = color; |
|
|
d->borderData._dirty = true; |
|
|
d->borderData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool Format::borderIndexValid() const |
|
|
bool Format::borderIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.indexValid(); |
|
|
return d->borderData.indexValid(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int Format::borderIndex() const |
|
|
int Format::borderIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->borderData.index(); |
|
|
return d->borderData.index(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setBorderIndex(int index) |
|
|
void Format::setBorderIndex(int index) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->borderData.setIndex(index); |
|
|
d->borderData.setIndex(index); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -802,35 +764,30 @@ void Format::setBorderIndex(int index) |
|
|
*/ |
|
|
*/ |
|
|
QByteArray Format::borderKey() const |
|
|
QByteArray Format::borderKey() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (d->borderData._dirty) |
|
|
if (d->borderData._dirty) |
|
|
const_cast<FormatPrivate*>(d)->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
d->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
|
|
|
|
|
|
return d->borderData.key(); |
|
|
return d->borderData.key(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Format::FillPattern Format::fillPattern() const |
|
|
Format::FillPattern Format::fillPattern() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fillData.pattern; |
|
|
return d->fillData.pattern; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setFillPattern(FillPattern pattern) |
|
|
void Format::setFillPattern(FillPattern pattern) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fillData.pattern = pattern; |
|
|
d->fillData.pattern = pattern; |
|
|
d->fillData._dirty = true; |
|
|
d->fillData._dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QColor Format::patternForegroundColor() const |
|
|
QColor Format::patternForegroundColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fillData.fgColor; |
|
|
return d->fillData.fgColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setPatternForegroundColor(const QColor &color) |
|
|
void Format::setPatternForegroundColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (color.isValid() && d->fillData.pattern == PatternNone) |
|
|
if (color.isValid() && d->fillData.pattern == PatternNone) |
|
|
d->fillData.pattern = PatternSolid; |
|
|
d->fillData.pattern = PatternSolid; |
|
|
d->fillData.fgColor = color; |
|
|
d->fillData.fgColor = color; |
|
@ -839,13 +796,11 @@ void Format::setPatternForegroundColor(const QColor &color) |
|
|
|
|
|
|
|
|
QColor Format::patternBackgroundColor() const |
|
|
QColor Format::patternBackgroundColor() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fillData.bgColor; |
|
|
return d->fillData.bgColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setPatternBackgroundColor(const QColor &color) |
|
|
void Format::setPatternBackgroundColor(const QColor &color) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
if (color.isValid() && d->fillData.pattern == PatternNone) |
|
|
if (color.isValid() && d->fillData.pattern == PatternNone) |
|
|
d->fillData.pattern = PatternSolid; |
|
|
d->fillData.pattern = PatternSolid; |
|
|
d->fillData.bgColor = color; |
|
|
d->fillData.bgColor = color; |
|
@ -854,19 +809,16 @@ void Format::setPatternBackgroundColor(const QColor &color) |
|
|
|
|
|
|
|
|
bool Format::fillIndexValid() const |
|
|
bool Format::fillIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fillData.indexValid(); |
|
|
return d->fillData.indexValid(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int Format::fillIndex() const |
|
|
int Format::fillIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->fillData.index(); |
|
|
return d->fillData.index(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setFillIndex(int index) |
|
|
void Format::setFillIndex(int index) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->fillData.setIndex(index); |
|
|
d->fillData.setIndex(index); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -874,42 +826,36 @@ void Format::setFillIndex(int index) |
|
|
*/ |
|
|
*/ |
|
|
QByteArray Format::fillKey() const |
|
|
QByteArray Format::fillKey() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (d->fillData._dirty) |
|
|
if (d->fillData._dirty) |
|
|
const_cast<FormatPrivate*>(d)->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
d->dirty = true; //Make sure formatKey() will be re-generated.
|
|
|
|
|
|
|
|
|
return d->fillData.key(); |
|
|
return d->fillData.key(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool Format::hidden() const |
|
|
bool Format::hidden() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->protectionData.hidden; |
|
|
return d->protectionData.hidden; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setHidden(bool hidden) |
|
|
void Format::setHidden(bool hidden) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->protectionData.hidden = hidden; |
|
|
d->protectionData.hidden = hidden; |
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool Format::locked() const |
|
|
bool Format::locked() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->protectionData.locked; |
|
|
return d->protectionData.locked; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setLocked(bool locked) |
|
|
void Format::setLocked(bool locked) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->protectionData.locked = locked; |
|
|
d->protectionData.locked = locked; |
|
|
d->dirty = true; |
|
|
d->dirty = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
QByteArray Format::formatKey() const |
|
|
QByteArray Format::formatKey() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
if (d->dirty || d->fontData._dirty || d->borderData._dirty || d->fillData._dirty) { |
|
|
if (d->dirty || d->fontData._dirty || d->borderData._dirty || d->fillData._dirty) { |
|
|
QByteArray key; |
|
|
QByteArray key; |
|
|
QDataStream stream(&key, QIODevice::WriteOnly); |
|
|
QDataStream stream(&key, QIODevice::WriteOnly); |
|
@ -918,10 +864,10 @@ QByteArray Format::formatKey() const |
|
|
<<d->alignmentData.alignH<<d->alignmentData.alignV<<d->alignmentData.indent |
|
|
<<d->alignmentData.alignH<<d->alignmentData.alignV<<d->alignmentData.indent |
|
|
<<d->alignmentData.rotation<<d->alignmentData.shinkToFit<<d->alignmentData.wrap |
|
|
<<d->alignmentData.rotation<<d->alignmentData.shinkToFit<<d->alignmentData.wrap |
|
|
<<d->protectionData.hidden<<d->protectionData.locked; |
|
|
<<d->protectionData.hidden<<d->protectionData.locked; |
|
|
const_cast<FormatPrivate*>(d)->formatKey = key; |
|
|
d->formatKey = key; |
|
|
const_cast<FormatPrivate*>(d)->dirty = false; |
|
|
d->dirty = false; |
|
|
const_cast<FormatPrivate*>(d)->xf_indexValid = false; |
|
|
d->xf_indexValid = false; |
|
|
const_cast<FormatPrivate*>(d)->dxf_indexValid = false; |
|
|
d->dxf_indexValid = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return d->formatKey; |
|
|
return d->formatKey; |
|
@ -929,39 +875,33 @@ QByteArray Format::formatKey() const |
|
|
|
|
|
|
|
|
void Format::setXfIndex(int index) |
|
|
void Format::setXfIndex(int index) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->xf_index = index; |
|
|
d->xf_index = index; |
|
|
d->xf_indexValid = true; |
|
|
d->xf_indexValid = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int Format::xfIndex() const |
|
|
int Format::xfIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->xf_index; |
|
|
return d->xf_index; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool Format::xfIndexValid() const |
|
|
bool Format::xfIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return !d->dirty && d->xf_indexValid; |
|
|
return !d->dirty && d->xf_indexValid; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Format::setDxfIndex(int index) |
|
|
void Format::setDxfIndex(int index) |
|
|
{ |
|
|
{ |
|
|
Q_D(Format); |
|
|
|
|
|
d->dxf_index = index; |
|
|
d->dxf_index = index; |
|
|
d->dxf_indexValid = true; |
|
|
d->dxf_indexValid = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int Format::dxfIndex() const |
|
|
int Format::dxfIndex() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->dxf_index; |
|
|
return d->dxf_index; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool Format::dxfIndexValid() const |
|
|
bool Format::dxfIndexValid() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return !d->dirty && d->dxf_indexValid; |
|
|
return !d->dirty && d->dxf_indexValid; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -977,13 +917,11 @@ bool Format::operator !=(const Format &format) const |
|
|
|
|
|
|
|
|
bool Format::isDxfFormat() const |
|
|
bool Format::isDxfFormat() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->is_dxf_fomat; |
|
|
return d->is_dxf_fomat; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int Format::theme() const |
|
|
int Format::theme() const |
|
|
{ |
|
|
{ |
|
|
Q_D(const Format); |
|
|
|
|
|
return d->theme; |
|
|
return d->theme; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|