summaryrefslogtreecommitdiffstats
path: root/kolourpaint/kpdocumentsaveoptions.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/kpdocumentsaveoptions.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint/kpdocumentsaveoptions.cpp')
-rw-r--r--kolourpaint/kpdocumentsaveoptions.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp
index 5151e739..a5b2988c 100644
--- a/kolourpaint/kpdocumentsaveoptions.cpp
+++ b/kolourpaint/kpdocumentsaveoptions.cpp
@@ -114,8 +114,8 @@ kpDocumentSaveOptions &kpDocumentSaveOptions::operator= (const kpDocumentSaveOpt
void kpDocumentSaveOptions::printDebug (const TQString &prefix) const
{
const TQString usedPrefix = !prefix.isEmpty () ?
- prefix + TQString::fromLatin1 (": ") :
- TQString::null;
+ prefix + TQString::tqfromLatin1 (": ") :
+ TQString();
kdDebug () << usedPrefix
<< "mimeType=" << mimeType ()
@@ -142,7 +142,7 @@ void kpDocumentSaveOptions::setMimeType (const TQString &mimeType)
// public static
TQString kpDocumentSaveOptions::invalidMimeType ()
{
- return TQString::null;
+ return TQString();
}
// public static
@@ -246,7 +246,7 @@ bool kpDocumentSaveOptions::qualityIsInvalid () const
TQString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config)
{
return config->readEntry (kpSettingForcedMimeType,
- TQString::fromLatin1 ("image/png"));
+ TQString::tqfromLatin1 ("image/png"));
}
// public static
@@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType,
const TQStringList mimeTypeList = mimeTypesSupportingProperty (
property, defaultMimeTypesWithPropertyList);
- return mimeTypeList.contains (mimeType);
+ return mimeTypeList.tqcontains (mimeType);
}
@@ -445,19 +445,19 @@ int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const TQString &mimeType)
// SYNC: update mime info here
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << TQString::fromLatin1 ("image/x-eps:32");
+ defaultList << TQString::tqfromLatin1 ("image/x-eps:32");
- defaultList << TQString::fromLatin1 ("image/x-portable-bitmap:1");
+ defaultList << TQString::tqfromLatin1 ("image/x-portable-bitmap:1");
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << TQString::fromLatin1 ("image/x-portable-greymap:8");
+ defaultList << TQString::tqfromLatin1 ("image/x-portable-greymap:8");
- defaultList << TQString::fromLatin1 ("image/x-xbm:1");
+ defaultList << TQString::tqfromLatin1 ("image/x-xbm:1");
const TQStringList mimeTypeList = mimeTypesSupportingProperty (
kpSettingMimeTypeMaximumColorDepth, defaultList);
- const TQString mimeTypeColon = mimeType + TQString::fromLatin1 (":");
+ const TQString mimeTypeColon = mimeType + TQString::tqfromLatin1 (":");
for (TQStringList::const_iterator it = mimeTypeList.begin ();
it != mimeTypeList.end ();
it++)
@@ -488,16 +488,16 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const TQString &m
TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << TQString::fromLatin1 ("image/png");
- defaultMimeTypes << TQString::fromLatin1 ("image/x-bmp");
- defaultMimeTypes << TQString::fromLatin1 ("image/x-pcx");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/png");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-bmp");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-pcx");
- // TODO: Only 1, 24 not 8; Qt only sees 32 but "file" cmd realises
+ // TODO: Only 1, 24 not 8; TQt only sees 32 but "file" cmd realises
// it's either 1 or 24.
- defaultMimeTypes << TQString::fromLatin1 ("image/x-rgb");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-rgb");
// TODO: Only 8 and 24 - no 1.
- defaultMimeTypes << TQString::fromLatin1 ("image/x-xpm");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/x-xpm");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableColorDepth,
@@ -517,8 +517,8 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const TQString &mime
TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << TQString::fromLatin1 ("image/jp2");
- defaultMimeTypes << TQString::fromLatin1 ("image/jpeg");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/jp2");
+ defaultMimeTypes << TQString::tqfromLatin1 ("image/jpeg");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableQuality,
@@ -545,7 +545,7 @@ int kpDocumentSaveOptions::isLossyForSaving (const TQPixmap &pixmap) const
if (mimeTypeHasConfigurableColorDepth () &&
!colorDepthIsInvalid () /*TODO: prevent*/ &&
(colorDepth () < pixmap.depth () ||
- colorDepth () < 32 && pixmap.mask ()))
+ colorDepth () < 32 && pixmap.tqmask ()))
{
ret |= ColorDepthLow;
}