diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /kstars/kstars/imageviewer.cpp | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip |
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars/kstars/imageviewer.cpp')
-rw-r--r-- | kstars/kstars/imageviewer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kstars/kstars/imageviewer.cpp b/kstars/kstars/imageviewer.cpp index 4d3e5a15..b92ee486 100644 --- a/kstars/kstars/imageviewer.cpp +++ b/kstars/kstars/imageviewer.cpp @@ -29,17 +29,17 @@ #include <kapplication.h> -ImageViewer::ImageViewer (const KURL *url, const TQString &capText, TQWidget *parent, const char *name) - : KMainWindow (parent, name), imageURL (*url), fileIsImage (false), +ImageViewer::ImageViewer (const KURL *url, const TQString &capText, TQWidget *tqparent, const char *name) + : KMainWindow (tqparent, name), imageURL (*url), fileIsImage (false), ctrl (false), key_s (false), key_q (false), downloadJob(0) { // toolbar can dock only on top-position and can't be minimized // JH: easier to just disable its mobility toolBar()->setMovingEnabled( false ); - KAction *action = new KAction (i18n ("Close Window"), "fileclose", CTRL+Key_Q, this, TQT_SLOT (close()), actionCollection()); + KAction *action = new KAction (i18n ("Close Window"), "fileclose", CTRL+Key_Q, TQT_TQOBJECT(this), TQT_SLOT (close()), actionCollection()); action->plug (toolBar()); - action = new KAction (i18n ("Save Image"), "filesave", CTRL+Key_S, this, TQT_SLOT (saveFileToDisc()), actionCollection()); + action = new KAction (i18n ("Save Image"), "filesave", CTRL+Key_S, TQT_TQOBJECT(this), TQT_SLOT (saveFileToDisc()), actionCollection()); action->plug (toolBar()); statusBar()->insertItem( capText, 0, 1, true ); @@ -60,9 +60,9 @@ ImageViewer::~ImageViewer() { if (!file->remove()) // if the file was not complete downloaded the suffix is ".part" { - kdDebug()<<TQString("remove of %1 failed").arg(file->name())<<endl; + kdDebug()<<TQString("remove of %1 failed").tqarg(file->name())<<endl; file->setName (file->name() + ".part"); // set new suffix to filename - kdDebug()<<TQString("try to remove %1").arg( file->name())<<endl; + kdDebug()<<TQString("try to remove %1").tqarg( file->name())<<endl; if (file->remove()) kdDebug()<<"file removed\n"; else @@ -86,7 +86,7 @@ void ImageViewer::resizeEvent (TQResizeEvent */*ev*/) void ImageViewer::closeEvent (TQCloseEvent *ev) { if (ev) // not if closeEvent (0) is called, because segfault - ev->accept(); // parent-widgets should not get this event, so it will be filtered + ev->accept(); // tqparent-widgets should not get this event, so it will be filtered this->~ImageViewer(); // destroy the object, so the object can only allocated with operator new, not as a global/local variable } @@ -208,9 +208,9 @@ void ImageViewer::saveFileToDisc() TQFile f (newURL.directory() + "/" + newURL.fileName()); if (f.exists()) { - 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(newURL.fileName()), + "Overwrite it?" ).tqarg(newURL.fileName()), i18n( "Overwrite File?" ), i18n( "&Overwrite" ) ); if(r==KMessageBox::Cancel) return; |