summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kivioglobal.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-21 14:05:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-21 14:05:41 -0600
commit2d6954f69caf63ed5057bd8e1405a65d7d970292 (patch)
tree88e6436b2e81d4e68313f02a9021054252e14cc4 /kivio/kiviopart/kivioglobal.cpp
parentf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (diff)
downloadkoffice-2d6954f69caf63ed5057bd8e1405a65d7d970292.tar.gz
koffice-2d6954f69caf63ed5057bd8e1405a65d7d970292.zip
Rename obsolete tq methods to standard names
Diffstat (limited to 'kivio/kiviopart/kivioglobal.cpp')
-rw-r--r--kivio/kiviopart/kivioglobal.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kivio/kiviopart/kivioglobal.cpp b/kivio/kiviopart/kivioglobal.cpp
index 7479af08..201eea08 100644
--- a/kivio/kiviopart/kivioglobal.cpp
+++ b/kivio/kiviopart/kivioglobal.cpp
@@ -44,52 +44,52 @@ struct PaperSizeDef {
int unit;
};
-void Kivio::savePageLayout(TQDomElement& e, const KoPageLayout& tqlayout)
+void Kivio::savePageLayout(TQDomElement& e, const KoPageLayout& layout)
{
- XmlWriteFloat(e, "width", tqlayout.ptWidth);
- XmlWriteFloat(e, "height", tqlayout.ptHeight);
- XmlWriteFloat(e, "marginLeft", tqlayout.ptLeft);
- XmlWriteFloat(e, "marginRight", tqlayout.ptRight);
- XmlWriteFloat(e, "marginTop", tqlayout.ptTop);
- XmlWriteFloat(e, "marginBottom", tqlayout.ptBottom);
- XmlWriteString(e, "format", KoPageFormat::formatString(tqlayout.format));
- XmlWriteString(e, "orientation", Kivio::orientationString(tqlayout.orientation));
+ XmlWriteFloat(e, "width", layout.ptWidth);
+ XmlWriteFloat(e, "height", layout.ptHeight);
+ XmlWriteFloat(e, "marginLeft", layout.ptLeft);
+ XmlWriteFloat(e, "marginRight", layout.ptRight);
+ XmlWriteFloat(e, "marginTop", layout.ptTop);
+ XmlWriteFloat(e, "marginBottom", layout.ptBottom);
+ XmlWriteString(e, "format", KoPageFormat::formatString(layout.format));
+ XmlWriteString(e, "orientation", Kivio::orientationString(layout.orientation));
}
-// ## TODO: remove this method, now that tqlayout.saveOasis() does it all
-KoGenStyle Kivio::savePageLayout(const KoPageLayout& tqlayout)
+// ## TODO: remove this method, now that layout.saveOasis() does it all
+KoGenStyle Kivio::savePageLayout(const KoPageLayout& layout)
{
- return tqlayout.saveOasis();
+ return layout.saveOasis();
}
KoPageLayout Kivio::loadPageLayout(const TQDomElement& e)
{
- KoPageLayout tqlayout;
+ KoPageLayout layout;
if(e.hasAttribute("unit")) {
// Compatibility with Kivio <= 1.2.x
kdDebug(43000) << "Compatibility mode..." << endl;
KoUnit::Unit unit = Kivio::convToKoUnit(XmlReadInt(e, "unit", 0));
- tqlayout.ptWidth = KoUnit::fromUserValue(XmlReadFloat(e, "width", 0.0), unit);
- tqlayout.ptHeight = KoUnit::fromUserValue(XmlReadFloat(e, "height", 0.0), unit);
- tqlayout.ptLeft = KoUnit::fromUserValue(XmlReadFloat(e, "marginLeft", 0.0), unit);
- tqlayout.ptRight = KoUnit::fromUserValue(XmlReadFloat(e, "marginRight", 0.0), unit);
- tqlayout.ptTop = KoUnit::fromUserValue(XmlReadFloat(e, "marginTop", 0.0), unit);
- tqlayout.ptBottom = KoUnit::fromUserValue(XmlReadFloat(e, "marginBottom", 0.0), unit);
- Kivio::setFormatOrientation(tqlayout);
+ layout.ptWidth = KoUnit::fromUserValue(XmlReadFloat(e, "width", 0.0), unit);
+ layout.ptHeight = KoUnit::fromUserValue(XmlReadFloat(e, "height", 0.0), unit);
+ layout.ptLeft = KoUnit::fromUserValue(XmlReadFloat(e, "marginLeft", 0.0), unit);
+ layout.ptRight = KoUnit::fromUserValue(XmlReadFloat(e, "marginRight", 0.0), unit);
+ layout.ptTop = KoUnit::fromUserValue(XmlReadFloat(e, "marginTop", 0.0), unit);
+ layout.ptBottom = KoUnit::fromUserValue(XmlReadFloat(e, "marginBottom", 0.0), unit);
+ Kivio::setFormatOrientation(layout);
kdDebug(43000) << "Ready." << endl;
} else {
- tqlayout.ptWidth = XmlReadFloat(e, "width", 0.0);
- tqlayout.ptHeight = XmlReadFloat(e, "height", 0.0);
- tqlayout.ptLeft = XmlReadFloat(e, "marginLeft", 0.0);
- tqlayout.ptRight = XmlReadFloat(e, "marginRight", 0.0);
- tqlayout.ptTop = XmlReadFloat(e, "marginTop", 0.0);
- tqlayout.ptBottom = XmlReadFloat(e, "marginBottom", 0.0);
- tqlayout.format = KoPageFormat::formatFromString(XmlReadString(e, "format", pageSizeString(KGlobal::locale()->pageSize())));
- tqlayout.orientation = Kivio::orientationFromString(XmlReadString(e, "orientation", "Portrait"));
+ layout.ptWidth = XmlReadFloat(e, "width", 0.0);
+ layout.ptHeight = XmlReadFloat(e, "height", 0.0);
+ layout.ptLeft = XmlReadFloat(e, "marginLeft", 0.0);
+ layout.ptRight = XmlReadFloat(e, "marginRight", 0.0);
+ layout.ptTop = XmlReadFloat(e, "marginTop", 0.0);
+ layout.ptBottom = XmlReadFloat(e, "marginBottom", 0.0);
+ layout.format = KoPageFormat::formatFromString(XmlReadString(e, "format", pageSizeString(KGlobal::locale()->pageSize())));
+ layout.orientation = Kivio::orientationFromString(XmlReadString(e, "orientation", "Portrait"));
}
- return tqlayout;
+ return layout;
}
KoUnit::Unit Kivio::convToKoUnit(int tkUnit)
@@ -132,7 +132,7 @@ KoOrientation Kivio::orientationFromString(const TQString& s)
return PG_PORTRAIT;
}
-void Kivio::setFormatOrientation(KoPageLayout& tqlayout)
+void Kivio::setFormatOrientation(KoPageLayout& layout)
{
const PaperSizeDef PapersTable[] = {
{"A0",841,1189,KoUnit::U_MM},
@@ -166,20 +166,20 @@ void Kivio::setFormatOrientation(KoPageLayout& tqlayout)
PaperSizeDef sizeDef = PapersTable[0];
bool found = false;
float width, height;
- tqlayout.format = PG_CUSTOM;
- tqlayout.orientation = PG_PORTRAIT;
+ layout.format = PG_CUSTOM;
+ layout.orientation = PG_PORTRAIT;
while((sizeDef.unit != -2) && !found) {
width = KoUnit::fromUserValue(sizeDef.width, static_cast<KoUnit::Unit>(sizeDef.unit));
height = KoUnit::fromUserValue(sizeDef.height, static_cast<KoUnit::Unit>(sizeDef.unit));
- if((tqlayout.ptWidth == width) && (tqlayout.ptHeight == height)) {
- tqlayout.format = KoPageFormat::formatFromString(sizeDef.title);
- tqlayout.orientation = PG_PORTRAIT;
+ if((layout.ptWidth == width) && (layout.ptHeight == height)) {
+ layout.format = KoPageFormat::formatFromString(sizeDef.title);
+ layout.orientation = PG_PORTRAIT;
found = true;
- } else if((tqlayout.ptWidth == height) && (tqlayout.ptHeight == width)) {
- tqlayout.format = KoPageFormat::formatFromString(sizeDef.title);
- tqlayout.orientation = PG_LANDSCAPE;
+ } else if((layout.ptWidth == height) && (layout.ptHeight == width)) {
+ layout.format = KoPageFormat::formatFromString(sizeDef.title);
+ layout.orientation = PG_LANDSCAPE;
found = true;
}