summaryrefslogtreecommitdiffstats
path: root/kiconedit/kicon.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 /kiconedit/kicon.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 'kiconedit/kicon.cpp')
-rw-r--r--kiconedit/kicon.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kiconedit/kicon.cpp b/kiconedit/kicon.cpp
index 9da72c9b..f1f31590 100644
--- a/kiconedit/kicon.cpp
+++ b/kiconedit/kicon.cpp
@@ -32,8 +32,8 @@
#include "kicon.h"
#include "utils.h"
-KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url)
- : TQObject(parent)
+KIconEditIcon::KIconEditIcon(TQObject *tqparent, const TQImage *img, KURL url)
+ : TQObject(tqparent)
{
f = 0;
_lastdir = "/";
@@ -70,8 +70,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
if(!url.isValid()) // Giving up
{
- TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
- KMessageBox::sorry((TQWidget*)parent(), msg);
+ TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").tqarg(url.url());
+ KMessageBox::sorry((TQWidget*)tqparent(), msg);
return false;
}
}
@@ -84,10 +84,10 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
}
else
{
- if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
+ if(!KIO::NetAccess::download( url, filename, (TQWidget*)tqparent() ))
{
- TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((TQWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL());
+ KMessageBox::error((TQWidget*)tqparent(), msg);
return false;
}
}
@@ -101,8 +101,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url)
if(!loadedOk)
{
- TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((TQWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL());
+ KMessageBox::error((TQWidget*)tqparent(), msg);
}
else
{
@@ -152,10 +152,10 @@ bool KIconEditIcon::promptForFile(const TQImage *img)
"*.ico|Icon files (*.ico)\n");
- KURL url = KFileDialog::getOpenURL( TQString::null, filter );
+ KURL url = KFileDialog::getOpenURL( TQString(), filter );
*/
bool loaded = false;
- KURL url = KFileDialog::getImageOpenURL( TQString::null, static_cast<TQWidget *>(parent()) );
+ KURL url = KFileDialog::getImageOpenURL( TQString(), TQT_TQWIDGET(tqparent()) );
if( !url.isEmpty() )
{
@@ -174,7 +174,7 @@ bool KIconEditIcon::saveAs(const TQImage *image)
TQString file;
//Get list of file types..
- KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, static_cast<TQWidget *>(parent()), "file dialog", true);
+ KFileDialog *dialog=new KFileDialog(TQString(), TQString(), TQT_TQWIDGET(tqparent()), "file dialog", true);
dialog->setCaption( i18n("Save Icon As") );
dialog->setKeepLocation( true );
dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" );
@@ -206,9 +206,9 @@ bool KIconEditIcon::saveAs(const TQImage *image)
if(TQFile::exists(file))
{
- int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()),
+ int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(tqparent()),
i18n( "A file named \"%1\" already exists. "
- "Overwrite it?" ).arg(file),
+ "Overwrite it?" ).tqarg(file),
i18n( "Overwrite File?" ),
i18n( "&Overwrite" ) );
@@ -265,8 +265,8 @@ bool KIconEditIcon::save(const TQImage *image, const TQString &_filename)
}
else
{
- TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
- KMessageBox::error((TQWidget*)parent(), msg);
+ TQString msg = i18n("There was an error saving:\n%1\n").tqarg(str);
+ KMessageBox::error((TQWidget*)tqparent(), msg);
kdDebug(4640) << "KIconEditIcon::save - " << msg << endl;
}