summaryrefslogtreecommitdiffstats
path: root/kolourpaint/kpdocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolourpaint/kpdocument.cpp')
-rw-r--r--kolourpaint/kpdocument.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp
index 9b7d5936..fe91bfee 100644
--- a/kolourpaint/kpdocument.cpp
+++ b/kolourpaint/kpdocument.cpp
@@ -231,12 +231,12 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
// public static
TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
- TQWidget *tqparent,
+ TQWidget *parent,
kpDocumentSaveOptions *saveOptions,
kpDocumentMetaInfo *metaInfo)
{
#if DEBUG_KP_DOCUMENT
- kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << tqparent << ")" << endl;
+ kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")" << endl;
#endif
if (saveOptions)
@@ -247,11 +247,11 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
TQString tempFile;
- if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, tqparent))
+ if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, parent))
{
if (!suppressDoesntExistDialog)
{
- KMessageBox::sorry (tqparent,
+ KMessageBox::sorry (parent,
i18n ("Could not open \"%1\".")
.arg (kpDocument::prettyFilenameForURL (url)));
}
@@ -277,7 +277,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
if (detectedMimeType.isEmpty ())
{
- KMessageBox::sorry (tqparent,
+ KMessageBox::sorry (parent,
i18n ("Could not open \"%1\" - unknown mimetype.")
.arg (kpDocument::prettyFilenameForURL (url)));
KIO::NetAccess::removeTempFile (tempFile);
@@ -292,7 +292,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
if (image.isNull ())
{
- KMessageBox::sorry (tqparent,
+ KMessageBox::sorry (parent,
i18n ("Could not open \"%1\" - unsupported image format.\n"
"The file may be corrupt.")
.arg (kpDocument::prettyFilenameForURL (url)));
@@ -310,7 +310,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
" contains translucency which is not fully"
" supported. The translucency data will be"
- " approximated with a 1-bit transparency tqmask.")
+ " approximated with a 1-bit transparency mask.")
.arg (prettyFilenameForURL (url)),
i18n ("The image \"%1\""
" may have more colors than the current screen mode."
@@ -320,16 +320,16 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis
i18n ("The image \"%1\""
" contains translucency which is not fully"
" supported. The translucency data will be"
- " approximated with a 1-bit transparency tqmask.")
+ " approximated with a 1-bit transparency mask.")
.arg (prettyFilenameForURL (url)),
"docOpen",
- tqparent),
+ parent),
saveOptions,
metaInfo);
if (newPixmap.isNull ())
{
- KMessageBox::sorry (tqparent,
+ KMessageBox::sorry (parent,
i18n ("Could not open \"%1\" - out of graphics memory.")
.arg (kpDocument::prettyFilenameForURL (url)));
return TQPixmap ();
@@ -446,7 +446,7 @@ bool kpDocument::save (bool overwritePrompt, bool lossyPrompt)
// public static
bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
- TQWidget *tqparent)
+ TQWidget *parent)
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "kpDocument::lossyPromptContinue()" << endl;
@@ -465,7 +465,7 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
kpDocumentSaveOptions::Quality))
{
TQUIT_IF_CANCEL (
- KMessageBox::warningContinueCancel (tqparent,
+ KMessageBox::warningContinueCancel (parent,
i18n ("<qt><p>The <b>%1</b> format may not be able"
" to preserve all of the image's color information.</p>"
@@ -480,7 +480,7 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
else if (lossyType & kpDocumentSaveOptions::ColorDepthLow)
{
TQUIT_IF_CANCEL (
- KMessageBox::warningContinueCancel (tqparent,
+ KMessageBox::warningContinueCancel (parent,
i18n ("<qt><p>Saving the image at the low color depth of %1-bit"
" may result in the loss of color information."
@@ -503,7 +503,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool lossyPrompt,
- TQWidget *tqparent,
+ TQWidget *parent,
bool *userCancelled)
{
if (userCancelled)
@@ -515,7 +515,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
<< " type=" << type << endl;
#endif
- if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent))
+ if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent))
{
if (userCancelled)
*userCancelled = true;
@@ -596,16 +596,16 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
return true;
}
-static void CouldNotCreateTemporaryFileDialog (TQWidget *tqparent)
+static void CouldNotCreateTemporaryFileDialog (TQWidget *parent)
{
- KMessageBox::error (tqparent,
+ KMessageBox::error (parent,
i18n ("Could not save image - unable to create temporary file."));
}
-static void CouldNotSaveDialog (const KURL &url, TQWidget *tqparent)
+static void CouldNotSaveDialog (const KURL &url, TQWidget *parent)
{
// TODO: use file.errorString()
- KMessageBox::error (tqparent,
+ KMessageBox::error (parent,
i18n ("Could not save as \"%1\".")
.arg (kpDocument::prettyFilenameForURL (url)));
}
@@ -617,7 +617,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
const kpDocumentMetaInfo &metaInfo,
bool overwritePrompt,
bool lossyPrompt,
- TQWidget *tqparent)
+ TQWidget *parent)
{
// TODO: Use KIO::NetAccess:mostLocalURL() for accessing home:/ (and other
// such local URLs) for efficiency and because only local writes
@@ -632,9 +632,9 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
metaInfo.printDebug (TQString::tqfromLatin1 ("\tmetaInfo"));
#endif
- if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, tqparent))
+ if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, parent))
{
- int result = KMessageBox::warningContinueCancel (tqparent,
+ int result = KMessageBox::warningContinueCancel (parent,
i18n ("A document called \"%1\" already exists.\n"
"Do you want to overwrite it?")
.arg (prettyFilenameForURL (url)),
@@ -652,7 +652,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
}
- if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent))
+ if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because of lossyPrompt" << endl;
@@ -681,7 +681,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because could not open KSaveFile"
<< " status=" << atomicFileWriter.status () << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (tqparent);
+ ::CouldNotCreateTemporaryFileDialog (parent);
return false;
}
@@ -689,7 +689,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(atomicFileWriter.file ()),
saveOptions, metaInfo,
false/*no lossy prompt*/,
- tqparent))
+ parent))
{
atomicFileWriter.abort ();
@@ -697,7 +697,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because could not save pixmap to device"
<< endl;
#endif
- ::CouldNotSaveDialog (url, tqparent);
+ ::CouldNotSaveDialog (url, parent);
return false;
}
@@ -710,7 +710,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\tcould not close KSaveFile" << endl;
#endif
- ::CouldNotSaveDialog (url, tqparent);
+ ::CouldNotSaveDialog (url, parent);
return false;
}
} // sync KSaveFile.abort()
@@ -729,7 +729,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because tempFile empty" << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (tqparent);
+ ::CouldNotCreateTemporaryFileDialog (parent);
return false;
}
@@ -742,20 +742,20 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
kdDebug () << "\treturning false because can't open file"
<< " errorString=" << file.errorString () << endl;
#endif
- ::CouldNotCreateTemporaryFileDialog (tqparent);
+ ::CouldNotCreateTemporaryFileDialog (parent);
return false;
}
if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(&file),
saveOptions, metaInfo,
false/*no lossy prompt*/,
- tqparent))
+ parent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not save pixmap to device"
<< endl;
#endif
- ::CouldNotSaveDialog (url, tqparent);
+ ::CouldNotSaveDialog (url, parent);
return false;
}
}
@@ -765,7 +765,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not close" << endl;
#endif
- ::CouldNotSaveDialog (url, tqparent);
+ ::CouldNotSaveDialog (url, parent);
return false;
}
@@ -773,12 +773,12 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
// TODO: No one seems to know how to do this atomically
// [http://lists.kde.org/?l=kde-core-devel&m=117845162728484&w=2].
// At least, fish:// (ssh) is definitely not atomic.
- if (!KIO::NetAccess::upload (filename, url, tqparent))
+ if (!KIO::NetAccess::upload (filename, url, parent))
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "\treturning false because could not upload" << endl;
#endif
- KMessageBox::error (tqparent,
+ KMessageBox::error (parent,
i18n ("Could not save image - failed to upload."));
return false;
}
@@ -1267,7 +1267,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
if (maskBitmap.isNull ())
{
- kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl;
+ kdError () << "kpDocument::getSelectedPixmap() could not get mask" << endl;
return TQPixmap ();
}
}
@@ -1325,7 +1325,7 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
//
- // Figure out tqmask for non-rectangular selections
+ // Figure out mask for non-rectangular selections
//
TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);
@@ -1355,8 +1355,8 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
TQPixmap erasePixmap (boundingRect.width (), boundingRect.height ());
erasePixmap.fill (backgroundColor.toTQColor ());
- if (selTransparentPixmap.tqmask ())
- erasePixmap.setMask (*selTransparentPixmap.tqmask ());
+ if (selTransparentPixmap.mask ())
+ erasePixmap.setMask (*selTransparentPixmap.mask ());
paintPixmapAt (erasePixmap, boundingRect.topLeft ());
}