summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
commitbf7f88413be3831a9372d323d02fc0335b9f9188 (patch)
tree516fdef9206245b40a14f99b4e3d9ef9289196e0
parente238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff)
downloadgwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.tar.gz
gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.zip
TQt4 port Gwenview
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1233720 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--src/app/Makefile.am6
-rw-r--r--src/app/bookmarkdialog.cpp32
-rw-r--r--src/app/bookmarkdialog.h15
-rw-r--r--src/app/bookmarkdialogbase.ui16
-rw-r--r--src/app/bookmarkowner.cpp8
-rw-r--r--src/app/bookmarkowner.h9
-rw-r--r--src/app/bookmarkviewcontroller.cpp118
-rw-r--r--src/app/bookmarkviewcontroller.h34
-rw-r--r--src/app/configdialog.cpp70
-rw-r--r--src/app/configdialog.h5
-rw-r--r--src/app/configfileoperationspage.ui28
-rw-r--r--src/app/configfullscreenpage.ui22
-rw-r--r--src/app/configimagelistpage.ui52
-rw-r--r--src/app/configimageviewpage.ui48
-rw-r--r--src/app/configmiscpage.ui36
-rw-r--r--src/app/configslideshowpage.ui18
-rw-r--r--src/app/dirviewcontroller.cpp42
-rw-r--r--src/app/dirviewcontroller.h23
-rw-r--r--src/app/history.cpp30
-rw-r--r--src/app/history.h11
-rw-r--r--src/app/kipiinterface.cpp72
-rw-r--r--src/app/kipiinterface.h7
-rw-r--r--src/app/main.cpp22
-rw-r--r--src/app/mainwindow.cpp360
-rw-r--r--src/app/mainwindow.h31
-rw-r--r--src/app/metaedit.cpp44
-rw-r--r--src/app/metaedit.h19
-rw-r--r--src/app/testvtabwidget.cpp10
-rw-r--r--src/app/treeview.cpp56
-rw-r--r--src/app/treeview.h13
-rw-r--r--src/app/truncatedtextlabel.h36
-rw-r--r--src/app/vtabwidget.cpp30
-rw-r--r--src/app/vtabwidget.h15
-rw-r--r--src/gvcore/archive.cpp20
-rw-r--r--src/gvcore/archive.h10
-rw-r--r--src/gvcore/bcgdialog.cpp22
-rw-r--r--src/gvcore/bcgdialog.h3
-rw-r--r--src/gvcore/bcgdialogbase.ui24
-rw-r--r--src/gvcore/busylevelmanager.cpp24
-rw-r--r--src/gvcore/busylevelmanager.h18
-rw-r--r--src/gvcore/cache.cpp86
-rw-r--r--src/gvcore/cache.h35
-rw-r--r--src/gvcore/captionformatter.cpp30
-rw-r--r--src/gvcore/captionformatter.h26
-rw-r--r--src/gvcore/clicklineedit.cpp36
-rw-r--r--src/gvcore/clicklineedit.h21
-rw-r--r--src/gvcore/cursortracker.cpp38
-rw-r--r--src/gvcore/cursortracker.h14
-rw-r--r--src/gvcore/deletedialog.cpp30
-rw-r--r--src/gvcore/deletedialog.h5
-rw-r--r--src/gvcore/deletedialogbase.ui24
-rw-r--r--src/gvcore/document.cpp152
-rw-r--r--src/gvcore/document.h47
-rw-r--r--src/gvcore/documentanimatedloadedimpl.cpp16
-rw-r--r--src/gvcore/documentanimatedloadedimpl.h15
-rw-r--r--src/gvcore/documentimpl.cpp32
-rw-r--r--src/gvcore/documentimpl.h35
-rw-r--r--src/gvcore/documentjpegloadedimpl.cpp34
-rw-r--r--src/gvcore/documentjpegloadedimpl.h23
-rw-r--r--src/gvcore/documentloadedimpl.cpp66
-rw-r--r--src/gvcore/documentloadedimpl.h13
-rw-r--r--src/gvcore/documentloadingimpl.cpp20
-rw-r--r--src/gvcore/documentloadingimpl.h3
-rw-r--r--src/gvcore/documentotherloadedimpl.h2
-rw-r--r--src/gvcore/dragpixmapgenerator.h46
-rw-r--r--src/gvcore/externaltoolaction.cpp18
-rw-r--r--src/gvcore/externaltoolaction.h3
-rw-r--r--src/gvcore/externaltoolcontext.cpp12
-rw-r--r--src/gvcore/externaltoolcontext.h13
-rw-r--r--src/gvcore/externaltooldialog.cpp114
-rw-r--r--src/gvcore/externaltooldialog.h7
-rw-r--r--src/gvcore/externaltooldialogbase.ui36
-rw-r--r--src/gvcore/externaltoolmanager.cpp96
-rw-r--r--src/gvcore/externaltoolmanager.h14
-rw-r--r--src/gvcore/filedetailview.cpp174
-rw-r--r--src/gvcore/filedetailview.h43
-rw-r--r--src/gvcore/filedetailviewitem.cpp4
-rw-r--r--src/gvcore/filedetailviewitem.h34
-rw-r--r--src/gvcore/fileoperation.cpp70
-rw-r--r--src/gvcore/fileoperation.h31
-rw-r--r--src/gvcore/fileopobject.cpp58
-rw-r--r--src/gvcore/fileopobject.h57
-rw-r--r--src/gvcore/filethumbnailview.cpp246
-rw-r--r--src/gvcore/filethumbnailview.h47
-rw-r--r--src/gvcore/filethumbnailviewitem.cpp108
-rw-r--r--src/gvcore/filethumbnailviewitem.h32
-rw-r--r--src/gvcore/fileviewbase.h4
-rw-r--r--src/gvcore/fileviewconfig.kcfg4
-rw-r--r--src/gvcore/fileviewcontroller.cpp378
-rw-r--r--src/gvcore/fileviewcontroller.h51
-rw-r--r--src/gvcore/filterbar.ui30
-rw-r--r--src/gvcore/fullscreenbar.cpp54
-rw-r--r--src/gvcore/fullscreenbar.h13
-rw-r--r--src/gvcore/gimp.h6
-rw-r--r--src/gvcore/imageframe.h14
-rw-r--r--src/gvcore/imageloader.cpp206
-rw-r--r--src/gvcore/imageloader.h50
-rw-r--r--src/gvcore/imagesavedialog.cpp52
-rw-r--r--src/gvcore/imagesavedialog.h15
-rw-r--r--src/gvcore/imageview.cpp370
-rw-r--r--src/gvcore/imageview.h73
-rw-r--r--src/gvcore/imageviewconfig.kcfg6
-rw-r--r--src/gvcore/imageviewcontroller.cpp112
-rw-r--r--src/gvcore/imageviewcontroller.h21
-rw-r--r--src/gvcore/imageviewtools.cpp52
-rw-r--r--src/gvcore/imageviewtools.h44
-rw-r--r--src/gvcore/inputdialog.cpp22
-rw-r--r--src/gvcore/inputdialog.h5
-rw-r--r--src/gvcore/jpegformattype.cpp34
-rw-r--r--src/gvcore/jpegformattype.h6
-rw-r--r--src/gvcore/mimetypeutils.cpp16
-rw-r--r--src/gvcore/mimetypeutils.h8
-rw-r--r--src/gvcore/mngformattype.cpp84
-rw-r--r--src/gvcore/mngformattype.h26
-rw-r--r--src/gvcore/pngformattype.cpp100
-rw-r--r--src/gvcore/pngformattype.h22
-rw-r--r--src/gvcore/printdialog.cpp118
-rw-r--r--src/gvcore/printdialog.h19
-rw-r--r--src/gvcore/printdialogpagebase.ui48
-rw-r--r--src/gvcore/qxcfi.cpp426
-rw-r--r--src/gvcore/qxcfi.h176
-rw-r--r--src/gvcore/slideshow.cpp32
-rw-r--r--src/gvcore/slideshow.h21
-rw-r--r--src/gvcore/threadgate.cpp18
-rw-r--r--src/gvcore/threadgate.h13
-rw-r--r--src/gvcore/thumbnaildetailsdialog.cpp14
-rw-r--r--src/gvcore/thumbnaildetailsdialog.h1
-rw-r--r--src/gvcore/thumbnaildetailsdialogbase.ui26
-rw-r--r--src/gvcore/thumbnailloadjob.cpp166
-rw-r--r--src/gvcore/thumbnailloadjob.h70
-rw-r--r--src/gvcore/timeutils.cpp8
-rw-r--r--src/gvcore/timeutils.h4
-rw-r--r--src/gvcore/xcursor.cpp36
-rw-r--r--src/gvcore/xcursor.h6
-rw-r--r--src/gvcore/xpm.cpp146
-rw-r--r--src/gvcore/xpm.h14
-rw-r--r--src/gvdirpart/gvdirpart.cpp74
-rw-r--r--src/gvdirpart/gvdirpart.h14
-rw-r--r--src/gvimagepart/gvimagepart.cpp102
-rw-r--r--src/gvimagepart/gvimagepart.h21
-rw-r--r--src/imageutils/croppedqimage.cpp30
-rw-r--r--src/imageutils/croppedqimage.h16
-rw-r--r--src/imageutils/imageutils.cpp50
-rw-r--r--src/imageutils/imageutils.h20
-rw-r--r--src/imageutils/jpegcontent.cpp128
-rw-r--r--src/imageutils/jpegcontent.h42
-rw-r--r--src/imageutils/jpegint.h106
-rw-r--r--src/imageutils/orientation.h2
-rw-r--r--src/imageutils/scale.cpp124
-rw-r--r--src/imageutils/testjpegcontent.cpp54
-rw-r--r--src/imageutils/transupp.c20
-rw-r--r--src/spec/gwenview-mdk.spec6
-rw-r--r--src/tsthread/tsthread.cpp52
-rw-r--r--src/tsthread/tsthread.h169
-rw-r--r--src/tsthread/tswaitcondition.cpp8
-rw-r--r--src/tsthread/tswaitcondition.h20
156 files changed, 3941 insertions, 3882 deletions
diff --git a/src/app/Makefile.am b/src/app/Makefile.am
index 037933a..275d2a4 100644
--- a/src/app/Makefile.am
+++ b/src/app/Makefile.am
@@ -32,10 +32,10 @@ gwenview_la_SOURCES = \
history.cpp \
main.cpp
-gwenview_la_LIBADD = libgwenshared.la ../gvcore/libgwenviewcore.la $(GV_LIB_KIPI) $(LIB_KUTILS)
+gwenview_la_LIBADD = libgwenshared.la ../gvcore/libgwenviewcore.la $(GV_LIB_KIPI) $(LIB_KUTILS) $(LIB_QT)
# the library search path.
-gwenview_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+gwenview_la_LDFLAGS = $(all_libraries) $(LIB_QT) -module $(KDE_PLUGIN)
# set the include path for X, qt and KDE
@@ -53,4 +53,4 @@ testvtabwidget_LDADD = \
libgwenshared.la \
$(LIB_KUTILS) $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_KDEPRINT) $(LIB_QT) \
$(LIBJPEG)
-testvtabwidget_LDFLAGS = $(all_libraries)
+testvtabwidget_LDFLAGS = $(all_libraries) $(LIB_QT)
diff --git a/src/app/bookmarkdialog.cpp b/src/app/bookmarkdialog.cpp
index 3a89491..d446d22 100644
--- a/src/app/bookmarkdialog.cpp
+++ b/src/app/bookmarkdialog.cpp
@@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "bookmarkdialog.moc"
-// Qt
-#include <qlabel.h>
+// TQt
+#include <tqlabel.h>
// KDE
#include <kfile.h>
@@ -39,8 +39,8 @@ public:
BookmarkDialog::Mode mMode;
};
-BookmarkDialog::BookmarkDialog(QWidget* parent, BookmarkDialog::Mode mode)
-: KDialogBase(parent,"folderconfig",true,QString::null,Ok|Cancel)
+BookmarkDialog::BookmarkDialog(TQWidget* tqparent, BookmarkDialog::Mode mode)
+: KDialogBase(tqparent,"folderconfig",true,TQString(),Ok|Cancel)
{
d=new BookmarkDialogPrivate;
d->mContent=new BookmarkDialogBase(this);
@@ -51,17 +51,17 @@ BookmarkDialog::BookmarkDialog(QWidget* parent, BookmarkDialog::Mode mode)
d->mContent->mUrl->setMode(KFile::Directory);
d->mContent->mIcon->setIcon("folder");
- connect(d->mContent->mTitle,SIGNAL(textChanged(const QString&)),
- this, SLOT(updateOk()));
- connect(d->mContent->mIcon,SIGNAL(iconChanged(QString)),
- this, SLOT(updateOk()));
+ connect(d->mContent->mTitle,TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(updateOk()));
+ connect(d->mContent->mIcon,TQT_SIGNAL(iconChanged(TQString)),
+ this, TQT_SLOT(updateOk()));
if (mode==BOOKMARK_GROUP) {
d->mContent->mUrlLabel->hide();
d->mContent->mUrl->hide();
} else {
- connect(d->mContent->mUrl,SIGNAL(textChanged(const QString&)),
- this, SLOT(updateOk()));
+ connect(d->mContent->mUrl,TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(updateOk()));
}
switch (mode) {
@@ -88,27 +88,27 @@ void BookmarkDialog::updateOk() {
enableButton(Ok, enabled);
}
-void BookmarkDialog::setIcon(const QString& icon) {
+void BookmarkDialog::setIcon(const TQString& icon) {
d->mContent->mIcon->setIcon(icon);
}
-QString BookmarkDialog::icon() const {
+TQString BookmarkDialog::icon() const {
return d->mContent->mIcon->icon();
}
-void BookmarkDialog::setTitle(const QString& title) {
+void BookmarkDialog::setTitle(const TQString& title) {
d->mContent->mTitle->setText(title);
}
-QString BookmarkDialog::title() const {
+TQString BookmarkDialog::title() const {
return d->mContent->mTitle->text();
}
-void BookmarkDialog::setURL(const QString& url) {
+void BookmarkDialog::setURL(const TQString& url) {
d->mContent->mUrl->setURL(url);
}
-QString BookmarkDialog::url() const {
+TQString BookmarkDialog::url() const {
return d->mContent->mUrl->url();
}
diff --git a/src/app/bookmarkdialog.h b/src/app/bookmarkdialog.h
index 808d3ed..17f43a3 100644
--- a/src/app/bookmarkdialog.h
+++ b/src/app/bookmarkdialog.h
@@ -29,18 +29,19 @@ class BookmarkDialogPrivate;
class BookmarkDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { BOOKMARK_GROUP, BOOKMARK };
- BookmarkDialog(QWidget* parent, Mode mode);
+ BookmarkDialog(TQWidget* tqparent, Mode mode);
~BookmarkDialog();
- void setIcon(const QString&);
- QString icon() const;
- void setTitle(const QString&);
- QString title() const;
- void setURL(const QString&);
- QString url() const;
+ void setIcon(const TQString&);
+ TQString icon() const;
+ void setTitle(const TQString&);
+ TQString title() const;
+ void setURL(const TQString&);
+ TQString url() const;
protected slots:
void updateOk();
diff --git a/src/app/bookmarkdialogbase.ui b/src/app/bookmarkdialogbase.ui
index 4768e4f..410695f 100644
--- a/src/app/bookmarkdialogbase.ui
+++ b/src/app/bookmarkdialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>BookmarkDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>BookmarkDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>400</width>
<height>0</height>
@@ -36,7 +36,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>mUrlLabel</cstring>
</property>
@@ -54,7 +54,7 @@
<cstring>mUrl</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -62,7 +62,7 @@
<string>Title:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -88,7 +88,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>383</width>
<height>16</height>
@@ -99,7 +99,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kurlrequester.h</includehint>
diff --git a/src/app/bookmarkowner.cpp b/src/app/bookmarkowner.cpp
index 49364ac..986a7ca 100644
--- a/src/app/bookmarkowner.cpp
+++ b/src/app/bookmarkowner.cpp
@@ -27,19 +27,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-BookmarkOwner::BookmarkOwner(QWidget* parent)
-: QObject(parent)
+BookmarkOwner::BookmarkOwner(TQWidget* tqparent)
+: TQObject(tqparent)
{}
-void BookmarkOwner::openBookmarkURL(const QString& strURL)
+void BookmarkOwner::openBookmarkURL(const TQString& strURL)
{
KURL url(strURL);
emit openURL(url);
}
-QString BookmarkOwner::currentURL() const
+TQString BookmarkOwner::currentURL() const
{
return mURL.prettyURL();
}
diff --git a/src/app/bookmarkowner.h b/src/app/bookmarkowner.h
index bafac1b..e2a6feb 100644
--- a/src/app/bookmarkowner.h
+++ b/src/app/bookmarkowner.h
@@ -28,14 +28,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-class BookmarkOwner : public QObject, public KBookmarkOwner {
+class BookmarkOwner : public TQObject, public KBookmarkOwner {
Q_OBJECT
+ TQ_OBJECT
public:
- BookmarkOwner(QWidget* parent);
+ BookmarkOwner(TQWidget* tqparent);
// KBookmarkOwner interface
- void openBookmarkURL(const QString&);
- QString currentURL() const;
+ void openBookmarkURL(const TQString&);
+ TQString currentURL() const;
public slots:
void setURL(const KURL&);
diff --git a/src/app/bookmarkviewcontroller.cpp b/src/app/bookmarkviewcontroller.cpp
index 159de18..664688b 100644
--- a/src/app/bookmarkviewcontroller.cpp
+++ b/src/app/bookmarkviewcontroller.cpp
@@ -23,12 +23,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <memory>
-// Qt
-#include <qcursor.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+// TQt
+#include <tqcursor.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
// KDE
#include <kaction.h>
@@ -52,13 +52,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
// URLDropListView
-URLDropListView::URLDropListView(QWidget* parent)
-: KListView(parent) {
+URLDropListView::URLDropListView(TQWidget* tqparent)
+: KListView(tqparent) {
setAcceptDrops(true);
}
-void URLDropListView::contentsDragMoveEvent(QDragMoveEvent* event) {
+void URLDropListView::contentsDragMoveEvent(TQDragMoveEvent* event) {
if (KURLDrag::canDecode(event)) {
event->accept();
} else {
@@ -71,8 +71,8 @@ void URLDropListView::contentsDragMoveEvent(QDragMoveEvent* event) {
struct BookmarkItem : public KListViewItem {
template <class ItemParent>
- BookmarkItem(ItemParent* parent, const KBookmark& bookmark)
- : KListViewItem(parent)
+ BookmarkItem(ItemParent* tqparent, const KBookmark& bookmark)
+ : KListViewItem(tqparent)
, mBookmark(bookmark)
{
refresh();
@@ -87,18 +87,18 @@ struct BookmarkItem : public KListViewItem {
};
-class BookmarkToolTip : public QToolTip {
+class BookmarkToolTip : public TQToolTip {
public:
BookmarkToolTip(KListView* lv)
- : QToolTip(lv->viewport())
+ : TQToolTip(lv->viewport())
, mListView(lv) {}
- void maybeTip(const QPoint& pos) {
+ void maybeTip(const TQPoint& pos) {
BookmarkItem *item = static_cast<BookmarkItem*>( mListView->itemAt(pos) );
if ( !item) return;
if (item->mBookmark.isGroup()) return;
- QRect rect=mListView->itemRect(item);
+ TQRect rect=mListView->tqitemRect(item);
tip(rect, item->mBookmark.url().prettyURL());
};
@@ -107,7 +107,7 @@ public:
struct BookmarkViewController::Private {
- QVBox* mBox;
+ TQVBox* mBox;
KListView* mListView;
KBookmarkManager* mManager;
KURL mCurrentURL;
@@ -157,7 +157,7 @@ struct BookmarkViewController::Private {
dialog.setTitle(url.fileName());
dialog.setURL(url.prettyURL());
dialog.setIcon(KMimeType::iconForURL(url));
- if (dialog.exec()==QDialog::Rejected) return;
+ if (dialog.exec()==TQDialog::Rejected) return;
KBookmarkGroup parentGroup=findBestParentGroup();
parentGroup.addBookmark(mManager, dialog.title(), dialog.url(), dialog.icon());
@@ -166,20 +166,20 @@ struct BookmarkViewController::Private {
};
-void URLDropListView::contentsDropEvent(QDropEvent* event) {
+void URLDropListView::contentsDropEvent(TQDropEvent* event) {
KURL::List urls;
if (!KURLDrag::decode(event, urls)) return;
emit urlDropped(event, urls);
}
-BookmarkViewController::BookmarkViewController(QWidget* parent)
-: QObject(parent)
+BookmarkViewController::BookmarkViewController(TQWidget* tqparent)
+: TQObject(tqparent)
{
d=new Private;
d->mManager=0;
- d->mBox=new QVBox(parent);
+ d->mBox=new TQVBox(tqparent);
// Init listview
d->mListView=new URLDropListView(d->mBox);
@@ -188,29 +188,29 @@ BookmarkViewController::BookmarkViewController(QWidget* parent)
d->mListView->header()->hide();
d->mListView->setRootIsDecorated(true);
- d->mListView->addColumn(QString::null);
+ d->mListView->addColumn(TQString());
d->mListView->setSorting(-1);
d->mListView->setShowToolTips(false);
d->mListView->setFullWidth(true);
- connect(d->mListView, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(slotOpenBookmark(QListViewItem*)) );
- connect(d->mListView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotOpenBookmark(QListViewItem*)) );
- connect(d->mListView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotContextMenu(QListViewItem*)) );
- connect(d->mListView, SIGNAL(urlDropped(QDropEvent*, const KURL::List&)),
- this, SLOT(slotURLDropped(QDropEvent*, const KURL::List&)) );
+ connect(d->mListView, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(slotOpenBookmark(TQListViewItem*)) );
+ connect(d->mListView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotOpenBookmark(TQListViewItem*)) );
+ connect(d->mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotContextMenu(TQListViewItem*)) );
+ connect(d->mListView, TQT_SIGNAL(urlDropped(TQDropEvent*, const KURL::List&)),
+ this, TQT_SLOT(slotURLDropped(TQDropEvent*, const KURL::List&)) );
// Init toolbar
KToolBar* toolbar=new KToolBar(d->mBox, "", true);
KAction* action;
toolbar->setIconText(KToolBar::IconTextRight);
action=new KAction(i18n("Add a bookmark (keep it short)", "Add"), "bookmark_add", 0,
- this, SLOT(bookmarkCurrentURL()), d->mActionCollection);
+ this, TQT_SLOT(bookmarkCurrentURL()), d->mActionCollection);
action->plug(toolbar);
action=new KAction(i18n("Remove a bookmark (keep it short)", "Remove"), "editdelete", 0,
- this, SLOT(deleteCurrentBookmark()), d->mActionCollection);
+ this, TQT_SLOT(deleteCurrentBookmark()), d->mActionCollection);
action->plug(toolbar);
}
@@ -226,8 +226,8 @@ void BookmarkViewController::init(KBookmarkManager* manager) {
d->mManager=manager;
// For now, we ignore the caller parameter and just refresh the full list on update
- connect(d->mManager, SIGNAL(changed(const QString&, const QString&)),
- this, SLOT(fill()) );
+ connect(d->mManager, TQT_SIGNAL(changed(const TQString&, const TQString&)),
+ this, TQT_SLOT(fill()) );
fill();
}
@@ -237,7 +237,7 @@ void BookmarkViewController::setURL(const KURL& url) {
}
-QWidget* BookmarkViewController::widget() const {
+TQWidget* BookmarkViewController::widget() const {
return d->mBox;
}
@@ -249,15 +249,15 @@ void BookmarkViewController::fill() {
}
-void BookmarkViewController::slotURLDropped(QDropEvent* event, const KURL::List& urls) {
+void BookmarkViewController::slotURLDropped(TQDropEvent* event, const KURL::List& urls) {
// Get a pointer to the drop item
- QPoint point(0,event->pos().y());
+ TQPoint point(0,event->pos().y());
KListView* lst=d->mListView;
BookmarkItem* item=static_cast<BookmarkItem*>( lst->itemAt(lst->contentsToViewport(point)) );
- QPopupMenu menu(lst);
+ TQPopupMenu menu(lst);
int addBookmarkID=menu.insertItem( SmallIcon("bookmark_add"), i18n("&Add Bookmark"),
- this, SLOT(slotBookmarkDroppedURL()) );
+ this, TQT_SLOT(slotBookmarkDroppedURL()) );
if (urls.count()==1) {
d->mDroppedURL=*urls.begin();
} else {
@@ -272,7 +272,7 @@ void BookmarkViewController::slotURLDropped(QDropEvent* event, const KURL::List&
menu.insertSeparator();
menu.insertItem( SmallIcon("cancel"), i18n("Cancel") );
- menu.exec(QCursor::pos());
+ menu.exec(TQCursor::pos());
}
@@ -281,7 +281,7 @@ void BookmarkViewController::slotBookmarkDroppedURL() {
}
-void BookmarkViewController::slotOpenBookmark(QListViewItem* item_) {
+void BookmarkViewController::slotOpenBookmark(TQListViewItem* item_) {
if (!item_) return;
BookmarkItem* item=static_cast<BookmarkItem*>(item_);
const KURL& url=item->mBookmark.url();
@@ -290,22 +290,22 @@ void BookmarkViewController::slotOpenBookmark(QListViewItem* item_) {
}
-void BookmarkViewController::slotContextMenu(QListViewItem* item_) {
+void BookmarkViewController::slotContextMenu(TQListViewItem* item_) {
BookmarkItem* item=static_cast<BookmarkItem*>(item_);
- QPopupMenu menu(d->mListView);
+ TQPopupMenu menu(d->mListView);
menu.insertItem(SmallIcon("bookmark_add"), i18n("Add Bookmark..."),
- this, SLOT(bookmarkCurrentURL()));
+ this, TQT_SLOT(bookmarkCurrentURL()));
menu.insertItem(SmallIcon("bookmark_folder"), i18n("Add Bookmark Folder..."),
- this, SLOT(addBookmarkGroup()));
+ this, TQT_SLOT(addBookmarkGroup()));
if (item) {
menu.insertSeparator();
menu.insertItem(SmallIcon("edit"), i18n("Edit..."),
- this, SLOT(editCurrentBookmark()));
+ this, TQT_SLOT(editCurrentBookmark()));
menu.insertItem(SmallIcon("editdelete"), i18n("Delete"),
- this, SLOT(deleteCurrentBookmark()));
+ this, TQT_SLOT(deleteCurrentBookmark()));
}
- menu.exec(QCursor::pos());
+ menu.exec(TQCursor::pos());
}
@@ -316,13 +316,13 @@ void BookmarkViewController::bookmarkCurrentURL() {
void BookmarkViewController::addBookmarkGroup() {
BookmarkDialog dialog(d->mListView, BookmarkDialog::BOOKMARK_GROUP);
- if (dialog.exec()==QDialog::Rejected) return;
+ if (dialog.exec()==TQDialog::Rejected) return;
KBookmarkGroup parentGroup=d->findBestParentGroup();
KBookmarkGroup newGroup=parentGroup.createNewFolder(d->mManager, dialog.title());
newGroup.internalElement().setAttribute("icon", dialog.icon());
d->mManager->emitChanged(parentGroup);
- QListViewItem* item=d->mListView->currentItem();
+ TQListViewItem* item=d->mListView->currentItem();
if (item) {
item->setOpen(true);
}
@@ -344,17 +344,17 @@ void BookmarkViewController::editCurrentBookmark() {
if (!isGroup) {
dialog.setURL(bookmark.url().prettyURL());
}
- if (dialog.exec()==QDialog::Rejected) return;
+ if (dialog.exec()==TQDialog::Rejected) return;
- QDomElement element=bookmark.internalElement();
+ TQDomElement element=bookmark.internalElement();
element.setAttribute("icon", dialog.icon());
if (!isGroup) {
element.setAttribute("href", dialog.url());
}
// Find title element (or create it if it does not exist)
- QDomElement titleElement;
- QDomNode tmp=element.namedItem("title");
+ TQDomElement titleElement;
+ TQDomNode tmp=element.namedItem("title");
if (tmp.isNull()) {
titleElement=element.ownerDocument().createElement("title");
element.appendChild(titleElement);
@@ -364,7 +364,7 @@ void BookmarkViewController::editCurrentBookmark() {
Q_ASSERT(!titleElement.isNull());
// Get title element content (or create)
- QDomText titleText;
+ TQDomText titleText;
tmp=titleElement.firstChild();
if (tmp.isNull()) {
titleText=element.ownerDocument().createTextNode("");
@@ -388,15 +388,15 @@ void BookmarkViewController::deleteCurrentBookmark() {
if (!item) return;
KBookmark bookmark=item->mBookmark;
- QString msg;
- QString title;
+ TQString msg;
+ TQString title;
if (bookmark.isGroup()) {
msg=i18n("Are you sure you want to delete the bookmark folder <b>%1</b>?<br>This will delete the folder and all the bookmarks in it.")
- .arg(bookmark.text());
+ .tqarg(bookmark.text());
title=i18n("Delete Bookmark &Folder");
} else {
msg=i18n("Are you sure you want to delete the bookmark <b>%1</b>?")
- .arg(bookmark.text());
+ .tqarg(bookmark.text());
title=i18n("Delete &Bookmark");
}
diff --git a/src/app/bookmarkviewcontroller.h b/src/app/bookmarkviewcontroller.h
index 9e651ea..ab47051 100644
--- a/src/app/bookmarkviewcontroller.h
+++ b/src/app/bookmarkviewcontroller.h
@@ -21,17 +21,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef BOOKMARKVIEWCONTROLLER_H
#define BOOKMARKVIEWCONTROLLER_H
-// Qt
-#include <qobject.h>
+// TQt
+#include <tqobject.h>
// KDE
#include <klistview.h>
#include <kurl.h>
-class QDragMoveEvent;
-class QDropEvent;
-class QListViewItem;
-class QPoint;
+class TQDragMoveEvent;
+class TQDropEvent;
+class TQListViewItem;
+class TQPoint;
class KBookmarkManager;
class KURL;
@@ -43,27 +43,29 @@ namespace Gwenview {
*/
class URLDropListView : public KListView {
Q_OBJECT
+ TQ_OBJECT
public:
- URLDropListView(QWidget* parent);
+ URLDropListView(TQWidget* tqparent);
signals:
- void urlDropped(QDropEvent*, const KURL::List&);
+ void urlDropped(TQDropEvent*, const KURL::List&);
protected:
- virtual void contentsDragMoveEvent(QDragMoveEvent* event);
- virtual void contentsDropEvent(QDropEvent* event);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
+ virtual void contentsDropEvent(TQDropEvent* event);
};
-class BookmarkViewController : public QObject {
+class BookmarkViewController : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- BookmarkViewController(QWidget*);
+ BookmarkViewController(TQWidget*);
~BookmarkViewController();
void init(KBookmarkManager*);
- QWidget* widget() const;
+ TQWidget* widget() const;
signals:
void openURL(const KURL&);
@@ -72,10 +74,10 @@ public slots:
void setURL(const KURL&);
private slots:
- void slotOpenBookmark(QListViewItem*);
+ void slotOpenBookmark(TQListViewItem*);
void fill();
- void slotContextMenu(QListViewItem*);
- void slotURLDropped(QDropEvent*, const KURL::List&);
+ void slotContextMenu(TQListViewItem*);
+ void slotURLDropped(TQDropEvent*, const KURL::List&);
void slotBookmarkDroppedURL();
void bookmarkCurrentURL();
void addBookmarkGroup();
diff --git a/src/app/configdialog.cpp b/src/app/configdialog.cpp
index 28ad7b3..9c29f71 100644
--- a/src/app/configdialog.cpp
+++ b/src/app/configdialog.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -19,16 +19,16 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qmap.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qstylesheet.h>
-#include <qtextedit.h>
+// TQt
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqmap.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqstylesheet.h>
+#include <tqtextedit.h>
// KDE
#include <kcolorbutton.h>
@@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "configdialog.moc"
namespace Gwenview {
-typedef QValueList<KConfigDialogManager*> ConfigManagerList;
+typedef TQValueList<KConfigDialogManager*> ConfigManagerList;
class ConfigDialogPrivate {
public:
@@ -90,29 +90,29 @@ public:
// Two helper functions to create the config pages
template<class T>
-void addConfigPage(KDialogBase* dialog, T* content, const QString& header, const QString& name, const char* iconName) {
- QFrame* page=dialog->addPage(name, header, BarIcon(iconName, 32));
- content->reparent(page, QPoint(0,0));
- QVBoxLayout* layout=new QVBoxLayout(page, 0, KDialog::spacingHint());
- layout->addWidget(content);
- layout->addStretch();
+void addConfigPage(KDialogBase* dialog, T* content, const TQString& header, const TQString& name, const char* iconName) {
+ TQFrame* page=dialog->addPage(name, header, BarIcon(iconName, 32));
+ content->reparent(page, TQPoint(0,0));
+ TQVBoxLayout* tqlayout=new TQVBoxLayout(page, 0, KDialog::spacingHint());
+ tqlayout->addWidget(content);
+ tqlayout->addStretch();
}
template<class T>
-T* addConfigPage(KDialogBase* dialog, const QString& header, const QString& name, const char* iconName) {
+T* addConfigPage(KDialogBase* dialog, const TQString& header, const TQString& name, const char* iconName) {
T* content=new T;
addConfigPage(dialog, content, header, name, iconName);
return content;
}
-ConfigDialog::ConfigDialog(QWidget* parent, KIPI::PluginLoader* pluginLoader)
+ConfigDialog::ConfigDialog(TQWidget* tqparent, KIPI::PluginLoader* pluginLoader)
: KDialogBase(
KDialogBase::IconList,
i18n("Configure"),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply,
KDialogBase::Ok,
- parent,
+ tqparent,
"ConfigDialog",
true,
true)
@@ -163,18 +163,18 @@ ConfigDialog::ConfigDialog(QWidget* parent, KIPI::PluginLoader* pluginLoader)
d->mImageListPage->mShowFileSize->setChecked(details & FileThumbnailView::FILESIZE);
d->mImageListPage->mShowImageSize->setChecked(details & FileThumbnailView::IMAGESIZE);
- connect(d->mImageListPage->mCalculateCacheSize,SIGNAL(clicked()),
- this,SLOT(calculateCacheSize()));
- connect(d->mImageListPage->mEmptyCache,SIGNAL(clicked()),
- this,SLOT(emptyCache()));
+ connect(d->mImageListPage->mCalculateCacheSize,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(calculateCacheSize()));
+ connect(d->mImageListPage->mEmptyCache,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(emptyCache()));
// Image View tab
d->mImageViewPage->mMouseWheelGroup->setButton(ImageViewConfig::mouseWheelScroll()?1:0);
// Full Screen tab
- QTextEdit* edit=d->mFullScreenPage->kcfg_osdFormat;
+ TQTextEdit* edit=d->mFullScreenPage->kcfg_osdFormat;
edit->setMaximumHeight(edit->fontMetrics().height()*3);
- connect(edit, SIGNAL(textChanged()), SLOT(updateOSDPreview()) );
+ connect(edit, TQT_SIGNAL(textChanged()), TQT_SLOT(updateOSDPreview()) );
// File Operations tab
d->mFileOperationsPage->kcfg_destDir->fileDialog()->setMode(
@@ -247,7 +247,7 @@ void ConfigDialog::calculateCacheSize() {
KURL url;
url.setPath(ThumbnailLoadJob::thumbnailBaseDir());
unsigned long size=KDirSize::dirSize(url);
- KMessageBox::information( this,i18n("Cache size is %1").arg(KIO::convertSize(size)) );
+ KMessageBox::information( this,i18n("Cache size is %1").tqarg(KIO::convertSize(size)) );
}
@@ -258,7 +258,7 @@ void ConfigDialog::updateOSDPreview() {
formatter.mPath=url.path();
formatter.mFileName=url.fileName();
formatter.mComment=i18n("A comment");
- formatter.mImageSize=QSize(1600, 1200);
+ formatter.mImageSize=TQSize(1600, 1200);
formatter.mPosition=4;
formatter.mCount=12;
formatter.mAperture="F2.8";
@@ -266,30 +266,30 @@ void ConfigDialog::updateOSDPreview() {
formatter.mIso="100";
formatter.mFocalLength="8.88 mm";
- QString txt=formatter.format( d->mFullScreenPage->kcfg_osdFormat->text() );
+ TQString txt=formatter.format( d->mFullScreenPage->kcfg_osdFormat->text() );
d->mFullScreenPage->mOSDPreviewLabel->setText(txt);
}
void ConfigDialog::emptyCache() {
- QString dir=ThumbnailLoadJob::thumbnailBaseDir();
+ TQString dir=ThumbnailLoadJob::thumbnailBaseDir();
- if (!QFile::exists(dir)) {
+ if (!TQFile::exists(dir)) {
KMessageBox::information( this,i18n("Cache is already empty.") );
return;
}
int response=KMessageBox::warningContinueCancel(this,
"<qt>" + i18n("Are you sure you want to empty the thumbnail cache?"
- " This will delete the folder <b>%1</b>.").arg(QStyleSheet::escape(dir)) + "</qt>",
- QString::null,
+ " This will delete the folder <b>%1</b>.").tqarg(TQStyleSheet::escape(dir)) + "</qt>",
+ TQString(),
KStdGuiItem::del());
if (response==KMessageBox::Cancel) return;
KURL url;
url.setPath(dir);
- if (KIO::NetAccess::del(url, topLevelWidget()) ) {
+ if (KIO::NetAccess::del(url, tqtopLevelWidget()) ) {
KMessageBox::information( this,i18n("Cache emptied.") );
}
}
diff --git a/src/app/configdialog.h b/src/app/configdialog.h
index ab9e64a..9de2f07 100644
--- a/src/app/configdialog.h
+++ b/src/app/configdialog.h
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -37,8 +37,9 @@ class ConfigDialogPrivate;
class ConfigDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigDialog(QWidget*, KIPI::PluginLoader*);
+ ConfigDialog(TQWidget*, KIPI::PluginLoader*);
~ConfigDialog();
signals:
diff --git a/src/app/configfileoperationspage.ui b/src/app/configfileoperationspage.ui
index b3d2f39..adf6772 100644
--- a/src/app/configfileoperationspage.ui
+++ b/src/app/configfileoperationspage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigFileOperationsPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigFileOperationsPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -30,7 +30,7 @@
<string>&lt;b&gt;Moving &amp; Copying Files&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_confirmCopy</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Show copy dialog</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_confirmMove</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Show move dialog</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -60,7 +60,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -93,14 +93,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -108,7 +108,7 @@
<string>&lt;b&gt;Deleting Files&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_confirmDelete</cstring>
</property>
@@ -116,7 +116,7 @@
<string>Ask for confirmation</string>
</property>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>mDeleteGroup</cstring>
</property>
@@ -136,7 +136,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mDeleteToTrash</cstring>
</property>
@@ -147,7 +147,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mReallyDelete</cstring>
</property>
@@ -164,7 +164,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/src/app/configfullscreenpage.ui b/src/app/configfullscreenpage.ui
index c0eaeba..320383a 100644
--- a/src/app/configfullscreenpage.ui
+++ b/src/app/configfullscreenpage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigFullScreenPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigFullScreenPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_showBusyPtr</cstring>
</property>
@@ -43,14 +43,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -58,7 +58,7 @@
<string>&lt;b&gt;On Screen Display&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<property name="name">
<cstring>kcfg_osdFormat</cstring>
</property>
@@ -76,7 +76,7 @@
<set>AutoNone</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -84,7 +84,7 @@
<string>Preview:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>mOSDPreviewLabel</cstring>
</property>
@@ -99,7 +99,7 @@
The file comment</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -131,7 +131,7 @@ You can use the following keywords to format the On Screen Display:
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>18</height>
@@ -140,5 +140,5 @@ You can use the following keywords to format the On Screen Display:
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/app/configimagelistpage.ui b/src/app/configimagelistpage.ui
index 7b378c7..5a8dbdb 100644
--- a/src/app/configimagelistpage.ui
+++ b/src/app/configimagelistpage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigImageListPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigImageListPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_showDirs</cstring>
</property>
@@ -40,14 +40,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
@@ -63,7 +63,7 @@
<string>&lt;b&gt;Thumbnail View&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -77,7 +77,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -96,7 +96,7 @@
<cstring></cstring>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_thumbnailMarginSize</cstring>
</property>
@@ -131,7 +131,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -140,7 +140,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -148,9 +148,9 @@
<string>Information to display in the thumbnail text:</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<grid>
<property name="name">
@@ -166,14 +166,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>mShowFileName</cstring>
</property>
@@ -181,7 +181,7 @@
<string>File name</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1">
+ <widget class="TQCheckBox" row="3" column="1">
<property name="name">
<cstring>mShowImageSize</cstring>
</property>
@@ -189,7 +189,7 @@
<string>Image size</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>mShowFileSize</cstring>
</property>
@@ -197,7 +197,7 @@
<string>File size</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>mShowFileDate</cstring>
</property>
@@ -217,14 +217,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -240,7 +240,7 @@
<string>&lt;b&gt;Thumbnail Cache&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_storeThumbnailsInCache</cstring>
</property>
@@ -248,7 +248,7 @@
<string>Store thumbnails in cache</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_deleteCacheOnExit</cstring>
</property>
@@ -256,9 +256,9 @@
<string>Automatically empty thumbnail cache on exit</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
@@ -270,7 +270,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mCalculateCacheSize</cstring>
</property>
@@ -278,7 +278,7 @@
<string>Calculate Cache Size</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mEmptyCache</cstring>
</property>
@@ -290,5 +290,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/app/configimageviewpage.ui b/src/app/configimageviewpage.ui
index 6abbf7b..5a73d6d 100644
--- a/src/app/configimageviewpage.ui
+++ b/src/app/configimageviewpage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigImageViewPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigImageViewPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="6">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>kcfg_enlargeSmallImages</cstring>
</property>
@@ -30,7 +30,7 @@
<string>Enlarge small images when auto &amp;zoom is activated</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -56,14 +56,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>181</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="3" column="0" rowspan="1" colspan="6">
+ <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -71,15 +71,15 @@
<string>&lt;b&gt;Smoothing&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="6">
+ <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="6">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>kcfg_smoothAlgorithm</cstring>
</property>
@@ -104,7 +104,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mSmoothNone</cstring>
</property>
@@ -118,7 +118,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mSmoothFast</cstring>
</property>
@@ -129,7 +129,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mSmoothNormal</cstring>
</property>
@@ -140,7 +140,7 @@
<number>2</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mSmoothBest</cstring>
</property>
@@ -167,7 +167,7 @@
<enum>Vertical</enum>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>frame3</cstring>
</property>
@@ -192,7 +192,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_delayedSmoothing</cstring>
</property>
@@ -203,7 +203,7 @@
<string>Delayed smoothing</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -217,7 +217,7 @@
<string>Using this option, Gwenview will display the image as fast as possible, and smooth it after a short delay.
Use this option if your computer is not very fast.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
<property name="buddy" stdset="0">
@@ -238,14 +238,14 @@ Use this option if your computer is not very fast.</string>
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="7" column="0" rowspan="1" colspan="6">
+ <widget class="TQButtonGroup" row="7" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>mMouseWheelGroup</cstring>
</property>
@@ -265,7 +265,7 @@ Use this option if your computer is not very fast.</string>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mMouseWheelScroll</cstring>
</property>
@@ -276,7 +276,7 @@ Use this option if your computer is not very fast.</string>
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mMouseWheelBrowse</cstring>
</property>
@@ -289,7 +289,7 @@ Use this option if your computer is not very fast.</string>
</widget>
</vbox>
</widget>
- <widget class="QLabel" row="6" column="0" rowspan="1" colspan="6">
+ <widget class="TQLabel" row="6" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -297,7 +297,7 @@ Use this option if your computer is not very fast.</string>
<string>&lt;b&gt;Mouse Wheel Behavior over Image&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="6">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>kcfg_showScrollBars</cstring>
</property>
@@ -323,7 +323,7 @@ Use this option if your computer is not very fast.</string>
<slot>setDisabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcolorbutton.h</includehint>
</includehints>
diff --git a/src/app/configmiscpage.ui b/src/app/configmiscpage.ui
index e4768f2..0bd2d36 100644
--- a/src/app/configmiscpage.ui
+++ b/src/app/configmiscpage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigMiscPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigMiscPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2_2_2</cstring>
</property>
@@ -30,7 +30,7 @@
<string>What to do when leaving a modified image</string>
</property>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>kcfg_modifiedBehavior</cstring>
</property>
@@ -44,7 +44,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mModifyAsk</cstring>
</property>
@@ -58,7 +58,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mModifySave</cstring>
</property>
@@ -69,7 +69,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mModifyDiscard</cstring>
</property>
@@ -92,14 +92,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>24</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_autoRotateImages</cstring>
</property>
@@ -120,14 +120,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>24</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -135,9 +135,9 @@
<string>Which settings should be remembered next time you start Gwenview</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<grid>
<property name="name">
@@ -153,14 +153,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>11</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>kcfg_rememberURL</cstring>
</property>
@@ -168,7 +168,7 @@
<string>Last opened URL</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>kcfg_rememberFilter</cstring>
</property>
@@ -191,7 +191,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>41</height>
@@ -200,5 +200,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/app/configslideshowpage.ui b/src/app/configslideshowpage.ui
index cb06835..dafdcc0 100644
--- a/src/app/configslideshowpage.ui
+++ b/src/app/configslideshowpage.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigSlideshowPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigSlideshowPage</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>kcfg_loop</cstring>
</property>
@@ -27,7 +27,7 @@
<string>Loop</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>kcfg_random</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Show images in random order</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>kcfg_fullscreen</cstring>
</property>
@@ -46,7 +46,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>kcfg_stopAtEnd</cstring>
</property>
@@ -59,7 +59,7 @@
When this option is enabled, the slideshow will stop on the last image of the folder.</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>mDelayLabel</cstring>
</property>
@@ -88,7 +88,7 @@ When this option is enabled, the slideshow will stop on the last image of the fo
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>180</width>
<height>20</height>
@@ -127,7 +127,7 @@ When this option is enabled, the slideshow will stop on the last image of the fo
<slot>setDisabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
</includehints>
diff --git a/src/app/dirviewcontroller.cpp b/src/app/dirviewcontroller.cpp
index e0a41c8..214e807 100644
--- a/src/app/dirviewcontroller.cpp
+++ b/src/app/dirviewcontroller.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2005 Aurelien Gateau
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Self
#include "dirviewcontroller.moc"
-// Qt
-#include <qpopupmenu.h>
+// TQt
+#include <tqpopupmenu.h>
// KDE
#include <kdebug.h>
@@ -53,18 +53,18 @@ struct DirViewController::Private {
};
-DirViewController::DirViewController(QWidget* parent)
-: QObject(parent)
+DirViewController::DirViewController(TQWidget* tqparent)
+: TQObject(tqparent)
{
d=new Private;
- d->mTreeView=new TreeView(parent);
+ d->mTreeView=new TreeView(tqparent);
- connect(d->mTreeView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotTreeViewSelectionChanged(QListViewItem*)) );
+ connect(d->mTreeView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotTreeViewSelectionChanged(TQListViewItem*)) );
- connect(d->mTreeView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotTreeViewContextMenu(KListView*, QListViewItem*, const QPoint&)) );
+ connect(d->mTreeView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotTreeViewContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
}
@@ -73,7 +73,7 @@ DirViewController::~DirViewController() {
}
-QWidget* DirViewController::widget() const {
+TQWidget* DirViewController::widget() const {
return d->mTreeView;
}
@@ -83,21 +83,21 @@ void DirViewController::setURL(const KURL& url) {
}
-void DirViewController::slotTreeViewSelectionChanged(QListViewItem* item) {
+void DirViewController::slotTreeViewSelectionChanged(TQListViewItem* item) {
if (!item) return;
LOG(d->mTreeView->currentURL());
emit urlChanged(d->mTreeView->currentURL());
}
-void DirViewController::slotTreeViewContextMenu(KListView*, QListViewItem*, const QPoint& pos) {
- QPopupMenu menu(d->mTreeView);
- menu.insertItem(SmallIcon("folder_new"),i18n("New Folder..."),this,SLOT(makeDir()));
+void DirViewController::slotTreeViewContextMenu(KListView*, TQListViewItem*, const TQPoint& pos) {
+ TQPopupMenu menu(d->mTreeView);
+ menu.insertItem(SmallIcon("folder_new"),i18n("New Folder..."),this,TQT_SLOT(makeDir()));
menu.insertSeparator();
- menu.insertItem(i18n("Rename..."),this,SLOT(renameDir()));
- menu.insertItem(SmallIcon("editdelete"),i18n("Delete"),this,SLOT(removeDir()));
+ menu.insertItem(i18n("Rename..."),this,TQT_SLOT(renameDir()));
+ menu.insertItem(SmallIcon("editdelete"),i18n("Delete"),this,TQT_SLOT(removeDir()));
menu.insertSeparator();
- menu.insertItem(i18n("Properties"),this,SLOT(showPropertiesDialog()));
+ menu.insertItem(i18n("Properties"),this,TQT_SLOT(showPropertiesDialog()));
menu.exec(pos);
}
@@ -105,7 +105,7 @@ void DirViewController::slotTreeViewContextMenu(KListView*, QListViewItem*, cons
void DirViewController::makeDir() {
if (!d->mTreeView->currentItem()) return;
- FileOperation::makeDir(d->mTreeView->currentURL(), d->mTreeView, this, SLOT(slotDirMade()) );
+ FileOperation::makeDir(d->mTreeView->currentURL(), d->mTreeView, this, TQT_SLOT(slotDirMade()) );
}
@@ -128,9 +128,9 @@ void DirViewController::removeDir() {
list << d->mTreeView->currentURL();
FileOperation::del(list, d->mTreeView);
- QListViewItem* item=d->mTreeView->currentItem();
+ TQListViewItem* item=d->mTreeView->currentItem();
if (!item) return;
- item=item->parent();
+ item=item->tqparent();
if (!item) return;
d->mTreeView->setCurrentItem(item);
}
diff --git a/src/app/dirviewcontroller.h b/src/app/dirviewcontroller.h
index 8bd7596..28fcc80 100644
--- a/src/app/dirviewcontroller.h
+++ b/src/app/dirviewcontroller.h
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2005 Aurelien Gateau
@@ -22,12 +22,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DIRVIEWCONTROLLER_H
#define DIRVIEWCONTROLLER_H
-// Qt
-#include "qobject.h"
+// TQt
+#include "tqobject.h"
-class QListViewItem;
-class QPoint;
-class QWidget;
+class TQListViewItem;
+class TQPoint;
+class TQWidget;
class KListView;
class KURL;
@@ -37,12 +37,13 @@ class Job;
namespace Gwenview {
-class DirViewController : public QObject {
+class DirViewController : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- DirViewController(QWidget* parent);
+ DirViewController(TQWidget* tqparent);
virtual ~DirViewController();
- QWidget* widget() const;
+ TQWidget* widget() const;
public slots:
void setURL(const KURL&);
@@ -56,8 +57,8 @@ private:
Private* d;
private slots:
- void slotTreeViewSelectionChanged(QListViewItem*);
- void slotTreeViewContextMenu(KListView*, QListViewItem*, const QPoint&);
+ void slotTreeViewSelectionChanged(TQListViewItem*);
+ void slotTreeViewContextMenu(KListView*, TQListViewItem*, const TQPoint&);
void makeDir();
void slotDirMade();
diff --git a/src/app/history.cpp b/src/app/history.cpp
index 03d3682..9c38ae7 100644
--- a/src/app/history.cpp
+++ b/src/app/history.cpp
@@ -40,24 +40,24 @@ History::History(KActionCollection* actionCollection) {
mMovingInHistory=false;
// Actions
- QPair<KGuiItem, KGuiItem> backForward = KStdGuiItem::backAndForward();
+ TQPair<KGuiItem, KGuiItem> backForward = KStdGuiItem::backAndForward();
mGoBack=new KToolBarPopupAction(backForward.first,
KStdAccel::shortcut(KStdAccel::Back),
- this, SLOT(goBack()), actionCollection, "go_back");
+ this, TQT_SLOT(goBack()), actionCollection, "go_back");
mGoForward=new KToolBarPopupAction(backForward.second,
KStdAccel::shortcut(KStdAccel::Forward),
- this, SLOT(goForward()), actionCollection, "go_forward");
+ this, TQT_SLOT(goForward()), actionCollection, "go_forward");
// Connections
- connect(mGoBack->popupMenu(),SIGNAL(activated(int)),
- this,SLOT(goBackTo(int)) );
- connect(mGoForward->popupMenu(),SIGNAL(activated(int)),
- this,SLOT(goForwardTo(int)) );
-
- connect(mGoBack->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(fillGoBackMenu()) );
- connect(mGoForward->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(fillGoForwardMenu()) );
+ connect(mGoBack->popupMenu(),TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(goBackTo(int)) );
+ connect(mGoForward->popupMenu(),TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(goForwardTo(int)) );
+
+ connect(mGoBack->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(fillGoBackMenu()) );
+ connect(mGoForward->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(fillGoForwardMenu()) );
}
@@ -67,7 +67,7 @@ History::~History() {
void History::addURLToHistory(const KURL& url2) {
KURL url( url2 );
- url.setFileName( QString::null );
+ url.setFileName( TQString() );
if (!mMovingInHistory) {
if (mPosition!=mHistoryList.end() && url.equals(*mPosition, true)) return;
@@ -87,7 +87,7 @@ void History::addURLToHistory(const KURL& url2) {
void History::fillGoBackMenu() {
- QPopupMenu* menu=mGoBack->popupMenu();
+ TQPopupMenu* menu=mGoBack->popupMenu();
menu->clear();
HistoryList::ConstIterator it;
@@ -98,7 +98,7 @@ void History::fillGoBackMenu() {
}
void History::fillGoForwardMenu() {
- QPopupMenu* menu=mGoForward->popupMenu();
+ TQPopupMenu* menu=mGoForward->popupMenu();
menu->clear();
HistoryList::ConstIterator it=mPosition;
++it;
diff --git a/src/app/history.h b/src/app/history.h
index 1d4685a..8630cfe 100644
--- a/src/app/history.h
+++ b/src/app/history.h
@@ -22,9 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef HISTORY_H
#define HISTORY_H
-// Qt
-#include <qobject.h>
-#include <qvaluelist.h>
+// TQt
+#include <tqobject.h>
+#include <tqvaluelist.h>
// KDE
#include <kurl.h>
@@ -32,11 +32,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KToolBarPopupAction;
class KActionCollection;
-typedef QValueList<KURL> HistoryList;
+typedef TQValueList<KURL> HistoryList;
namespace Gwenview {
-class History : public QObject {
+class History : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
History(KActionCollection*);
diff --git a/src/app/kipiinterface.cpp b/src/app/kipiinterface.cpp
index 4013e3c..fd37853 100644
--- a/src/app/kipiinterface.cpp
+++ b/src/app/kipiinterface.cpp
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <config.h>
#ifdef GV_HAVE_KIPI
-// Qt
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtimer.h>
+// TQt
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -56,62 +56,62 @@ namespace Gwenview {
class ImageCollection : public KIPI::ImageCollectionShared {
public:
- ImageCollection(KURL dirURL, const QString& name, const KURL::List& images)
+ ImageCollection(KURL dirURL, const TQString& name, const KURL::List& images)
: KIPI::ImageCollectionShared()
, mDirURL(dirURL)
, mName(name)
, mImages(images) {}
- QString name() { return mName; }
- QString comment() { return QString::null; }
+ TQString name() { return mName; }
+ TQString comment() { return TQString(); }
KURL::List images() { return mImages; }
KURL uploadRoot() { return KURL("/"); }
KURL uploadPath() { return mDirURL; }
- QString uploadRootName() { return "/"; }
+ TQString uploadRootName() { return "/"; }
bool isDirectory() { return true; }
private:
KURL mDirURL;
- QString mName;
+ TQString mName;
KURL::List mImages;
};
class ImageInfo : public KIPI::ImageInfoShared {
- static const QRegExp sExtensionRE;
+ static const TQRegExp sExtensionRE;
public:
ImageInfo(KIPI::Interface* interface, const KURL& url) : KIPI::ImageInfoShared(interface, url) {}
- QString title() {
- QString txt=_url.fileName();
- txt.replace("_", " ");
- txt.replace(sExtensionRE, "");
+ TQString title() {
+ TQString txt=_url.fileName();
+ txt.tqreplace("_", " ");
+ txt.tqreplace(sExtensionRE, "");
return txt;
}
- QString description() {
- if (!_url.isLocalFile()) return QString::null;
+ TQString description() {
+ if (!_url.isLocalFile()) return TQString();
ImageUtils::JPEGContent content;
bool ok=content.load(_url.path());
- if (!ok) return QString::null;
+ if (!ok) return TQString();
return content.comment();
}
- void setDescription(const QString&) {}
+ void setDescription(const TQString&) {}
- QMap<QString,QVariant> attributes() {
- return QMap<QString,QVariant>();
+ TQMap<TQString,TQVariant> attributes() {
+ return TQMap<TQString,TQVariant>();
}
void clearAttributes() {}
- void addAttributes(const QMap<QString, QVariant>&) {}
+ void addAttributes(const TQMap<TQString, TQVariant>&) {}
};
-const QRegExp ImageInfo::sExtensionRE("\\.[a-z0-9]+$", false /*caseSensitive*/);
+const TQRegExp ImageInfo::sExtensionRE("\\.[a-z0-9]+$", false /*caseSensitive*/);
struct KIPIInterfacePrivate {
@@ -119,18 +119,18 @@ struct KIPIInterfacePrivate {
};
-KIPIInterface::KIPIInterface( QWidget* parent, FileViewController* fileView)
-:KIPI::Interface(parent, "Gwenview kipi interface") {
+KIPIInterface::KIPIInterface( TQWidget* tqparent, FileViewController* fileView)
+:KIPI::Interface(tqparent, "Gwenview kipi interface") {
d=new KIPIInterfacePrivate;
d->mFileView=fileView;
- connect(d->mFileView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()) );
+ connect(d->mFileView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()) );
- connect(d->mFileView, SIGNAL(completed()),
- this, SLOT(slotDirectoryChanged()) );
+ connect(d->mFileView, TQT_SIGNAL(completed()),
+ this, TQT_SLOT(slotDirectoryChanged()) );
// delay a bit, so that it's called after loadPlugins()
- QTimer::singleShot( 0, this, SLOT( init()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( init()));
}
@@ -163,13 +163,13 @@ KIPI::ImageCollection KIPIInterface::currentSelection() {
LOG("");
KURL::List list=d->mFileView->selectedImageURLs();
KURL url=d->mFileView->dirURL();
- return KIPI::ImageCollection(new ImageCollection(url, i18n("%1 (Selected Images)").arg(url.fileName()), list));
+ return KIPI::ImageCollection(new ImageCollection(url, i18n("%1 (Selected Images)").tqarg(url.fileName()), list));
}
-QValueList<KIPI::ImageCollection> KIPIInterface::allAlbums() {
+TQValueList<KIPI::ImageCollection> KIPIInterface::allAlbums() {
LOG("");
- QValueList<KIPI::ImageCollection> list;
+ TQValueList<KIPI::ImageCollection> list;
list << currentAlbum() << currentSelection();
return list;
}
@@ -188,13 +188,13 @@ int KIPIInterface::features() const {
* KDirLister will pick up the image if necessary, so no updating is needed
* here, it is however necessary to discard caches if the plugin preserves timestamp
*/
-bool KIPIInterface::addImage(const KURL& url, QString&) {
- Cache::instance()->invalidate( url );
+bool KIPIInterface::addImage(const KURL& url, TQString&) {
+ Cache::instance()->tqinvalidate( url );
return true;
}
void KIPIInterface::delImage(const KURL& url) {
- Cache::instance()->invalidate( url );
+ Cache::instance()->tqinvalidate( url );
}
// TODO currently KDirWatch doesn't have watching of files in a directory
@@ -203,7 +203,7 @@ void KIPIInterface::refreshImages( const KURL::List& urls ) {
for( KURL::List::ConstIterator it = urls.begin();
it != urls.end();
++it ) {
- Cache::instance()->invalidate( *it );
+ Cache::instance()->tqinvalidate( *it );
}
d->mFileView->refreshItems( urls );
}
diff --git a/src/app/kipiinterface.h b/src/app/kipiinterface.h
index 5ac1b87..825b418 100644
--- a/src/app/kipiinterface.h
+++ b/src/app/kipiinterface.h
@@ -33,17 +33,18 @@ class FileViewController;
class KIPIInterface :public KIPI::Interface {
Q_OBJECT
+ TQ_OBJECT
public:
- KIPIInterface( QWidget* parent, FileViewController*);
+ KIPIInterface( TQWidget* tqparent, FileViewController*);
virtual ~KIPIInterface();
KIPI::ImageCollection currentAlbum();
KIPI::ImageCollection currentSelection();
- QValueList<KIPI::ImageCollection> allAlbums();
+ TQValueList<KIPI::ImageCollection> allAlbums();
KIPI::ImageInfo info( const KURL& );
int features() const;
- virtual bool addImage(const KURL&, QString& err);
+ virtual bool addImage(const KURL&, TQString& err);
virtual void delImage( const KURL& );
virtual void refreshImages( const KURL::List& urls );
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 7e637be..52f9811 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -47,10 +47,10 @@ static const char version[] = "1.4.2";
void applyFilterArgs(KCmdLineArgs* args, FileViewController* controller) {
- QString filterType = args->getOption("filter-type");
- QString filterName = args->getOption("filter-name");
- QString filterFrom = args->getOption("filter-from");
- QString filterTo = args->getOption("filter-to");
+ TQString filterType = args->getOption("filter-type");
+ TQString filterName = args->getOption("filter-name");
+ TQString filterFrom = args->getOption("filter-from");
+ TQString filterTo = args->getOption("filter-to");
// Do nothing if there is no filter
if (filterType.isEmpty() && filterName.isEmpty()
&& filterFrom.isEmpty() && filterTo.isEmpty())
@@ -58,9 +58,9 @@ void applyFilterArgs(KCmdLineArgs* args, FileViewController* controller) {
return;
}
- QStringList typeList;
+ TQStringList typeList;
typeList << "all" << "images" << "videos";
- int mode = typeList.findIndex(filterType);
+ int mode = typeList.tqfindIndex(filterType);
if (mode == -1) {
// Default to "all"
controller->setFilterMode(0);
@@ -76,7 +76,7 @@ void applyFilterArgs(KCmdLineArgs* args, FileViewController* controller) {
controller->setFilterName(filterName);
bool ok = false;
- QDate date;
+ TQDate date;
if (!filterFrom.isEmpty()) {
date = KGlobal::locale()->readDate(filterFrom, &ok);
if (!ok) {
@@ -85,7 +85,7 @@ void applyFilterArgs(KCmdLineArgs* args, FileViewController* controller) {
}
controller->setFilterFromDate(date);
- date=QDate();
+ date=TQDate();
if (!filterTo.isEmpty()) {
date = KGlobal::locale()->readDate(filterTo, &ok);
if (!ok) {
@@ -117,7 +117,7 @@ KDE_EXPORT int kdemain (int argc, char *argv[]) {
aboutData.addCredit("Marco Gazzetta", I18N_NOOP("Fixed crash when trying to generate a thumbnail for a broken JPEG file (v0.16.0)"), "[email protected]");
aboutData.addCredit("GeniusR13", I18N_NOOP("Fixed compilation on KDE 3.0 (v0.16.1)"), "[email protected]");
aboutData.addCredit("Ian Koenig", I18N_NOOP("First RPM spec file"), "[email protected]");
- aboutData.addCredit("Meni Livne", I18N_NOOP("Toolbar layout patch for RTL languages (v0.16.0)"), "[email protected]");
+ aboutData.addCredit("Meni Livne", I18N_NOOP("Toolbar tqlayout patch for RTL languages (v0.16.0)"), "[email protected]");
aboutData.addCredit("Angelo Naselli", I18N_NOOP("Printing support (v1.0.0)"), "[email protected]");
aboutData.addCredit("Jos van den Oever", I18N_NOOP("File info view (v1.0.0)\nPatch to toggle auto-zoom on click (v1.0.0)"), "[email protected]");
aboutData.addCredit("Jeroen Peters", I18N_NOOP("Configurable mouse wheel behavior (v1.1.1)"), "[email protected]");
@@ -149,7 +149,7 @@ KDE_EXPORT int kdemain (int argc, char *argv[]) {
if (MiscConfig::rememberURL() && MiscConfig::history().count() > 0) {
url = KURL(MiscConfig::history()[0]);
} else {
- url.setPath( QDir::currentDirPath() );
+ url.setPath( TQDir::currentDirPath() );
}
}
mainWindow->openURL(url);
diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp
index bf598ec..d608dfe 100644
--- a/src/app/mainwindow.cpp
+++ b/src/app/mainwindow.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "mainwindow.moc"
-// Qt
-#include <qdir.h>
-#include <qdockarea.h>
-#include <qwidgetstack.h>
+// TQt
+#include <tqdir.h>
+#include <tqdockarea.h>
+#include <tqwidgetstack.h>
// KDE
#include <kaboutdata.h>
@@ -139,18 +139,18 @@ const int HISTORY_MAX_COUNT=20;
enum { StackIDBrowse, StackIDView };
-static bool urlIsDirectory(QWidget* parent, const KURL& url) {
+static bool urlIsDirectory(TQWidget* tqparent, const KURL& url) {
if( url.filename( false ).isEmpty()) return true; // file:/somewhere/<nothing here>
// Do direct stat instead of using KIO if the file is local (faster)
if( url.isLocalFile()
&& !KIO::probably_slow_mounted( url.path())) {
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(url.path()), &buff ) == 0 ) {
+ if ( KDE_stat( TQFile::encodeName(url.path()), &buff ) == 0 ) {
return S_ISDIR( buff.st_mode );
}
}
KIO::UDSEntry entry;
- if( KIO::NetAccess::stat( url, entry, parent)) {
+ if( KIO::NetAccess::stat( url, entry, tqparent)) {
KIO::UDSEntry::ConstIterator it;
for(it=entry.begin();it!=entry.end();++it) {
if ((*it).m_uds==KIO::UDS_FILE_TYPE) {
@@ -169,7 +169,7 @@ MainWindow::MainWindow()
#endif
{
// Backend
- mDocument=new Document(this);
+ mDocument=new Document(TQT_TQOBJECT(this));
mHistory=new History(actionCollection());
// GUI
createActions();
@@ -199,16 +199,16 @@ bool MainWindow::queryClose() {
KConfig* config=KGlobal::config();
- // Don't store dock layout if only the image dock is visible. This avoid
- // saving layout when in "fullscreen" or "image only" mode.
+ // Don't store dock tqlayout if only the image dock is visible. This avoid
+ // saving tqlayout when in "fullscreen" or "image only" mode.
if (mFileViewController->isVisible() || mDirViewController->widget()->isVisible()) {
mDockArea->writeDockConfig(config,CONFIG_DOCK_GROUP);
}
if (FileViewConfig::deleteCacheOnExit()) {
- QString dir=ThumbnailLoadJob::thumbnailBaseDir();
+ TQString dir=ThumbnailLoadJob::thumbnailBaseDir();
- if (QFile::exists(dir)) {
+ if (TQFile::exists(dir)) {
KURL url;
url.setPath(dir);
KIO::NetAccess::del(url, this);
@@ -256,7 +256,7 @@ void MainWindow::openURL(const KURL& url) {
}
}
-void MainWindow::slotRenamed(const QString& fileName) {
+void MainWindow::slotRenamed(const TQString& fileName) {
KURL url = mDocument->url();
url.setFileName(fileName);
mDocument->setURL(url);
@@ -307,7 +307,7 @@ void MainWindow::updateFullScreenLabel() {
formatter.mIso=mDocument->iso();
formatter.mFocalLength=mDocument->focalLength();
- QString txt=formatter.format( FullScreenConfig::osdFormat() );
+ TQString txt=formatter.format( FullScreenConfig::osdFormat() );
mFullScreenLabelAction->label()->setText(txt);
}
@@ -326,7 +326,7 @@ void MainWindow::goUpTo(int id) {
}
void MainWindow::fillGoUpMenu() {
- QPopupMenu* menu = mGoUp->popupMenu();
+ TQPopupMenu* menu = mGoUp->popupMenu();
menu->clear();
int pos = 0;
KURL url = mFileViewController->dirURL().upURL();
@@ -344,7 +344,7 @@ void MainWindow::fillGoUpMenu() {
//-----------------------------------------------------------------------
void MainWindow::goHome() {
KURL url;
- url.setPath( QDir::homeDirPath() );
+ url.setPath( TQDir::homeDirPath() );
mFileViewController->setDirURL(url);
}
@@ -359,7 +359,7 @@ void MainWindow::renameFile() {
} else {
url = mDocument->url();
}
- FileOperation::rename(url, this, this, SLOT(slotRenamed(const QString &)));
+ FileOperation::rename(url, this, TQT_TQOBJECT(this), TQT_SLOT(slotRenamed(const TQString &)));
}
@@ -454,14 +454,14 @@ void MainWindow::printFile() {
printer.setDocName(mDocument->filename());
const KAboutData* pAbout = KApplication::kApplication()->aboutData();
- QString nm = pAbout->appName();
+ TQString nm = pAbout->appName();
nm += "-";
nm += pAbout->version();
printer.setCreator( nm );
KPrinter::addDialogPage( new PrintDialogPage( mDocument, this, " page"));
- if (printer.setup(this, QString::null, true)) {
+ if (printer.setup(this, TQString(), true)) {
mDocument->print(&printer);
}
}
@@ -472,7 +472,7 @@ void MainWindow::printFile() {
// Private slots
//
//-----------------------------------------------------------------------
-void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onItem) {
+void MainWindow::openFileViewControllerContextMenu(const TQPoint& pos, bool onItem) {
int selectionSize;
ExternalToolContext* externalToolContext;
@@ -480,14 +480,14 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
const KFileItemList* items = mFileViewController->currentFileView()->selectedItems();
selectionSize = items->count();
externalToolContext =
- ExternalToolManager::instance()->createContext(this, items);
+ ExternalToolManager::instance()->createContext(TQT_TQOBJECT(this), items);
} else {
selectionSize = 0;
externalToolContext =
- ExternalToolManager::instance()->createContext(this, mFileViewController->dirURL());
+ ExternalToolManager::instance()->createContext(TQT_TQOBJECT(this), mFileViewController->dirURL());
}
- QPopupMenu menu(this);
+ TQPopupMenu menu(this);
menu.insertItem(
i18n("External Tools"), externalToolContext->popupMenu());
@@ -495,7 +495,7 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
actionCollection()->action("view_sort")->plug(&menu);
mGoUp->plug(&menu);
- menu.insertItem(SmallIcon("folder_new"), i18n("New Folder..."), this, SLOT(makeDir()));
+ menu.insertItem(SmallIcon("folder_new"), i18n("New Folder..."), TQT_TQOBJECT(this), TQT_SLOT(makeDir()));
menu.insertSeparator();
@@ -518,7 +518,7 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
void MainWindow::slotImageLoading() {
if (FullScreenConfig::showBusyPtr() || !mToggleFullScreen->isChecked()) {
- kapp->setOverrideCursor(KCursor::workingCursor(), true /* replace */);
+ kapp->setOverrideCursor(KCursor::workingCursor(), true /* tqreplace */);
}
}
@@ -538,7 +538,7 @@ void MainWindow::slotImageLoaded() {
void MainWindow::hideToolBars() {
- QPtrListIterator<KToolBar> it=toolBarIterator();
+ TQPtrListIterator<KToolBar> it=toolBarIterator();
KToolBar* bar;
for(;it.current()!=0L; ++it) {
@@ -553,7 +553,7 @@ void MainWindow::hideToolBars() {
void MainWindow::showToolBars() {
- QPtrListIterator<KToolBar> it=toolBarIterator();
+ TQPtrListIterator<KToolBar> it=toolBarIterator();
KToolBar* bar;
@@ -591,7 +591,7 @@ void MainWindow::toggleFullScreen() {
if (bottomDock()->isEmpty()) bottomDock()->hide();
if (mSwitchToBrowseMode->isChecked()) {
- mImageViewController->widget()->reparent(mViewModeWidget, QPoint(0,0));
+ mImageViewController->widget()->reparent(mViewModeWidget, TQPoint(0,0));
mCentralStack->raiseWidget(StackIDView);
}
updateFullScreenLabel();
@@ -666,12 +666,12 @@ void MainWindow::showConfigDialog() {
#else
ConfigDialog dialog(this, 0);
#endif
- connect(&dialog, SIGNAL(settingsChanged()),
- mSlideShow, SLOT(slotSettingsChanged()) );
- connect(&dialog, SIGNAL(settingsChanged()),
- mImageViewController, SLOT(updateFromSettings()) );
- connect(&dialog, SIGNAL(settingsChanged()),
- mFileViewController, SLOT(updateFromSettings()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mSlideShow, TQT_SLOT(slotSettingsChanged()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mImageViewController, TQT_SLOT(updateFromSettings()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mFileViewController, TQT_SLOT(updateFromSettings()) );
dialog.exec();
}
@@ -692,7 +692,7 @@ void MainWindow::showKeyDialog() {
void MainWindow::showToolBarDialog() {
saveMainWindowSettings(KGlobal::config(), "MainWindow");
KEditToolbar dlg(actionCollection());
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(applyMainWindowSettings()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),TQT_TQOBJECT(this),TQT_SLOT(applyMainWindowSettings()));
dlg.exec();
}
@@ -715,13 +715,13 @@ void MainWindow::slotDirRenamed(const KURL& oldURL, const KURL& newURL) {
KURL url(mFileViewController->dirURL());
if (!oldURL.isParentOf(url) ) {
- LOG(oldURL.prettyURL() << " is not a parent of " << url.prettyURL());
+ LOG(oldURL.prettyURL() << " is not a tqparent of " << url.prettyURL());
return;
}
- QString oldPath=oldURL.path();
+ TQString oldPath=oldURL.path();
LOG("current path: " << url.path() );
- QString path=newURL.path() + url.path().mid(oldPath.length());
+ TQString path=newURL.path() + url.path().mid(oldPath.length());
LOG("new path: " << path);
url.setPath(path);
mFileViewController->setDirURL(url);
@@ -750,14 +750,14 @@ void MainWindow::slotToggleCentralStack() {
// force re-reading the directory to show the error
if( mFileViewController->lastURLError()) mFileViewController->retryURL();
} else {
- mImageViewController->widget()->reparent(mViewModeWidget, QPoint(0,0));
+ mImageViewController->widget()->reparent(mViewModeWidget, TQPoint(0,0));
mCentralStack->raiseWidget(StackIDView);
mFileViewController->setSilentMode( true );
}
// Make sure the window list actions are disabled if we are in view mode,
// otherwise weird things happens when we go back to browse mode
- QPtrListIterator<KAction> it(mWindowListActions);
+ TQPtrListIterator<KAction> it(mWindowListActions);
for (;it.current(); ++it) {
it.current()->setEnabled(mSwitchToBrowseMode->isChecked());
}
@@ -769,7 +769,7 @@ void MainWindow::slotToggleCentralStack() {
void MainWindow::resetDockWidgets() {
int answer=KMessageBox::warningContinueCancel(this,
i18n("You are about to revert the window setup to factory defaults, are you sure?"),
- QString::null /* caption */,
+ TQString() /* caption */,
i18n("Reset"));
if (answer==KMessageBox::Cancel) return;
@@ -786,7 +786,7 @@ void MainWindow::resetDockWidgets() {
/**
* Display a hint as a temporary message in the status bar
*/
-void MainWindow::showHint(const QString& hint) {
+void MainWindow::showHint(const TQString& hint) {
mSBHintLabel->setText(hint);
mSBHintLabel->show();
@@ -800,23 +800,23 @@ void MainWindow::showHint(const QString& hint) {
//
//-----------------------------------------------------------------------
void MainWindow::updateStatusInfo() {
- QStringList tokens;
+ TQStringList tokens;
if ( KProtocolInfo::supportsListing(mFileViewController->url()) ) {
int pos = mFileViewController->shownFilePosition();
uint count = mFileViewController->fileCount();
if (count > 0) {
- tokens << i18n("%1/%2").arg(pos+1).arg(count);
+ tokens << i18n("%1/%2").tqarg(pos+1).tqarg(count);
} else {
tokens << i18n("No images");
}
}
- QString filename = mDocument->filename();
+ TQString filename = mDocument->filename();
- QSize size = mDocument->image().size();
+ TQSize size = mDocument->image().size();
if (!size.isEmpty()) {
- tokens << i18n("%1 x %2 pixels").arg(size.width()).arg(size.height());
+ tokens << i18n("%1 x %2 pixels").tqarg(size.width()).tqarg(size.height());
}
mSBDetailLabel->setText(tokens.join(" - "));
@@ -858,7 +858,7 @@ void MainWindow::updateImageActions() {
void MainWindow::createWidgets() {
KConfig* config=KGlobal::config();
- mCentralStack=new QWidgetStack(this);
+ mCentralStack=new TQWidgetStack(this);
setCentralWidget(mCentralStack);
mDockArea=new KDockArea(mCentralStack);
@@ -866,31 +866,31 @@ void MainWindow::createWidgets() {
mDockArea->manager()->setSplitterHighResolution(true);
mDockArea->manager()->setSplitterOpaqueResize(true);
- mViewModeWidget=new QWidget(mCentralStack);
- QVBoxLayout* layout=new QVBoxLayout(mViewModeWidget);
- layout->setAutoAdd(true);
+ mViewModeWidget=new TQWidget(mCentralStack);
+ TQVBoxLayout* tqlayout=new TQVBoxLayout(mViewModeWidget);
+ tqlayout->setAutoAdd(true);
mCentralStack->addWidget(mViewModeWidget);
- // Status bar
- mSBDetailLabel=new QLabel("", statusBar());
+ // tqStatus bar
+ mSBDetailLabel=new TQLabel("", statusBar());
mSBHintLabel=new TruncatedTextLabel(statusBar());
- QFont font=mSBHintLabel->font();
+ TQFont font=mSBHintLabel->font();
font.setItalic(true);
mSBHintLabel->setFont(font);
statusBar()->addWidget(mSBDetailLabel, 0);
statusBar()->addWidget(mSBHintLabel, 1);
- mHintTimer=new QTimer(this);
- connect(mHintTimer, SIGNAL(timeout()),
- mSBHintLabel, SLOT(clear()) );
+ mHintTimer=new TQTimer(this);
+ connect(mHintTimer, TQT_SIGNAL(timeout()),
+ mSBHintLabel, TQT_SLOT(clear()) );
// Pixmap widget
mImageDock = mDockArea->createDockWidget("Image",SmallIcon("gwenview"),NULL,i18n("Image"));
mImageViewController=new ImageViewController(mImageDock, mDocument, actionCollection());
mImageDock->setWidget(mImageViewController->widget());
- connect(mImageViewController, SIGNAL(requestHintDisplay(const QString&)),
- this, SLOT(showHint(const QString&)) );
+ connect(mImageViewController, TQT_SIGNAL(requestHintDisplay(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(showHint(const TQString&)) );
// Folder widget
mFolderDock = mDockArea->createDockWidget("Folders",SmallIcon("folder_open"),NULL,i18n("Folders"));
@@ -923,7 +923,7 @@ void MainWindow::createWidgets() {
setGeometry(20,20,720,520);
// Default dock config
- // (The "magic numbers" were found by adjusting the layout from within the
+ // (The "magic numbers" were found by adjusting the tqlayout from within the
// app and looking at the result in the configuration file)
mFolderDock->manualDock(mFileDock, KDockWidget::DockLeft, 4000);
mImageDock->manualDock(mFolderDock, KDockWidget::DockBottom, 3734);
@@ -964,55 +964,55 @@ void MainWindow::createWidgets() {
*/
void MainWindow::createActions() {
// Stack
- mSwitchToBrowseMode=new KRadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, this, SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode");
+ mSwitchToBrowseMode=new KRadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode");
mSwitchToBrowseMode->setExclusiveGroup("centralStackMode");
mSwitchToBrowseMode->setChecked(true);
- mSwitchToViewMode=new KRadioAction(i18n("View Image"), "image", 0, this, SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode");
+ mSwitchToViewMode=new KRadioAction(i18n("View Image"), "image", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode");
mSwitchToViewMode->setExclusiveGroup("centralStackMode");
// File
- KStdAction::open(this,SLOT(showFileDialog()),actionCollection() );
- mSaveFile=KStdAction::save(mDocument,SLOT(save()),actionCollection() );
- mSaveFileAs=KStdAction::saveAs(mDocument,SLOT(saveAs()),actionCollection() );
- mFilePrint = KStdAction::print(this, SLOT(printFile()), actionCollection());
- mRenameFile=new KAction(i18n("&Rename..."),Key_F2,this,SLOT(renameFile()),actionCollection(),"file_rename");
- mCopyFiles=new KAction(i18n("&Copy To..."),Key_F7,this,SLOT(copyFiles()),actionCollection(),"file_copy");
- mMoveFiles=new KAction(i18n("&Move To..."),Key_F8,this,SLOT(moveFiles()),actionCollection(),"file_move");
- mLinkFiles=new KAction(i18n("&Link To..."),Key_F9,this,SLOT(linkFiles()),actionCollection(),"file_link");
- mDeleteFiles=new KAction(i18n("&Delete"),"editdelete",Key_Delete,this,SLOT(deleteFiles()),actionCollection(),"file_delete");
- mShowFileProperties=new KAction(i18n("Properties"),0,this,SLOT(showFileProperties()),actionCollection(),"file_properties");
- KStdAction::quit( kapp, SLOT (closeAllWindows()), actionCollection() );
+ KStdAction::open(TQT_TQOBJECT(this),TQT_SLOT(showFileDialog()),actionCollection() );
+ mSaveFile=KStdAction::save(mDocument,TQT_SLOT(save()),actionCollection() );
+ mSaveFileAs=KStdAction::saveAs(mDocument,TQT_SLOT(saveAs()),actionCollection() );
+ mFilePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printFile()), actionCollection());
+ mRenameFile=new KAction(i18n("&Rename..."),Key_F2,TQT_TQOBJECT(this),TQT_SLOT(renameFile()),actionCollection(),"file_rename");
+ mCopyFiles=new KAction(i18n("&Copy To..."),Key_F7,TQT_TQOBJECT(this),TQT_SLOT(copyFiles()),actionCollection(),"file_copy");
+ mMoveFiles=new KAction(i18n("&Move To..."),Key_F8,TQT_TQOBJECT(this),TQT_SLOT(moveFiles()),actionCollection(),"file_move");
+ mLinkFiles=new KAction(i18n("&Link To..."),Key_F9,TQT_TQOBJECT(this),TQT_SLOT(linkFiles()),actionCollection(),"file_link");
+ mDeleteFiles=new KAction(i18n("&Delete"),"editdelete",Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(deleteFiles()),actionCollection(),"file_delete");
+ mShowFileProperties=new KAction(i18n("Properties"),0,TQT_TQOBJECT(this),TQT_SLOT(showFileProperties()),actionCollection(),"file_properties");
+ KStdAction::quit( TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()), actionCollection() );
// Edit
- mRotateLeft=new KAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, this, SLOT(rotateLeft()),actionCollection(),"rotate_left");
- mRotateRight=new KAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, this, SLOT(rotateRight()),actionCollection(),"rotate_right");
- mMirror=new KAction(i18n("&Mirror"),"mirror",0, this, SLOT(mirror()),actionCollection(),"mirror");
- mFlip=new KAction(i18n("&Flip"),"flip",0, this, SLOT(flip()),actionCollection(),"flip");
+ mRotateLeft=new KAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(rotateLeft()),actionCollection(),"rotate_left");
+ mRotateRight=new KAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(rotateRight()),actionCollection(),"rotate_right");
+ mMirror=new KAction(i18n("&Mirror"),"mirror",0, TQT_TQOBJECT(this), TQT_SLOT(mirror()),actionCollection(),"mirror");
+ mFlip=new KAction(i18n("&Flip"),"flip",0, TQT_TQOBJECT(this), TQT_SLOT(flip()),actionCollection(),"flip");
// View
- mReload=new KAction(i18n("Reload"), "reload", Key_F5, mDocument, SLOT(reload()), actionCollection(), "reload");
+ mReload=new KAction(i18n("Reload"), "reload", Key_F5, mDocument, TQT_SLOT(reload()), actionCollection(), "reload");
mReload->setEnabled(false);
- mToggleFullScreen= KStdAction::fullScreen(this,SLOT(toggleFullScreen()),actionCollection(),0);
- mToggleSlideShow=new KAction(i18n("Slide Show"),"slideshow_play",0,this,SLOT(toggleSlideShow()),actionCollection(),"slideshow");
+ mToggleFullScreen= KStdAction::fullScreen(TQT_TQOBJECT(this),TQT_SLOT(toggleFullScreen()),actionCollection(),0);
+ mToggleSlideShow=new KAction(i18n("Slide Show"),"slideshow_play",0,TQT_TQOBJECT(this),TQT_SLOT(toggleSlideShow()),actionCollection(),"slideshow");
mFullScreenLabelAction=new KToolBarLabelAction("", 0, 0, 0, actionCollection(), "fullscreen_label");
// Go
- mGoUp=new KToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, this, SLOT(goUp()), actionCollection(), "go_up");
- new KAction( i18n( "Home" ), "gohome", KStdAccel::shortcut(KStdAccel::Home), this, SLOT(goHome()), actionCollection(), "go_home");
+ mGoUp=new KToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "go_up");
+ new KAction( i18n( "Home" ), "gohome", KStdAccel::shortcut(KStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection(), "go_home");
// Window
- mResetDockWidgets = new KAction(i18n("Reset"), 0, this, SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets");
+ mResetDockWidgets = new KAction(i18n("Reset"), 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets");
// Settings
mShowConfigDialog=
- KStdAction::preferences(this, SLOT(showConfigDialog()), actionCollection() );
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showConfigDialog()), actionCollection() );
mShowKeyDialog=
- KStdAction::keyBindings(this, SLOT(showKeyDialog()), actionCollection() );
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(showKeyDialog()), actionCollection() );
(void)new KAction(i18n("Configure External Tools..."), "configure", 0,
- this, SLOT(showExternalToolDialog()), actionCollection(), "configure_tools");
+ TQT_TQOBJECT(this), TQT_SLOT(showExternalToolDialog()), actionCollection(), "configure_tools");
(void)KStdAction::configureToolbars(
- this, SLOT(showToolBarDialog()), actionCollection() );
+ TQT_TQOBJECT(this), TQT_SLOT(showToolBarDialog()), actionCollection() );
actionCollection()->readShortcutSettings();
}
@@ -1061,14 +1061,14 @@ void MainWindow::createObjectInteractions() {
}
// Make sure file actions are correctly updated
- connect(mFileViewController, SIGNAL(selectionChanged()),
- this, SLOT(updateImageActions()) );
+ connect(mFileViewController, TQT_SIGNAL(selectionChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateImageActions()) );
- connect(mFileViewController, SIGNAL(requestContextMenu(const QPoint&, bool)),
- this, SLOT(openFileViewControllerContextMenu(const QPoint&, bool)) );
+ connect(mFileViewController, TQT_SIGNAL(requestContextMenu(const TQPoint&, bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(openFileViewControllerContextMenu(const TQPoint&, bool)) );
// Bookmarks
- QString file = locate( "data", "kfile/bookmarks.xml" );
+ TQString file = locate( "data", "kfile/bookmarks.xml" );
if (file.isEmpty()) {
file = locateLocal( "data", "kfile/bookmarks.xml" );
}
@@ -1083,25 +1083,25 @@ void MainWindow::createObjectInteractions() {
KActionMenu* bookmark=new KActionMenu(i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" );
new KBookmarkMenu(manager, bookmarkOwner, bookmark->popupMenu(), 0, true);
- connect(bookmarkOwner,SIGNAL(openURL(const KURL&)),
- mFileViewController,SLOT(setDirURL(const KURL&)) );
+ connect(bookmarkOwner,TQT_SIGNAL(openURL(const KURL&)),
+ mFileViewController,TQT_SLOT(setDirURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- bookmarkOwner,SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ bookmarkOwner,TQT_SLOT(setURL(const KURL&)) );
}
void MainWindow::createHideShowAction(KDockWidget* dock) {
- QString caption;
+ TQString caption;
if (dock->mayBeHide()) {
- caption=i18n("Hide %1").arg(dock->caption());
+ caption=i18n("Hide %1").tqarg(dock->caption());
} else {
- caption=i18n("Show %1").arg(dock->caption());
+ caption=i18n("Show %1").tqarg(dock->caption());
}
- KAction* action=new KAction(caption, 0, dock, SLOT(changeHideShowState()), (QObject*)0 );
+ KAction* action=new KAction(caption, 0, TQT_TQOBJECT(dock), TQT_SLOT(changeHideShowState()), (TQObject*)0 );
if (dock->icon()) {
- action->setIconSet( QIconSet(*dock->icon()) );
+ action->setIconSet( TQIconSet(*dock->icon()) );
}
mWindowListActions.append(action);
}
@@ -1118,91 +1118,91 @@ void MainWindow::updateWindowActions() {
void MainWindow::createConnections() {
- connect(mGoUp->popupMenu(), SIGNAL(aboutToShow()),
- this,SLOT(fillGoUpMenu()));
+ connect(mGoUp->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this,TQT_SLOT(fillGoUpMenu()));
- connect(mGoUp->popupMenu(), SIGNAL(activated(int)),
- this,SLOT(goUpTo(int)));
+ connect(mGoUp->popupMenu(), TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(goUpTo(int)));
// Slideshow connections
- connect( mSlideShow, SIGNAL(nextURL(const KURL&)),
- SLOT( openURL(const KURL&)) );
- connect( mSlideShow, SIGNAL( stateChanged(bool)),
- SLOT( slotSlideShowChanged(bool)) );
+ connect( mSlideShow, TQT_SIGNAL(nextURL(const KURL&)),
+ TQT_SLOT( openURL(const KURL&)) );
+ connect( mSlideShow, TQT_SIGNAL( stateChanged(bool)),
+ TQT_SLOT( slotSlideShowChanged(bool)) );
// Dir view connections
- connect(mDirViewController, SIGNAL(urlChanged(const KURL&)),
- mFileViewController, SLOT(setDirURL(const KURL&)) );
- connect(mDirViewController, SIGNAL(urlRenamed(const KURL&, const KURL&)),
- this, SLOT(slotDirRenamed(const KURL&, const KURL&)) );
+ connect(mDirViewController, TQT_SIGNAL(urlChanged(const KURL&)),
+ mFileViewController, TQT_SLOT(setDirURL(const KURL&)) );
+ connect(mDirViewController, TQT_SIGNAL(urlRenamed(const KURL&, const KURL&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDirRenamed(const KURL&, const KURL&)) );
// Bookmark view connections
- connect(mBookmarkViewController, SIGNAL(openURL(const KURL&)),
- mFileViewController,SLOT(setDirURL(const KURL&)) );
- connect(mFileViewController, SIGNAL(directoryChanged(const KURL&)),
- mBookmarkViewController, SLOT(setURL(const KURL&)) );
+ connect(mBookmarkViewController, TQT_SIGNAL(openURL(const KURL&)),
+ mFileViewController,TQT_SLOT(setDirURL(const KURL&)) );
+ connect(mFileViewController, TQT_SIGNAL(directoryChanged(const KURL&)),
+ mBookmarkViewController, TQT_SLOT(setURL(const KURL&)) );
// Pixmap view connections
- connect(mImageViewController, SIGNAL(selectPrevious()),
- mFileViewController, SLOT(slotSelectPrevious()) );
- connect(mImageViewController, SIGNAL(selectNext()),
- mFileViewController, SLOT(slotSelectNext()) );
- connect(mImageViewController, SIGNAL(doubleClicked()),
- mToggleFullScreen, SLOT(activate()) );
+ connect(mImageViewController, TQT_SIGNAL(selectPrevious()),
+ mFileViewController, TQT_SLOT(slotSelectPrevious()) );
+ connect(mImageViewController, TQT_SIGNAL(selectNext()),
+ mFileViewController, TQT_SLOT(slotSelectNext()) );
+ connect(mImageViewController, TQT_SIGNAL(doubleClicked()),
+ mToggleFullScreen, TQT_SLOT(activate()) );
// File view connections
- connect(mFileViewController,SIGNAL(urlChanged(const KURL&)),
- mDocument,SLOT(setURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- this,SLOT(slotDirURLChanged(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- mDirViewController,SLOT(setURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- mHistory,SLOT(addURLToHistory(const KURL&)) );
-
- connect(mFileViewController,SIGNAL(completed()),
- this,SLOT(updateStatusInfo()) );
- connect(mFileViewController,SIGNAL(canceled()),
- this,SLOT(updateStatusInfo()) );
- connect(mFileViewController,SIGNAL(imageDoubleClicked()),
- mToggleFullScreen,SLOT(activate()) );
- connect(mFileViewController,SIGNAL(shownFileItemRefreshed(const KFileItem*)),
- this,SLOT(slotShownFileItemRefreshed(const KFileItem*)) );
- connect(mFileViewController,SIGNAL(sortingChanged()),
- this, SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(urlChanged(const KURL&)),
+ mDocument,TQT_SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ this,TQT_SLOT(slotDirURLChanged(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ mDirViewController,TQT_SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ mHistory,TQT_SLOT(addURLToHistory(const KURL&)) );
+
+ connect(mFileViewController,TQT_SIGNAL(completed()),
+ this,TQT_SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(canceled()),
+ this,TQT_SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(imageDoubleClicked()),
+ mToggleFullScreen,TQT_SLOT(activate()) );
+ connect(mFileViewController,TQT_SIGNAL(shownFileItemRefreshed(const KFileItem*)),
+ this,TQT_SLOT(slotShownFileItemRefreshed(const KFileItem*)) );
+ connect(mFileViewController,TQT_SIGNAL(sortingChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateStatusInfo()) );
// History connections
- connect(mHistory, SIGNAL(urlChanged(const KURL&)),
- mFileViewController, SLOT(setDirURL(const KURL&)) );
+ connect(mHistory, TQT_SIGNAL(urlChanged(const KURL&)),
+ mFileViewController, TQT_SLOT(setDirURL(const KURL&)) );
// Document connections
- connect(mDocument,SIGNAL(loading()),
- this,SLOT(slotImageLoading()) );
- connect(mDocument,SIGNAL(loaded(const KURL&)),
- this,SLOT(slotImageLoaded()) );
- connect(mDocument,SIGNAL(saved(const KURL&)),
- mFileViewController,SLOT(updateThumbnail(const KURL&)) );
- connect(mDocument,SIGNAL(reloaded(const KURL&)),
- mFileViewController,SLOT(updateThumbnail(const KURL&)) );
+ connect(mDocument,TQT_SIGNAL(loading()),
+ this,TQT_SLOT(slotImageLoading()) );
+ connect(mDocument,TQT_SIGNAL(loaded(const KURL&)),
+ this,TQT_SLOT(slotImageLoaded()) );
+ connect(mDocument,TQT_SIGNAL(saved(const KURL&)),
+ mFileViewController,TQT_SLOT(updateThumbnail(const KURL&)) );
+ connect(mDocument,TQT_SIGNAL(reloaded(const KURL&)),
+ mFileViewController,TQT_SLOT(updateThumbnail(const KURL&)) );
// Location bar
- connect(mURLEdit, SIGNAL(activated(const QString &)),
- this,SLOT(slotGo()) );
- connect(mURLEdit, SIGNAL(returnPressed()),
- this,SLOT(slotGo()) );
+ connect(mURLEdit, TQT_SIGNAL(activated(const TQString &)),
+ this,TQT_SLOT(slotGo()) );
+ connect(mURLEdit, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(slotGo()) );
// Non configurable stop-fullscreen accel
- QAccel* accel=new QAccel(this);
- accel->connectItem(accel->insertItem(Key_Escape),this,SLOT(escapePressed()));
+ TQAccel* accel=new TQAccel(this);
+ accel->connectItem(accel->insertItem(Key_Escape),TQT_TQOBJECT(this),TQT_SLOT(escapePressed()));
// Dock related
- connect(mDockArea->manager(), SIGNAL(change()),
- this, SLOT(updateWindowActions()) );
+ connect(mDockArea->manager(), TQT_SIGNAL(change()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateWindowActions()) );
// Plugin menu
- QPopupMenu *popup = static_cast<QPopupMenu*>(
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(
factory()->container( "plugins", this));
- connect(popup, SIGNAL(aboutToShow()), this, SLOT(loadPlugins()) );
+ connect(popup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(loadPlugins()) );
}
@@ -1216,10 +1216,10 @@ void MainWindow::createLocationToolBar() {
// Do not let the combobox get wider than available space, as this would
// hide the toolbuttons after it
- mURLEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ mURLEdit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
// Avoid stealing focus
- mURLEdit->setFocusPolicy(ClickFocus);
+ mURLEdit->setFocusPolicy(TQ_ClickFocus);
mURLEditCompletion=new KURLCompletion();
@@ -1233,16 +1233,16 @@ void MainWindow::createLocationToolBar() {
// Clear button
(void)new KAction( i18n("Clear Location Bar"),
- QApplication::reverseLayout()?"clear_left" : "locationbar_erase",
- 0, this, SLOT(clearLocationLabel()), actionCollection(), "clear_location");
+ TQApplication::reverseLayout()?"clear_left" : "locationbar_erase",
+ 0, TQT_TQOBJECT(this), TQT_SLOT(clearLocationLabel()), actionCollection(), "clear_location");
// URL Label
KToolBarLabelAction* locationAction = new KToolBarLabelAction(i18n("L&ocation:"),
- Key_F6, this, SLOT( activateLocationLabel()), actionCollection(), "location_label");
+ Key_F6, TQT_TQOBJECT(this), TQT_SLOT( activateLocationLabel()), actionCollection(), "location_label");
locationAction->setBuddy(mURLEdit);
// Go button
- (void)new KAction(i18n("Go"), "key_enter", 0, this, SLOT(slotGo()), actionCollection(), "location_go");
+ (void)new KAction(i18n("Go"), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGo()), actionCollection(), "location_go");
}
@@ -1267,8 +1267,8 @@ void MainWindow::loadPlugins() {
LOG("Load plugins");
// Sets up the plugin interface, and load the plugins
KIPIInterface* interface = new KIPIInterface(this, mFileViewController);
- mPluginLoader = new KIPI::PluginLoader(QStringList(), interface );
- connect( mPluginLoader, SIGNAL( replug() ), this, SLOT( slotReplug() ) );
+ mPluginLoader = new KIPI::PluginLoader(TQStringList(), interface );
+ connect( mPluginLoader, TQT_SIGNAL( replug() ), TQT_TQOBJECT(this), TQT_SLOT( slotReplug() ) );
mPluginLoader->loadPlugins();
}
@@ -1276,14 +1276,14 @@ void MainWindow::loadPlugins() {
// Helper class for slotReplug(), gcc does not want to instantiate templates
// with local classes, so this is declared outside of slotReplug()
struct MenuInfo {
- QString mName;
- QPtrList<KAction> mActions;
+ TQString mName;
+ TQPtrList<KAction> mActions;
MenuInfo() {}
- MenuInfo(const QString& name) : mName(name) {}
+ MenuInfo(const TQString& name) : mName(name) {}
};
void MainWindow::slotReplug() {
- typedef QMap<KIPI::Category, MenuInfo> CategoryMap;
+ typedef TQMap<KIPI::Category, MenuInfo> CategoryMap;
CategoryMap categoryMap;
categoryMap[KIPI::IMAGESPLUGIN]=MenuInfo("image_actions");
categoryMap[KIPI::EFFECTSPLUGIN]=MenuInfo("effect_actions");
@@ -1309,7 +1309,7 @@ void MainWindow::slotReplug() {
for (; actionIt!=end; ++actionIt) {
KIPI::Category category = plugin->category(*actionIt);
- if (!categoryMap.contains(category)) {
+ if (!categoryMap.tqcontains(category)) {
kdWarning() << "Unknown category '" << category << "'\n";
continue;
}
@@ -1323,7 +1323,7 @@ void MainWindow::slotReplug() {
KAction* noPlugin=new KAction(i18n("No Plugin"), 0, 0, 0, actionCollection(), "no_plugin");
noPlugin->setShortcutConfigurable(false);
noPlugin->setEnabled(false);
- QPtrList<KAction> noPluginList;
+ TQPtrList<KAction> noPluginList;
noPluginList.append(noPlugin);
// Fill the menu
@@ -1344,10 +1344,10 @@ void MainWindow::loadPlugins() {
KAction* noPlugin=new KAction(i18n("No KIPI support"), 0, 0, 0, actionCollection(), "no_plugin");
noPlugin->setShortcutConfigurable(false);
noPlugin->setEnabled(false);
- QPtrList<KAction> noPluginList;
+ TQPtrList<KAction> noPluginList;
noPluginList.append(noPlugin);
- QStringList lst;
+ TQStringList lst;
lst << "image_actions"
<< "effect_actions"
<< "tool_actions"
@@ -1357,7 +1357,7 @@ void MainWindow::loadPlugins() {
<< "collection_actions";
// Fill the menu
- QStringList::ConstIterator catIt=lst.begin(), catItEnd=lst.end();
+ TQStringList::ConstIterator catIt=lst.begin(), catItEnd=lst.end();
for (; catIt!=catItEnd; ++catIt) {
plugActionList(*catIt, noPluginList);
}
diff --git a/src/app/mainwindow.h b/src/app/mainwindow.h
index 96bf0a2..239eaf3 100644
--- a/src/app/mainwindow.h
+++ b/src/app/mainwindow.h
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-// Qt
-#include <qptrlist.h>
+// TQt
+#include <tqptrlist.h>
// KDE
#include <kmainwindow.h>
@@ -35,9 +35,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <libkipi/pluginloader.h>
#endif
-class QLabel;
-class QTimer;
-class QWidgetStack;
+class TQLabel;
+class TQTimer;
+class TQWidgetStack;
class KAction;
class KDockArea;
@@ -64,6 +64,7 @@ class SlideShow;
class MainWindow : public KMainWindow {
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow();
void setFullScreen(bool);
@@ -78,16 +79,16 @@ protected:
virtual void readProperties( KConfig* );
private:
- QWidgetStack* mCentralStack;
- QWidget* mViewModeWidget;
+ TQWidgetStack* mCentralStack;
+ TQWidget* mViewModeWidget;
KDockArea* mDockArea;
KDockWidget* mFolderDock;
KDockWidget* mFileDock;
KDockWidget* mImageDock;
KDockWidget* mMetaDock;
- QLabel* mSBDetailLabel;
- QLabel* mSBHintLabel;
- QTimer* mHintTimer;
+ TQLabel* mSBDetailLabel;
+ TQLabel* mSBHintLabel;
+ TQTimer* mHintTimer;
FileViewController* mFileViewController;
DirViewController* mDirViewController;
@@ -125,7 +126,7 @@ private:
KHistoryCombo* mURLEdit;
KURLCompletion* mURLEditCompletion;
- QPtrList<KAction> mWindowListActions;
+ TQPtrList<KAction> mWindowListActions;
#ifdef GV_HAVE_KIPI
KIPI::PluginLoader* mPluginLoader;
@@ -148,7 +149,7 @@ private slots:
void makeDir();
void goHome();
void renameFile();
- void slotRenamed(const QString&);
+ void slotRenamed(const TQString&);
void copyFiles();
void moveFiles();
void linkFiles();
@@ -209,11 +210,11 @@ private slots:
void slotReplug();
- void showHint(const QString&);
+ void showHint(const TQString&);
void fillGoUpMenu();
- void openFileViewControllerContextMenu(const QPoint& pos, bool onItem);
+ void openFileViewControllerContextMenu(const TQPoint& pos, bool onItem);
};
diff --git a/src/app/metaedit.cpp b/src/app/metaedit.cpp
index 8e2999c..0d37135 100644
--- a/src/app/metaedit.cpp
+++ b/src/app/metaedit.cpp
@@ -17,10 +17,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qfileinfo.h>
+// TQt
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqfileinfo.h>
// KDE
#include <kdeversion.h>
@@ -31,20 +31,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "metaedit.moc"
namespace Gwenview {
-// FIXME: Why doesn't MetaEdit inherits from QTextEdit rather than QVBox?
-MetaEdit::MetaEdit(QWidget *parent, Document *gvp, const char *name)
-: QVBox(parent, name)
+// FIXME: Why doesn't MetaEdit inherits from TQTextEdit rather than TQVBox?
+MetaEdit::MetaEdit(TQWidget *tqparent, Document *gvp, const char *name)
+: TQVBox(tqparent, name)
, mEmpty(true)
, mDocument(gvp)
{
- mCommentEdit=new QTextEdit(this);
+ mCommentEdit=new TQTextEdit(this);
mCommentEdit->installEventFilter(this);
- connect(mCommentEdit, SIGNAL(modificationChanged(bool)),
- this, SLOT(setModified(bool)));
- connect(mDocument,SIGNAL(loaded(const KURL&)),
- this,SLOT(updateContent()) );
- connect(mCommentEdit, SIGNAL(textChanged()),
- this, SLOT(updateDoc()) );
+ connect(mCommentEdit, TQT_SIGNAL(modificationChanged(bool)),
+ this, TQT_SLOT(setModified(bool)));
+ connect(mDocument,TQT_SIGNAL(loaded(const KURL&)),
+ this,TQT_SLOT(updateContent()) );
+ connect(mCommentEdit, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(updateDoc()) );
updateContent();
mCommentEdit->setMinimumHeight(int (mCommentEdit->fontMetrics().height() * 1.5) );
}
@@ -54,10 +54,10 @@ MetaEdit::~MetaEdit() {
}
-bool MetaEdit::eventFilter(QObject*, QEvent *event) {
+bool MetaEdit::eventFilter(TQObject*, TQEvent *event) {
if (mEmpty
&& (mDocument->commentState()==Document::WRITABLE)
- && (event->type()==QEvent::FocusIn || event->type()==QEvent::FocusOut)
+ && (event->type()==TQEvent::FocusIn || event->type()==TQEvent::FocusOut)
) {
setEmptyText();
}
@@ -83,7 +83,7 @@ void MetaEdit::updateContent() {
return;
}
- QString comment=mDocument->comment();
+ TQString comment=mDocument->comment();
mEmpty = comment.isEmpty();
if (mEmpty) {
setEmptyText();
@@ -118,9 +118,9 @@ void MetaEdit::setEmptyText() {
/**
* Use mCommentEdit to show the comment and let the user edit it
*/
-void MetaEdit::setComment(const QString& comment) {
+void MetaEdit::setComment(const TQString& comment) {
Q_ASSERT(mDocument->commentState()!=Document::NONE);
- mCommentEdit->setTextFormat(QTextEdit::PlainText);
+ mCommentEdit->setTextFormat(TQTextEdit::PlainText);
mCommentEdit->setReadOnly(mDocument->commentState()==Document::READ_ONLY);
mCommentEdit->setText(comment);
}
@@ -129,10 +129,10 @@ void MetaEdit::setComment(const QString& comment) {
/**
* Use mCommentEdit to display a read-only message
*/
-void MetaEdit::setMessage(const QString& msg) {
- mCommentEdit->setTextFormat(QTextEdit::RichText);
+void MetaEdit::setMessage(const TQString& msg) {
+ mCommentEdit->setTextFormat(TQTextEdit::RichText);
mCommentEdit->setReadOnly(true);
- mCommentEdit->setText(QString("<i>%1</i>").arg(msg));
+ mCommentEdit->setText(TQString("<i>%1</i>").tqarg(msg));
}
} // namespace
diff --git a/src/app/metaedit.h b/src/app/metaedit.h
index 4e5d34e..57b1054 100644
--- a/src/app/metaedit.h
+++ b/src/app/metaedit.h
@@ -20,24 +20,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef METAEDIT_H
#define METAEDIT_H
-// Qt
-#include <qvbox.h>
+// TQt
+#include <tqvbox.h>
// KDE
#include <kfilemetainfo.h>
-class QTextEdit;
+class TQTextEdit;
namespace Gwenview {
class Document;
-class MetaEdit : public QVBox {
+class MetaEdit : public TQVBox {
Q_OBJECT
+ TQ_OBJECT
public:
- MetaEdit(QWidget *parent, Document*, const char *name="");
+ MetaEdit(TQWidget *tqparent, Document*, const char *name="");
~MetaEdit();
protected:
- bool eventFilter(QObject *, QEvent *);
+ bool eventFilter(TQObject *, TQEvent *);
private slots:
void updateContent();
void updateDoc();
@@ -46,10 +47,10 @@ private slots:
private:
bool mEmpty;
Document* mDocument;
- QTextEdit* mCommentEdit;
+ TQTextEdit* mCommentEdit;
- void setComment(const QString&);
- void setMessage(const QString&);
+ void setComment(const TQString&);
+ void setMessage(const TQString&);
void setEmptyText();
};
diff --git a/src/app/testvtabwidget.cpp b/src/app/testvtabwidget.cpp
index f346f1c..d9fccaf 100644
--- a/src/app/testvtabwidget.cpp
+++ b/src/app/testvtabwidget.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2005 Aurelien Gateau
@@ -19,8 +19,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qlabel.h>
+// TQt
+#include <tqlabel.h>
// KDE
#include <kapplication.h>
@@ -37,9 +37,9 @@ int main(int argc, char* argv[]) {
KApplication app;
Gwenview::VTabWidget tabWidget(0);
- QLabel* lbl=new QLabel("label 1", &tabWidget);
+ TQLabel* lbl=new TQLabel("label 1", &tabWidget);
tabWidget.addTab(lbl, SmallIcon("text"), "tab1");
- lbl=new QLabel("label 2", &tabWidget);
+ lbl=new TQLabel("label 2", &tabWidget);
tabWidget.addTab(lbl, SmallIcon("image"), "tab2");
app.setMainWidget(&tabWidget);
diff --git a/src/app/treeview.cpp b/src/app/treeview.cpp
index ecde019..a8c7b59 100644
--- a/src/app/treeview.cpp
+++ b/src/app/treeview.cpp
@@ -20,9 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "treeview.moc"
-// Qt
-#include <qheader.h>
-#include <qtimer.h>
+// TQt
+#include <tqheader.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -53,12 +53,12 @@ struct TreeView::Private {
TreeView* mView;
KFileTreeBranch* mBranch;
KFileTreeViewItem* mDropTarget;
- QTimer* mAutoOpenTimer;
+ TQTimer* mAutoOpenTimer;
- KFileTreeViewItem* findViewItem(KFileTreeViewItem* parent,const QString& text) {
- QListViewItem* item;
+ KFileTreeViewItem* findViewItem(KFileTreeViewItem* tqparent,const TQString& text) {
+ TQListViewItem* item;
- for (item=parent->firstChild();item;item=item->nextSibling()) {
+ for (item=tqparent->firstChild();item;item=item->nextSibling()) {
if (item->text(0)==text) {
return static_cast<KFileTreeViewItem*>(item);
}
@@ -68,7 +68,7 @@ struct TreeView::Private {
void setURLInternal(const KURL& url) {
LOG(url.prettyURL() );
- QString path=url.path();
+ TQString path=url.path();
if (!mBranch || !mBranch->rootUrl().isParentOf(url)) {
mView->createBranch(url);
@@ -84,9 +84,9 @@ struct TreeView::Private {
LOG("Path=" << path);
// Finds the deepest existing view item
- QStringList folderParts=QStringList::split('/',path);
- QStringList::Iterator folderIter=folderParts.begin();
- QStringList::Iterator endFolderIter=folderParts.end();
+ TQStringList folderParts=TQStringList::split('/',path);
+ TQStringList::Iterator folderIter=folderParts.begin();
+ TQStringList::Iterator endFolderIter=folderParts.end();
KFileTreeViewItem* viewItem=mBranch->root();
for(;folderIter!=endFolderIter;++folderIter) {
@@ -114,16 +114,16 @@ struct TreeView::Private {
};
-TreeView::TreeView(QWidget* parent)
-: KFileTreeView(parent) {
+TreeView::TreeView(TQWidget* tqparent)
+: KFileTreeView(tqparent) {
d=new Private;
d->mView=this;
d->mBranch=0;
d->mDropTarget=0;
- d->mAutoOpenTimer=new QTimer(this);
+ d->mAutoOpenTimer=new TQTimer(this);
// Look
- addColumn(QString::null);
+ addColumn(TQString());
header()->hide();
setAllColumnsShowFocus(true);
setRootIsDecorated(false);
@@ -135,8 +135,8 @@ TreeView::TreeView(QWidget* parent)
setDropHighlighter(true);
setAcceptDrops(true);
- connect(d->mAutoOpenTimer, SIGNAL(timeout()),
- this, SLOT(autoOpenDropTarget()));
+ connect(d->mAutoOpenTimer, TQT_SIGNAL(timeout()),
+ TQT_TQOBJECT(this), TQT_SLOT(autoOpenDropTarget()));
}
@@ -163,7 +163,7 @@ void TreeView::setURL(const KURL& url) {
void TreeView::slotTreeViewPopulateFinished(KFileTreeViewItem* item) {
- QListViewItem* child;
+ TQListViewItem* child;
if (!item) return;
KURL url=item->url();
@@ -180,7 +180,7 @@ void TreeView::slotTreeViewPopulateFinished(KFileTreeViewItem* item) {
return;
}
- // This URL is not a parent of a wanted URL, get out
+ // This URL is not a tqparent of a wanted URL, get out
if (!url.isParentOf(m_nextUrlToSelect)) return;
// Find the next child item and open it
@@ -201,14 +201,14 @@ void TreeView::createBranch(const KURL& url) {
if (d->mBranch) {
removeBranch(d->mBranch);
}
- QString title=url.prettyURL(0, KURL::StripFileProtocol);
+ TQString title=url.prettyURL(0, KURL::StripFileProtocol);
d->mBranch=addBranch(url, title, SmallIcon(KMimeType::iconForURL(url)) );
setDirOnlyMode(d->mBranch, true);
d->mBranch->setChildRecurse(false);
d->mBranch->root()->setOpen(true);
- connect(d->mBranch, SIGNAL(populateFinished(KFileTreeViewItem*) ),
- this, SLOT(slotTreeViewPopulateFinished(KFileTreeViewItem*)) );
+ connect(d->mBranch, TQT_SIGNAL(populateFinished(KFileTreeViewItem*) ),
+ TQT_TQOBJECT(this), TQT_SLOT(slotTreeViewPopulateFinished(KFileTreeViewItem*)) );
}
@@ -248,23 +248,23 @@ void TreeView::slotNewTreeViewItems(KFileTreeBranch* branch, const KFileTreeView
* dir when it's shown. Since the view doesn't update if it's
* hidden
*/
-void TreeView::showEvent(QShowEvent* event) {
+void TreeView::showEvent(TQShowEvent* event) {
LOG("m_nextUrlToSelect=" << m_nextUrlToSelect.pathOrURL());
if (m_nextUrlToSelect.isValid() && !currentURL().equals(m_nextUrlToSelect,true)) {
d->setURLInternal(m_nextUrlToSelect);
}
- QWidget::showEvent(event);
+ TQWidget::showEvent(event);
}
-void TreeView::contentsDragMoveEvent(QDragMoveEvent* event) {
+void TreeView::contentsDragMoveEvent(TQDragMoveEvent* event) {
if (!KURLDrag::canDecode(event)) {
event->ignore();
return;
}
// Get a pointer to the new drop item
- QPoint point(0,event->pos().y());
+ TQPoint point(0,event->pos().y());
KFileTreeViewItem* newDropTarget=static_cast<KFileTreeViewItem*>( itemAt(contentsToViewport(point)) );
if (!newDropTarget) {
event->ignore();
@@ -290,7 +290,7 @@ void TreeView::contentsDragMoveEvent(QDragMoveEvent* event) {
}
-void TreeView::contentsDragLeaveEvent(QDragLeaveEvent*) {
+void TreeView::contentsDragLeaveEvent(TQDragLeaveEvent*) {
d->mAutoOpenTimer->stop();
if (d->mDropTarget) {
stopAnimation(d->mDropTarget);
@@ -299,7 +299,7 @@ void TreeView::contentsDragLeaveEvent(QDragLeaveEvent*) {
}
-void TreeView::contentsDropEvent(QDropEvent* event) {
+void TreeView::contentsDropEvent(TQDropEvent* event) {
d->mAutoOpenTimer->stop();
// Get data from drop (do it before showing menu to avoid mDropTarget changes)
diff --git a/src/app/treeview.h b/src/app/treeview.h
index cc94364..eea709b 100644
--- a/src/app/treeview.h
+++ b/src/app/treeview.h
@@ -25,15 +25,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <kfiletreeview.h>
class KURL;
-class QShowEvent;
+class TQShowEvent;
namespace Gwenview {
class TreeView : public KFileTreeView {
Q_OBJECT
+ TQ_OBJECT
public:
- TreeView(QWidget* parent);
+ TreeView(TQWidget* tqparent);
~TreeView();
public slots:
@@ -44,10 +45,10 @@ signals:
void urlChanged(const KURL&);
protected:
- virtual void showEvent(QShowEvent*);
- virtual void contentsDragMoveEvent(QDragMoveEvent*);
- virtual void contentsDragLeaveEvent(QDragLeaveEvent*);
- virtual void contentsDropEvent(QDropEvent*);
+ virtual void showEvent(TQShowEvent*);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent*);
+ virtual void contentsDragLeaveEvent(TQDragLeaveEvent*);
+ virtual void contentsDropEvent(TQDropEvent*);
protected slots:
virtual void slotNewTreeViewItems(KFileTreeBranch*, const KFileTreeViewItemList&);
diff --git a/src/app/truncatedtextlabel.h b/src/app/truncatedtextlabel.h
index 183752f..d9c1b88 100644
--- a/src/app/truncatedtextlabel.h
+++ b/src/app/truncatedtextlabel.h
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef TRUNCATEDTEXTLABEL_H
#define TRUNCATEDTEXTLABEL_H
-// Qt
-#include <qlabel.h>
-#include <qtooltip.h>
+// TQt
+#include <tqlabel.h>
+#include <tqtooltip.h>
// KDE
#include <kwordwrap.h>
@@ -34,42 +34,42 @@ namespace Gwenview {
* A label which truncates it's text if it's too long, drawing it using
* KWordWrap::drawFadeoutText()
*/
-class TruncatedTextLabel : public QLabel {
+class TruncatedTextLabel : public TQLabel {
public:
- TruncatedTextLabel(QWidget* parent)
- : QLabel(parent) {}
+ TruncatedTextLabel(TQWidget* tqparent)
+ : TQLabel(tqparent) {}
- QSize minimumSizeHint() const {
- QSize size=QLabel::minimumSizeHint();
+ TQSize tqminimumSizeHint() const {
+ TQSize size=TQLabel::tqminimumSizeHint();
size.setWidth(-1);
return size;
}
- QSize sizeHint() const {
- return QSize(contentsRect().width(), QLabel::sizeHint().height());
+ TQSize tqsizeHint() const {
+ return TQSize(contentsRect().width(), TQLabel::tqsizeHint().height());
}
- void setText(const QString& text) {
- QLabel::setText(text);
+ void setText(const TQString& text) {
+ TQLabel::setText(text);
updateToolTip();
}
protected:
- void drawContents(QPainter* painter) {
+ void drawContents(TQPainter* painter) {
KWordWrap::drawFadeoutText(painter, 0, fontMetrics().ascent(), width(), text());
}
- void resizeEvent(QResizeEvent*) {
+ void resizeEvent(TQResizeEvent*) {
updateToolTip();
}
void updateToolTip() {
- QString txt=text();
- QToolTip::remove(this);
+ TQString txt=text();
+ TQToolTip::remove(this);
if ( width() < fontMetrics().width(txt) ) {
- QToolTip::add(this, txt);
+ TQToolTip::add(this, txt);
} else {
- QToolTip::hide();
+ TQToolTip::hide();
}
}
};
diff --git a/src/app/vtabwidget.cpp b/src/app/vtabwidget.cpp
index a05772c..24918f8 100644
--- a/src/app/vtabwidget.cpp
+++ b/src/app/vtabwidget.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2005 Aurelien Gateau
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "vtabwidget.moc"
-// Qt
-#include <qwidgetstack.h>
+// TQt
+#include <tqwidgetstack.h>
// KDE
#include <kmultitabbar.h>
@@ -33,23 +33,23 @@ namespace Gwenview {
struct VTabWidget::Private {
KMultiTabBar* mTabBar;
- QWidgetStack* mStack;
+ TQWidgetStack* mStack;
bool mEmpty;
};
-VTabWidget::VTabWidget(QWidget* parent)
-: QWidget(parent)
+VTabWidget::VTabWidget(TQWidget* tqparent)
+: TQWidget(tqparent)
{
d=new Private;
d->mEmpty=true;
d->mTabBar=new KMultiTabBar(KMultiTabBar::Vertical, this);
d->mTabBar->setPosition(KMultiTabBar::Left);
d->mTabBar->setStyle(KMultiTabBar::KDEV3ICON);
- d->mStack=new QWidgetStack(this);
- QHBoxLayout* layout=new QHBoxLayout(this);
- layout->add(d->mTabBar);
- layout->add(d->mStack);
+ d->mStack=new TQWidgetStack(this);
+ TQHBoxLayout* tqlayout=new TQHBoxLayout(this);
+ tqlayout->add(d->mTabBar);
+ tqlayout->add(d->mStack);
}
@@ -58,11 +58,11 @@ VTabWidget::~VTabWidget() {
}
-void VTabWidget::addTab(QWidget* child, const QPixmap& pix, const QString& label) {
+void VTabWidget::addTab(TQWidget* child, const TQPixmap& pix, const TQString& label) {
int id=d->mStack->addWidget(child);
d->mTabBar->appendTab(pix, id, label);
- connect(d->mTabBar->tab(id), SIGNAL(clicked(int)),
- this, SLOT(slotClicked(int)) );
+ connect(d->mTabBar->tab(id), TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(slotClicked(int)) );
if (d->mEmpty) {
d->mTabBar->tab(id)->setOn(true);
@@ -73,8 +73,8 @@ void VTabWidget::addTab(QWidget* child, const QPixmap& pix, const QString& label
void VTabWidget::slotClicked(int id) {
d->mStack->raiseWidget(id);
- QPtrList<KMultiTabBarTab>* tabs=d->mTabBar->tabs();
- QPtrListIterator<KMultiTabBarTab> it(*tabs);
+ TQPtrList<KMultiTabBarTab>* tabs=d->mTabBar->tabs();
+ TQPtrListIterator<KMultiTabBarTab> it(*tabs);
for (; it.current(); ++it) {
KMultiTabBarTab* tab=it.current();
tab->setOn(tab->id()==id);
diff --git a/src/app/vtabwidget.h b/src/app/vtabwidget.h
index 92e4b12..85aa4b4 100644
--- a/src/app/vtabwidget.h
+++ b/src/app/vtabwidget.h
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2005 Aurelien Gateau
@@ -22,20 +22,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef VTABWIDGET_H
#define VTABWIDGET_H
-// Qt
-#include <qwidget.h>
+// TQt
+#include <tqwidget.h>
-class QPixmap;
+class TQPixmap;
namespace Gwenview {
-class VTabWidget : public QWidget {
+class VTabWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- VTabWidget(QWidget* parent);
+ VTabWidget(TQWidget* tqparent);
virtual ~VTabWidget();
- void addTab(QWidget*, const QPixmap&, const QString& label);
+ void addTab(TQWidget*, const TQPixmap&, const TQString& label);
private slots:
void slotClicked(int id);
diff --git a/src/gvcore/archive.cpp b/src/gvcore/archive.cpp
index d3cc20b..a0e78ed 100644
--- a/src/gvcore/archive.cpp
+++ b/src/gvcore/archive.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -29,7 +29,7 @@ namespace Gwenview {
namespace Archive {
-typedef QMap<QString,QString> MimeTypeProtocols;
+typedef TQMap<TQString,TQString> MimeTypeProtocols;
static const char* KDE_PROTOCOL = "X-KDE-LocalProtocol";
@@ -39,8 +39,8 @@ static const MimeTypeProtocols& mimeTypeProtocols() {
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::Iterator it=list.begin(), end=list.end();
for (; it!=end; ++it) {
- if ( (*it)->propertyNames().findIndex(KDE_PROTOCOL)!= -1 ) {
- QString protocol = (*it)->property(KDE_PROTOCOL).toString();
+ if ( (*it)->propertyNames().tqfindIndex(KDE_PROTOCOL)!= -1 ) {
+ TQString protocol = (*it)->property(KDE_PROTOCOL).toString();
map[(*it)->name()] = protocol;
}
}
@@ -50,14 +50,14 @@ static const MimeTypeProtocols& mimeTypeProtocols() {
bool fileItemIsArchive(const KFileItem* item) {
- return mimeTypeProtocols().contains(item->mimetype());
+ return mimeTypeProtocols().tqcontains(item->mimetype());
}
bool fileItemIsDirOrArchive(const KFileItem* item) {
return item->isDir() || Archive::fileItemIsArchive(item);
}
-bool protocolIsArchive(const QString& protocol) {
+bool protocolIsArchive(const TQString& protocol) {
const MimeTypeProtocols& map=mimeTypeProtocols();
MimeTypeProtocols::ConstIterator it;
for (it=map.begin();it!=map.end();++it) {
@@ -66,19 +66,19 @@ bool protocolIsArchive(const QString& protocol) {
return false;
}
-QStringList mimeTypes() {
+TQStringList mimeTypes() {
const MimeTypeProtocols& map=mimeTypeProtocols();
MimeTypeProtocols::ConstIterator it;
- QStringList strlist;
+ TQStringList strlist;
for (it=map.begin();it!=map.end();++it) {
strlist+=it.key();
}
return strlist;
- //return mimeTypeProtocols().keys(); // keys() does not exist in Qt 3.0
+ //return mimeTypeProtocols().keys(); // keys() does not exist in TQt 3.0
}
-QString protocolForMimeType(const QString& mimeType) {
+TQString protocolForMimeType(const TQString& mimeType) {
return mimeTypeProtocols()[mimeType];
}
diff --git a/src/gvcore/archive.h b/src/gvcore/archive.h
index 6e2090b..7e65c36 100644
--- a/src/gvcore/archive.h
+++ b/src/gvcore/archive.h
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef ARCHIVE_H
#define ARCHIVE_H
-// Qt includes
-#include <qstringlist.h>
+// TQt includes
+#include <tqstringlist.h>
#include "libgwenview_export.h"
class KFileItem;
namespace Gwenview {
@@ -35,9 +35,9 @@ namespace Archive {
LIBGWENVIEW_EXPORT bool fileItemIsArchive(const KFileItem*);
LIBGWENVIEW_EXPORT bool fileItemIsDirOrArchive(const KFileItem*);
-bool protocolIsArchive(const QString&);
-QStringList mimeTypes();
-QString protocolForMimeType(const QString&);
+bool protocolIsArchive(const TQString&);
+TQStringList mimeTypes();
+TQString protocolForMimeType(const TQString&);
}
diff --git a/src/gvcore/bcgdialog.cpp b/src/gvcore/bcgdialog.cpp
index 9f1486a..58f3149 100644
--- a/src/gvcore/bcgdialog.cpp
+++ b/src/gvcore/bcgdialog.cpp
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Self
#include "bcgdialog.moc"
-// Qt
-#include <qslider.h>
-#include <qvbox.h>
+// TQt
+#include <tqslider.h>
+#include <tqvbox.h>
// KDE
#include <klocale.h>
@@ -49,15 +49,15 @@ BCGDialog::BCGDialog(ImageView* view)
d->mView=view;
d->mContent=new BCGDialogBase(this);
setMainWidget(d->mContent);
- connect(d->mContent->mBSlider, SIGNAL(valueChanged(int)),
- view, SLOT(setBrightness(int)) );
- connect(d->mContent->mCSlider, SIGNAL(valueChanged(int)),
- view, SLOT(setContrast(int)) );
- connect(d->mContent->mGSlider, SIGNAL(valueChanged(int)),
- view, SLOT(setGamma(int)) );
+ connect(d->mContent->mBSlider, TQT_SIGNAL(valueChanged(int)),
+ view, TQT_SLOT(setBrightness(int)) );
+ connect(d->mContent->mCSlider, TQT_SIGNAL(valueChanged(int)),
+ view, TQT_SLOT(setContrast(int)) );
+ connect(d->mContent->mGSlider, TQT_SIGNAL(valueChanged(int)),
+ view, TQT_SLOT(setGamma(int)) );
- connect(view, SIGNAL(bcgChanged()),
- this, SLOT(updateFromImageView()) );
+ connect(view, TQT_SIGNAL(bcgChanged()),
+ this, TQT_SLOT(updateFromImageView()) );
}
diff --git a/src/gvcore/bcgdialog.h b/src/gvcore/bcgdialog.h
index 43e4958..d6238b4 100644
--- a/src/gvcore/bcgdialog.h
+++ b/src/gvcore/bcgdialog.h
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <kdialogbase.h>
-class QShowEvent;
+class TQShowEvent;
namespace Gwenview {
@@ -32,6 +32,7 @@ class ImageView;
class BCGDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
BCGDialog(ImageView*);
~BCGDialog();
diff --git a/src/gvcore/bcgdialogbase.ui b/src/gvcore/bcgdialogbase.ui
index 81a79a3..3f992e5 100644
--- a/src/gvcore/bcgdialogbase.ui
+++ b/src/gvcore/bcgdialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>BCGDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>BCGDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -30,7 +30,7 @@
<cstring>mCSlider</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -41,7 +41,7 @@
<cstring>mGSlider</cstring>
</property>
</widget>
- <widget class="QSlider" row="0" column="1">
+ <widget class="TQSlider" row="0" column="1">
<property name="name">
<cstring>mBSlider</cstring>
</property>
@@ -55,7 +55,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QSlider" row="1" column="1">
+ <widget class="TQSlider" row="1" column="1">
<property name="name">
<cstring>mCSlider</cstring>
</property>
@@ -69,7 +69,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QSlider" row="2" column="1">
+ <widget class="TQSlider" row="2" column="1">
<property name="name">
<cstring>mGSlider</cstring>
</property>
@@ -83,7 +83,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="2">
+ <widget class="TQSpinBox" row="0" column="2">
<property name="name">
<cstring>mBSpinBox</cstring>
</property>
@@ -94,7 +94,7 @@
<number>-100</number>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>mCSpinBox</cstring>
</property>
@@ -105,7 +105,7 @@
<number>-100</number>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="2">
+ <widget class="TQSpinBox" row="2" column="2">
<property name="name">
<cstring>mGSpinBox</cstring>
</property>
@@ -116,7 +116,7 @@
<number>-100</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -175,5 +175,5 @@
<tabstop>mGSlider</tabstop>
<tabstop>mGSpinBox</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/gvcore/busylevelmanager.cpp b/src/gvcore/busylevelmanager.cpp
index a08e146..326fdf1 100644
--- a/src/gvcore/busylevelmanager.cpp
+++ b/src/gvcore/busylevelmanager.cpp
@@ -19,8 +19,8 @@ Copyright 2000-2004 Aur�lien G�teau
*/
-// Qt
-#include <qtimer.h>
+// TQt
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -41,8 +41,8 @@ namespace Gwenview {
BusyLevelManager::BusyLevelManager()
: mCurrentBusyLevel( BUSY_NONE )
{
- connect( &mDelayedBusyLevelTimer, SIGNAL( timeout()),
- this, SLOT( delayedBusyLevelChanged()));
+ connect( &mDelayedBusyLevelTimer, TQT_SIGNAL( timeout()),
+ this, TQT_SLOT( delayedBusyLevelChanged()));
}
BusyLevelManager* BusyLevelManager::instance() {
@@ -64,22 +64,22 @@ BusyLevelManager* BusyLevelManager::instance() {
// so if one object is responsible for more operations,
// it needs to use helper objects for setBusyLevel().
-void BusyLevelManager::setBusyLevel( QObject* obj, BusyLevel level ) {
+void BusyLevelManager::setBusyLevel( TQObject* obj, BusyLevel level ) {
LOG("BUSY:" << level << ":" << obj << ":" << obj->className() );
if( level > BUSY_NONE ) {
- if( mBusyLevels.contains( obj ) && mBusyLevels[ obj ] == level ) return;
- if( !mBusyLevels.contains( obj )) {
- connect( obj, SIGNAL( destroyed( QObject* )), this, SLOT( objectDestroyed( QObject* )));
+ if( mBusyLevels.tqcontains( obj ) && mBusyLevels[ obj ] == level ) return;
+ if( !mBusyLevels.tqcontains( obj )) {
+ connect( obj, TQT_SIGNAL( destroyed( TQObject* )), this, TQT_SLOT( objectDestroyed( TQObject* )));
}
mBusyLevels[ obj ] = level;
} else {
mBusyLevels.remove( obj );
- disconnect( obj, SIGNAL( destroyed( QObject* )), this, SLOT( objectDestroyed( QObject* )));
+ disconnect( obj, TQT_SIGNAL( destroyed( TQObject* )), this, TQT_SLOT( objectDestroyed( TQObject* )));
}
mDelayedBusyLevelTimer.start( 0, true );
}
-void BusyLevelManager::objectDestroyed( QObject* obj ) {
+void BusyLevelManager::objectDestroyed( TQObject* obj ) {
LOG("DESTROYED:" << obj );
mBusyLevels.remove( obj );
mDelayedBusyLevelTimer.start( 0, true );
@@ -87,10 +87,10 @@ void BusyLevelManager::objectDestroyed( QObject* obj ) {
void BusyLevelManager::delayedBusyLevelChanged() {
BusyLevel newLevel = BUSY_NONE;
- for( QMap< QObject*, BusyLevel >::ConstIterator it = mBusyLevels.begin();
+ for( TQMap< TQObject*, BusyLevel >::ConstIterator it = mBusyLevels.begin();
it != mBusyLevels.end();
++it ) {
- newLevel = QMAX( newLevel, *it );
+ newLevel = TQMAX( newLevel, *it );
}
if( newLevel != mCurrentBusyLevel ) {
diff --git a/src/gvcore/busylevelmanager.h b/src/gvcore/busylevelmanager.h
index 9959c56..e1f8a43 100644
--- a/src/gvcore/busylevelmanager.h
+++ b/src/gvcore/busylevelmanager.h
@@ -21,8 +21,8 @@ Copyright 2000-2004 Aur�lien G�teau
#ifndef BUSYLEVELMANAGER_H
#define BUSYLEVELMANAGER_H
-// Qt
-#include <qtimer.h>
+// TQt
+#include <tqtimer.h>
namespace Gwenview {
// KDE
@@ -42,15 +42,16 @@ enum BusyLevel {
BUSY_CHECKING_NEW_IMAGE
};
-class LIBGWENVIEW_EXPORT BusyLevelManager : public QObject {
+class LIBGWENVIEW_EXPORT BusyLevelManager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
static BusyLevelManager* instance();
/**
* Announces that the given object is busy.
*/
- void setBusyLevel( QObject* obj, BusyLevel level );
+ void setBusyLevel( TQObject* obj, BusyLevel level );
/**
* Returns the busy level of the whole application (i.e. maximum).
@@ -67,13 +68,13 @@ signals:
private slots:
void delayedBusyLevelChanged();
- void objectDestroyed( QObject* obj );
+ void objectDestroyed( TQObject* obj );
private:
BusyLevelManager();
- QMap< QObject*, BusyLevel > mBusyLevels;
+ TQMap< TQObject*, BusyLevel > mBusyLevels;
BusyLevel mCurrentBusyLevel;
- QTimer mDelayedBusyLevelTimer;
+ TQTimer mDelayedBusyLevelTimer;
};
@@ -81,8 +82,9 @@ private:
Helper class. Constructor sets its busy level to the given level,
destructor resets the busy level to none.
*/
-class BusyLevelHelper : public QObject {
+class BusyLevelHelper : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
BusyLevelHelper( BusyLevel level );
~BusyLevelHelper();
diff --git a/src/gvcore/cache.cpp b/src/gvcore/cache.cpp
index 99ab9fc..ccebb47 100644
--- a/src/gvcore/cache.cpp
+++ b/src/gvcore/cache.cpp
@@ -21,7 +21,7 @@ Copyright 2000-2004 Aur�lien G�teau
#include "cache.h"
-// Qt
+// TQt
// KDE
#include <kconfig.h>
@@ -52,24 +52,24 @@ const char CONFIG_CACHE_MAXSIZE[]="maxSize";
struct ImageData : public KShared {
- ImageData( const KURL& url, const QDateTime& _timestamp )
+ ImageData( const KURL& url, const TQDateTime& _timestamp )
: timestamp(_timestamp)
, age(0)
, fast_url( url.isLocalFile() && !KIO::probably_slow_mounted( url.path()))
, priority( false ) {
}
- void addFile( const QByteArray& file );
- void addImage( const ImageFrames& frames, const QCString& format );
- void addThumbnail( const QPixmap& thumbnail, QSize imagesize );
+ void addFile( const TQByteArray& file );
+ void addImage( const ImageFrames& frames, const TQCString& format );
+ void addThumbnail( const TQPixmap& thumbnail, TQSize imagesize );
long long cost() const;
int size() const;
- QByteArray file;
+ TQByteArray file;
ImageFrames frames;
- QPixmap thumbnail;
- QSize imagesize;
- QCString format;
- QDateTime timestamp;
+ TQPixmap thumbnail;
+ TQSize imagesize;
+ TQCString format;
+ TQDateTime timestamp;
mutable int age;
bool fast_url;
bool priority;
@@ -82,28 +82,28 @@ struct ImageData : public KShared {
typedef KSharedPtr<ImageData> Ptr;
};
-typedef QMap<KURL, ImageData::Ptr> ImageMap;
+typedef TQMap<KURL, ImageData::Ptr> ImageMap;
struct Cache::Private {
ImageMap mImages;
int mMaxSize;
int mThumbnailSize;
- QValueList< KURL > mPriorityURLs;
+ TQValueList< KURL > mPriorityURLs;
/**
* This function tries to returns a valid ImageData for url and timestamp.
* If it can't find one, it will create a new one and return it.
*/
- ImageData::Ptr getOrCreateImageData(const KURL& url, const QDateTime& timestamp) {
- if (mImages.contains(url)) {
+ ImageData::Ptr getOrCreateImageData(const KURL& url, const TQDateTime& timestamp) {
+ if (mImages.tqcontains(url)) {
ImageData::Ptr data = mImages[url];
if (data->timestamp == timestamp) return data;
}
ImageData::Ptr data = new ImageData(url, timestamp);
mImages[url] = data;
- if (mPriorityURLs.contains(url)) data->priority = true;
+ if (mPriorityURLs.tqcontains(url)) data->priority = true;
return data;
}
};
@@ -144,12 +144,12 @@ Cache* Cache::instance() {
void Cache::setPriorityURL( const KURL& url, bool set ) {
if( set ) {
d->mPriorityURLs.append( url );
- if( d->mImages.contains( url )) {
+ if( d->mImages.tqcontains( url )) {
d->mImages[ url ]->priority = true;
}
} else {
d->mPriorityURLs.remove( url );
- if( d->mImages.contains( url )) {
+ if( d->mImages.tqcontains( url )) {
d->mImages[ url ]->priority = false;
}
checkMaxSize();
@@ -157,21 +157,21 @@ void Cache::setPriorityURL( const KURL& url, bool set ) {
}
-void Cache::addFile( const KURL& url, const QByteArray& file, const QDateTime& timestamp ) {
+void Cache::addFile( const KURL& url, const TQByteArray& file, const TQDateTime& timestamp ) {
LOG(url.prettyURL());
updateAge();
d->getOrCreateImageData(url, timestamp)->addFile(file);
checkMaxSize();
}
-void Cache::addImage( const KURL& url, const ImageFrames& frames, const QCString& format, const QDateTime& timestamp ) {
+void Cache::addImage( const KURL& url, const ImageFrames& frames, const TQCString& format, const TQDateTime& timestamp ) {
LOG(url.prettyURL());
updateAge();
d->getOrCreateImageData(url, timestamp)->addImage(frames, format);
checkMaxSize();
}
-void Cache::addThumbnail( const KURL& url, const QPixmap& thumbnail, QSize imagesize, const QDateTime& timestamp ) {
+void Cache::addThumbnail( const KURL& url, const TQPixmap& thumbnail, TQSize imagesize, const TQDateTime& timestamp ) {
// Thumbnails are many and often - things would age too quickly. Therefore
// when adding thumbnails updateAge() is called from the outside only once for all of them.
// updateAge();
@@ -179,34 +179,34 @@ void Cache::addThumbnail( const KURL& url, const QPixmap& thumbnail, QSize image
checkMaxSize();
}
-void Cache::invalidate( const KURL& url ) {
+void Cache::tqinvalidate( const KURL& url ) {
d->mImages.remove( url );
}
-QDateTime Cache::timestamp( const KURL& url ) const {
+TQDateTime Cache::timestamp( const KURL& url ) const {
LOG(url.prettyURL());
- if( d->mImages.contains( url )) return d->mImages[ url ]->timestamp;
- return QDateTime();
+ if( d->mImages.tqcontains( url )) return d->mImages[ url ]->timestamp;
+ return TQDateTime();
}
-QByteArray Cache::file( const KURL& url ) const {
+TQByteArray Cache::file( const KURL& url ) const {
LOG(url.prettyURL());
- if( d->mImages.contains( url )) {
+ if( d->mImages.tqcontains( url )) {
const ImageData::Ptr data = d->mImages[ url ];
- if( data->file.isNull()) return QByteArray();
+ if( data->file.isNull()) return TQByteArray();
data->age = 0;
return data->file;
}
- return QByteArray();
+ return TQByteArray();
}
-void Cache::getFrames( const KURL& url, ImageFrames* frames, QCString* format ) const {
+void Cache::getFrames( const KURL& url, ImageFrames* frames, TQCString* format ) const {
LOG(url.prettyURL());
Q_ASSERT(frames);
Q_ASSERT(format);
frames->clear();
- *format = QCString();
- if( d->mImages.contains( url )) {
+ *format = TQCString();
+ if( d->mImages.tqcontains( url )) {
const ImageData::Ptr data = d->mImages[ url ];
if( data->frames.isEmpty()) return;
*frames = data->frames;
@@ -215,15 +215,15 @@ void Cache::getFrames( const KURL& url, ImageFrames* frames, QCString* format )
}
}
-QPixmap Cache::thumbnail( const KURL& url, QSize& imagesize ) const {
- if( d->mImages.contains( url )) {
+TQPixmap Cache::thumbnail( const KURL& url, TQSize& imagesize ) const {
+ if( d->mImages.tqcontains( url )) {
const ImageData::Ptr data = d->mImages[ url ];
- if( data->thumbnail.isNull()) return QPixmap();
+ if( data->thumbnail.isNull()) return TQPixmap();
imagesize = data->imagesize;
// data.age = 0;
return data->thumbnail;
}
- return QPixmap();
+ return TQPixmap();
}
void Cache::updateAge() {
@@ -298,33 +298,33 @@ void Cache::checkMaxSize() {
}
}
-void Cache::readConfig(KConfig* config,const QString& group) {
+void Cache::readConfig(KConfig* config,const TQString& group) {
KConfigGroupSaver saver( config, group );
d->mMaxSize = config->readNumEntry( CONFIG_CACHE_MAXSIZE, d->mMaxSize );
checkMaxSize();
}
-void ImageData::addFile( const QByteArray& f ) {
+void ImageData::addFile( const TQByteArray& f ) {
file = f;
file.detach(); // explicit sharing
age = 0;
}
-void ImageData::addImage( const ImageFrames& fs, const QCString& f ) {
+void ImageData::addImage( const ImageFrames& fs, const TQCString& f ) {
frames = fs;
format = f;
age = 0;
}
-void ImageData::addThumbnail( const QPixmap& thumb, QSize imgsize ) {
+void ImageData::addThumbnail( const TQPixmap& thumb, TQSize imgsize ) {
thumbnail = thumb;
imagesize = imgsize;
// age = 0;
}
int ImageData::size() const {
- return QMAX( fileSize() + imageSize() + thumbnailSize(), 100 ); // some minimal size per item
+ return TQMAX( fileSize() + imageSize() + thumbnailSize(), 100 ); // some minimal size per item
}
int ImageData::fileSize() const {
@@ -345,7 +345,7 @@ int ImageData::imageSize() const {
bool ImageData::reduceSize() {
if( !file.isNull() && fast_url && !frames.isEmpty()) {
- file = QByteArray();
+ file = TQByteArray();
#ifdef DEBUG_CACHE
kdDebug() << "Cache: Dumping fast file: " << _cache_url.prettyURL() << ":" << cost() << endl;
#endif
@@ -355,7 +355,7 @@ bool ImageData::reduceSize() {
#ifdef DEBUG_CACHE
kdDebug() << "Cache: Dumping thumbnail: " << _cache_url.prettyURL() << ":" << cost() << endl;
#endif
- thumbnail = QPixmap();
+ thumbnail = TQPixmap();
return true;
}
if( !file.isNull() && !frames.isEmpty()) {
@@ -367,7 +367,7 @@ bool ImageData::reduceSize() {
kdDebug() << "Cache: Dumping images: " << _cache_url.prettyURL() << ":" << cost() << endl;
#endif
} else {
- file = QByteArray();
+ file = TQByteArray();
#ifdef DEBUG_CACHE
kdDebug() << "Cache: Dumping file: " << _cache_url.prettyURL() << ":" << cost() << endl;
#endif
diff --git a/src/gvcore/cache.h b/src/gvcore/cache.h
index 272cf8f..199bc46 100644
--- a/src/gvcore/cache.h
+++ b/src/gvcore/cache.h
@@ -21,13 +21,13 @@ Copyright 2000-2004 Aur�lien G�teau
#ifndef CACHE_H
#define CACHE_H
-// Qt
-#include <qcstring.h>
-#include <qdatetime.h>
-#include <qimage.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+// TQt
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqimage.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
// KDE
#include <kurl.h>
@@ -38,22 +38,23 @@ Copyright 2000-2004 Aur�lien G�teau
class KConfig;
namespace Gwenview {
-class LIBGWENVIEW_EXPORT Cache : public QObject {
+class LIBGWENVIEW_EXPORT Cache : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
static Cache* instance();
~Cache();
- void addImage( const KURL& url, const ImageFrames& frames, const QCString& format, const QDateTime& timestamp );
- void addFile( const KURL& url, const QByteArray& file, const QDateTime& timestamp );
- void addThumbnail( const KURL& url, const QPixmap& thumbnail, QSize imagesize, const QDateTime& timestamp );
- QDateTime timestamp( const KURL& url ) const;
- QByteArray file( const KURL& url ) const;
- void getFrames( const KURL& url, ImageFrames* frames, QCString* format ) const;
- QPixmap thumbnail( const KURL& url, QSize& imagesize ) const;
+ void addImage( const KURL& url, const ImageFrames& frames, const TQCString& format, const TQDateTime& timestamp );
+ void addFile( const KURL& url, const TQByteArray& file, const TQDateTime& timestamp );
+ void addThumbnail( const KURL& url, const TQPixmap& thumbnail, TQSize imagesize, const TQDateTime& timestamp );
+ TQDateTime timestamp( const KURL& url ) const;
+ TQByteArray file( const KURL& url ) const;
+ void getFrames( const KURL& url, ImageFrames* frames, TQCString* format ) const;
+ TQPixmap thumbnail( const KURL& url, TQSize& imagesize ) const;
void setPriorityURL( const KURL& url, bool set );
- void invalidate( const KURL& url );
+ void tqinvalidate( const KURL& url );
void checkThumbnailSize( int size );
- void readConfig(KConfig*,const QString& group);
+ void readConfig(KConfig*,const TQString& group);
void updateAge();
enum { DEFAULT_MAXSIZE = 16 * 1024 * 1024 }; // 16MiB
private:
diff --git a/src/gvcore/captionformatter.cpp b/src/gvcore/captionformatter.cpp
index 4acbc11..ca34a51 100644
--- a/src/gvcore/captionformatter.cpp
+++ b/src/gvcore/captionformatter.cpp
@@ -27,28 +27,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-QString CaptionFormatter::format(const QString& format) {
- QString comment=mComment;
+TQString CaptionFormatter::format(const TQString& format) {
+ TQString comment=mComment;
if (comment.isNull()) {
comment=i18n("(No comment)");
}
- QString resolution;
+ TQString resolution;
if (mImageSize.isValid()) {
- resolution = QString( "%1x%2" ).arg( mImageSize.width()).arg( mImageSize.height());
+ resolution = TQString( "%1x%2" ).tqarg( mImageSize.width()).tqarg( mImageSize.height());
}
- QString str=format;
- str.replace("%f", mFileName);
- str.replace("%p", mPath);
- str.replace("%c", comment);
- str.replace("%r", resolution);
- str.replace("%n", QString::number(mPosition));
- str.replace("%N", QString::number(mCount));
- str.replace("%a", mAperture);
- str.replace("%t", mExposureTime);
- str.replace("%i", mIso);
- str.replace("%l", mFocalLength);
+ TQString str=format;
+ str.tqreplace("%f", mFileName);
+ str.tqreplace("%p", mPath);
+ str.tqreplace("%c", comment);
+ str.tqreplace("%r", resolution);
+ str.tqreplace("%n", TQString::number(mPosition));
+ str.tqreplace("%N", TQString::number(mCount));
+ str.tqreplace("%a", mAperture);
+ str.tqreplace("%t", mExposureTime);
+ str.tqreplace("%i", mIso);
+ str.tqreplace("%l", mFocalLength);
return str;
}
diff --git a/src/gvcore/captionformatter.h b/src/gvcore/captionformatter.h
index 29aa3a9..2438a26 100644
--- a/src/gvcore/captionformatter.h
+++ b/src/gvcore/captionformatter.h
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef CAPTIONFORMATTER_H
#define CAPTIONFORMATTER_H
-// Qt
-#include <qsize.h>
-#include <qstring.h>
+// TQt
+#include <tqsize.h>
+#include <tqstring.h>
// Local
#include "libgwenview_export.h"
@@ -38,18 +38,18 @@ namespace Gwenview {
*/
class LIBGWENVIEW_EXPORT CaptionFormatter {
public:
- QString mPath;
- QString mFileName;
- QString mComment;
- QString mAperture;
- QString mFocalLength;
- QString mExposureTime;
- QString mIso;
-
- QSize mImageSize;
+ TQString mPath;
+ TQString mFileName;
+ TQString mComment;
+ TQString mAperture;
+ TQString mFocalLength;
+ TQString mExposureTime;
+ TQString mIso;
+
+ TQSize mImageSize;
int mPosition;
int mCount;
- QString format(const QString& format);
+ TQString format(const TQString& format);
};
} // namespace
diff --git a/src/gvcore/clicklineedit.cpp b/src/gvcore/clicklineedit.cpp
index a1728a0..f35cbe3 100644
--- a/src/gvcore/clicklineedit.cpp
+++ b/src/gvcore/clicklineedit.cpp
@@ -22,12 +22,12 @@
#include "clicklineedit.h"
-#include "qpainter.h"
+#include "tqpainter.h"
namespace Gwenview {
-ClickLineEdit::ClickLineEdit(QWidget *parent, const char* name ) :
- KLineEdit( parent, name )
+ClickLineEdit::ClickLineEdit(TQWidget *tqparent, const char* name ) :
+ KLineEdit( tqparent, name )
{
mDrawClickMsg = true;
}
@@ -37,17 +37,17 @@ ClickLineEdit::ClickLineEdit(QWidget *parent, const char* name ) :
// PUBLIC
/////////////////////////////////////////////////////////////////////////////////////
-void ClickLineEdit::setClickMessage( const QString &msg )
+void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
- repaint();
+ tqrepaint();
}
-void ClickLineEdit::setText( const QString &txt )
+void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
- repaint();
+ tqrepaint();
KLineEdit::setText( txt );
}
@@ -57,14 +57,14 @@ void ClickLineEdit::setText( const QString &txt )
/////////////////////////////////////////////////////////////////////////////////////
//#include <kiconloader.h>
-void ClickLineEdit::drawContents( QPainter *p )
+void ClickLineEdit::drawContents( TQPainter *p )
{
KLineEdit::drawContents( p );
if ( mDrawClickMsg == true && !hasFocus() ) {
- QPen tmp = p->pen();
- p->setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) );
- QRect cr = contentsRect();
+ TQPen tmp = p->pen();
+ p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
+ TQRect cr = contentsRect();
//p->drawPixmap( 3, 3, SmallIcon("filter") );
@@ -75,30 +75,30 @@ void ClickLineEdit::drawContents( QPainter *p )
}
}
-void ClickLineEdit::dropEvent( QDropEvent *ev )
+void ClickLineEdit::dropEvent( TQDropEvent *ev )
{
mDrawClickMsg = false;
KLineEdit::dropEvent( ev );
}
-void ClickLineEdit::focusInEvent( QFocusEvent *ev )
+void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true ) {
mDrawClickMsg = false;
- repaint();
+ tqrepaint();
}
- QLineEdit::focusInEvent( ev );
+ TQLineEdit::focusInEvent( ev );
}
-void ClickLineEdit::focusOutEvent( QFocusEvent *ev )
+void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() ) {
mDrawClickMsg = true;
- repaint();
+ tqrepaint();
}
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
} // namespace
diff --git a/src/gvcore/clicklineedit.h b/src/gvcore/clicklineedit.h
index 05624eb..84259e8 100644
--- a/src/gvcore/clicklineedit.h
+++ b/src/gvcore/clicklineedit.h
@@ -35,23 +35,24 @@ namespace Gwenview {
class ClickLineEdit : public KLineEdit
{
Q_OBJECT
- Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
- ClickLineEdit(QWidget *parent, const char* name = 0 );
+ ClickLineEdit(TQWidget *tqparent, const char* name = 0 );
- void setClickMessage( const QString &msg );
- QString clickMessage() const { return mClickMessage; }
+ void setClickMessage( const TQString &msg );
+ TQString clickMessage() const { return mClickMessage; }
- virtual void setText( const QString& txt );
+ virtual void setText( const TQString& txt );
protected:
- virtual void drawContents( QPainter *p );
- virtual void dropEvent( QDropEvent *ev );
- virtual void focusInEvent( QFocusEvent *ev );
- virtual void focusOutEvent( QFocusEvent *ev );
+ virtual void drawContents( TQPainter *p );
+ virtual void dropEvent( TQDropEvent *ev );
+ virtual void focusInEvent( TQFocusEvent *ev );
+ virtual void focusOutEvent( TQFocusEvent *ev );
private:
- QString mClickMessage;
+ TQString mClickMessage;
bool mDrawClickMsg;
};
diff --git a/src/gvcore/cursortracker.cpp b/src/gvcore/cursortracker.cpp
index 0d3060d..44e38ac 100644
--- a/src/gvcore/cursortracker.cpp
+++ b/src/gvcore/cursortracker.cpp
@@ -21,14 +21,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "cursortracker.h"
-// Qt
-#include <qevent.h>
-#include <qtooltip.h>
+// TQt
+#include <tqevent.h>
+#include <tqtooltip.h>
namespace Gwenview {
-CursorTracker::CursorTracker(const QString& txt, QWidget* reference)
-: QLabel(txt, 0, "", WX11BypassWM) {
+CursorTracker::CursorTracker(const TQString& txt, TQWidget* reference)
+: TQLabel(txt, 0, "", WX11BypassWM) {
reference->setMouseTracking(true);
reference->installEventFilter(this);
}
@@ -37,19 +37,19 @@ CursorTracker::CursorTracker(const QString& txt, QWidget* reference)
/**
* Overload to make sure the widget size is correct
*/
-void CursorTracker::setText(const QString& txt) {
- QLabel::setText(txt);
+void CursorTracker::setText(const TQString& txt) {
+ TQLabel::setText(txt);
adjustSize();
}
-bool CursorTracker::eventFilter(QObject* object, QEvent* _event) {
- QWidget* widget=static_cast<QWidget*>(object);
+bool CursorTracker::eventFilter(TQObject* object, TQEvent* _event) {
+ TQWidget* widget=TQT_TQWIDGET(object);
switch (_event->type()) {
- case QEvent::MouseMove: {
- QMouseEvent* event=static_cast<QMouseEvent*>(_event);
- if (widget->rect().contains(event->pos()) || (event->stateAfter() & LeftButton)) {
+ case TQEvent::MouseMove: {
+ TQMouseEvent* event=TQT_TQMOUSEEVENT(_event);
+ if (TQT_TQRECT_OBJECT(widget->rect()).tqcontains(event->pos()) || (event->stateAfter() & Qt::LeftButton)) {
show();
move(event->globalPos().x() + 15, event->globalPos().y() + 15);
} else {
@@ -58,9 +58,9 @@ bool CursorTracker::eventFilter(QObject* object, QEvent* _event) {
break;
}
- case QEvent::MouseButtonRelease: {
- QMouseEvent* event=static_cast<QMouseEvent*>(_event);
- if ( !widget->rect().contains(event->pos()) ) {
+ case TQEvent::MouseButtonRelease: {
+ TQMouseEvent* event=TQT_TQMOUSEEVENT(_event);
+ if ( !TQT_TQRECT_OBJECT(widget->rect()).tqcontains(event->pos()) ) {
hide();
}
break;
@@ -74,12 +74,12 @@ bool CursorTracker::eventFilter(QObject* object, QEvent* _event) {
}
-TipTracker::TipTracker(const QString& txt, QWidget* reference)
+TipTracker::TipTracker(const TQString& txt, TQWidget* reference)
: CursorTracker(txt, reference) {
- setPalette(QToolTip::palette());
- setFrameStyle(QFrame::Plain | QFrame::Box);
+ setPalette(TQToolTip::palette());
+ setFrameStyle(TQFrame::Plain | TQFrame::Box);
setLineWidth(1);
- setAlignment(AlignAuto | AlignTop);
+ tqsetAlignment(AlignAuto | AlignTop);
}
diff --git a/src/gvcore/cursortracker.h b/src/gvcore/cursortracker.h
index 2d2f6eb..9472223 100644
--- a/src/gvcore/cursortracker.h
+++ b/src/gvcore/cursortracker.h
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef CURSORTRACKER_H
#define CURSORTRACKER_H
-// Qt
-#include <qlabel.h>
+// TQt
+#include <tqlabel.h>
namespace Gwenview {
@@ -31,14 +31,14 @@ namespace Gwenview {
* This class implements a decoration-less window which will follow the cursor
* when it's over a specified widget.
*/
-class CursorTracker : public QLabel {
+class CursorTracker : public TQLabel {
public:
- CursorTracker(const QString& txt, QWidget* reference);
+ CursorTracker(const TQString& txt, TQWidget* reference);
- void setText(const QString& txt);
+ void setText(const TQString& txt);
protected:
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
};
@@ -47,7 +47,7 @@ protected:
*/
class TipTracker : public CursorTracker {
public:
- TipTracker(const QString& txt, QWidget* reference);
+ TipTracker(const TQString& txt, TQWidget* reference);
};
diff --git a/src/gvcore/deletedialog.cpp b/src/gvcore/deletedialog.cpp
index 19c34ba..cc0010e 100644
--- a/src/gvcore/deletedialog.cpp
+++ b/src/gvcore/deletedialog.cpp
@@ -24,14 +24,14 @@
#include <kstdguiitem.h>
#include <kurl.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
#include "fileoperationconfig.h"
#include "deletedialog.h"
@@ -39,8 +39,8 @@
namespace Gwenview {
-DeleteDialog::DeleteDialog(QWidget *parent, const char *name) :
- KDialogBase(Swallow, WStyle_DialogBorder, parent, name,
+DeleteDialog::DeleteDialog(TQWidget *tqparent, const char *name) :
+ KDialogBase(Swallow, WStyle_DialogBorder, tqparent, name,
true /* modal */, i18n("About to delete selected files"),
Ok | Cancel, Cancel /* Default */, true /* separator */),
m_trashGuiItem(i18n("&Send to Trash"), "trashcan_full")
@@ -55,7 +55,7 @@ DeleteDialog::DeleteDialog(QWidget *parent, const char *name) :
bool deleteInstead = ! FileOperationConfig::deleteToTrash();
m_widget->ddShouldDelete->setChecked(deleteInstead);
- connect(m_widget->ddShouldDelete, SIGNAL(toggled(bool)), SLOT(updateUI()));
+ connect(m_widget->ddShouldDelete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateUI()));
}
void DeleteDialog::setURLList(const KURL::List &files)
@@ -79,7 +79,7 @@ void DeleteDialog::accept()
void DeleteDialog::updateUI()
{
- QString msg, iconName;
+ TQString msg, iconName;
int fileCount = m_widget->ddFileList->count();
bool reallyDelete = m_widget->ddShouldDelete->isChecked();
@@ -98,7 +98,7 @@ void DeleteDialog::updateUI()
fileCount);
iconName = "trashcan_full";
}
- QPixmap icon = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeMedium);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeMedium);
m_widget->ddDeleteText->setText(msg);
m_widget->ddWarningIcon->setPixmap(icon);
@@ -113,9 +113,9 @@ bool DeleteDialog::shouldDelete() const {
}
-QSize DeleteDialog::sizeHint() const {
+TQSize DeleteDialog::tqsizeHint() const {
m_widget->adjustSize();
- QSize hint = m_widget->minimumSize();
+ TQSize hint = m_widget->tqminimumSize();
hint = calculateSize(hint.width(), hint.height());
// For some reason calculateSize does not return a correct height. As I'm
diff --git a/src/gvcore/deletedialog.h b/src/gvcore/deletedialog.h
index 0340e09..dbb2d9d 100644
--- a/src/gvcore/deletedialog.h
+++ b/src/gvcore/deletedialog.h
@@ -28,14 +28,15 @@ namespace Gwenview {
class DeleteDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- DeleteDialog(QWidget *parent, const char *name = "delete_dialog");
+ DeleteDialog(TQWidget *tqparent, const char *name = "delete_dialog");
void setURLList(const KURL::List &files);
bool shouldDelete() const;
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
protected slots:
virtual void accept();
diff --git a/src/gvcore/deletedialogbase.ui b/src/gvcore/deletedialogbase.ui
index dd338ea..92285a7 100644
--- a/src/gvcore/deletedialogbase.ui
+++ b/src/gvcore/deletedialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>DeleteDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>DeleteDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,15 +19,15 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>ddWarningIcon</cstring>
</property>
@@ -43,11 +43,11 @@
<string>Icon Placeholder, not in GUI</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>ddDeleteText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>60</height>
@@ -56,7 +56,7 @@
<property name="text">
<string>Deletion method placeholder, not in GUI</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignCenter</set>
</property>
</widget>
@@ -73,18 +73,18 @@
<enum>NoSelection</enum>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>ddNumFiles</cstring>
</property>
<property name="text">
<string>Placeholder for number of files, not in GUI</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>ddShouldDelete</cstring>
</property>
@@ -104,7 +104,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistbox.h</includehint>
</includehints>
diff --git a/src/gvcore/document.cpp b/src/gvcore/document.cpp
index 14a6410..3069ae5 100644
--- a/src/gvcore/document.cpp
+++ b/src/gvcore/document.cpp
@@ -21,12 +21,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <sys/stat.h> // For S_ISDIR
-// Qt
-#include <qfileinfo.h>
-#include <qguardedptr.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
+// TQt
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
// KDE
#include <kapplication.h>
@@ -73,9 +73,9 @@ const char* CONFIG_SAVE_AUTOMATICALLY="save automatically";
/**
- * Returns a widget suitable to use as a dialog parent
+ * Returns a widget suitable to use as a dialog tqparent
*/
-static QWidget* dialogParentWidget() {
+static TQWidget* dialogParentWidget() {
return KApplication::kApplication()->mainWidget();
}
@@ -88,11 +88,11 @@ class DocumentPrivate {
public:
KURL mURL;
bool mModified;
- QImage mImage;
- QString mMimeType;
- QCString mImageFormat;
+ TQImage mImage;
+ TQString mMimeType;
+ TQCString mImageFormat;
DocumentImpl* mImpl;
- QGuardedPtr<KIO::StatJob> mStatJob;
+ TQGuardedPtr<KIO::StatJob> mStatJob;
int mFileSize;
};
@@ -102,8 +102,8 @@ public:
// Document
//
//-------------------------------------------------------------------
-Document::Document(QObject* parent)
-: QObject(parent) {
+Document::Document(TQObject* tqparent)
+: TQObject(tqparent) {
d=new DocumentPrivate;
d->mModified=false;
d->mImpl=new DocumentEmptyImpl(this);
@@ -114,9 +114,9 @@ Document::Document(QObject* parent)
KImageIO::registerFormats();
XCFImageFormat::registerFormat();
- // First load Qt's plugins, so that Gwenview's decoders that
+ // First load TQt's plugins, so that Gwenview's decoders that
// override some of them are installed later and thus come first.
- QImageIO::inputFormats();
+ TQImageIO::inputFormats();
{
static Gwenview::JPEGFormatType sJPEGFormatType;
static Gwenview::PNGFormatType sPNGFormatType;
@@ -125,10 +125,10 @@ Document::Document(QObject* parent)
static Gwenview::XCursorFormatType sXCursorFormatType;
}
- connect( this, SIGNAL( loading()),
- this, SLOT( slotLoading()));
- connect( this, SIGNAL( loaded(const KURL&)),
- this, SLOT( slotLoaded()));
+ connect( this, TQT_SIGNAL( loading()),
+ this, TQT_SLOT( slotLoading()));
+ connect( this, TQT_SIGNAL( loaded(const KURL&)),
+ this, TQT_SLOT( slotLoaded()));
}
@@ -143,11 +143,11 @@ Document::~Document() {
// Properties
//
//---------------------------------------------------------------------
-QString Document::mimeType() const {
+TQString Document::mimeType() const {
return d->mMimeType;
}
-void Document::setMimeType(const QString& mimeType) {
+void Document::setMimeType(const TQString& mimeType) {
d->mMimeType = mimeType;
}
@@ -188,7 +188,7 @@ void Document::setURL(const KURL& paramURL) {
// Fix wrong protocol
if (Archive::protocolIsArchive(localURL.protocol())) {
- QFileInfo info(localURL.path());
+ TQFileInfo info(localURL.path());
if (info.exists()) {
localURL.setProtocol("file");
}
@@ -197,8 +197,8 @@ void Document::setURL(const KURL& paramURL) {
d->mURL = localURL; // this may be fixed after stat() is complete, but set at least something
d->mStatJob = KIO::stat( localURL, !localURL.isLocalFile() );
d->mStatJob->setWindow(KApplication::kApplication()->mainWidget());
- connect( d->mStatJob, SIGNAL( result (KIO::Job *) ),
- this, SLOT( slotStatResult (KIO::Job *) ) );
+ connect( d->mStatJob, TQT_SIGNAL( result (KIO::Job *) ),
+ this, TQT_SLOT( slotStatResult (KIO::Job *) ) );
}
@@ -242,11 +242,11 @@ void Document::setDirURL(const KURL& paramURL) {
}
-const QImage& Document::image() const {
+const TQImage& Document::image() const {
return d->mImage;
}
-void Document::setImage(QImage img) {
+void Document::setImage(TQImage img) {
bool sizechange = d->mImage.size() != img.size();
d->mImage = img;
if( sizechange ) emit sizeUpdated();
@@ -263,15 +263,15 @@ KURL Document::dirURL() const {
}
}
-QString Document::filename() const {
+TQString Document::filename() const {
return d->mURL.filename(false);
}
-const QCString& Document::imageFormat() const {
+const TQCString& Document::imageFormat() const {
return d->mImageFormat;
}
-void Document::setImageFormat(const QCString& format) {
+void Document::setImageFormat(const TQCString& format) {
d->mImageFormat=format;
}
@@ -279,27 +279,27 @@ void Document::setFileSize(int size) {
d->mFileSize=size;
}
-QString Document::comment() const {
+TQString Document::comment() const {
return d->mImpl->comment();
}
-QString Document::aperture() const {
+TQString Document::aperture() const {
return d->mImpl->aperture();
}
-QString Document::exposureTime() const {
+TQString Document::exposureTime() const {
return d->mImpl->exposureTime();
}
-QString Document::iso() const {
+TQString Document::iso() const {
return d->mImpl->iso();
}
-QString Document::focalLength() const {
+TQString Document::focalLength() const {
return d->mImpl->focalLength();
}
-void Document::setComment(const QString& comment) {
+void Document::setComment(const TQString& comment) {
d->mImpl->setComment(comment);
d->mModified=true;
emit modified();
@@ -343,43 +343,43 @@ void Document::slotLoaded() {
//
//---------------------------------------------------------------------
void Document::reload() {
- Cache::instance()->invalidate( url());
+ Cache::instance()->tqinvalidate( url());
load();
emit reloaded(url());
}
void Document::print(KPrinter *pPrinter) {
- QPainter printPainter;
+ TQPainter printPainter;
printPainter.begin(pPrinter);
doPaint(pPrinter, &printPainter);
printPainter.end();
}
-void Document::doPaint(KPrinter *printer, QPainter *painter) {
+void Document::doPaint(KPrinter *printer, TQPainter *painter) {
// will contain the final image to print
- QImage image = d->mImage;
+ TQImage image = d->mImage;
image.detach();
- // We use a QPaintDeviceMetrics to know the actual page size in pixel,
+ // We use a TQPaintDeviceMetrics to know the actual page size in pixel,
// this gives the real painting area
- QPaintDeviceMetrics pdMetrics(painter->device());
+ TQPaintDeviceMetrics pdMetrics(painter->device());
const int margin = pdMetrics.logicalDpiY() / 2; // half-inch margin
painter->setFont( KGlobalSettings::generalFont() );
- QFontMetrics fMetrics = painter->fontMetrics();
+ TQFontMetrics fMetrics = painter->fontMetrics();
int x = 0;
int y = 0;
int pdWidth = pdMetrics.width();
int pdHeight = pdMetrics.height();
- QString t = "true";
- QString f = "false";
+ TQString t = "true";
+ TQString f = "false";
- int alignment = (printer->option("app-gwenview-position").isEmpty() ?
- Qt::AlignCenter : printer->option("app-gwenview-position").toInt());
+ int tqalignment = (printer->option("app-gwenview-position").isEmpty() ?
+ TQt::AlignCenter : printer->option("app-gwenview-position").toInt());
// Compute filename offset
int filenameOffset = 0;
@@ -403,11 +403,11 @@ void Document::doPaint(KPrinter *printer, QPainter *painter) {
// Apply scaling
int scaling = printer->option( "app-gwenview-scale" ).toInt();
- QSize size = image.size();
+ TQSize size = image.size();
if (scaling==GV_FITTOPAGE /* Fit to page */) {
bool enlargeToFit = printer->option( "app-gwenview-enlargeToFit" ) != f;
if ((image.width() > pdWidth || image.height() > pdHeight) || enlargeToFit) {
- size.scale( pdWidth, pdHeight, QSize::ScaleMin );
+ size.tqscale( pdWidth, pdHeight, TQSize::ScaleMin );
}
} else {
if (scaling==GV_SCALE /* Scale To */) {
@@ -445,38 +445,38 @@ void Document::doPaint(KPrinter *printer, QPainter *painter) {
if (size.width() > pdWidth || size.height() > pdHeight) {
int resp = KMessageBox::warningYesNoCancel(dialogParentWidget(),
i18n("The image will not fit on the page, what do you want to do?"),
- QString::null,KStdGuiItem::cont(),
+ TQString(),KStdGuiItem::cont(),
i18n("Shrink") );
if (resp==KMessageBox::Cancel) {
printer->abort();
return;
} else if (resp == KMessageBox::No) { // Shrink
- size.scale(pdWidth, pdHeight, QSize::ScaleMin);
+ size.tqscale(pdWidth, pdHeight, TQSize::ScaleMin);
}
}
}
// Compute x and y
- if ( alignment & Qt::AlignHCenter )
+ if ( tqalignment & TQt::AlignHCenter )
x = (pdWidth - size.width())/2;
- else if ( alignment & Qt::AlignLeft )
+ else if ( tqalignment & TQt::AlignLeft )
x = 0;
- else if ( alignment & Qt::AlignRight )
+ else if ( tqalignment & TQt::AlignRight )
x = pdWidth - size.width();
- if ( alignment & Qt::AlignVCenter )
+ if ( tqalignment & TQt::AlignVCenter )
y = (pdHeight - size.height())/2;
- else if ( alignment & Qt::AlignTop )
+ else if ( tqalignment & TQt::AlignTop )
y = 0;
- else if ( alignment & Qt::AlignBottom )
+ else if ( tqalignment & TQt::AlignBottom )
y = pdHeight - size.height();
// Draw, the image will be scaled to fit the given area if necessary
- painter->drawImage( QRect( x, y, size.width(), size.height()), image );
+ painter->drawImage( TQRect( x, y, size.width(), size.height()), image );
if ( printFilename ) {
- QString fname = KStringHandler::cPixelSqueeze( filename(), fMetrics, pdWidth );
+ TQString fname = KStringHandler::cPixelSqueeze( filename(), fMetrics, pdWidth );
if ( !fname.isEmpty() ) {
int fw = fMetrics.width( fname );
int x = (pdWidth - fw)/2;
@@ -485,7 +485,7 @@ void Document::doPaint(KPrinter *printer, QPainter *painter) {
}
}
if ( printComment ) {
- QString comm = comment();
+ TQString comm = comment();
if ( !comm.isEmpty() ) {
int fw = fMetrics.width( comm );
int x = (pdWidth - fw)/2;
@@ -504,7 +504,7 @@ void Document::transform(ImageUtils::Orientation orientation) {
void Document::save() {
- QString msg=saveInternal(url(), d->mImageFormat);
+ TQString msg=saveInternal(url(), d->mImageFormat);
if (!msg.isNull()) {
KMessageBox::error(dialogParentWidget(), msg);
// If it can't be saved we leave it as modified, because user
@@ -520,7 +520,7 @@ void Document::saveAs() {
dialog.setSelection(url().fileName());
if (!dialog.exec()) return;
- QString msg=saveInternal(saveURL, dialog.imageFormat() );
+ TQString msg=saveInternal(saveURL, dialog.imageFormat() );
if (!msg.isNull()) {
// If it can't be saved we leave it as modified, because user
// could choose a wrong readonly path from dialog and retry to
@@ -531,10 +531,10 @@ void Document::saveAs() {
void Document::saveBeforeClosing() {
if (!d->mModified) return;
- QString msg=i18n("<qt>The image <b>%1</b> has been modified, do you want to save the changes?</qt>")
- .arg(url().prettyURL());
+ TQString msg=i18n("<qt>The image <b>%1</b> has been modified, do you want to save the changes?</qt>")
+ .tqarg(url().prettyURL());
- int result=KMessageBox::questionYesNo(dialogParentWidget(), msg, QString::null,
+ int result=KMessageBox::questionYesNo(dialogParentWidget(), msg, TQString(),
KStdGuiItem::save(), KStdGuiItem::discard(), CONFIG_SAVE_AUTOMATICALLY);
if (result == KMessageBox::Yes) {
@@ -561,12 +561,12 @@ void Document::switchToImpl(DocumentImpl* impl) {
delete d->mImpl;
d->mImpl=impl;
- connect(d->mImpl, SIGNAL(finished(bool)),
- this, SLOT(slotFinished(bool)) );
- connect(d->mImpl, SIGNAL(sizeUpdated()),
- this, SIGNAL(sizeUpdated()) );
- connect(d->mImpl, SIGNAL(rectUpdated(const QRect&)),
- this, SIGNAL(rectUpdated(const QRect&)) );
+ connect(d->mImpl, TQT_SIGNAL(finished(bool)),
+ this, TQT_SLOT(slotFinished(bool)) );
+ connect(d->mImpl, TQT_SIGNAL(sizeUpdated()),
+ this, TQT_SIGNAL(sizeUpdated()) );
+ connect(d->mImpl, TQT_SIGNAL(rectUpdated(const TQRect&)),
+ this, TQT_SIGNAL(rectUpdated(const TQRect&)) );
d->mImpl->init();
}
@@ -594,18 +594,18 @@ void Document::slotFinished(bool success) {
}
-QString Document::saveInternal(const KURL& url, const QCString& format) {
- QString msg=d->mImpl->save(url, format);
+TQString Document::saveInternal(const KURL& url, const TQCString& format) {
+ TQString msg=d->mImpl->save(url, format);
if (msg.isNull()) {
emit saved(url);
d->mModified=false;
- return QString::null;
+ return TQString();
}
LOG("Save failed: " << msg);
- return QString("<qt><b>%1</b><br/>")
- .arg(i18n("Could not save the image to %1.").arg(url.prettyURL()))
+ return TQString("<qt><b>%1</b><br/>")
+ .tqarg(i18n("Could not save the image to %1.").tqarg(url.prettyURL()))
+ msg + "</qt>";
}
diff --git a/src/gvcore/document.h b/src/gvcore/document.h
index d49811d..36fa235 100644
--- a/src/gvcore/document.h
+++ b/src/gvcore/document.h
@@ -21,10 +21,10 @@ Copyright 2000-2006 Aurelien Gateau
#ifndef DOCUMENT_H
#define DOCUMENT_H
-// Qt
-#include <qcstring.h>
-#include <qobject.h>
-#include <qimage.h>
+// TQt
+#include <tqcstring.h>
+#include <tqobject.h>
+#include <tqimage.h>
// KDE
#include <kurl.h>
@@ -52,22 +52,23 @@ class DocumentImpl;
* - image is being loaded
* - loaded() is emitted
*/
-class LIBGWENVIEW_EXPORT Document : public QObject {
+class LIBGWENVIEW_EXPORT Document : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
enum CommentState { NONE=0, READ_ONLY=1, WRITABLE=2 };
- Document(QObject*);
+ Document(TQObject*);
~Document();
// Properties
- const QImage& image() const;
+ const TQImage& image() const;
KURL url() const;
KURL dirURL() const;
- QString filename() const;
- const QCString& imageFormat() const;
+ TQString filename() const;
+ const TQCString& imageFormat() const;
int fileSize() const;
- QString mimeType() const;
+ TQString mimeType() const;
MimeTypeUtils::Kind urlKind() const;
bool isModified() const;
@@ -82,12 +83,12 @@ public:
int height() const { return image().height(); }
Document::CommentState commentState() const;
- QString comment() const;
- void setComment(const QString&);
- QString aperture() const;
- QString exposureTime() const;
- QString iso() const;
- QString focalLength() const;
+ TQString comment() const;
+ void setComment(const TQString&);
+ TQString aperture() const;
+ TQString exposureTime() const;
+ TQString iso() const;
+ TQString focalLength() const;
int duration() const;
@@ -143,7 +144,7 @@ signals:
/**
* Emitted to show a part of the image must be refreshed
*/
- void rectUpdated(const QRect& rect);
+ void rectUpdated(const TQRect& rect);
/**
* Emitted when the size is known
@@ -153,7 +154,7 @@ signals:
/**
* Emitted when something goes wrong, like when save fails
*/
- void errorHappened(const QString& message);
+ void errorHappened(const TQString& message);
private slots:
void slotStatResult(KIO::Job*);
@@ -169,20 +170,20 @@ private:
// These methods are used by DocumentImpl and derived
void switchToImpl(DocumentImpl*);
- void setImage(QImage);
- void setImageFormat(const QCString&);
- void setMimeType(const QString&);
+ void setImage(TQImage);
+ void setImageFormat(const TQCString&);
+ void setMimeType(const TQString&);
void setFileSize(int);
void reset();
void load();
- void doPaint(KPrinter *pPrinter, QPainter *p);
+ void doPaint(KPrinter *pPrinter, TQPainter *p);
/**
* The returned string is null if the image was successfully saved,
* otherwise it's the translated error message.
*/
- QString saveInternal(const KURL& url, const QCString& format);
+ TQString saveInternal(const KURL& url, const TQCString& format);
Document(const Document&);
Document &operator=(const Document&);
diff --git a/src/gvcore/documentanimatedloadedimpl.cpp b/src/gvcore/documentanimatedloadedimpl.cpp
index aaaed2f..db4e72c 100644
--- a/src/gvcore/documentanimatedloadedimpl.cpp
+++ b/src/gvcore/documentanimatedloadedimpl.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "documentanimatedloadedimpl.moc"
-// Qt
-#include <qstring.h>
-#include <qtimer.h>
+// TQt
+#include <tqstring.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -45,7 +45,7 @@ class DocumentAnimatedLoadedImplPrivate {
public:
ImageFrames mFrames;
int mCurrentFrame;
- QTimer mFrameTimer;
+ TQTimer mFrameTimer;
};
@@ -55,7 +55,7 @@ DocumentAnimatedLoadedImpl::DocumentAnimatedLoadedImpl(Document* document, const
d=new DocumentAnimatedLoadedImplPrivate;
d->mFrames = frames;
d->mCurrentFrame = -1;
- connect( &d->mFrameTimer, SIGNAL( timeout()), SLOT( nextFrame()));
+ connect( &d->mFrameTimer, TQT_SIGNAL( timeout()), TQT_SLOT( nextFrame()));
}
void DocumentAnimatedLoadedImpl::init() {
@@ -66,7 +66,7 @@ void DocumentAnimatedLoadedImpl::init() {
void DocumentAnimatedLoadedImpl::nextFrame() {
++d->mCurrentFrame;
if( d->mCurrentFrame == int( d->mFrames.count())) d->mCurrentFrame = 0;
- d->mFrameTimer.start( QMAX( 10, d->mFrames[ d->mCurrentFrame ].delay ));
+ d->mFrameTimer.start( TQMAX( 10, d->mFrames[ d->mCurrentFrame ].delay ));
// NOTE! If this ever gets changed to already animate the picture while it's still
// loading, with MNG the frame delay gets announced only after the frame is ready.
// See ImageLoader::frameDone() .
@@ -90,7 +90,7 @@ void DocumentAnimatedLoadedImpl::transform(ImageUtils::Orientation orientation)
}
-QString DocumentAnimatedLoadedImpl::localSave(QFile* /*file*/, const QCString& /*format*/) const {
+TQString DocumentAnimatedLoadedImpl::localSave(TQFile* /*file*/, const TQCString& /*format*/) const {
return i18n("Sorry, cannot save animated images.");
}
diff --git a/src/gvcore/documentanimatedloadedimpl.h b/src/gvcore/documentanimatedloadedimpl.h
index a7493fc..91a5288 100644
--- a/src/gvcore/documentanimatedloadedimpl.h
+++ b/src/gvcore/documentanimatedloadedimpl.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,17 +21,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DOCUMENTANIMATEDIMPL_H
#define DOCUMENTANIMATEDIMPL_H
-// Qt
-#include <qimage.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqimage.h>
+#include <tqvaluevector.h>
// Local
#include "documentloadedimpl.h"
#include "imageutils/imageutils.h"
#include "imageframe.h"
-class QFile;
-class QCString;
+class TQFile;
+class TQCString;
namespace Gwenview {
class Document;
@@ -40,6 +40,7 @@ class DocumentAnimatedLoadedImplPrivate;
class DocumentAnimatedLoadedImpl : public DocumentLoadedImpl {
Q_OBJECT
+ TQ_OBJECT
public:
DocumentAnimatedLoadedImpl(Document* document, const ImageFrames& frames);
~DocumentAnimatedLoadedImpl();
@@ -49,7 +50,7 @@ public:
virtual bool canBeSaved() const { return false; }
protected:
- QString localSave(QFile*, const QCString& format) const;
+ TQString localSave(TQFile*, const TQCString& format) const;
private slots:
void nextFrame();
diff --git a/src/gvcore/documentimpl.cpp b/src/gvcore/documentimpl.cpp
index 97a32c5..34f5216 100644
--- a/src/gvcore/documentimpl.cpp
+++ b/src/gvcore/documentimpl.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@ void DocumentImpl::switchToImpl(DocumentImpl* impl) {
mDocument->switchToImpl(impl);
}
-void DocumentImpl::setImage(QImage img) {
+void DocumentImpl::setImage(TQImage img) {
if (img.depth() == 1) {
// 1 bit depth images are difficult to scale. Let's convert to 8 bit
// depth. See bug #155518.
@@ -50,11 +50,11 @@ void DocumentImpl::emitImageRectUpdated() {
emit rectUpdated(mDocument->image().rect());
}
-void DocumentImpl::setImageFormat(const QCString& format) {
+void DocumentImpl::setImageFormat(const TQCString& format) {
mDocument->setImageFormat(format);
}
-void DocumentImpl::setMimeType(const QString& mimeType) {
+void DocumentImpl::setMimeType(const TQString& mimeType) {
mDocument->setMimeType(mimeType);
}
@@ -62,31 +62,31 @@ void DocumentImpl::setFileSize(int size) const {
mDocument->setFileSize(size);
}
-QString DocumentImpl::aperture() const {
- return QString::null;
+TQString DocumentImpl::aperture() const {
+ return TQString();
}
-QString DocumentImpl::exposureTime() const {
- return QString::null;
+TQString DocumentImpl::exposureTime() const {
+ return TQString();
}
-QString DocumentImpl::iso() const {
- return QString::null;
+TQString DocumentImpl::iso() const {
+ return TQString();
}
-QString DocumentImpl::focalLength() const {
- return QString::null;
+TQString DocumentImpl::focalLength() const {
+ return TQString();
}
-QString DocumentImpl::comment() const {
- return QString::null;
+TQString DocumentImpl::comment() const {
+ return TQString();
}
Document::CommentState DocumentImpl::commentState() const {
return Document::NONE;
}
-void DocumentImpl::setComment(const QString&) {
+void DocumentImpl::setComment(const TQString&) {
}
int DocumentImpl::duration() const {
@@ -96,7 +96,7 @@ int DocumentImpl::duration() const {
void DocumentImpl::transform(ImageUtils::Orientation) {
}
-QString DocumentImpl::save(const KURL&, const QCString&) const {
+TQString DocumentImpl::save(const KURL&, const TQCString&) const {
return i18n("No document to save");
}
diff --git a/src/gvcore/documentimpl.h b/src/gvcore/documentimpl.h
index 94e23f4..c6e5697 100644
--- a/src/gvcore/documentimpl.h
+++ b/src/gvcore/documentimpl.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DOCUMENTIMPL_H
#define DOCUMENTIMPL_H
-// Qt
-#include <qobject.h>
-#include <qrect.h>
+// TQt
+#include <tqobject.h>
+#include <tqrect.h>
// Local
#include "document.h"
@@ -31,8 +31,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-class DocumentImpl : public QObject {
+class DocumentImpl : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
DocumentImpl(Document* document);
virtual ~DocumentImpl();
@@ -43,9 +44,9 @@ public:
virtual void init();
void switchToImpl(DocumentImpl*);
- void setImage(QImage);
- void setMimeType(const QString&);
- void setImageFormat(const QCString&);
+ void setImage(TQImage);
+ void setMimeType(const TQString&);
+ void setImageFormat(const TQCString&);
void setFileSize(int) const;
/**
@@ -53,18 +54,18 @@ public:
*/
void emitImageRectUpdated();
- virtual QString aperture() const;
- virtual QString exposureTime() const;
- virtual QString iso() const;
- virtual QString focalLength() const;
+ virtual TQString aperture() const;
+ virtual TQString exposureTime() const;
+ virtual TQString iso() const;
+ virtual TQString focalLength() const;
- virtual QString comment() const;
+ virtual TQString comment() const;
virtual Document::CommentState commentState() const;
- virtual void setComment(const QString&);
+ virtual void setComment(const TQString&);
virtual int duration() const;
virtual void transform(ImageUtils::Orientation);
- virtual QString save(const KURL&, const QCString& format) const;
+ virtual TQString save(const KURL&, const TQCString& format) const;
virtual MimeTypeUtils::Kind urlKind() const=0;
@@ -74,7 +75,7 @@ public:
signals:
void finished(bool success);
void sizeUpdated();
- void rectUpdated(const QRect&);
+ void rectUpdated(const TQRect&);
protected:
Document* mDocument;
@@ -84,7 +85,7 @@ class DocumentEmptyImpl : public DocumentImpl {
public:
DocumentEmptyImpl(Document* document)
: DocumentImpl(document) {
- setImage(QImage());
+ setImage(TQImage());
setImageFormat(0);
setMimeType("application/x-zerosize");
}
diff --git a/src/gvcore/documentjpegloadedimpl.cpp b/src/gvcore/documentjpegloadedimpl.cpp
index 0b4caec..e56a31c 100644
--- a/src/gvcore/documentjpegloadedimpl.cpp
+++ b/src/gvcore/documentjpegloadedimpl.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -18,11 +18,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qcstring.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+// TQt
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -54,7 +54,7 @@ public:
};
-DocumentJPEGLoadedImpl::DocumentJPEGLoadedImpl(Document* document, const QByteArray& rawData)
+DocumentJPEGLoadedImpl::DocumentJPEGLoadedImpl(Document* document, const TQByteArray& rawData)
: DocumentLoadedImpl(document) {
LOG("" << mDocument->url().prettyURL() << ", data size: " << rawData.size() );
d=new DocumentJPEGLoadedImplPrivate;
@@ -89,13 +89,13 @@ void DocumentJPEGLoadedImpl::transform(ImageUtils::Orientation orientation) {
}
-QString DocumentJPEGLoadedImpl::localSave(QFile* file, const QCString& format) const {
+TQString DocumentJPEGLoadedImpl::localSave(TQFile* file, const TQCString& format) const {
if (qstrcmp(format, "JPEG")==0) {
LOG("JPEG Reset orientation");
d->mJPEGContent.resetOrientation();
if (!d->mJPEGContent.thumbnail().isNull()) {
d->mJPEGContent.setThumbnail( ImageUtils::scale(
- mDocument->image(), 128, 128, ImageUtils::SMOOTH_FAST, QImage::ScaleMin));
+ mDocument->image(), 128, 128, ImageUtils::SMOOTH_FAST, TQ_ScaleMin));
}
LOG("JPEG Lossless save");
@@ -103,35 +103,35 @@ QString DocumentJPEGLoadedImpl::localSave(QFile* file, const QCString& format) c
return i18n("Could not save this JPEG file.");
}
} else {
- QString msg=DocumentLoadedImpl::localSave(file, format);
+ TQString msg=DocumentLoadedImpl::localSave(file, format);
if (!msg.isNull()) return msg;
}
- return QString::null;
+ return TQString();
}
-QString DocumentJPEGLoadedImpl::comment() const {
+TQString DocumentJPEGLoadedImpl::comment() const {
return d->mJPEGContent.comment();
}
-void DocumentJPEGLoadedImpl::setComment(const QString& comment) {
+void DocumentJPEGLoadedImpl::setComment(const TQString& comment) {
d->mJPEGContent.setComment(comment);
}
-QString DocumentJPEGLoadedImpl::aperture() const {
+TQString DocumentJPEGLoadedImpl::aperture() const {
return d->mJPEGContent.aperture();
}
-QString DocumentJPEGLoadedImpl::exposureTime() const {
+TQString DocumentJPEGLoadedImpl::exposureTime() const {
return d->mJPEGContent.exposureTime();
}
-QString DocumentJPEGLoadedImpl::iso() const {
+TQString DocumentJPEGLoadedImpl::iso() const {
return d->mJPEGContent.iso();
}
-QString DocumentJPEGLoadedImpl::focalLength() const {
+TQString DocumentJPEGLoadedImpl::focalLength() const {
return d->mJPEGContent.focalLength();
}
diff --git a/src/gvcore/documentjpegloadedimpl.h b/src/gvcore/documentjpegloadedimpl.h
index 94e9e00..2b2a83a 100644
--- a/src/gvcore/documentjpegloadedimpl.h
+++ b/src/gvcore/documentjpegloadedimpl.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DOCUMENTJPEGLOADEDIMPL_H
#define DOCUMENTJPEGLOADEDIMPL_H
-// Qt
-#include <qimage.h>
+// TQt
+#include <tqimage.h>
// Local
#include "documentloadedimpl.h"
@@ -34,24 +34,25 @@ class DocumentJPEGLoadedImplPrivate;
class DocumentJPEGLoadedImpl : public DocumentLoadedImpl {
Q_OBJECT
+ TQ_OBJECT
public:
- DocumentJPEGLoadedImpl(Document* document, const QByteArray& rawData);
+ DocumentJPEGLoadedImpl(Document* document, const TQByteArray& rawData);
~DocumentJPEGLoadedImpl();
void init();
- QString comment() const;
- void setComment(const QString&);
+ TQString comment() const;
+ void setComment(const TQString&);
Document::CommentState commentState() const;
- QString aperture() const;
- QString exposureTime() const;
- QString iso() const;
- QString focalLength() const;
+ TQString aperture() const;
+ TQString exposureTime() const;
+ TQString iso() const;
+ TQString focalLength() const;
void transform(ImageUtils::Orientation);
protected:
- QString localSave(QFile*, const QCString& format) const;
+ TQString localSave(TQFile*, const TQCString& format) const;
private:
DocumentJPEGLoadedImplPrivate* d;
diff --git a/src/gvcore/documentloadedimpl.cpp b/src/gvcore/documentloadedimpl.cpp
index 04fef67..35a07b0 100644
--- a/src/gvcore/documentloadedimpl.cpp
+++ b/src/gvcore/documentloadedimpl.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -25,10 +25,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <unistd.h>
#include <sys/stat.h>
-// Qt
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+// TQt
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
// KDE
#include <kapplication.h>
@@ -54,7 +54,7 @@ namespace Gwenview {
class DocumentLoadedImplPrivate {
int mSize;
- QDateTime mModified;
+ TQDateTime mModified;
};
DocumentLoadedImpl::DocumentLoadedImpl(Document* document)
@@ -78,12 +78,12 @@ void DocumentLoadedImpl::transform(ImageUtils::Orientation orientation) {
}
-QString DocumentLoadedImpl::save(const KURL& _url, const QCString& format) const {
- if (!QImageIO::outputFormats().contains(format)) {
+TQString DocumentLoadedImpl::save(const KURL& _url, const TQCString& format) const {
+ if (!TQImageIO::outputFormats().tqcontains(format)) {
return i18n("Gwenview cannot write files in this format.");
}
- QString msg;
+ TQString msg;
KURL url(_url);
// Use the umask to determine default mode (will be used if the dest file
@@ -95,17 +95,17 @@ QString DocumentLoadedImpl::save(const KURL& _url, const QCString& format) const
if (url.isLocalFile()) {
// If the file is a link, dereference it but take care of circular
// links
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (info.isSymLink()) {
- QStringList links;
+ TQStringList links;
while (info.isSymLink()) {
links.append(info.filePath());
- QString path=info.readLink();
+ TQString path=info.readLink();
if (path[0]!='/') {
path=info.dirPath(true) + '/' + path;
}
- path=QDir::cleanDirPath(path);
- if (links.contains(path)) {
+ path=TQDir::cleanDirPath(path);
+ if (links.tqcontains(path)) {
return i18n("This is a circular link.");
}
info.setFile(path);
@@ -122,7 +122,7 @@ QString DocumentLoadedImpl::save(const KURL& _url, const QCString& format) const
if (info.exists()) {
// Get current file mode
KDE_struct_stat st;
- if (KDE_stat(QFile::encodeName(info.filePath()), &st)==0) {
+ if (KDE_stat(TQFile::encodeName(info.filePath()), &st)==0) {
mode=st.st_mode & 07777;
} else {
// This should not happen
@@ -130,17 +130,17 @@ QString DocumentLoadedImpl::save(const KURL& _url, const QCString& format) const
}
} else {
- QFileInfo parent=QFileInfo(info.dirPath());
- if (!parent.isWritable()) {
+ TQFileInfo tqparent=TQFileInfo(info.dirPath());
+ if (!tqparent.isWritable()) {
return
i18n("The %1 folder is read-only.")
- .arg(parent.filePath());
+ .tqarg(tqparent.filePath());
}
}
}
// Save the file to a tmp file
- QString prefix;
+ TQString prefix;
if (url.isLocalFile()) {
// We set the prefix to url.path() so that the temp file is on the
// same partition as the destination file. If we don't do this, rename
@@ -150,48 +150,48 @@ QString DocumentLoadedImpl::save(const KURL& _url, const QCString& format) const
KTempFile tmp(prefix, "gwenview", mode);
tmp.setAutoDelete(true);
if (tmp.status()!=0) {
- QString reason( strerror(tmp.status()) );
+ TQString reason( strerror(tmp.status()) );
return i18n("Could not create a temporary file.\nReason: %1.")
- .arg(reason);
+ .tqarg(reason);
}
- QFile* file=tmp.file();
+ TQFile* file=tmp.file();
msg=localSave(file, format);
if (!msg.isNull()) return msg;
file->close();
if (tmp.status()!=0) {
- QString reason( strerror(tmp.status()) );
+ TQString reason( strerror(tmp.status()) );
return i18n("Saving image to a temporary file failed.\nReason: %1.")
- .arg(reason);
+ .tqarg(reason);
}
- QString tmpName=tmp.name();
- int tmpSize=QFileInfo(tmpName).size();
+ TQString tmpName=tmp.name();
+ int tmpSize=TQFileInfo(tmpName).size();
setFileSize(tmpSize);
// Move the tmp file to the final dest
if (url.isLocalFile()) {
- if( ::rename( QFile::encodeName(tmpName), QFile::encodeName( url.path())) < 0 ) {
- return i18n("Could not write to %1.").arg(url.path());
+ if( ::rename( TQFile::encodeName(tmpName), TQFile::encodeName( url.path())) < 0 ) {
+ return i18n("Could not write to %1.").tqarg(url.path());
}
} else {
if (!KIO::NetAccess::upload(tmp.name(), url, KApplication::kApplication()->mainWidget() )) {
- return i18n("Could not upload the file to %1.").arg(url.prettyURL());
+ return i18n("Could not upload the file to %1.").tqarg(url.prettyURL());
}
}
- return QString::null;
+ return TQString();
}
-QString DocumentLoadedImpl::localSave(QFile* file, const QCString& format) const {
- QImageIO iio(file, format);
+TQString DocumentLoadedImpl::localSave(TQFile* file, const TQCString& format) const {
+ TQImageIO iio(file, format);
iio.setImage(mDocument->image());
if (!iio.write()) {
return
i18n("An error happened while saving.");
}
- return QString::null;
+ return TQString();
}
diff --git a/src/gvcore/documentloadedimpl.h b/src/gvcore/documentloadedimpl.h
index 6951090..42b8b0b 100644
--- a/src/gvcore/documentloadedimpl.h
+++ b/src/gvcore/documentloadedimpl.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,32 +21,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DOCUMENTLOADEDIMPL_H
#define DOCUMENTLOADEDIMPL_H
-// Qt
-#include <qimage.h>
+// TQt
+#include <tqimage.h>
// Local
#include "documentimpl.h"
-class QFile;
+class TQFile;
namespace Gwenview {
class Document;
class DocumentLoadedImpl : public DocumentImpl {
Q_OBJECT
+ TQ_OBJECT
public:
DocumentLoadedImpl(Document* document);
void init();
~DocumentLoadedImpl();
void transform(ImageUtils::Orientation);
- QString save(const KURL&, const QCString& format) const;
+ TQString save(const KURL&, const TQCString& format) const;
virtual MimeTypeUtils::Kind urlKind() const { return MimeTypeUtils::KIND_RASTER_IMAGE; }
virtual bool canBeSaved() const { return true; }
protected:
- virtual QString localSave(QFile* file, const QCString& format) const;
+ virtual TQString localSave(TQFile* file, const TQCString& format) const;
};
} // namespace
diff --git a/src/gvcore/documentloadingimpl.cpp b/src/gvcore/documentloadingimpl.cpp
index 2a6efd7..072229e 100644
--- a/src/gvcore/documentloadingimpl.cpp
+++ b/src/gvcore/documentloadingimpl.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "documentloadingimpl.moc"
-// Qt
+// TQt
// KDE
#include <kmimetype.h>
@@ -86,20 +86,20 @@ void DocumentLoadingImpl::init() {
switchToImpl(new DocumentOtherLoadedImpl(mDocument));
return;
}
- connect( d->mLoader, SIGNAL( urlKindDetermined()), SLOT( slotURLKindDetermined() ));
- connect( d->mLoader, SIGNAL( sizeLoaded( int, int )), SLOT( sizeLoaded( int, int )));
- connect( d->mLoader, SIGNAL( imageChanged( const QRect& )), SLOT( imageChanged( const QRect& )));
- connect( d->mLoader, SIGNAL( imageLoaded( bool )), SLOT( imageLoaded( bool )));
+ connect( d->mLoader, TQT_SIGNAL( urlKindDetermined()), TQT_SLOT( slotURLKindDetermined() ));
+ connect( d->mLoader, TQT_SIGNAL( sizeLoaded( int, int )), TQT_SLOT( sizeLoaded( int, int )));
+ connect( d->mLoader, TQT_SIGNAL( imageChanged( const TQRect& )), TQT_SLOT( imageChanged( const TQRect& )));
+ connect( d->mLoader, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( imageLoaded( bool )));
// it's possible the loader already has the whole or at least part of the image loaded
- QImage image = d->mLoader->processedImage();
+ TQImage image = d->mLoader->processedImage();
if (!image.isNull()) {
if( d->mLoader->frames().count() > 0 ) {
setImage( d->mLoader->frames().first().image);
emitImageRectUpdated();
} else {
setImage(image);
- QMemArray< QRect > rects = d->mLoader->loadedRegion().rects();
+ TQMemArray< TQRect > rects = TQRegion(d->mLoader->loadedRegion()).tqrects();
for( unsigned int i = 0; i < rects.count(); ++i ) {
emit rectUpdated(rects[i]);
}
@@ -121,7 +121,7 @@ void DocumentLoadingImpl::slotURLKindDetermined() {
void DocumentLoadingImpl::imageLoaded( bool ok ) {
LOG("");
- QCString format = d->mLoader->imageFormat();
+ TQCString format = d->mLoader->imageFormat();
if ( !ok || format.isEmpty()) {
// Unknown format, no need to go further
emit finished(false);
@@ -145,7 +145,7 @@ void DocumentLoadingImpl::imageLoaded( bool ok ) {
}
-void DocumentLoadingImpl::imageChanged(const QRect& rect) {
+void DocumentLoadingImpl::imageChanged(const TQRect& rect) {
LOG(rect);
setImage(d->mLoader->processedImage());
emit rectUpdated(rect);
diff --git a/src/gvcore/documentloadingimpl.h b/src/gvcore/documentloadingimpl.h
index 83543a9..a5bba3f 100644
--- a/src/gvcore/documentloadingimpl.h
+++ b/src/gvcore/documentloadingimpl.h
@@ -33,6 +33,7 @@ class DocumentLoadingImplPrivate;
class DocumentLoadingImpl : public DocumentImpl {
Q_OBJECT
+ TQ_OBJECT
public:
DocumentLoadingImpl(Document* document);
~DocumentLoadingImpl();
@@ -46,7 +47,7 @@ private:
private slots:
void slotURLKindDetermined();
void sizeLoaded(int, int);
- void imageChanged(const QRect&);
+ void imageChanged(const TQRect&);
void imageLoaded( bool ok );
};
diff --git a/src/gvcore/documentotherloadedimpl.h b/src/gvcore/documentotherloadedimpl.h
index 8343d05..b3b91b0 100644
--- a/src/gvcore/documentotherloadedimpl.h
+++ b/src/gvcore/documentotherloadedimpl.h
@@ -32,7 +32,7 @@ class DocumentOtherLoadedImpl : public DocumentImpl {
public:
DocumentOtherLoadedImpl(Document* document)
: DocumentImpl(document) {
- setImage(QImage());
+ setImage(TQImage());
setImageFormat(0);
}
diff --git a/src/gvcore/dragpixmapgenerator.h b/src/gvcore/dragpixmapgenerator.h
index d73d776..efbbd93 100644
--- a/src/gvcore/dragpixmapgenerator.h
+++ b/src/gvcore/dragpixmapgenerator.h
@@ -21,12 +21,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef DRAGPIXMAPGENERATOR_H
#define DRAGPIXMAPGENERATOR_H
-// Qt
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
// KDE
#include <klocale.h>
@@ -47,8 +47,8 @@ public:
virtual void setGenerator(DragPixmapGenerator<T>* generator) {
mGenerator = generator;
}
- virtual QSize itemSize(T)=0;
- virtual void drawItem(QPainter*, int left, int top, T)=0;
+ virtual TQSize itemSize(T)=0;
+ virtual void drawItem(TQPainter*, int left, int top, T)=0;
virtual int spacing() const {
return 0;
}
@@ -58,7 +58,7 @@ protected:
};
-QPixmap dragPixmapGeneratorHelper(QValueVector<QPixmap> pixmapVector);
+TQPixmap dragPixmapGeneratorHelper(TQValueVector<TQPixmap> pixmapVector);
template <class T>
@@ -104,23 +104,23 @@ public:
drawer->setGenerator(this);
}
- QPixmap generate() {
+ TQPixmap generate() {
int width = 0, height = 0;
int dragCount = 0;
int spacing = mItemDrawer->spacing();
bool listCropped;
- QString bottomText;
- QFontMetrics fm = QApplication::fontMetrics();
+ TQString bottomText;
+ TQFontMetrics fm = TQApplication::fontMetrics();
// Compute pixmap size and update dragCount
- QValueListIterator<T> it = mItemList.begin();
- QValueListIterator<T> end = mItemList.end();
+ TQValueListIterator<T> it = mItemList.begin();
+ TQValueListIterator<T> end = mItemList.end();
height = -spacing;
for (; it!= end && height < MAX_HEIGHT; ++dragCount, ++it) {
- QSize itemSize = mItemDrawer->itemSize(*it);
+ TQSize itemSize = mItemDrawer->itemSize(*it);
Q_ASSERT(itemSize.width() <= ITEM_MAX_WIDTH);
- width = QMAX(width, itemSize.width());
+ width = TQMAX(width, itemSize.width());
height += itemSize.height() + spacing;
}
@@ -128,18 +128,18 @@ public:
if (listCropped) {
// If list has been cropped, leave space for item count text
height += fm.height();
- bottomText = i18n("%1 items").arg(mItemList.count());
- width = QMAX(width, fm.width("... " + bottomText));
+ bottomText = i18n("%1 items").tqarg(mItemList.count());
+ width = TQMAX(width, fm.width("... " + bottomText));
}
mPixmapWidth = width;
// Init pixmap
- QPixmap pixmap(width + 2*DRAG_MARGIN, height + 2*DRAG_MARGIN);
- QColorGroup cg = QToolTip::palette().active();
+ TQPixmap pixmap(width + 2*DRAG_MARGIN, height + 2*DRAG_MARGIN);
+ TQColorGroup cg = TQToolTip::palette().active();
pixmap.fill(cg.base());
- QPainter painter(&pixmap);
+ TQPainter painter(&pixmap);
// Draw border
painter.setPen(cg.dark());
@@ -156,7 +156,7 @@ public:
// Draw text if necessary
if (listCropped) {
int posY= height + fm.ascent();
- painter.drawText(DRAG_MARGIN, posY, "...");
+ painter.drawText(DRAG_MARGIN, posY, TQString("..."));
int offset = width - fm.width(bottomText);
painter.drawText(DRAG_MARGIN + offset, posY, bottomText);
}
@@ -167,7 +167,7 @@ public:
private:
- QValueList<T> mItemList;
+ TQValueList<T> mItemList;
DragPixmapItemDrawer<T>* mItemDrawer;
int mPixmapWidth;
};
diff --git a/src/gvcore/externaltoolaction.cpp b/src/gvcore/externaltoolaction.cpp
index f8e4ad6..4953e8d 100644
--- a/src/gvcore/externaltoolaction.cpp
+++ b/src/gvcore/externaltoolaction.cpp
@@ -18,8 +18,8 @@ Copyright 2000-2004 Aur�lien G�teau
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qdir.h>
+// TQt
+#include <tqdir.h>
// KDE
#include <kdebug.h>
@@ -31,25 +31,25 @@ Copyright 2000-2004 Aur�lien G�teau
namespace Gwenview {
ExternalToolAction::ExternalToolAction(
- QObject* parent, const KService* service,
+ TQObject* tqparent, const KService* service,
const KURL::List& urls)
-: KAction(parent)
+: KAction(tqparent)
, mService(service)
, mURLs(urls)
{
setText(service->name());
setIcon(service->icon());
- connect(this, SIGNAL(activated()),
- this, SLOT(openExternalTool()) );
+ connect(this, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(openExternalTool()) );
}
void ExternalToolAction::openExternalTool() {
- QString dir=mURLs.first().directory();
- QDir::setCurrent(dir);
+ TQString dir=mURLs.first().directory();
+ TQDir::setCurrent(dir);
- QStringList args=KRun::processDesktopExec(*mService, mURLs, true);
+ TQStringList args=KRun::processDesktopExec(*mService, mURLs, true);
KRun::runCommand(args.join(" "), mService->name(), mService->icon());
}
diff --git a/src/gvcore/externaltoolaction.h b/src/gvcore/externaltoolaction.h
index d2c450e..287938a 100644
--- a/src/gvcore/externaltoolaction.h
+++ b/src/gvcore/externaltoolaction.h
@@ -34,8 +34,9 @@ namespace Gwenview {
*/
class ExternalToolAction : public KAction {
Q_OBJECT
+ TQ_OBJECT
public:
- ExternalToolAction(QObject* parent, const KService*, const KURL::List&);
+ ExternalToolAction(TQObject* tqparent, const KService*, const KURL::List&);
private slots:
void openExternalTool();
diff --git a/src/gvcore/externaltoolcontext.cpp b/src/gvcore/externaltoolcontext.cpp
index 24456e5..a82f900 100644
--- a/src/gvcore/externaltoolcontext.cpp
+++ b/src/gvcore/externaltoolcontext.cpp
@@ -36,10 +36,10 @@ Copyright 2000-2004 Aur�lien G�teau
namespace Gwenview {
ExternalToolContext::ExternalToolContext(
- QObject* parent,
+ TQObject* tqparent,
std::list<KService*> services,
KURL::List urls)
-: QObject(parent)
+: TQObject(tqparent)
, mServices(services)
, mURLs(urls)
{}
@@ -56,8 +56,8 @@ void ExternalToolContext::showOpenWithDialog() {
}
-QPopupMenu* ExternalToolContext::popupMenu() {
- QPopupMenu* menu=new QPopupMenu();
+TQPopupMenu* ExternalToolContext::popupMenu() {
+ TQPopupMenu* menu=new TQPopupMenu();
std::list<KService*>::const_iterator it=mServices.begin();
std::list<KService*>::const_iterator itEnd=mServices.end();
for (;it!=itEnd; ++it) {
@@ -68,11 +68,11 @@ QPopupMenu* ExternalToolContext::popupMenu() {
menu->insertSeparator();
menu->insertItem(i18n("Other..."),
- this, SLOT(showOpenWithDialog()) );
+ this, TQT_SLOT(showOpenWithDialog()) );
menu->insertItem(
SmallIcon("configure"),
i18n("Configure External Tools..."),
- this, SLOT(showExternalToolDialog()) );
+ this, TQT_SLOT(showExternalToolDialog()) );
return menu;
}
diff --git a/src/gvcore/externaltoolcontext.h b/src/gvcore/externaltoolcontext.h
index 01a3574..0c61e1c 100644
--- a/src/gvcore/externaltoolcontext.h
+++ b/src/gvcore/externaltoolcontext.h
@@ -24,8 +24,8 @@ Copyright 2000-2004 Aur�lien G�teau
// STL
#include <list>
-// Qt
-#include <qobject.h>
+// TQt
+#include <tqobject.h>
// KDE
#include <kurl.h>
@@ -33,17 +33,18 @@ Copyright 2000-2004 Aur�lien G�teau
// Local
#include "libgwenview_export.h"
-class QPopupMenu;
+class TQPopupMenu;
class KService;
namespace Gwenview {
-class LIBGWENVIEW_EXPORT ExternalToolContext : public QObject {
+class LIBGWENVIEW_EXPORT ExternalToolContext : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- ExternalToolContext(QObject* parent,
+ ExternalToolContext(TQObject* tqparent,
std::list<KService*> services,
KURL::List urls);
- QPopupMenu* popupMenu();
+ TQPopupMenu* popupMenu();
private slots:
void showExternalToolDialog();
diff --git a/src/gvcore/externaltooldialog.cpp b/src/gvcore/externaltooldialog.cpp
index e8b0809..1835fc9 100644
--- a/src/gvcore/externaltooldialog.cpp
+++ b/src/gvcore/externaltooldialog.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -18,10 +18,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qbuttongroup.h>
-#include <qheader.h>
-#include <qwhatsthis.h>
+// TQt
+#include <tqbuttongroup.h>
+#include <tqheader.h>
+#include <tqwhatsthis.h>
// KDE
#include <kdebug.h>
@@ -51,8 +51,8 @@ enum { ID_ALL_IMAGES=0, ID_ALL_FILES, ID_CUSTOM };
class ToolListViewItem : public KListViewItem {
public:
- ToolListViewItem(KListView* parent, const QString& label)
- : KListViewItem(parent, label), mDesktopFile(0L) {}
+ ToolListViewItem(KListView* tqparent, const TQString& label)
+ : KListViewItem(tqparent, label), mDesktopFile(0L) {}
void setDesktopFile(KDesktopFile* df) {
mDesktopFile=df;
@@ -69,7 +69,7 @@ private:
struct ExternalToolDialogPrivate {
ExternalToolDialogBase* mContent;
- QPtrList<KDesktopFile> mDeletedTools;
+ TQPtrList<KDesktopFile> mDeletedTools;
ToolListViewItem* mSelectedItem;
@@ -77,21 +77,21 @@ struct ExternalToolDialogPrivate {
: mSelectedItem(0L) {}
void fillMimeTypeListView() {
- QStringList mimeTypes=MimeTypeUtils::rasterImageMimeTypes();
+ TQStringList mimeTypes=MimeTypeUtils::rasterImageMimeTypes();
mimeTypes.append("inode/directory");
mimeTypes+=Archive::mimeTypes();
- QStringList::const_iterator it=mimeTypes.begin();
+ TQStringList::const_iterator it=mimeTypes.begin();
for(; it!=mimeTypes.end(); ++it) {
- (void)new QCheckListItem(mContent->mMimeTypeListView, *it, QCheckListItem::CheckBox);
+ (void)new TQCheckListItem(mContent->mMimeTypeListView, *it, TQCheckListItem::CheckBox);
}
}
void fillToolListView() {
- QDict<KDesktopFile> desktopFiles=ExternalToolManager::instance()->desktopFiles();
+ TQDict<KDesktopFile> desktopFiles=ExternalToolManager::instance()->desktopFiles();
- QDictIterator<KDesktopFile> it(desktopFiles);
+ TQDictIterator<KDesktopFile> it(desktopFiles);
for (; it.current(); ++it) {
ToolListViewItem* item=new ToolListViewItem(mContent->mToolListView, it.current()->readName());
item->setPixmap(0, SmallIcon(it.current()->readIcon()) );
@@ -103,7 +103,7 @@ struct ExternalToolDialogPrivate {
void writeServiceTypes(KDesktopFile* desktopFile) {
- QButton* button=mContent->mFileAssociationGroup->selected();
+ TQButton* button=mContent->mFileAssociationGroup->selected();
if (!button) {
desktopFile->writeEntry("ServiceTypes", "*");
return;
@@ -119,10 +119,10 @@ struct ExternalToolDialogPrivate {
return;
}
- QStringList mimeTypes;
- QListViewItem* item=mContent->mMimeTypeListView->firstChild();
+ TQStringList mimeTypes;
+ TQListViewItem* item=mContent->mMimeTypeListView->firstChild();
for (; item; item=item->nextSibling()) {
- if (static_cast<QCheckListItem*>(item)->isOn()) {
+ if (static_cast<TQCheckListItem*>(item)->isOn()) {
mimeTypes.append(item->text(0));
}
}
@@ -134,17 +134,17 @@ struct ExternalToolDialogPrivate {
if (!mSelectedItem) return true;
// Check name
- QString name=mContent->mName->text().stripWhiteSpace();
+ TQString name=mContent->mName->text().stripWhiteSpace();
if (name.isEmpty()) {
KMessageBox::sorry(mContent, i18n("The tool name cannot be empty"));
return false;
}
- QListViewItem* item=mContent->mToolListView->firstChild();
+ TQListViewItem* item=mContent->mToolListView->firstChild();
for (; item; item=item->nextSibling()) {
if (item==mSelectedItem) continue;
if (name==item->text(0)) {
- KMessageBox::sorry(mContent, i18n("There is already a tool named \"%1\"").arg(name));
+ KMessageBox::sorry(mContent, i18n("There is already a tool named \"%1\"").tqarg(name));
return false;
}
}
@@ -172,10 +172,10 @@ struct ExternalToolDialogPrivate {
}
- void updateFileAssociationGroup(const QStringList& serviceTypes) {
- QListViewItem* item=mContent->mMimeTypeListView->firstChild();
+ void updateFileAssociationGroup(const TQStringList& serviceTypes) {
+ TQListViewItem* item=mContent->mMimeTypeListView->firstChild();
for (; item; item=item->nextSibling()) {
- static_cast<QCheckListItem*>(item)->setOn(false);
+ static_cast<TQCheckListItem*>(item)->setOn(false);
}
if (serviceTypes.size()==0) {
@@ -183,7 +183,7 @@ struct ExternalToolDialogPrivate {
return;
}
if (serviceTypes.size()==1) {
- QString serviceType=serviceTypes[0];
+ TQString serviceType=serviceTypes[0];
if (serviceType=="image/*") {
mContent->mFileAssociationGroup->setButton(ID_ALL_IMAGES);
return;
@@ -195,11 +195,11 @@ struct ExternalToolDialogPrivate {
}
mContent->mFileAssociationGroup->setButton(ID_CUSTOM);
- QStringList::ConstIterator it=serviceTypes.begin();
+ TQStringList::ConstIterator it=serviceTypes.begin();
for (;it!=serviceTypes.end(); ++it) {
- QListViewItem* item=
- mContent->mMimeTypeListView->findItem(*it, 0, Qt::ExactMatch);
- if (item) static_cast<QCheckListItem*>(item)->setOn(true);
+ TQListViewItem* item=
+ mContent->mMimeTypeListView->tqfindItem(*it, 0, TQt::ExactMatch);
+ if (item) static_cast<TQCheckListItem*>(item)->setOn(true);
}
}
@@ -213,21 +213,21 @@ struct ExternalToolDialogPrivate {
mContent->mName->setText(desktopFile->readName());
mContent->mCommand->setURL(desktopFile->readEntry("Exec"));
mContent->mIconButton->setIcon(desktopFile->readIcon());
- QStringList serviceTypes=desktopFile->readListEntry("ServiceTypes");
+ TQStringList serviceTypes=desktopFile->readListEntry("ServiceTypes");
updateFileAssociationGroup(serviceTypes);
return;
}
}
- mContent->mName->setText(QString::null);
- mContent->mCommand->setURL(QString::null);
- mContent->mIconButton->setIcon(QString::null);
+ mContent->mName->setText(TQString());
+ mContent->mCommand->setURL(TQString());
+ mContent->mIconButton->setIcon(TQString());
mContent->mFileAssociationGroup->setButton(ID_ALL_IMAGES);
}
bool apply() {
if (!saveChanges()) return false;
- QPtrListIterator<KDesktopFile> it(mDeletedTools);
+ TQPtrListIterator<KDesktopFile> it(mDeletedTools);
for(; it.current(); ++it) {
ExternalToolManager::instance()->hideDesktopFile(it.current());
}
@@ -241,25 +241,25 @@ struct ExternalToolDialogPrivate {
* This event filter object is here to prevent the user from selecting a
* different tool in the tool list view if the current tool could not be saved.
*/
-class ToolListViewFilterObject : public QObject {
+class ToolListViewFilterObject : public TQObject {
ExternalToolDialogPrivate* d;
public:
- ToolListViewFilterObject(QObject* parent, ExternalToolDialogPrivate* _d)
- : QObject(parent), d(_d) {}
+ ToolListViewFilterObject(TQObject* tqparent, ExternalToolDialogPrivate* _d)
+ : TQObject(tqparent), d(_d) {}
- bool eventFilter(QObject*, QEvent* event) {
- if (event->type()!=QEvent::MouseButtonPress) return false;
+ bool eventFilter(TQObject*, TQEvent* event) {
+ if (event->type()!=TQEvent::MouseButtonPress) return false;
return !d->saveChanges();
}
};
-ExternalToolDialog::ExternalToolDialog(QWidget* parent)
+ExternalToolDialog::ExternalToolDialog(TQWidget* tqparent)
: KDialogBase(
- parent,0, false, QString::null, KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
+ tqparent,0, false, TQString(), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel,
KDialogBase::Ok, true)
{
- setWFlags(getWFlags() | Qt::WDestructiveClose);
+ setWFlags(getWFlags() | TQt::WDestructiveClose);
d=new ExternalToolDialogPrivate;
d->mContent=new ExternalToolDialogBase(this);
@@ -272,18 +272,18 @@ ExternalToolDialog::ExternalToolDialog(QWidget* parent)
d->fillMimeTypeListView();
d->fillToolListView();
d->mContent->mToolListView->viewport()->installEventFilter(
- new ToolListViewFilterObject(this, d));
-
- connect( d->mContent->mToolListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotSelectionChanged(QListViewItem*)) );
- connect( d->mContent->mAddButton, SIGNAL(clicked()),
- this, SLOT(addTool()) );
- connect( d->mContent->mDeleteButton, SIGNAL(clicked()),
- this, SLOT(deleteTool()) );
- connect( d->mContent->mHelp, SIGNAL(leftClickedURL()),
- this, SLOT(showCommandHelp()) );
- connect( d->mContent->mMoreTools, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(openURL(const QString&)) );
+ new ToolListViewFilterObject(TQT_TQOBJECT(this), d));
+
+ connect( d->mContent->mToolListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)) );
+ connect( d->mContent->mAddButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addTool()) );
+ connect( d->mContent->mDeleteButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(deleteTool()) );
+ connect( d->mContent->mHelp, TQT_SIGNAL(leftClickedURL()),
+ this, TQT_SLOT(showCommandHelp()) );
+ connect( d->mContent->mMoreTools, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(openURL(const TQString&)) );
KListView* view=d->mContent->mToolListView;
if (view->firstChild()) {
@@ -314,7 +314,7 @@ void ExternalToolDialog::slotCancel() {
}
-void ExternalToolDialog::slotSelectionChanged(QListViewItem* item) {
+void ExternalToolDialog::slotSelectionChanged(TQListViewItem* item) {
d->mSelectedItem=static_cast<ToolListViewItem*>(item);
d->updateDetails();
}
@@ -322,7 +322,7 @@ void ExternalToolDialog::slotSelectionChanged(QListViewItem* item) {
void ExternalToolDialog::addTool() {
KListView* view=d->mContent->mToolListView;
- QString name=i18n("<Unnamed tool>");
+ TQString name=i18n("<Unnamed tool>");
ToolListViewItem* item=new ToolListViewItem(view, name);
view->setSelected(item, true);
}
@@ -343,12 +343,12 @@ void ExternalToolDialog::deleteTool() {
void ExternalToolDialog::showCommandHelp() {
KURLRequester* lbl=d->mContent->mCommand;
- QWhatsThis::display(QWhatsThis::textFor(lbl),
+ TQWhatsThis::display(TQWhatsThis::textFor(lbl),
lbl->mapToGlobal( lbl->rect().bottomRight() ) );
}
-void ExternalToolDialog::openURL(const QString& url) {
+void ExternalToolDialog::openURL(const TQString& url) {
new KRun(KURL(url));
}
diff --git a/src/gvcore/externaltooldialog.h b/src/gvcore/externaltooldialog.h
index 890644f..149817b 100644
--- a/src/gvcore/externaltooldialog.h
+++ b/src/gvcore/externaltooldialog.h
@@ -33,8 +33,9 @@ namespace Gwenview {
class ExternalToolDialogPrivate;
class LIBGWENVIEW_EXPORT ExternalToolDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ExternalToolDialog(QWidget* parent);
+ ExternalToolDialog(TQWidget* tqparent);
~ExternalToolDialog();
protected slots:
@@ -43,11 +44,11 @@ protected slots:
void slotCancel();
private slots:
- void slotSelectionChanged(QListViewItem*);
+ void slotSelectionChanged(TQListViewItem*);
void addTool();
void deleteTool();
void showCommandHelp();
- void openURL(const QString& url);
+ void openURL(const TQString& url);
private:
ExternalToolDialogPrivate* d;
diff --git a/src/gvcore/externaltooldialogbase.ui b/src/gvcore/externaltooldialogbase.ui
index 7b17ed4..7166a3d 100644
--- a/src/gvcore/externaltooldialogbase.ui
+++ b/src/gvcore/externaltooldialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ExternalToolDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ExternalToolDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>720</width>
<height>0</height>
@@ -49,14 +49,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>487</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>mDeleteButton</cstring>
</property>
@@ -64,7 +64,7 @@
<string>&amp;Delete</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>mAddButton</cstring>
</property>
@@ -113,7 +113,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QFrame" row="0" column="2" rowspan="1" colspan="2">
+ <widget class="TQFrame" row="0" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>mDetails</cstring>
</property>
@@ -130,7 +130,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -151,9 +151,9 @@
<string>File Associations</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
@@ -175,7 +175,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -194,7 +194,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -233,7 +233,7 @@ You can use keywords in the Command field:
</widget>
</grid>
</widget>
- <widget class="QButtonGroup" row="2" column="0">
+ <widget class="TQButtonGroup" row="2" column="0">
<property name="name">
<cstring>mFileAssociationGroup</cstring>
</property>
@@ -261,7 +261,7 @@ You can use keywords in the Command field:
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButton1</cstring>
</property>
@@ -275,7 +275,7 @@ You can use keywords in the Command field:
<number>0</number>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButton2</cstring>
</property>
@@ -286,7 +286,7 @@ You can use keywords in the Command field:
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="0">
+ <widget class="TQRadioButton" row="2" column="0">
<property name="name">
<cstring>radioButton3</cstring>
</property>
@@ -304,7 +304,7 @@ You can use keywords in the Command field:
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>140</height>
@@ -358,7 +358,7 @@ You can use keywords in the Command field:
<tabstop>radioButton1</tabstop>
<tabstop>mMimeTypeListView</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kurllabel.h</includehint>
diff --git a/src/gvcore/externaltoolmanager.cpp b/src/gvcore/externaltoolmanager.cpp
index 9e6fc9e..3471bc0 100644
--- a/src/gvcore/externaltoolmanager.cpp
+++ b/src/gvcore/externaltoolmanager.cpp
@@ -21,8 +21,8 @@ Copyright 2000-2004 Aur�lien G�teau
// STL
#include <list>
-// Qt
-#include <qdir.h>
+// TQt
+#include <tqdir.h>
// KDE
#include <kdebug.h>
@@ -47,7 +47,7 @@ namespace Gwenview {
#endif
// Helper functions for createContextInternal
-inline bool mimeTypeMatches(const QString& candidate, const QString& reference) {
+inline bool mimeTypeMatches(const TQString& candidate, const TQString& reference) {
if (reference=="*") return true;
if (reference.right(1)=="*") {
@@ -57,15 +57,15 @@ inline bool mimeTypeMatches(const QString& candidate, const QString& reference)
}
}
-inline bool isSubSetOf(const QStringList& subSet, const QStringList& set) {
+inline bool isSubSetOf(const TQStringList& subSet, const TQStringList& set) {
// Simple implementation, might need some optimization
- QStringList::ConstIterator itSubSet=subSet.begin();
- QStringList::ConstIterator itSetBegin=set.begin();
- QStringList::ConstIterator itSetEnd=set.end();
+ TQStringList::ConstIterator itSubSet=subSet.begin();
+ TQStringList::ConstIterator itSetBegin=set.begin();
+ TQStringList::ConstIterator itSetEnd=set.end();
for (; itSubSet!=subSet.end(); ++itSubSet) {
bool matchFound=false;
- QStringList::ConstIterator itSet=itSetBegin;
+ TQStringList::ConstIterator itSet=itSetBegin;
for (; itSet!=itSetEnd; ++itSet) {
if (mimeTypeMatches(*itSubSet, *itSet)) {
matchFound=true;
@@ -81,9 +81,9 @@ inline bool isSubSetOf(const QStringList& subSet, const QStringList& set) {
struct ExternalToolManagerPrivate {
- QDict<KDesktopFile> mDesktopFiles;
- QPtrList<KService> mServices;
- QString mUserToolDir;
+ TQDict<KDesktopFile> mDesktopFiles;
+ TQPtrList<KService> mServices;
+ TQString mUserToolDir;
/**
* Helper function for createContextInternal
@@ -95,49 +95,49 @@ struct ExternalToolManagerPrivate {
}
ExternalToolContext* createContextInternal(
- QObject* parent, const KURL::List& urls, const QStringList& mimeTypes)
+ TQObject* tqparent, const KURL::List& urls, const TQStringList& mimeTypes)
{
bool onlyOneURL=urls.size()==1;
// Only add to selectionServices the services which can handle all the
// different mime types present in the selection
//
- // We use std::list instead of QValueList because it's not possible to
+ // We use std::list instead of TQValueList because it's not possible to
// pass a sort functor to qHeapSort
std::list<KService*> selectionServices;
- QPtrListIterator<KService> it(mServices);
+ TQPtrListIterator<KService> it(mServices);
for (; it.current(); ++it) {
KService* service=it.current();
if (!onlyOneURL && !service->allowMultipleFiles()) {
continue;
}
- QStringList serviceTypes=service->serviceTypes();
+ TQStringList serviceTypes=service->serviceTypes();
if (isSubSetOf(mimeTypes, serviceTypes)) {
selectionServices.push_back(service);
}
}
selectionServices.sort(compareKServicePtrByName);
- return new ExternalToolContext(parent, selectionServices, urls);
+ return new ExternalToolContext(tqparent, selectionServices, urls);
}
};
// Helper function for ctor
-void loadDesktopFiles(QDict<KDesktopFile>& dict, const QString& dirString) {
- QDir dir(dirString);
- QStringList list=dir.entryList("*.desktop");
- QStringList::ConstIterator it=list.begin();
+void loadDesktopFiles(TQDict<KDesktopFile>& dict, const TQString& dirString) {
+ TQDir dir(dirString);
+ TQStringList list=dir.entryList("*.desktop");
+ TQStringList::ConstIterator it=list.begin();
for (; it!=list.end(); ++it) {
KDesktopFile* df=new KDesktopFile( dir.filePath(*it) );
dict.insert(*it, df);
}
}
-inline QString addSlash(const QString& _str) {
- QString str(_str);
+inline TQString addSlash(const TQString& _str) {
+ TQString str(_str);
if (str.right(1)!="/") str.append('/');
return str;
}
@@ -151,12 +151,12 @@ ExternalToolManager::ExternalToolManager() {
Q_ASSERT(!d->mUserToolDir.isEmpty());
LOG("d->mUserToolDir:" << d->mUserToolDir);
- QStringList dirs=KGlobal::dirs()->findDirs("appdata", "tools");
+ TQStringList dirs=KGlobal::dirs()->findDirs("appdata", "tools");
LOG("dirs:" << dirs.join(","));
// Loading desktop files
- QDict<KDesktopFile> systemDesktopFiles;
- QStringList::ConstIterator it;
+ TQDict<KDesktopFile> systemDesktopFiles;
+ TQStringList::ConstIterator it;
for (it=dirs.begin(); it!=dirs.end(); ++it) {
if (addSlash(*it)==d->mUserToolDir) {
LOG("skipping " << *it);
@@ -165,18 +165,18 @@ ExternalToolManager::ExternalToolManager() {
LOG("loading system desktop files from " << *it);
loadDesktopFiles(systemDesktopFiles, *it);
}
- QDict<KDesktopFile> userDesktopFiles;
+ TQDict<KDesktopFile> userDesktopFiles;
loadDesktopFiles(userDesktopFiles, d->mUserToolDir);
// Merge system and user desktop files into our KDesktopFile dictionary
d->mDesktopFiles=systemDesktopFiles;
d->mDesktopFiles.setAutoDelete(true);
- QDictIterator<KDesktopFile> itDict(userDesktopFiles);
+ TQDictIterator<KDesktopFile> itDict(userDesktopFiles);
for (; itDict.current(); ++itDict) {
- QString name=itDict.currentKey();
+ TQString name=itDict.currentKey();
KDesktopFile* df=itDict.current();
- if (d->mDesktopFiles.find(name)) {
+ if (d->mDesktopFiles.tqfind(name)) {
d->mDesktopFiles.remove(name);
}
if (df->readBoolEntry("Hidden")) {
@@ -204,7 +204,7 @@ ExternalToolManager* ExternalToolManager::instance() {
void ExternalToolManager::updateServices() {
d->mServices.clear();
- QDictIterator<KDesktopFile> it(d->mDesktopFiles);
+ TQDictIterator<KDesktopFile> it(d->mDesktopFiles);
for (; it.current(); ++it) {
KDesktopFile* desktopFile=it.current();
// If sync() is not called, KService does not read up to date content
@@ -215,14 +215,14 @@ void ExternalToolManager::updateServices() {
}
-QDict<KDesktopFile>& ExternalToolManager::desktopFiles() const {
+TQDict<KDesktopFile>& ExternalToolManager::desktopFiles() const {
return d->mDesktopFiles;
}
void ExternalToolManager::hideDesktopFile(KDesktopFile* desktopFile) {
- QFileInfo fi(desktopFile->fileName());
- QString name=QString("%1.desktop").arg( fi.baseName(true) );
+ TQFileInfo fi(desktopFile->fileName());
+ TQString name=TQString("%1.desktop").tqarg( fi.baseName(true) );
d->mDesktopFiles.take(name);
if (desktopFile->isReadOnly()) {
@@ -237,57 +237,57 @@ void ExternalToolManager::hideDesktopFile(KDesktopFile* desktopFile) {
KDesktopFile* ExternalToolManager::editSystemDesktopFile(const KDesktopFile* desktopFile) {
Q_ASSERT(desktopFile);
- QFileInfo fi(desktopFile->fileName());
+ TQFileInfo fi(desktopFile->fileName());
- QString name=fi.baseName(true);
- d->mDesktopFiles.remove(QString("%1.desktop").arg(name));
+ TQString name=fi.baseName(true);
+ d->mDesktopFiles.remove(TQString("%1.desktop").tqarg(name));
return createUserDesktopFile(name);
}
-KDesktopFile* ExternalToolManager::createUserDesktopFile(const QString& name) {
+KDesktopFile* ExternalToolManager::createUserDesktopFile(const TQString& name) {
Q_ASSERT(!name.isEmpty());
KDesktopFile* desktopFile=new KDesktopFile(
d->mUserToolDir + "/" + name + ".desktop", false);
- d->mDesktopFiles.insert(QString("%1.desktop").arg(name), desktopFile);
+ d->mDesktopFiles.insert(TQString("%1.desktop").tqarg(name), desktopFile);
return desktopFile;
}
ExternalToolContext* ExternalToolManager::createContext(
- QObject* parent, const KFileItemList* items)
+ TQObject* tqparent, const KFileItemList* items)
{
KURL::List urls;
- QStringList mimeTypes;
+ TQStringList mimeTypes;
// Create our URL list and a list of the different mime types present in
// the selection
- QPtrListIterator<KFileItem> it(*items);
+ TQPtrListIterator<KFileItem> it(*items);
for (; it.current(); ++it) {
urls.append(it.current()->url());
- QString mimeType=it.current()->mimetype();
- if (!mimeTypes.contains(mimeType)) {
+ TQString mimeType=it.current()->mimetype();
+ if (!mimeTypes.tqcontains(mimeType)) {
mimeTypes.append(mimeType);
}
}
- return d->createContextInternal(parent, urls, mimeTypes);
+ return d->createContextInternal(tqparent, urls, mimeTypes);
}
ExternalToolContext* ExternalToolManager::createContext(
- QObject* parent, const KURL& url)
+ TQObject* tqparent, const KURL& url)
{
KURL::List urls;
- QStringList mimeTypes;
+ TQStringList mimeTypes;
urls.append(url);
- QString mimeType=KMimeType::findByURL(url, 0, url.isLocalFile(), true)->name();
+ TQString mimeType=KMimeType::findByURL(url, 0, url.isLocalFile(), true)->name();
mimeTypes.append(mimeType);
- return d->createContextInternal(parent, urls, mimeTypes);
+ return d->createContextInternal(tqparent, urls, mimeTypes);
}
diff --git a/src/gvcore/externaltoolmanager.h b/src/gvcore/externaltoolmanager.h
index fd767e3..96a6706 100644
--- a/src/gvcore/externaltoolmanager.h
+++ b/src/gvcore/externaltoolmanager.h
@@ -21,9 +21,9 @@ Copyright 2000-2004 Aur�lien G�teau
#ifndef EXTERNALTOOLMANAGER_H
#define EXTERNALTOOLMANAGER_H
-// Qt
-#include <qdict.h>
-#include <qptrlist.h>
+// TQt
+#include <tqdict.h>
+#include <tqptrlist.h>
// KDE
#include <kfileitem.h>
@@ -42,16 +42,16 @@ class LIBGWENVIEW_EXPORT ExternalToolManager {
public:
~ExternalToolManager();
- ExternalToolContext* createContext(QObject* parent, const KFileItemList*);
- ExternalToolContext* createContext(QObject* parent, const KURL&);
+ ExternalToolContext* createContext(TQObject* tqparent, const KFileItemList*);
+ ExternalToolContext* createContext(TQObject* tqparent, const KURL&);
static ExternalToolManager* instance();
- QDict<KDesktopFile>& desktopFiles() const;
+ TQDict<KDesktopFile>& desktopFiles() const;
void hideDesktopFile(KDesktopFile*);
// Create a new desktop file
- KDesktopFile* createUserDesktopFile(const QString& name);
+ KDesktopFile* createUserDesktopFile(const TQString& name);
// Create a desktop file based on a existing (system) desktop file
KDesktopFile* editSystemDesktopFile(const KDesktopFile* desktopFile);
diff --git a/src/gvcore/filedetailview.cpp b/src/gvcore/filedetailview.cpp
index 9ba2c0d..5cce441 100644
--- a/src/gvcore/filedetailview.cpp
+++ b/src/gvcore/filedetailview.cpp
@@ -22,13 +22,13 @@
Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qheader.h>
-#include <qkeycode.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+// TQt
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqheader.h>
+#include <tqkeycode.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
// KDE
#include <kapplication.h>
@@ -49,18 +49,18 @@
namespace Gwenview {
-static QPixmap createShownItemPixmap(int size, const QColor& color) {
- QPixmap pix(size, size);
- pix.fill(Qt::red);
- QPainter painter(&pix);
+static TQPixmap createShownItemPixmap(int size, const TQColor& color) {
+ TQPixmap pix(size, size);
+ pix.fill(TQt::red);
+ TQPainter painter(&pix);
int margin = 2;
- QPointArray pa(3);
+ TQPointArray pa(3);
int arrowSize = size/2 - margin;
int center = size/2 - 1;
- pa[0] = QPoint((size - arrowSize) / 2, center - arrowSize);
- pa[1] = QPoint((size + arrowSize) / 2, center);
- pa[2] = QPoint(pa[0].x(), center + arrowSize);
+ pa[0] = TQPoint((size - arrowSize) / 2, center - arrowSize);
+ pa[1] = TQPoint((size + arrowSize) / 2, center);
+ pa[2] = TQPoint(pa[0].x(), center + arrowSize);
painter.setBrush(color);
painter.setPen(color);
@@ -73,8 +73,8 @@ static QPixmap createShownItemPixmap(int size, const QColor& color) {
}
-FileDetailView::FileDetailView(QWidget *parent, const char *name)
- : KListView(parent, name), FileViewBase()
+FileDetailView::FileDetailView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name), FileViewBase()
{
mSortingCol = COL_NAME;
mBlockSortingSignal = false;
@@ -88,29 +88,29 @@ FileDetailView::FileDetailView(QWidget *parent, const char *name)
setShowSortIndicator( TRUE );
setAllColumnsShowFocus( TRUE );
- connect( header(), SIGNAL( sectionClicked(int)),
- SLOT(slotSortingChanged(int) ));
+ connect( header(), TQT_SIGNAL( sectionClicked(int)),
+ TQT_SLOT(slotSortingChanged(int) ));
- connect( this, SIGNAL( returnPressed(QListViewItem *) ),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQListViewItem *) ),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint&, int)),
- SLOT( selected( QListViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QListViewItem *, const QPoint&, int)),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( selected( TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL(contextMenuRequested( QListViewItem *,
- const QPoint &, int )),
- this, SLOT( slotActivateMenu( QListViewItem *, const QPoint& )));
+ connect( this, TQT_SIGNAL(contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int )),
+ this, TQT_SLOT( slotActivateMenu( TQListViewItem *, const TQPoint& )));
- QListView::setSelectionMode( QListView::Extended );
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ TQListView::setSelectionMode( TQListView::Extended );
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
// FileViewStack need to be aware of sort changes, to update the sort menu
- connect( sig, SIGNAL(sortingChanged(QDir::SortSpec)),
- this, SIGNAL(sortingChanged(QDir::SortSpec)) );
+ connect( sig, TQT_SIGNAL(sortingChanged(TQDir::SortSpec)),
+ this, TQT_SIGNAL(sortingChanged(TQDir::SortSpec)) );
setSorting( sorting() );
@@ -125,8 +125,8 @@ FileDetailView::FileDetailView(QWidget *parent, const char *name)
setDropHighlighter(false);
int size = IconSize(KIcon::Small);
- mShownItemUnselectedPixmap = createShownItemPixmap(size, colorGroup().highlight());
- mShownItemSelectedPixmap = createShownItemPixmap(size, colorGroup().highlightedText());
+ mShownItemUnselectedPixmap = createShownItemPixmap(size, tqcolorGroup().highlight());
+ mShownItemSelectedPixmap = createShownItemPixmap(size, tqcolorGroup().highlightedText());
}
@@ -173,7 +173,7 @@ void FileDetailView::invertSelection()
KListView::invertSelection();
}
-void FileDetailView::slotActivateMenu (QListViewItem *item,const QPoint& pos )
+void FileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -194,7 +194,7 @@ void FileDetailView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- FileDetailViewItem *item = new FileDetailViewItem( (QListView*) this, i );
+ FileDetailViewItem *item = new FileDetailViewItem( (TQListView*) this, i );
setSortingKey( item, i );
@@ -204,7 +204,7 @@ void FileDetailView::insertItem( KFileItem *i )
mResolver->m_lstPendingMimeIconItems.append( item );
}
-void FileDetailView::slotActivate( QListViewItem *item )
+void FileDetailView::slotActivate( TQListViewItem *item )
{
if ( !item ) return;
@@ -212,7 +212,7 @@ void FileDetailView::slotActivate( QListViewItem *item )
if ( fi ) sig->activate( fi );
}
-void FileDetailView::selected( QListViewItem *item )
+void FileDetailView::selected( TQListViewItem *item )
{
if ( !item ) return;
@@ -223,7 +223,7 @@ void FileDetailView::selected( QListViewItem *item )
}
}
-void FileDetailView::highlighted( QListViewItem *item )
+void FileDetailView::highlighted( TQListViewItem *item )
{
if ( !item ) return;
@@ -245,7 +245,7 @@ void FileDetailView::updateView( bool b )
{
if ( !b ) return;
- QListViewItemIterator it( (QListView*)this );
+ TQListViewItemIterator it( (TQListView*)this );
for ( ; it.current(); ++it ) {
FileDetailViewItem *item=static_cast<FileDetailViewItem *>(it.current());
item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) );
@@ -266,15 +266,15 @@ void FileDetailView::updateView( const KFileItem *i )
void FileDetailView::setSortingKey( FileDetailViewItem *dvItem, const KFileItem *item)
{
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
bool isDirOrArchive=item->isDir() || Archive::fileItemIsArchive(item);
- QString key;
- if ( spec & QDir::Time ) {
+ TQString key;
+ if ( spec & TQDir::Time ) {
time_t time = TimeUtils::getTime(item);
key=sortingKey(time, isDirOrArchive, spec);
- } else if ( spec & QDir::Size ) {
+ } else if ( spec & TQDir::Size ) {
key=sortingKey( item->size(), isDirOrArchive, spec );
} else {
@@ -300,46 +300,46 @@ void FileDetailView::removeItem( const KFileItem *i )
void FileDetailView::slotSortingChanged( int col )
{
- QDir::SortSpec sort = sorting();
+ TQDir::SortSpec sort = sorting();
int sortSpec = -1;
- bool reversed = col == mSortingCol && (sort & QDir::Reversed) == 0;
+ bool reversed = col == mSortingCol && (sort & TQDir::Reversed) == 0;
mSortingCol = col;
switch( col ) {
case COL_NAME:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Name);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name);
break;
case COL_SIZE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Size);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size);
break;
case COL_DATE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Time);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time);
break;
- // the following columns have no equivalent in QDir, so we set it
- // to QDir::Unsorted and remember the column (mSortingCol)
+ // the following columns have no equivalent in TQDir, so we set it
+ // to TQDir::Unsorted and remember the column (mSortingCol)
case COL_OWNER:
case COL_GROUP:
case COL_PERM:
- // grmbl, QDir::Unsorted == SortByMask.
- sortSpec = (sort & ~QDir::SortByMask);// | QDir::Unsorted;
+ // grmbl, TQDir::Unsorted == SortByMask.
+ sortSpec = (sort & ~TQDir::SortByMask);// | TQDir::Unsorted;
break;
default:
break;
}
if ( reversed )
- sortSpec |= QDir::Reversed;
+ sortSpec |= TQDir::Reversed;
else
- sortSpec &= ~QDir::Reversed;
+ sortSpec &= ~TQDir::Reversed;
- if ( sort & QDir::IgnoreCase )
- sortSpec |= QDir::IgnoreCase;
+ if ( sort & TQDir::IgnoreCase )
+ sortSpec |= TQDir::IgnoreCase;
else
- sortSpec &= ~QDir::IgnoreCase;
+ sortSpec &= ~TQDir::IgnoreCase;
- KFileView::setSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ KFileView::setSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
KFileItem *item;
KFileItemListIterator it( *items() );
@@ -352,30 +352,30 @@ void FileDetailView::slotSortingChanged( int col )
KListView::setSorting( mSortingCol, !reversed );
KListView::sort();
- if (!mBlockSortingSignal) sig->changeSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ if (!mBlockSortingSignal) sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
}
-void FileDetailView::setSorting( QDir::SortSpec spec )
+void FileDetailView::setSorting( TQDir::SortSpec spec )
{
int col = 0;
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
col = COL_DATE;
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
col = COL_SIZE;
- else if ( spec & QDir::Unsorted )
+ else if ( spec & TQDir::Unsorted )
col = mSortingCol;
else
col = COL_NAME;
// inversed, because slotSortingChanged will reverse it
- if ( spec & QDir::Reversed )
- spec = (QDir::SortSpec) (spec & ~QDir::Reversed);
+ if ( spec & TQDir::Reversed )
+ spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed);
else
- spec = (QDir::SortSpec) (spec | QDir::Reversed);
+ spec = (TQDir::SortSpec) (spec | TQDir::Reversed);
mSortingCol = col;
- KFileView::setSorting( (QDir::SortSpec) spec );
+ KFileView::setSorting( (TQDir::SortSpec) spec );
// don't emit sortingChanged() when called via setSorting()
@@ -432,7 +432,7 @@ KFileItem * FileDetailView::prevItem( const KFileItem *fileItem ) const
return firstFileItem();
}
-void FileDetailView::keyPressEvent( QKeyEvent *e )
+void FileDetailView::keyPressEvent( TQKeyEvent *e )
{
KListView::keyPressEvent( e );
@@ -469,19 +469,19 @@ void FileDetailView::startDrag()
* The item drawer for DragPixmapGenerator
*/
struct ItemDrawer : public DragPixmapItemDrawer<KFileItem*> {
- ItemDrawer(const QFontMetrics& fontMetrics)
+ ItemDrawer(const TQFontMetrics& fontMetrics)
: mFontMetrics(fontMetrics) {}
- QSize itemSize(KFileItem* fileItem) {
- if (!fileItem) return QSize();
- QString name = fileItem->name();
- int width = QMIN(mGenerator->maxWidth(), mFontMetrics.width(name));
+ TQSize itemSize(KFileItem* fileItem) {
+ if (!fileItem) return TQSize();
+ TQString name = fileItem->name();
+ int width = TQMIN(mGenerator->maxWidth(), mFontMetrics.width(name));
int height = mFontMetrics.height();
- return QSize(width, height);
+ return TQSize(width, height);
}
- void drawItem(QPainter* painter, int left, int top, KFileItem* fileItem) {
- QString name = fileItem->name();
+ void drawItem(TQPainter* painter, int left, int top, KFileItem* fileItem) {
+ TQString name = fileItem->name();
painter->save();
KWordWrap::drawFadeoutText(painter,
left, top + mFontMetrics.ascent(),
@@ -489,7 +489,7 @@ void FileDetailView::startDrag()
painter->restore();
}
- QFontMetrics mFontMetrics;
+ TQFontMetrics mFontMetrics;
};
ItemDrawer drawer(fontMetrics());
@@ -510,10 +510,10 @@ void FileDetailView::startDrag()
return;
}
- QDragObject* drag=new KURLDrag(urls, this, 0);
- QPixmap dragPixmap = generator.generate();
+ TQDragObject* drag=new KURLDrag(urls, this, 0);
+ TQPixmap dragPixmap = generator.generate();
- drag->setPixmap( dragPixmap, QPoint(-generator.DRAG_OFFSET, -generator.DRAG_OFFSET));
+ drag->setPixmap( dragPixmap, TQPoint(-generator.DRAG_OFFSET, -generator.DRAG_OFFSET));
drag->dragCopy();
}
@@ -525,8 +525,8 @@ void FileDetailView::setShownFileItem(KFileItem* fileItem)
FileDetailViewItem* newShownItem=viewItem(fileItem);
FileViewBase::setShownFileItem(fileItem);
- if (oldShownItem) oldShownItem->repaint();
- if (newShownItem) newShownItem->repaint();
+ if (oldShownItem) oldShownItem->tqrepaint();
+ if (newShownItem) newShownItem->tqrepaint();
}
@@ -535,13 +535,13 @@ void FileDetailView::setShownFileItem(KFileItem* fileItem)
// Drop support
//
//----------------------------------------------------------------------
-bool FileDetailView::acceptDrag(QDropEvent* event) const {
+bool FileDetailView::acceptDrag(TQDropEvent* event) const {
return KURLDrag::canDecode(event);
}
-void FileDetailView::contentsDropEvent(QDropEvent *event) {
+void FileDetailView::contentsDropEvent(TQDropEvent *event) {
KFileItem* fileItem=0L;
- QListViewItem *item=itemAt(contentsToViewport(event->pos() ) );
+ TQListViewItem *item=itemAt(contentsToViewport(event->pos() ) );
if (item) {
fileItem=static_cast<FileDetailViewItem*>(item)->fileInfo();
diff --git a/src/gvcore/filedetailview.h b/src/gvcore/filedetailview.h
index 2d8c988..346f618 100644
--- a/src/gvcore/filedetailview.h
+++ b/src/gvcore/filedetailview.h
@@ -25,11 +25,11 @@
#define FILEDETAILVIEW_H
class KFileItem;
-class QWidget;
-class QKeyEvent;
+class TQWidget;
+class TQKeyEvent;
-// Qt includes
-#include <qdir.h>
+// TQt includes
+#include <tqdir.h>
// KDE includes
#include <klistview.h>
@@ -44,14 +44,15 @@ class FileDetailViewItem;
class FileDetailView : public KListView, public FileViewBase
{
Q_OBJECT
+ TQ_OBJECT
friend class FileDetailViewItem;
public:
- FileDetailView(QWidget* parent, const char* name);
+ FileDetailView(TQWidget* tqparent, const char* name);
virtual ~FileDetailView();
- virtual QWidget* widget() { return this; }
+ virtual TQWidget* widget() { return this; }
virtual void clearView();
virtual void updateView( bool );
@@ -74,25 +75,25 @@ public:
virtual void insertItem( KFileItem* i );
// implemented to get noticed about sorting changes (for sortingIndicator)
- virtual void setSorting( QDir::SortSpec );
+ virtual void setSorting( TQDir::SortSpec );
void ensureItemVisible( const KFileItem* );
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( FileDetailViewItem* item );
- QScrollView* scrollWidget() { return this; }
+ TQScrollView* scrollWidget() { return this; }
void setShownFileItem(KFileItem* fileItem);
signals:
- void dropped(QDropEvent* event, KFileItem* item);
- void sortingChanged(QDir::SortSpec);
+ void dropped(TQDropEvent* event, KFileItem* item);
+ void sortingChanged(TQDir::SortSpec);
protected:
- virtual bool acceptDrag(QDropEvent*) const;
- virtual void contentsDropEvent(QDropEvent*);
- virtual void keyPressEvent(QKeyEvent*);
+ virtual bool acceptDrag(TQDropEvent*) const;
+ virtual void contentsDropEvent(TQDropEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
int mSortingCol;
@@ -101,18 +102,18 @@ protected slots:
private slots:
void slotSortingChanged( int );
- void selected( QListViewItem* item );
- void slotActivate( QListViewItem* item );
- void highlighted( QListViewItem* item );
- void slotActivateMenu ( QListViewItem* item, const QPoint& pos );
+ void selected( TQListViewItem* item );
+ void slotActivate( TQListViewItem* item );
+ void highlighted( TQListViewItem* item );
+ void slotActivateMenu ( TQListViewItem* item, const TQPoint& pos );
private:
bool mBlockSortingSignal;
KMimeTypeResolver<FileDetailViewItem,FileDetailView>* mResolver;
- virtual void insertItem(QListViewItem* i) { KListView::insertItem(i); }
+ virtual void insertItem(TQListViewItem* i) { KListView::insertItem(i); }
virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); }
- virtual void setSelected(QListViewItem* i, bool b) { KListView::setSelected(i, b); }
+ virtual void setSelected(TQListViewItem* i, bool b) { KListView::setSelected(i, b); }
FileDetailViewItem* viewItem( const KFileItem* item ) const {
if (item) return (FileDetailViewItem*)item->extraData(this);
@@ -123,8 +124,8 @@ private:
void startDrag();
- QPixmap mShownItemSelectedPixmap;
- QPixmap mShownItemUnselectedPixmap;
+ TQPixmap mShownItemSelectedPixmap;
+ TQPixmap mShownItemUnselectedPixmap;
};
diff --git a/src/gvcore/filedetailviewitem.cpp b/src/gvcore/filedetailviewitem.cpp
index d879744..6d5fead 100644
--- a/src/gvcore/filedetailviewitem.cpp
+++ b/src/gvcore/filedetailviewitem.cpp
@@ -47,8 +47,8 @@ void FileDetailViewItem::init()
}
-const QPixmap* FileDetailViewItem::pixmap(int column) const {
- const QPixmap* normalPix = KListViewItem::pixmap(column);
+const TQPixmap* FileDetailViewItem::pixmap(int column) const {
+ const TQPixmap* normalPix = KListViewItem::pixmap(column);
if (column!=0) {
return normalPix;
}
diff --git a/src/gvcore/filedetailviewitem.h b/src/gvcore/filedetailviewitem.h
index c67a34b..ef769a9 100644
--- a/src/gvcore/filedetailviewitem.h
+++ b/src/gvcore/filedetailviewitem.h
@@ -39,22 +39,22 @@ namespace Gwenview {
class FileDetailViewItem : public KListViewItem
{
public:
- FileDetailViewItem( QListView* parent, const QString &text,
- const QPixmap &icon, KFileItem* fi )
- : KListViewItem( parent, text ), inf( fi ) {
+ FileDetailViewItem( TQListView* tqparent, const TQString &text,
+ const TQPixmap &icon, KFileItem* fi )
+ : KListViewItem( tqparent, text ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
}
- FileDetailViewItem( QListView* parent, KFileItem* fi )
- : KListViewItem( parent ), inf( fi ) {
+ FileDetailViewItem( TQListView* tqparent, KFileItem* fi )
+ : KListViewItem( tqparent ), inf( fi ) {
init();
}
- FileDetailViewItem( QListView* parent, const QString &text,
- const QPixmap &icon, KFileItem* fi,
- QListViewItem* after)
- : KListViewItem( parent, after ), inf( fi ) {
+ FileDetailViewItem( TQListView* tqparent, const TQString &text,
+ const TQPixmap &icon, KFileItem* fi,
+ TQListViewItem* after)
+ : KListViewItem( tqparent, after ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
}
@@ -65,23 +65,23 @@ public:
KFileItem* fileInfo() const { return inf; }
- virtual QString key( int /*column*/, bool /*ascending*/ ) const { return m_key; }
+ virtual TQString key( int /*column*/, bool /*ascending*/ ) const { return m_key; }
- void setKey( const QString& key ) { m_key = key; }
+ void setKey( const TQString& key ) { m_key = key; }
- QRect rect() const
+ TQRect rect() const
{
- QRect r = listView()->itemRect(this);
- return QRect( listView()->viewportToContents( r.topLeft() ),
- QSize( r.width(), r.height() ) );
+ TQRect r = listView()->tqitemRect(this);
+ return TQRect( listView()->viewportToContents( r.topLeft() ),
+ TQSize( r.width(), r.height() ) );
}
void init();
- virtual const QPixmap* pixmap(int column) const;
+ virtual const TQPixmap* pixmap(int column) const;
private:
KFileItem* inf;
- QString m_key;
+ TQString m_key;
};
} // namespace
diff --git a/src/gvcore/fileoperation.cpp b/src/gvcore/fileoperation.cpp
index fd113cc..8213fcb 100644
--- a/src/gvcore/fileoperation.cpp
+++ b/src/gvcore/fileoperation.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Self
#include "fileoperation.moc"
-// Qt
-#include <qcursor.h>
-#include <qpopupmenu.h>
-#include <qobject.h>
+// TQt
+#include <tqcursor.h>
+#include <tqpopupmenu.h>
+#include <tqobject.h>
// KDE
#include <kconfig.h>
@@ -40,69 +40,69 @@ namespace Gwenview {
namespace FileOperation {
-void copyTo(const KURL::List& srcURL,QWidget* parent) {
- FileOpObject* op=new FileOpCopyToObject(srcURL,parent);
+void copyTo(const KURL::List& srcURL,TQWidget* tqparent) {
+ FileOpObject* op=new FileOpCopyToObject(srcURL,tqparent);
(*op)();
}
-void linkTo(const KURL::List& srcURL,QWidget* parent) {
- FileOpObject* op=new FileOpLinkToObject(srcURL,parent);
+void linkTo(const KURL::List& srcURL,TQWidget* tqparent) {
+ FileOpObject* op=new FileOpLinkToObject(srcURL,tqparent);
(*op)();
}
-void moveTo(const KURL::List& srcURL,QWidget* parent,QObject* receiver,const char* slot) {
- FileOpObject* op=new FileOpMoveToObject(srcURL,parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(success()),receiver,slot);
+void moveTo(const KURL::List& srcURL,TQWidget* tqparent,TQObject* receiver,const char* slot) {
+ FileOpObject* op=new FileOpMoveToObject(srcURL,tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(success()),receiver,slot);
(*op)();
}
-void makeDir(const KURL& parentURL, QWidget* parent, QObject* receiver, const char* slot) {
- FileOpObject* op=new FileOpMakeDirObject(parentURL, parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(success()),receiver,slot);
+void makeDir(const KURL& tqparentURL, TQWidget* tqparent, TQObject* receiver, const char* slot) {
+ FileOpObject* op=new FileOpMakeDirObject(tqparentURL, tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(success()),receiver,slot);
(*op)();
}
-void del(const KURL::List& url,QWidget* parent,QObject* receiver,const char* slot) {
- FileOpObject* op = new FileOpDelObject(url,parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(success()),receiver,slot);
+void del(const KURL::List& url,TQWidget* tqparent,TQObject* receiver,const char* slot) {
+ FileOpObject* op = new FileOpDelObject(url,tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(success()),receiver,slot);
(*op)();
}
-void trash(const KURL::List& url, QWidget* parent, QObject* receiver, const char* slot) {
- FileOpObject* op = new FileOpTrashObject(url,parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(success()),receiver,slot);
+void trash(const KURL::List& url, TQWidget* tqparent, TQObject* receiver, const char* slot) {
+ FileOpObject* op = new FileOpTrashObject(url,tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(success()),receiver,slot);
(*op)();
}
-void realDelete(const KURL::List& url, QWidget* parent, QObject* receiver, const char* slot) {
- FileOpObject* op = new FileOpRealDeleteObject(url,parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(success()),receiver,slot);
+void realDelete(const KURL::List& url, TQWidget* tqparent, TQObject* receiver, const char* slot) {
+ FileOpObject* op = new FileOpRealDeleteObject(url,tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(success()),receiver,slot);
(*op)();
}
-void rename(const KURL& url,QWidget* parent,QObject* receiver,const char* slot) {
- FileOpObject* op=new FileOpRenameObject(url,parent);
- if (receiver && slot) QObject::connect(op,SIGNAL(renamed(const QString&)),receiver,slot);
+void rename(const KURL& url,TQWidget* tqparent,TQObject* receiver,const char* slot) {
+ FileOpObject* op=new FileOpRenameObject(url,tqparent);
+ if (receiver && slot) TQObject::connect(op,TQT_SIGNAL(renamed(const TQString&)),receiver,slot);
(*op)();
}
-void fillDropURLMenu(QPopupMenu* menu, const KURL::List& urls, const KURL& target, bool* wasMoved) {
- DropMenuContext* context=new DropMenuContext(menu, urls, target, wasMoved);
+void fillDropURLMenu(TQPopupMenu* menu, const KURL::List& urls, const KURL& target, bool* wasMoved) {
+ DropMenuContext* context=new DropMenuContext(TQT_TQOBJECT(menu), urls, target, wasMoved);
menu->insertItem( SmallIcon("goto"), i18n("&Move Here"),
- context, SLOT(move()) );
+ context, TQT_SLOT(move()) );
menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"),
- context, SLOT(copy()) );
+ context, TQT_SLOT(copy()) );
menu->insertItem( SmallIcon("www"), i18n("&Link Here"),
- context, SLOT(link()) );
+ context, TQT_SLOT(link()) );
}
-void openDropURLMenu(QWidget* parent, const KURL::List& urls, const KURL& target, bool* wasMoved) {
- QPopupMenu menu(parent);
+void openDropURLMenu(TQWidget* tqparent, const KURL::List& urls, const KURL& target, bool* wasMoved) {
+ TQPopupMenu menu(tqparent);
if (wasMoved) *wasMoved=false;
fillDropURLMenu(&menu, urls, target, wasMoved);
@@ -110,7 +110,7 @@ void openDropURLMenu(QWidget* parent, const KURL::List& urls, const KURL& target
menu.insertItem( SmallIcon("cancel"), i18n("Cancel") );
menu.setMouseTracking(true);
- menu.exec(QCursor::pos());
+ menu.exec(TQCursor::pos());
}
diff --git a/src/gvcore/fileoperation.h b/src/gvcore/fileoperation.h
index 5ac7115..163682b 100644
--- a/src/gvcore/fileoperation.h
+++ b/src/gvcore/fileoperation.h
@@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "libgwenview_export.h"
-class QPopupMenu;
-class QWidget;
+class TQPopupMenu;
+class TQWidget;
namespace Gwenview {
/**
@@ -39,24 +39,25 @@ namespace Gwenview {
*/
namespace FileOperation {
-LIBGWENVIEW_EXPORT void copyTo(const KURL::List&,QWidget* parent=0L);
-LIBGWENVIEW_EXPORT void moveTo(const KURL::List&,QWidget* parent,QObject* receiver=0L,const char* slot=0L);
-LIBGWENVIEW_EXPORT void linkTo(const KURL::List& srcURL,QWidget* parent);
-LIBGWENVIEW_EXPORT void makeDir(const KURL& parentURL, QWidget* parent, QObject* receiver=0L, const char* slot=0L);
-LIBGWENVIEW_EXPORT void del(const KURL::List&,QWidget* parent,QObject* receiver=0L,const char* slot=0L);
-LIBGWENVIEW_EXPORT void trash(const KURL::List&,QWidget* parent,QObject* receiver=0L,const char* slot=0L);
-LIBGWENVIEW_EXPORT void realDelete(const KURL::List&,QWidget* parent,QObject* receiver=0L,const char* slot=0L);
-LIBGWENVIEW_EXPORT void rename(const KURL&,QWidget* parent,QObject* receiver=0L,const char* slot=0L);
+LIBGWENVIEW_EXPORT void copyTo(const KURL::List&,TQWidget* tqparent=0L);
+LIBGWENVIEW_EXPORT void moveTo(const KURL::List&,TQWidget* tqparent,TQObject* receiver=0L,const char* slot=0L);
+LIBGWENVIEW_EXPORT void linkTo(const KURL::List& srcURL,TQWidget* tqparent);
+LIBGWENVIEW_EXPORT void makeDir(const KURL& tqparentURL, TQWidget* tqparent, TQObject* receiver=0L, const char* slot=0L);
+LIBGWENVIEW_EXPORT void del(const KURL::List&,TQWidget* tqparent,TQObject* receiver=0L,const char* slot=0L);
+LIBGWENVIEW_EXPORT void trash(const KURL::List&,TQWidget* tqparent,TQObject* receiver=0L,const char* slot=0L);
+LIBGWENVIEW_EXPORT void realDelete(const KURL::List&,TQWidget* tqparent,TQObject* receiver=0L,const char* slot=0L);
+LIBGWENVIEW_EXPORT void rename(const KURL&,TQWidget* tqparent,TQObject* receiver=0L,const char* slot=0L);
/**
* @internal
*/
-class DropMenuContext : public QObject {
+class DropMenuContext : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- DropMenuContext(QObject* parent, const KURL::List& src, const KURL& dst, bool* wasMoved)
- : QObject(parent)
+ DropMenuContext(TQObject* tqparent, const KURL::List& src, const KURL& dst, bool* wasMoved)
+ : TQObject(tqparent)
, mSrc(src)
, mDst(dst)
, mWasMoved(wasMoved)
@@ -85,8 +86,8 @@ private:
};
-LIBGWENVIEW_EXPORT void fillDropURLMenu(QPopupMenu*, const KURL::List&, const KURL& target, bool* wasMoved=0L);
-LIBGWENVIEW_EXPORT void openDropURLMenu(QWidget* parent, const KURL::List&, const KURL& target, bool* wasMoved=0L);
+LIBGWENVIEW_EXPORT void fillDropURLMenu(TQPopupMenu*, const KURL::List&, const KURL& target, bool* wasMoved=0L);
+LIBGWENVIEW_EXPORT void openDropURLMenu(TQWidget* tqparent, const KURL::List&, const KURL& target, bool* wasMoved=0L);
} // namespace
diff --git a/src/gvcore/fileopobject.cpp b/src/gvcore/fileopobject.cpp
index 0d565b5..38dbe6b 100644
--- a/src/gvcore/fileopobject.cpp
+++ b/src/gvcore/fileopobject.cpp
@@ -19,10 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qfile.h>
-#include <qstylesheet.h>
-#include <qwidget.h>
+// TQt
+#include <tqfile.h>
+#include <tqstylesheet.h>
+#include <tqwidget.h>
// KDE
#include <kdeversion.h>
@@ -51,8 +51,8 @@ namespace Gwenview {
*/
class DirSelectDialog : public KFileDialog {
public:
- DirSelectDialog(const QString& startDir, QWidget* parent)
- : KFileDialog(startDir, QString::null, parent, "dirselectdialog", true) {
+ DirSelectDialog(const TQString& startDir, TQWidget* tqparent)
+ : KFileDialog(startDir, TQString(), tqparent, "dirselectdialog", true) {
locationEdit->setEnabled(false);
filterWidget->setEnabled(false);
setMode(KFile::Directory | KFile::ExistingOnly);
@@ -64,15 +64,15 @@ public:
//-FileOpObject--------------------------------------------------------------------
-FileOpObject::FileOpObject(const KURL& url,QWidget* parent)
-: mParent(parent)
+FileOpObject::FileOpObject(const KURL& url,TQWidget* tqparent)
+: mParent(tqparent)
{
mURLList.append(url);
}
-FileOpObject::FileOpObject(const KURL::List& list,QWidget* parent)
-: mParent(parent), mURLList(list)
+FileOpObject::FileOpObject(const KURL::List& list,TQWidget* tqparent)
+: mParent(tqparent), mURLList(list)
{}
@@ -89,9 +89,9 @@ void FileOpObject::slotResult(KIO::Job* job) {
void FileOpObject::polishJob(KIO::Job* job) {
- job->setWindow(mParent->topLevelWidget());
- connect( job, SIGNAL( result(KIO::Job*) ),
- this, SLOT( slotResult(KIO::Job*) ) );
+ job->setWindow(mParent->tqtopLevelWidget());
+ connect( job, TQT_SIGNAL( result(KIO::Job*) ),
+ this, TQT_SLOT( slotResult(KIO::Job*) ) );
}
@@ -102,13 +102,13 @@ void FileOpCopyToObject::operator()() {
KURL destURL;
if (FileOperationConfig::confirmCopy()) {
- QString destDir = FileOperationConfig::destDir();
+ TQString destDir = FileOperationConfig::destDir();
if( !destDir.isEmpty()) {
destDir += "/";
}
if (mURLList.size()==1) {
destURL=KFileDialog::getSaveURL(destDir + mURLList.first().fileName(),
- QString::null, mParent, i18n("Copy File"));
+ TQString(), mParent, i18n("Copy File"));
} else {
DirSelectDialog dialog(destDir, mParent);
dialog.setCaption(i18n("Select Folder Where Files Will be Copied"));
@@ -134,13 +134,13 @@ void FileOpLinkToObject::operator()() {
KURL destURL;
if (FileOperationConfig::confirmCopy()) {
- QString destDir = FileOperationConfig::destDir();
+ TQString destDir = FileOperationConfig::destDir();
if( !destDir.isEmpty()) {
destDir += "/";
}
if (mURLList.size()==1) {
destURL=KFileDialog::getSaveURL(destDir + mURLList.first().fileName(),
- QString::null, mParent, i18n("Link File"));
+ TQString(), mParent, i18n("Link File"));
} else {
DirSelectDialog dialog(destDir, mParent);
dialog.setCaption(i18n("Select Folder Where the Files Will be Linked"));
@@ -163,13 +163,13 @@ void FileOpMoveToObject::operator()() {
KURL destURL;
if (FileOperationConfig::confirmMove()) {
- QString destDir = FileOperationConfig::destDir();
+ TQString destDir = FileOperationConfig::destDir();
if( !destDir.isEmpty()) {
destDir += "/";
}
if (mURLList.size()==1) {
destURL=KFileDialog::getSaveURL(destDir + mURLList.first().fileName(),
- QString::null, mParent, i18n("Move File"));
+ TQString(), mParent, i18n("Move File"));
} else {
DirSelectDialog dialog(destDir, mParent);
dialog.setCaption(i18n("Select Folder Where Files Will be Moved"));
@@ -195,7 +195,7 @@ void FileOpMakeDirObject::operator()() {
dlg.setButtonOK( KGuiItem(i18n("Create Folder"), "folder_new") );
if (!dlg.exec()) return;
- QString newDir = dlg.lineEdit()->text();
+ TQString newDir = dlg.lineEdit()->text();
KURL newURL(mURLList.first());
newURL.addPath(newDir);
@@ -249,7 +249,7 @@ void FileOpTrashObject::operator()() {
if (FileOperationConfig::confirmDelete()) {
int response;
if (mURLList.count()>1) {
- QStringList fileList;
+ TQStringList fileList;
KURL::List::ConstIterator it=mURLList.begin();
for (; it!=mURLList.end(); ++it) {
fileList.append((*it).filename());
@@ -257,9 +257,9 @@ void FileOpTrashObject::operator()() {
response=KMessageBox::warningContinueCancelList(mParent,
i18n("Do you really want to trash these files?"),fileList,i18n("Trash used as a verb", "Trash Files"),KGuiItem(i18n("Trash used as a verb", "&Trash"),"edittrash"));
} else {
- QString filename=QStyleSheet::escape(mURLList.first().filename());
+ TQString filename=TQStyleSheet::escape(mURLList.first().filename());
response=KMessageBox::warningContinueCancel(mParent,
- i18n("<p>Do you really want to move <b>%1</b> to the trash?</p>").arg(filename),i18n("Trash used as a verb", "Trash File"),KGuiItem(i18n("Trash used as a verb", "&Trash"),"edittrash"));
+ i18n("<p>Do you really want to move <b>%1</b> to the trash?</p>").tqarg(filename),i18n("Trash used as a verb", "Trash File"),KGuiItem(i18n("Trash used as a verb", "&Trash"),"edittrash"));
}
if (response!=KMessageBox::Continue) return;
}
@@ -274,7 +274,7 @@ void FileOpRealDeleteObject::operator()() {
if (FileOperationConfig::confirmDelete()) {
int response;
if (mURLList.count()>1) {
- QStringList fileList;
+ TQStringList fileList;
KURL::List::ConstIterator it=mURLList.begin();
for (; it!=mURLList.end(); ++it) {
fileList.append((*it).filename());
@@ -285,9 +285,9 @@ void FileOpRealDeleteObject::operator()() {
KStdGuiItem::del()
);
} else {
- QString filename=QStyleSheet::escape(mURLList.first().filename());
+ TQString filename=TQStyleSheet::escape(mURLList.first().filename());
response=KMessageBox::warningContinueCancel(mParent,
- i18n("<p>Do you really want to delete <b>%1</b>?</p>").arg(filename),
+ i18n("<p>Do you really want to delete <b>%1</b>?</p>").tqarg(filename),
i18n("Delete File"),
KStdGuiItem::del()
);
@@ -306,14 +306,14 @@ void FileOpRenameObject::operator()() {
KURL srcURL=mURLList.first();
// Prompt for the new filename
- QString filename = srcURL.filename();
+ TQString filename = srcURL.filename();
InputDialog dlg(mParent);
dlg.setCaption(i18n("Renaming File"));
- dlg.setLabel(i18n("<p>Rename file <b>%1</b> to:</p>").arg(QStyleSheet::escape(filename)));
+ dlg.setLabel(i18n("<p>Rename file <b>%1</b> to:</p>").tqarg(TQStyleSheet::escape(filename)));
dlg.setButtonOK( KGuiItem(i18n("&Rename"), "edit") );
dlg.lineEdit()->setText(filename);
- int extPos = filename.findRev('.');
+ int extPos = filename.tqfindRev('.');
if (extPos != -1) {
if (filename.mid(extPos - 4, 4) == ".tar") {
// Special case: *.tar.*
diff --git a/src/gvcore/fileopobject.h b/src/gvcore/fileopobject.h
index a792685..9ec3429 100644
--- a/src/gvcore/fileopobject.h
+++ b/src/gvcore/fileopobject.h
@@ -21,15 +21,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef FILEOPOBJECT_H
#define FILEOPOBJECT_H
-// Qt includes
-#include <qobject.h>
-#include <qstring.h>
+// TQt includes
+#include <tqobject.h>
+#include <tqstring.h>
// KDE includes
#include <kio/job.h>
#include <kurl.h>
-class QWidget;
+class TQWidget;
namespace Gwenview {
@@ -42,11 +42,12 @@ namespace Gwenview {
*
* All these classes are used by the @FileOperation namespace-like class
*/
-class FileOpObject : public QObject {
+class FileOpObject : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpObject(const KURL&,QWidget* parent=0L);
- FileOpObject(const KURL::List&,QWidget* parent=0L);
+ FileOpObject(const KURL&,TQWidget* tqparent=0L);
+ FileOpObject(const KURL::List&,TQWidget* tqparent=0L);
virtual void operator()()=0;
signals:
@@ -56,7 +57,7 @@ protected slots:
virtual void slotResult(KIO::Job*);
protected:
- QWidget* mParent;
+ TQWidget* mParent;
KURL::List mURLList;
void polishJob(KIO::Job*);
@@ -65,76 +66,84 @@ protected:
class FileOpCopyToObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpCopyToObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpCopyToObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpCopyToObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpCopyToObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpLinkToObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpLinkToObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpLinkToObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpLinkToObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpLinkToObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpMoveToObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpMoveToObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpMoveToObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpMoveToObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpMoveToObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpMakeDirObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpMakeDirObject(const KURL& url, QWidget* parent=0L) : FileOpObject(url, parent) {}
+ FileOpMakeDirObject(const KURL& url, TQWidget* tqparent=0L) : FileOpObject(url, tqparent) {}
void operator()();
};
class FileOpDelObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpDelObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpDelObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpDelObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpDelObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpTrashObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpTrashObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpTrashObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpTrashObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpTrashObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpRealDeleteObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpRealDeleteObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
- FileOpRealDeleteObject(const KURL::List& urlList,QWidget* parent=0L) : FileOpObject(urlList,parent) {}
+ FileOpRealDeleteObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
+ FileOpRealDeleteObject(const KURL::List& urlList,TQWidget* tqparent=0L) : FileOpObject(urlList,tqparent) {}
void operator()();
};
class FileOpRenameObject : public FileOpObject {
Q_OBJECT
+ TQ_OBJECT
public:
- FileOpRenameObject(const KURL& url,QWidget* parent=0L) : FileOpObject(url,parent) {}
+ FileOpRenameObject(const KURL& url,TQWidget* tqparent=0L) : FileOpObject(url,tqparent) {}
void operator()();
signals:
- void renamed(const QString& newName);
+ void renamed(const TQString& newName);
protected slots:
virtual void slotResult(KIO::Job*);
private:
- QString mNewFilename;
+ TQString mNewFilename;
};
diff --git a/src/gvcore/filethumbnailview.cpp b/src/gvcore/filethumbnailview.cpp
index 8deaf09..e9dff61 100644
--- a/src/gvcore/filethumbnailview.cpp
+++ b/src/gvcore/filethumbnailview.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qframe.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
// KDE
#include <kapplication.h>
@@ -70,18 +70,18 @@ static const int THUMBNAIL_UPDATE_DELAY=500;
static const int RIGHT_TEXT_WIDTH=128;
static const int BOTTOM_MIN_TEXT_WIDTH=96;
-class ProgressWidget : public QFrame {
+class ProgressWidget : public TQFrame {
KProgress* mProgressBar;
- QPushButton* mStop;
+ TQPushButton* mStop;
public:
ProgressWidget(FileThumbnailView* view, int count)
- : QFrame(view)
+ : TQFrame(view)
{
- QHBoxLayout* layout=new QHBoxLayout(this, 3, 3);
- layout->setAutoAdd(true);
- setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
+ TQHBoxLayout* tqlayout=new TQHBoxLayout(this, 3, 3);
+ tqlayout->setAutoAdd(true);
+ setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );
- mStop=new QPushButton(this);
+ mStop=new TQPushButton(this);
mStop->setPixmap(SmallIcon("stop"));
mStop->setFlat(true);
@@ -92,31 +92,31 @@ public:
}
void polish() {
- QFrame::polish();
- setMinimumWidth(layout()->minimumSize().width());
+ TQFrame::polish();
+ setMinimumWidth(tqlayout()->tqminimumSize().width());
//setFixedHeight( mProgressBar->height() );
setFixedHeight( mStop->height() );
}
- void showEvent(QShowEvent*) {
+ void showEvent(TQShowEvent*) {
updatePosition();
}
- bool eventFilter(QObject*, QEvent* event) {
- if (event->type()==QEvent::Resize) {
+ bool eventFilter(TQObject*, TQEvent* event) {
+ if (event->type()==TQEvent::Resize) {
updatePosition();
}
return false;
}
void updatePosition() {
- FileThumbnailView* view=static_cast<FileThumbnailView*>(parent());
- QSize tmp=view->clipper()->size() - size();
+ FileThumbnailView* view=static_cast<FileThumbnailView*>(TQT_TQWIDGET(tqparent()));
+ TQSize tmp=view->clipper()->size() - size();
move(tmp.width() - 2, tmp.height() - 2);
}
KProgress* progressBar() const { return mProgressBar; }
- QPushButton* stopButton() const { return mStop; }
+ TQPushButton* stopButton() const { return mStop; }
};
@@ -124,13 +124,13 @@ struct FileThumbnailView::Private {
int mThumbnailSize;
int mMarginSize;
bool mUpdateThumbnailsOnNextShow;
- QPixmap mWaitPixmap; // The wait pixmap (32 x 32)
- QPixmap mWaitThumbnail; // The wait thumbnail (mThumbnailSize x mThumbnailSize)
+ TQPixmap mWaitPixmap; // The wait pixmap (32 x 32)
+ TQPixmap mWaitThumbnail; // The wait thumbnail (mThumbnailSize x mThumbnailSize)
ProgressWidget* mProgressWidget;
- QGuardedPtr<ThumbnailLoadJob> mThumbnailLoadJob;
+ TQGuardedPtr<ThumbnailLoadJob> mThumbnailLoadJob;
- QTimer* mThumbnailUpdateTimer;
+ TQTimer* mThumbnailUpdateTimer;
int mItemDetails;
@@ -138,11 +138,11 @@ struct FileThumbnailView::Private {
ThumbnailDetailsDialog* mThumbnailsDetailDialog;
void updateWaitThumbnail(const FileThumbnailView* view) {
- mWaitThumbnail=QPixmap(mThumbnailSize, mThumbnailSize);
+ mWaitThumbnail=TQPixmap(mThumbnailSize, mThumbnailSize);
mWaitThumbnail.fill(view->paletteBackgroundColor());
- QPainter painter(&mWaitThumbnail);
+ TQPainter painter(&mWaitThumbnail);
- painter.setPen(view->colorGroup().button());
+ painter.setPen(view->tqcolorGroup().button());
painter.drawRect(0,0,mThumbnailSize,mThumbnailSize);
painter.drawPixmap(
(mThumbnailSize-mWaitPixmap.width())/2,
@@ -159,24 +159,24 @@ static FileThumbnailViewItem* viewItem(const FileThumbnailView* view, const KFil
}
-FileThumbnailView::FileThumbnailView(QWidget* parent)
-: KIconView(parent), FileViewBase()
+FileThumbnailView::FileThumbnailView(TQWidget* tqparent)
+: KIconView(tqparent), FileViewBase()
{
d=new Private;
d->mUpdateThumbnailsOnNextShow=false;
d->mThumbnailLoadJob=0L;
- d->mWaitPixmap=QPixmap(::locate("appdata", "thumbnail/wait.png"));
+ d->mWaitPixmap=TQPixmap(::locate("appdata", "thumbnail/wait.png"));
d->mProgressWidget=0L;
- d->mThumbnailUpdateTimer=new QTimer(this);
+ d->mThumbnailUpdateTimer=new TQTimer(this);
d->mMarginSize=FileViewConfig::thumbnailMarginSize();
d->mItemDetails=FileViewConfig::thumbnailDetails();
d->mPrefetch = NULL;
d->mThumbnailSize = 0;
d->mThumbnailsDetailDialog = 0;
- setItemTextPos( QIconView::ItemTextPos(FileViewConfig::thumbnailTextPos()) );
+ setItemTextPos( TQIconView::ItemTextPos(FileViewConfig::thumbnailTextPos()) );
setAutoArrange(true);
- QIconView::setSorting(true);
+ TQIconView::setSorting(true);
setItemsMovable(false);
setResizeMode(Adjust);
setShowToolTips(true);
@@ -187,25 +187,25 @@ FileThumbnailView::FileThumbnailView(QWidget* parent)
// item is unselected after being clicked, so we use KIconView::Select mode
// and emit the execute() signal with slotClicked() ourself.
setMode(KIconView::Select);
- connect(this, SIGNAL(clicked(QIconViewItem*)),
- this, SLOT(slotClicked(QIconViewItem*)) );
- connect(this, SIGNAL(doubleClicked(QIconViewItem*)),
- this, SLOT(slotDoubleClicked(QIconViewItem*)) );
+ connect(this, TQT_SIGNAL(clicked(TQIconViewItem*)),
+ this, TQT_SLOT(slotClicked(TQIconViewItem*)) );
+ connect(this, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ this, TQT_SLOT(slotDoubleClicked(TQIconViewItem*)) );
- connect(this, SIGNAL(dropped(QDropEvent*,const QValueList<QIconDragItem>&)),
- this, SLOT(slotDropped(QDropEvent*)) );
- connect(this, SIGNAL( contentsMoving( int, int )),
- this, SLOT( slotContentsMoving( int, int )));
- connect(this, SIGNAL(currentChanged(QIconViewItem*)),
- this, SLOT(slotCurrentChanged(QIconViewItem*)) );
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*,const TQValueList<TQIconDragItem>&)),
+ this, TQT_SLOT(slotDropped(TQDropEvent*)) );
+ connect(this, TQT_SIGNAL( contentsMoving( int, int )),
+ this, TQT_SLOT( slotContentsMoving( int, int )));
+ connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQIconViewItem*)) );
- QIconView::setSelectionMode(Extended);
+ TQIconView::setSelectionMode(Extended);
- connect(BusyLevelManager::instance(), SIGNAL(busyLevelChanged(BusyLevel)),
- this, SLOT( slotBusyLevelChanged(BusyLevel)));
+ connect(BusyLevelManager::instance(), TQT_SIGNAL(busyLevelChanged(BusyLevel)),
+ this, TQT_SLOT( slotBusyLevelChanged(BusyLevel)));
- connect(d->mThumbnailUpdateTimer, SIGNAL(timeout()),
- this, SLOT( startThumbnailUpdate()) );
+ connect(d->mThumbnailUpdateTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT( startThumbnailUpdate()) );
}
@@ -226,8 +226,8 @@ void FileThumbnailView::setThumbnailSize(int value) {
KFileItemListIterator it( *items() );
for ( ; it.current(); ++it ) {
KFileItem *item=it.current();
- QPixmap pixmap=createItemPixmap(item);
- QIconViewItem* iconItem=viewItem(this, item);
+ TQPixmap pixmap=createItemPixmap(item);
+ TQIconViewItem* iconItem=viewItem(this, item);
if (iconItem) iconItem->setPixmap(pixmap);
}
arrangeItemsInGrid();
@@ -244,7 +244,7 @@ int FileThumbnailView::thumbnailSize() const {
* Overriden to call updateGrid
*/
void FileThumbnailView::setItemTextPos(ItemTextPos pos) {
- QIconView::setItemTextPos(pos);
+ TQIconView::setItemTextPos(pos);
updateGrid();
}
@@ -263,7 +263,7 @@ int FileThumbnailView::marginSize() const {
void FileThumbnailView::setItemDetails(int details) {
d->mItemDetails=details;
- for (QIconViewItem* item=firstItem(); item; item=item->nextItem()) {
+ for (TQIconViewItem* item=firstItem(); item; item=item->nextItem()) {
static_cast<FileThumbnailViewItem*>(item)->updateLines();
}
arrangeItemsInGrid();
@@ -275,7 +275,7 @@ int FileThumbnailView::itemDetails() const {
}
-void FileThumbnailView::setThumbnailPixmap(const KFileItem* fileItem, const QPixmap& thumbnail, const QSize& size) {
+void FileThumbnailView::setThumbnailPixmap(const KFileItem* fileItem, const TQPixmap& thumbnail, const TQSize& size) {
FileThumbnailViewItem* iconItem=viewItem(this, fileItem);
if (!iconItem) return;
@@ -285,7 +285,7 @@ void FileThumbnailView::setThumbnailPixmap(const KFileItem* fileItem, const QPix
if (size.isValid()) {
iconItem->setImageSize(size);
}
- iconItem->repaint();
+ iconItem->tqrepaint();
// Notify progress
if (d->mProgressWidget) {
@@ -305,8 +305,8 @@ void FileThumbnailView::setShownFileItem(KFileItem* fileItem) {
FileThumbnailViewItem* newShownItem=viewItem(this, fileItem);
FileViewBase::setShownFileItem(fileItem);
- if (oldShownItem) repaintItem(oldShownItem);
- if (newShownItem) repaintItem(newShownItem);
+ if (oldShownItem) tqrepaintItem(oldShownItem);
+ if (newShownItem) tqrepaintItem(newShownItem);
}
@@ -315,7 +315,7 @@ void FileThumbnailView::setShownFileItem(KFileItem* fileItem) {
// Thumbnail code
//
//-----------------------------------------------------------------------------
-QPixmap FileThumbnailView::createItemPixmap(const KFileItem* item) const {
+TQPixmap FileThumbnailView::createItemPixmap(const KFileItem* item) const {
bool isDirOrArchive=item->isDir() || Archive::fileItemIsArchive(item);
if (!isDirOrArchive) {
if (d->mWaitThumbnail.width()!=d->mThumbnailSize) {
@@ -324,12 +324,12 @@ QPixmap FileThumbnailView::createItemPixmap(const KFileItem* item) const {
return d->mWaitThumbnail;
}
- QPixmap thumbnail(d->mThumbnailSize, d->mThumbnailSize);
+ TQPixmap thumbnail(d->mThumbnailSize, d->mThumbnailSize);
thumbnail.fill(paletteBackgroundColor());
- QPainter painter(&thumbnail);
+ TQPainter painter(&thumbnail);
// Load the icon
- QPixmap itemPix=item->pixmap(QMIN(d->mThumbnailSize, ThumbnailSize::NORMAL));
+ TQPixmap itemPix=item->pixmap(TQMIN(d->mThumbnailSize, ThumbnailSize::NORMAL));
painter.drawPixmap(
(d->mThumbnailSize-itemPix.width())/2,
(d->mThumbnailSize-itemPix.height())/2,
@@ -352,9 +352,9 @@ void FileThumbnailView::startThumbnailUpdate() {
void FileThumbnailView::doStartThumbnailUpdate(const KFileItemList* list) {
- QValueVector<const KFileItem*> imageList;
+ TQValueVector<const KFileItem*> imageList;
imageList.reserve( list->count());
- QPtrListIterator<KFileItem> it(*list);
+ TQPtrListIterator<KFileItem> it(*list);
for (;it.current(); ++it) {
KFileItem* item=it.current();
if (!item->isDir() && !Archive::fileItemIsArchive(item)) {
@@ -363,21 +363,21 @@ void FileThumbnailView::doStartThumbnailUpdate(const KFileItemList* list) {
}
if (imageList.empty()) return;
- BusyLevelManager::instance()->setBusyLevel( this, BUSY_THUMBNAILS );
+ BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_THUMBNAILS );
Q_ASSERT(!d->mProgressWidget);
d->mProgressWidget=new ProgressWidget(this, imageList.count() );
- connect(d->mProgressWidget->stopButton(), SIGNAL(clicked()),
- this, SLOT(stopThumbnailUpdate()) );
+ connect(d->mProgressWidget->stopButton(), TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(stopThumbnailUpdate()) );
d->mProgressWidget->show();
d->mThumbnailLoadJob = new ThumbnailLoadJob(&imageList, d->mThumbnailSize);
- connect(d->mThumbnailLoadJob, SIGNAL(thumbnailLoaded(const KFileItem*, const QPixmap&, const QSize&)),
- this, SLOT(setThumbnailPixmap(const KFileItem*,const QPixmap&, const QSize&)) );
- connect(d->mThumbnailLoadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotUpdateEnded()) );
+ connect(d->mThumbnailLoadJob, TQT_SIGNAL(thumbnailLoaded(const KFileItem*, const TQPixmap&, const TQSize&)),
+ this, TQT_SLOT(setThumbnailPixmap(const KFileItem*,const TQPixmap&, const TQSize&)) );
+ connect(d->mThumbnailLoadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotUpdateEnded()) );
slotBusyLevelChanged( BusyLevelManager::instance()->busyLevel());
// start updating at visible position
@@ -398,7 +398,7 @@ void FileThumbnailView::slotUpdateEnded() {
delete d->mProgressWidget;
d->mProgressWidget=0L;
- BusyLevelManager::instance()->setBusyLevel( this, BUSY_NONE );
+ BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_NONE );
}
@@ -437,7 +437,7 @@ void FileThumbnailView::slotBusyLevelChanged(BusyLevel level) {
void FileThumbnailView::clearView() {
stopThumbnailUpdate();
mShownFileItem=0L;
- QIconView::clear();
+ TQIconView::clear();
}
@@ -445,7 +445,7 @@ void FileThumbnailView::insertItem(KFileItem* item) {
if (!item) return;
bool isDirOrArchive=item->isDir() || Archive::fileItemIsArchive(item);
- QPixmap thumbnail=createItemPixmap(item);
+ TQPixmap thumbnail=createItemPixmap(item);
FileThumbnailViewItem* iconItem=new FileThumbnailViewItem(this,item->text(),thumbnail,item);
iconItem->setDropEnabled(isDirOrArchive);
@@ -470,7 +470,7 @@ void FileThumbnailView::ensureItemVisible(const KFileItem* fileItem) {
if (!fileItem) return;
FileThumbnailViewItem* iconItem=viewItem(this, fileItem);
- if (iconItem) QIconView::ensureItemVisible(iconItem);
+ if (iconItem) TQIconView::ensureItemVisible(iconItem);
}
@@ -478,7 +478,7 @@ void FileThumbnailView::setCurrentItem(const KFileItem* fileItem) {
if (!fileItem) return;
FileThumbnailViewItem* iconItem=viewItem(this, fileItem);
- if (iconItem) QIconView::setCurrentItem(iconItem);
+ if (iconItem) TQIconView::setCurrentItem(iconItem);
}
@@ -486,7 +486,7 @@ void FileThumbnailView::setSelected(const KFileItem* fileItem,bool enable) {
if (!fileItem) return;
FileThumbnailViewItem* iconItem=viewItem(this, fileItem);
- if (iconItem) QIconView::setSelected(iconItem, enable, true /* do not unselect others */);
+ if (iconItem) TQIconView::setSelected(iconItem, enable, true /* do not unselect others */);
}
@@ -536,7 +536,7 @@ KFileItem* FileThumbnailView::prevItem(const KFileItem* fileItem) const {
KFileItem* FileThumbnailView::currentFileItem() const {
- const QIconViewItem* iconItem=currentItem();
+ const TQIconViewItem* iconItem=currentItem();
if (!iconItem) return 0L;
return static_cast<const FileThumbnailViewItem*>(iconItem)->fileItem();
@@ -554,18 +554,18 @@ KFileItem* FileThumbnailView::nextItem(const KFileItem* fileItem) const {
}
-void FileThumbnailView::setSorting(QDir::SortSpec spec) {
+void FileThumbnailView::setSorting(TQDir::SortSpec spec) {
KFileView::setSorting(spec);
KFileItem *item;
KFileItemListIterator it( *items() );
for ( ; (item = it.current() ); ++it ) {
- QIconViewItem* iconItem=viewItem(this, item);
+ TQIconViewItem* iconItem=viewItem(this, item);
if (iconItem) setSortingKey(iconItem, item);
}
- KIconView::sort(! (spec & QDir::Reversed) );
+ KIconView::sort(! (spec & TQDir::Reversed) );
}
//--------------------------------------------------------------------------
@@ -573,22 +573,22 @@ void FileThumbnailView::setSorting(QDir::SortSpec spec) {
// Drop support
//
//--------------------------------------------------------------------------
-void FileThumbnailView::contentsDragEnterEvent(QDragEnterEvent* event) {
+void FileThumbnailView::contentsDragEnterEvent(TQDragEnterEvent* event) {
return event->accept( KURLDrag::canDecode(event) );
}
-void FileThumbnailView::slotDropped(QDropEvent* event) {
+void FileThumbnailView::slotDropped(TQDropEvent* event) {
emit dropped(event,0L);
}
-void FileThumbnailView::showEvent(QShowEvent* event) {
+void FileThumbnailView::showEvent(TQShowEvent* event) {
KIconView::showEvent(event);
if (!d->mUpdateThumbnailsOnNextShow) return;
d->mUpdateThumbnailsOnNextShow=false;
- QTimer::singleShot(0, this, SLOT(startThumbnailUpdate()));
+ TQTimer::singleShot(0, this, TQT_SLOT(startThumbnailUpdate()));
}
@@ -605,25 +605,25 @@ void FileThumbnailView::updateGrid() {
+ RIGHT_TEXT_WIDTH);
} else {
setGridX(
- QMAX(d->mThumbnailSize, BOTTOM_MIN_TEXT_WIDTH)
+ TQMAX(d->mThumbnailSize, BOTTOM_MIN_TEXT_WIDTH)
+ FileThumbnailViewItem::PADDING*2);
}
setSpacing(d->mMarginSize);
}
-void FileThumbnailView::setSortingKey(QIconViewItem *iconItem, const KFileItem *item)
+void FileThumbnailView::setSortingKey(TQIconViewItem *iconItem, const KFileItem *item)
{
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
bool isDirOrArchive=item->isDir() || Archive::fileItemIsArchive(item);
- QString key;
- if ( spec & QDir::Time ) {
+ TQString key;
+ if ( spec & TQDir::Time ) {
time_t time = TimeUtils::getTime(item);
key=sortingKey(time, isDirOrArchive, spec);
- } else if ( spec & QDir::Size ) {
+ } else if ( spec & TQDir::Size ) {
key=sortingKey( item->size(), isDirOrArchive, spec );
} else {
@@ -640,7 +640,7 @@ void FileThumbnailView::setSortingKey(QIconViewItem *iconItem, const KFileItem *
// Private slots
//
//--------------------------------------------------------------------------
-void FileThumbnailView::slotDoubleClicked(QIconViewItem* iconItem) {
+void FileThumbnailView::slotDoubleClicked(TQIconViewItem* iconItem) {
if (!iconItem) return;
if (KGlobalSettings::singleClick()) return;
FileThumbnailViewItem* thumbItem=static_cast<FileThumbnailViewItem*>(iconItem);
@@ -653,7 +653,7 @@ void FileThumbnailView::slotDoubleClicked(QIconViewItem* iconItem) {
}
-void FileThumbnailView::slotClicked(QIconViewItem* iconItem) {
+void FileThumbnailView::slotClicked(TQIconViewItem* iconItem) {
if (!iconItem) return;
if (!KGlobalSettings::singleClick()) return;
FileThumbnailViewItem* thumbItem=static_cast<FileThumbnailViewItem*>(iconItem);
@@ -669,12 +669,12 @@ void FileThumbnailView::slotContentsMoving( int x, int y ) {
updateVisibilityInfo( x, y ); // use x,y, the signal is emitted before moving
}
-void FileThumbnailView::slotCurrentChanged(QIconViewItem* item ) {
+void FileThumbnailView::slotCurrentChanged(TQIconViewItem* item ) {
// trigger generating thumbnails from the current one
updateVisibilityInfo( contentsX(), contentsY());
prefetchDone();
// if the first image is selected, no matter how, preload the next one
- for( QIconViewItem* pos = item;
+ for( TQIconViewItem* pos = item;
pos != NULL;
pos = pos->nextItem()) {
FileThumbnailViewItem* cur = static_cast< FileThumbnailViewItem* >( pos );
@@ -682,8 +682,8 @@ void FileThumbnailView::slotCurrentChanged(QIconViewItem* item ) {
if( pos == item && pos->nextItem() != NULL ) {
d->mPrefetch = ImageLoader::loader(
static_cast<const FileThumbnailViewItem*>( cur->nextItem() )->fileItem()->url(),
- this, BUSY_PRELOADING );
- connect( d->mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone()));
+ TQT_TQOBJECT(this), BUSY_PRELOADING );
+ connect( d->mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone()));
}
}
}
@@ -696,14 +696,14 @@ void FileThumbnailView::slotCurrentChanged(QIconViewItem* item ) {
void FileThumbnailView::updateVisibilityInfo( int x, int y ) {
if (d->mThumbnailLoadJob.isNull()) return;
- QRect rect( x, y, visibleWidth(), visibleHeight());
- FileThumbnailViewItem* first = static_cast< FileThumbnailViewItem* >( findFirstVisibleItem( rect ));
+ TQRect rect( x, y, visibleWidth(), visibleHeight());
+ FileThumbnailViewItem* first = static_cast< FileThumbnailViewItem* >( tqfindFirstVisibleItem( rect ));
if (!first) {
d->mThumbnailLoadJob->setPriorityItems(NULL,NULL,NULL);
return;
}
- FileThumbnailViewItem* last = static_cast< FileThumbnailViewItem* >( findLastVisibleItem( rect ));
+ FileThumbnailViewItem* last = static_cast< FileThumbnailViewItem* >( tqfindLastVisibleItem( rect ));
Q_ASSERT(last); // If we get a first item, then there must be a last
if (currentItem() && currentItem()->intersects(rect)) {
@@ -719,16 +719,16 @@ void FileThumbnailView::updateVisibilityInfo( int x, int y ) {
last->fileItem());
}
-void FileThumbnailView::keyPressEvent( QKeyEvent* e ) {
+void FileThumbnailView::keyPressEvent( TQKeyEvent* e ) {
// When the user presses e.g. the Down key, try to preload the next image in that direction.
if( e->key() != Key_Left
&& e->key() != Key_Right
&& e->key() != Key_Up
&& e->key() != Key_Down ) return KIconView::keyPressEvent( e );
- QIconViewItem* current = currentItem();
+ TQIconViewItem* current = currentItem();
KIconView::keyPressEvent( e );
- QIconViewItem* next = NULL;
+ TQIconViewItem* next = NULL;
if( current != currentItem() && currentItem() != NULL ) { // it actually moved
switch( e->key()) {
case Key_Left:
@@ -757,14 +757,14 @@ void FileThumbnailView::keyPressEvent( QKeyEvent* e ) {
if( next != NULL ) {
d->mPrefetch = ImageLoader::loader(
static_cast<const FileThumbnailViewItem*>( next )->fileItem()->url(),
- this, BUSY_PRELOADING );
- connect( d->mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone()));
+ TQT_TQOBJECT(this), BUSY_PRELOADING );
+ connect( d->mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone()));
}
}
void FileThumbnailView::prefetchDone() {
if( d->mPrefetch != NULL ) {
- d->mPrefetch->release( this );
+ d->mPrefetch->release( TQT_TQOBJECT(this) );
d->mPrefetch = NULL;
}
}
@@ -782,11 +782,11 @@ void FileThumbnailView::startDrag() {
ItemDrawer(FileThumbnailView* view)
: mView(view) {}
- QSize itemSize(KFileItem* fileItem) {
- QPixmap* pix = pixmapFromFileItem(fileItem);
- if (!pix) return QSize();
+ TQSize itemSize(KFileItem* fileItem) {
+ TQPixmap* pix = pixmapFromFileItem(fileItem);
+ if (!pix) return TQSize();
- QSize size = pix->size();
+ TQSize size = pix->size();
int maxWidth = mGenerator->maxWidth();
if (size.width() > maxWidth) {
size.rheight() = size.height() * maxWidth / size.width();
@@ -799,28 +799,28 @@ void FileThumbnailView::startDrag() {
return 2;
}
- void drawItem(QPainter* painter, int left, int top, KFileItem* fileItem) {
- QPixmap* pix = pixmapFromFileItem(fileItem);
+ void drawItem(TQPainter* painter, int left, int top, KFileItem* fileItem) {
+ TQPixmap* pix = pixmapFromFileItem(fileItem);
if (!pix) return;
- QSize size = itemSize(fileItem);
+ TQSize size = itemSize(fileItem);
left += (mGenerator->pixmapWidth() - size.width()) / 2;
if (size == pix->size()) {
painter->drawPixmap(left, top, *pix);
return;
}
- QImage img = pix->convertToImage();
- img = img.smoothScale(size, QImage::ScaleMin);
+ TQImage img = pix->convertToImage();
+ img = img.smoothScale(size, TQ_ScaleMin);
painter->drawImage(left, top, img);
}
- QPixmap* pixmapFromFileItem(KFileItem* fileItem) {
+ TQPixmap* pixmapFromFileItem(KFileItem* fileItem) {
FileThumbnailViewItem* iconItem = viewItem(mView, fileItem);
Q_ASSERT(iconItem);
if (!iconItem) return 0;
- QPixmap* pix = iconItem->pixmap();
+ TQPixmap* pix = iconItem->pixmap();
Q_ASSERT(pix);
if (!pix) return 0;
return pix;
@@ -847,10 +847,10 @@ void FileThumbnailView::startDrag() {
return;
}
- QDragObject* drag=new KURLDrag(urls, this, 0);
- QPixmap dragPixmap = generator.generate();
+ TQDragObject* drag=new KURLDrag(urls, this, 0);
+ TQPixmap dragPixmap = generator.generate();
- drag->setPixmap( dragPixmap, QPoint(generator.DRAG_OFFSET, -generator.DRAG_OFFSET));
+ drag->setPixmap( dragPixmap, TQPoint(generator.DRAG_OFFSET, -generator.DRAG_OFFSET));
drag->dragCopy();
}
diff --git a/src/gvcore/filethumbnailview.h b/src/gvcore/filethumbnailview.h
index c27b855..8cc2776 100644
--- a/src/gvcore/filethumbnailview.h
+++ b/src/gvcore/filethumbnailview.h
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef FILETHUMBNAILVIEW_H
#define FILETHUMBNAILVIEW_H
-// Qt includes
-#include <qguardedptr.h>
-#include <qptrlist.h>
+// TQt includes
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
// KDE includes
#include <kiconview.h>
@@ -33,32 +33,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "busylevelmanager.h"
#include "libgwenview_export.h"
-class QDragEnterEvent;
-class QIconViewItem;
-class QPopupMenu;
-class QShowEvent;
+class TQDragEnterEvent;
+class TQIconViewItem;
+class TQPopupMenu;
+class TQShowEvent;
class KConfig;
class KFileItem;
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
namespace Gwenview {
class FileThumbnailViewItem;
class LIBGWENVIEW_EXPORT FileThumbnailView : public KIconView, public FileViewBase {
Q_OBJECT
+ TQ_OBJECT
friend class FileThumbnailViewItem;
public:
enum ItemDetail { FILENAME=1, FILESIZE=2, FILEDATE=4, IMAGESIZE=8 };
- FileThumbnailView(QWidget* parent);
+ FileThumbnailView(TQWidget* tqparent);
~FileThumbnailView();
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
// KFileView methods
void clearView();
- void clearSelection() { QIconView::clearSelection(); }
+ void clearSelection() { TQIconView::clearSelection(); }
void insertItem(KFileItem* item);
void ensureItemVisible(const KFileItem* item);
void setCurrentItem(const KFileItem* item);
@@ -66,7 +67,7 @@ public:
bool isSelected(const KFileItem* item) const;
void removeItem(const KFileItem* item);
void updateView(const KFileItem* item);
- void setSorting(QDir::SortSpec);
+ void setSorting(TQDir::SortSpec);
KFileItem* firstFileItem() const;
KFileItem* prevItem( const KFileItem*) const;
@@ -89,37 +90,37 @@ public:
void updateThumbnail(const KFileItem*);
public slots:
- void setThumbnailPixmap(const KFileItem*,const QPixmap&, const QSize&);
+ void setThumbnailPixmap(const KFileItem*,const TQPixmap&, const TQSize&);
void startThumbnailUpdate();
void stopThumbnailUpdate();
void showThumbnailDetailsDialog();
signals:
- void dropped(QDropEvent*, KFileItem* target);
+ void dropped(TQDropEvent*, KFileItem* target);
protected:
- void showEvent(QShowEvent*);
- void contentsDragEnterEvent(QDragEnterEvent*);
+ void showEvent(TQShowEvent*);
+ void contentsDragEnterEvent(TQDragEnterEvent*);
void startDrag();
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
private:
class Private;
Private* d;
void updateGrid();
- QPixmap createItemPixmap(const KFileItem*) const;
+ TQPixmap createItemPixmap(const KFileItem*) const;
void doStartThumbnailUpdate(const KFileItemList*);
- void setSortingKey(QIconViewItem*, const KFileItem*);
+ void setSortingKey(TQIconViewItem*, const KFileItem*);
void updateVisibilityInfo( int x, int y );
private slots:
- void slotClicked(QIconViewItem*);
- void slotDoubleClicked(QIconViewItem*);
- void slotDropped(QDropEvent*);
+ void slotClicked(TQIconViewItem*);
+ void slotDoubleClicked(TQIconViewItem*);
+ void slotDropped(TQDropEvent*);
void slotContentsMoving( int, int );
- void slotCurrentChanged(QIconViewItem*);
+ void slotCurrentChanged(TQIconViewItem*);
void slotBusyLevelChanged( BusyLevel );
void slotUpdateEnded();
void prefetchDone();
diff --git a/src/gvcore/filethumbnailviewitem.cpp b/src/gvcore/filethumbnailviewitem.cpp
index 00f3c89..65da494 100644
--- a/src/gvcore/filethumbnailviewitem.cpp
+++ b/src/gvcore/filethumbnailviewitem.cpp
@@ -21,12 +21,12 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-// Qt includes
-#include <qapplication.h>
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpixmap.h>
+// TQt includes
+#include <tqapplication.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
// KDE includes
#include <kdebug.h>
@@ -45,7 +45,7 @@ namespace Gwenview {
const int SHOWN_ITEM_INDICATOR_SIZE = 8;
#if 0
-static void printRect(const QString& txt,const QRect& rect) {
+static void printRect(const TQString& txt,const TQRect& rect) {
kdWarning() << txt << " : " << rect.x() << "x" << rect.y() << " " << rect.width() << "x" << rect.height() << endl;
}
#endif
@@ -56,11 +56,11 @@ static void printRect(const QString& txt,const QRect& rect) {
*/
class FileThumbnailViewItem::Line {
protected:
- const QIconViewItem* mItem;
- QString mTxt;
+ const TQIconViewItem* mItem;
+ TQString mTxt;
int mWidth;
public:
- Line(const QIconViewItem* item, const QString& txt)
+ Line(const TQIconViewItem* item, const TQString& txt)
: mItem(item)
, mTxt(txt)
, mWidth(-1) {
@@ -73,7 +73,7 @@ public:
virtual int height() const=0;
- void paint(QPainter* p, int textX, int textY, int align) const {
+ void paint(TQPainter* p, int textX, int textY, int align) const {
Q_ASSERT(mWidth!=-1);
int length=fontMetrics().width(mTxt);
if (length<=mWidth ) {
@@ -96,14 +96,14 @@ protected:
return static_cast<const FileThumbnailView*>(mItem->iconView());
}
- QFontMetrics fontMetrics() const {
+ TQFontMetrics fontMetrics() const {
return view()->fontMetrics();
}
/**
* Called when the text won't fit the available space
*/
- virtual void complexPaint(QPainter* p, int textX, int textY, int align) const=0;
+ virtual void complexPaint(TQPainter* p, int textX, int textY, int align) const=0;
};
@@ -112,14 +112,14 @@ protected:
*/
class FileThumbnailViewItem::CroppedLine : public FileThumbnailViewItem::Line {
public:
- CroppedLine(const QIconViewItem* item, const QString& txt)
+ CroppedLine(const TQIconViewItem* item, const TQString& txt)
: Line(item, txt) {}
int height() const {
return fontMetrics().height();
}
- void complexPaint(QPainter* p, int textX, int textY, int /*align*/) const {
+ void complexPaint(TQPainter* p, int textX, int textY, int /*align*/) const {
KWordWrap::drawFadeoutText(p,
textX,
textY + fontMetrics().ascent(),
@@ -135,7 +135,7 @@ public:
class FileThumbnailViewItem::WrappedLine : public FileThumbnailViewItem::Line {
KWordWrap* mWordWrap;
public:
- WrappedLine(const QIconViewItem* item, const QString& txt)
+ WrappedLine(const TQIconViewItem* item, const TQString& txt)
: Line(item, txt)
, mWordWrap(0) {}
@@ -156,14 +156,14 @@ public:
if (width==mWidth) return;
mWidth=width;
delete mWordWrap;
- QFontMetrics fm=fontMetrics();
+ TQFontMetrics fm=fontMetrics();
mWordWrap=KWordWrap::formatText(fm,
- QRect(0, 0, mWidth, fm.height()*3),
+ TQRect(0, 0, mWidth, fm.height()*3),
0 /*flags*/,
mTxt);
}
- void complexPaint(QPainter* p, int textX, int textY, int align) const {
+ void complexPaint(TQPainter* p, int textX, int textY, int align) const {
Q_ASSERT(mWordWrap);
if (!mWordWrap) return;
@@ -180,16 +180,16 @@ public:
};
-FileThumbnailViewItem::FileThumbnailViewItem(QIconView* view,const QString& text,const QPixmap& icon, KFileItem* fileItem)
-: QIconViewItem(view,text,icon), mFileItem(fileItem) {
+FileThumbnailViewItem::FileThumbnailViewItem(TQIconView* view,const TQString& text,const TQPixmap& icon, KFileItem* fileItem)
+: TQIconViewItem(view,text,icon), mFileItem(fileItem) {
updateLines();
calcRect();
}
FileThumbnailViewItem::~FileThumbnailViewItem() {
- QValueVector<Line*>::ConstIterator it=mLines.begin();
- QValueVector<Line*>::ConstIterator itEnd=mLines.end();
+ TQValueVector<Line*>::ConstIterator it=mLines.begin();
+ TQValueVector<Line*>::ConstIterator itEnd=mLines.end();
for (;it!=itEnd; ++it) {
delete *it;
}
@@ -197,8 +197,8 @@ FileThumbnailViewItem::~FileThumbnailViewItem() {
void FileThumbnailViewItem::updateLines() {
- QValueVector<Line*>::ConstIterator it=mLines.begin();
- QValueVector<Line*>::ConstIterator itEnd=mLines.end();
+ TQValueVector<Line*>::ConstIterator it=mLines.begin();
+ TQValueVector<Line*>::ConstIterator itEnd=mLines.end();
for (;it!=itEnd; ++it) {
delete *it;
}
@@ -206,14 +206,14 @@ void FileThumbnailViewItem::updateLines() {
if (!mFileItem) return;
bool isDir=mFileItem->isDir();
- if (iconView()->itemTextPos()==QIconView::Right) {
+ if (iconView()->itemTextPos()==TQIconView::Right) {
// Text is on the right, show everything
time_t time = TimeUtils::getTime(mFileItem);
mLines.append( new WrappedLine(this, mFileItem->name()) );
mLines.append( new CroppedLine(this, TimeUtils::formatTime(time)) );
if (mImageSize.isValid()) {
- QString txt=QString::number(mImageSize.width())+"x"+QString::number(mImageSize.height());
+ TQString txt=TQString::number(mImageSize.width())+"x"+TQString::number(mImageSize.height());
mLines.append( new CroppedLine(this, txt) );
}
if (!isDir) {
@@ -235,9 +235,9 @@ void FileThumbnailViewItem::updateLines() {
mLines.append( new CroppedLine(this, TimeUtils::formatTime(time)) );
}
if (details & FileThumbnailView::IMAGESIZE) {
- QString txt;
+ TQString txt;
if (mImageSize.isValid()) {
- txt=QString::number(mImageSize.width())+"x"+QString::number(mImageSize.height());
+ txt=TQString::number(mImageSize.width())+"x"+TQString::number(mImageSize.height());
}
mLines.append( new CroppedLine(this, txt) );
}
@@ -251,9 +251,9 @@ void FileThumbnailViewItem::updateLines() {
}
-void FileThumbnailViewItem::calcRect(const QString&) {
+void FileThumbnailViewItem::calcRect(const TQString&) {
FileThumbnailView *view=static_cast<FileThumbnailView*>(iconView());
- bool isRight=view->itemTextPos()==QIconView::Right;
+ bool isRight=view->itemTextPos()==TQIconView::Right;
int textW=view->gridX();
int thumbnailSize=FileViewConfig::thumbnailSize();
@@ -264,23 +264,23 @@ void FileThumbnailViewItem::calcRect(const QString&) {
}
int textH=0;
- QValueVector<Line*>::ConstIterator it=mLines.begin();
- QValueVector<Line*>::ConstIterator itEnd=mLines.end();
+ TQValueVector<Line*>::ConstIterator it=mLines.begin();
+ TQValueVector<Line*>::ConstIterator itEnd=mLines.end();
for (;it!=itEnd; ++it) {
(*it)->setWidth(textW);
textH+=(*it)->height();
}
- QRect itemRect(x(), y(), view->gridX(), 0);
- QRect itemPixmapRect(PADDING, PADDING, thumbnailSize, thumbnailSize);
- QRect itemTextRect(0, 0, textW, textH);
+ TQRect tqitemRect(x(), y(), view->gridX(), 0);
+ TQRect itemPixmapRect(PADDING, PADDING, thumbnailSize, thumbnailSize);
+ TQRect itemTextRect(0, 0, textW, textH);
if (isRight) {
- itemRect.setHeight( QMAX(thumbnailSize + PADDING*2, textH) );
+ tqitemRect.setHeight( TQMAX(thumbnailSize + PADDING*2, textH) );
itemTextRect.moveLeft(thumbnailSize + PADDING * 2 );
- itemTextRect.moveTop((itemRect.height() - textH)/2);
+ itemTextRect.moveTop((tqitemRect.height() - textH)/2);
} else {
- itemPixmapRect.moveLeft( (itemRect.width() - itemPixmapRect.width()) / 2 );
- itemRect.setHeight(thumbnailSize + PADDING*3 + textH);
+ itemPixmapRect.moveLeft( (tqitemRect.width() - itemPixmapRect.width()) / 2 );
+ tqitemRect.setHeight(thumbnailSize + PADDING*3 + textH);
itemTextRect.moveLeft(PADDING);
itemTextRect.moveTop(thumbnailSize + PADDING * 2);
}
@@ -292,18 +292,18 @@ void FileThumbnailViewItem::calcRect(const QString&) {
if ( itemTextRect != textRect() ) {
setTextRect( itemTextRect );
}
- if ( itemRect != rect() ) {
- setItemRect( itemRect );
+ if ( tqitemRect != rect() ) {
+ setItemRect( tqitemRect );
}
}
-void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
+void FileThumbnailViewItem::paintItem(TQPainter *p, const TQColorGroup &cg) {
FileThumbnailView *view=static_cast<FileThumbnailView*>(iconView());
Q_ASSERT(view);
if (!view) return;
- bool isRight=view->itemTextPos()==QIconView::Right;
+ bool isRight=view->itemTextPos()==TQIconView::Right;
bool isShownItem=view->shownFileItem() && view->shownFileItem()->extraData(view)==this;
bool isImage=!Archive::fileItemIsDirOrArchive(mFileItem);
int textX, textY, textW, textH;
@@ -315,12 +315,12 @@ void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
textH=textRect(false).height();
// Draw pixmap
- QRect pRect = pixmapRect(false);
+ TQRect pRect = pixmapRect(false);
int pixX = pRect.left() + ( thumbnailSize - pixmap()->width() ) / 2;
int pixY = pRect.top() + ( thumbnailSize - pixmap()->height() ) / 2;
p->drawPixmap( pixX, pixY, *pixmap() );
- QColor bg;
+ TQColor bg;
if ( isSelected() ) {
bg=cg.highlight();
} else {
@@ -329,7 +329,7 @@ void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
// Draw shown item indicator
if (isShownItem) {
- QPointArray pa(3);
+ TQPointArray pa(3);
pa[0] = pixmapRect(false).bottomLeft();
pa[0].rx() += pixmapRect(false).width() / 2;
pa[0].ry() += PADDING - 1;
@@ -349,10 +349,10 @@ void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
if (isImage || isSelected()) {
// Draw frame
- QRect frmRect=pixmapRect(false);
+ TQRect frmRect=pixmapRect(false);
frmRect.addCoords(-PADDING, -PADDING, PADDING, PADDING);
- p->setBrush(QBrush());
+ p->setBrush(TQBrush());
p->setPen(bg);
p->drawRect(frmRect);
if (isSelected()) {
@@ -366,8 +366,8 @@ void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
p->setBackgroundColor(cg.base());
int align = (isRight ? AlignAuto : AlignHCenter) | AlignTop;
- QValueVector<Line*>::ConstIterator it=mLines.begin();
- QValueVector<Line*>::ConstIterator itEnd=mLines.end();
+ TQValueVector<Line*>::ConstIterator it=mLines.begin();
+ TQValueVector<Line*>::ConstIterator itEnd=mLines.end();
for (;it!=itEnd; ++it) {
const Line* line=*it;
line->paint(p, textX, textY, align);
@@ -376,17 +376,17 @@ void FileThumbnailViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
}
-bool FileThumbnailViewItem::acceptDrop(const QMimeSource* source) const {
+bool FileThumbnailViewItem::acceptDrop(const TQMimeSource* source) const {
return KURLDrag::canDecode(source);
}
-void FileThumbnailViewItem::dropped(QDropEvent* event, const QValueList<QIconDragItem>&) {
+void FileThumbnailViewItem::dropped(TQDropEvent* event, const TQValueList<TQIconDragItem>&) {
FileThumbnailView *view=static_cast<FileThumbnailView*>(iconView());
emit view->dropped(event,mFileItem);
}
-void FileThumbnailViewItem::setImageSize(const QSize& size) {
+void FileThumbnailViewItem::setImageSize(const TQSize& size) {
mImageSize=size;
updateLines();
}
diff --git a/src/gvcore/filethumbnailviewitem.h b/src/gvcore/filethumbnailviewitem.h
index 0a817bf..55b2c98 100644
--- a/src/gvcore/filethumbnailviewitem.h
+++ b/src/gvcore/filethumbnailviewitem.h
@@ -22,46 +22,46 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef FILETHUMBNAILVIEWITEM_H
#define FILETHUMBNAILVIEWITEM_H
-// Qt
-#include <qiconview.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqiconview.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
class KFileItem;
namespace Gwenview {
/**
- * We override the QIconViewItem to control the look of selected items
+ * We override the TQIconViewItem to control the look of selected items
* and get a pointer to our KFileItem
*/
-class FileThumbnailViewItem : public QIconViewItem {
+class FileThumbnailViewItem : public TQIconViewItem {
public:
class Line;
class CroppedLine;
class WrappedLine;
enum { PADDING=4 };
- FileThumbnailViewItem(QIconView* parent,const QString& text,const QPixmap& icon, KFileItem* fileItem);
+ FileThumbnailViewItem(TQIconView* tqparent,const TQString& text,const TQPixmap& icon, KFileItem* fileItem);
~FileThumbnailViewItem();
KFileItem* fileItem() const { return mFileItem; }
- void setImageSize(const QSize&);
+ void setImageSize(const TQSize&);
void updateLines();
protected:
- void paintItem(QPainter* painter, const QColorGroup& colorGroup);
- void calcRect( const QString& text_=QString::null );
- void paintFocus(QPainter*, const QColorGroup&) {}
- bool acceptDrop(const QMimeSource*) const;
- void dropped(QDropEvent*, const QValueList<QIconDragItem>&);
+ void paintItem(TQPainter* painter, const TQColorGroup& tqcolorGroup);
+ void calcRect( const TQString& text_=TQString() );
+ void paintFocus(TQPainter*, const TQColorGroup&) {}
+ bool acceptDrop(const TQMimeSource*) const;
+ void dropped(TQDropEvent*, const TQValueList<TQIconDragItem>&);
KFileItem* mFileItem;
- QValueVector<Line*> mLines;
+ TQValueVector<Line*> mLines;
- QSize mImageSize;
+ TQSize mImageSize;
};
} // namespace
diff --git a/src/gvcore/fileviewbase.h b/src/gvcore/fileviewbase.h
index 0802310..37c8690 100644
--- a/src/gvcore/fileviewbase.h
+++ b/src/gvcore/fileviewbase.h
@@ -22,8 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef FILEVIEWBASE_H
#define FILEVIEWBASE_H
-// Qt includes
-#include <qcolor.h>
+// TQt includes
+#include <tqcolor.h>
// KDE includes
#include <kfileview.h>
diff --git a/src/gvcore/fileviewconfig.kcfg b/src/gvcore/fileviewconfig.kcfg
index 0ef5f1a..9ec2ed6 100644
--- a/src/gvcore/fileviewconfig.kcfg
+++ b/src/gvcore/fileviewconfig.kcfg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
- <include>qiconview.h</include>
+ <include>tqiconview.h</include>
<kcfgfile name="gwenviewrc"/>
<group name="file widget">
<entry name="showDirs" key="show dirs" type="Bool">
@@ -14,7 +14,7 @@
<default>true</default>
</entry>
<entry name="thumbnailTextPos" key="item text pos" type="Int">
- <default code="true">QIconView::Right</default>
+ <default code="true">TQIconView::Right</default>
</entry>
<entry name="thumbnailSize" key="thumbnail size" type="Int">
<default>48</default>
diff --git a/src/gvcore/fileviewcontroller.cpp b/src/gvcore/fileviewcontroller.cpp
index 95dc47c..e58e654 100644
--- a/src/gvcore/fileviewcontroller.cpp
+++ b/src/gvcore/fileviewcontroller.cpp
@@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qcheckbox.h>
-#include <qdatetimeedit.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+// TQt
+#include <tqcheckbox.h>
+#include <tqdatetimeedit.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
// KDE
#include <kaction.h>
@@ -116,7 +116,7 @@ public:
mCheck = c;
}
- void setDateFilter(const QDate& from, const QDate& to) {
+ void setDateFilter(const TQDate& from, const TQDate& to) {
mFromDate = from;
mToDate =to;
}
@@ -129,10 +129,10 @@ public:
public:
virtual bool matchesMimeFilter(const KFileItem* item) const {
// Do mime filtering ourself because we use startsWith instead of ==
- QStringList lst = mimeFilters();
- QStringList::Iterator it = lst.begin(), end = lst.end();
+ TQStringList lst = mimeFilters();
+ TQStringList::Iterator it = lst.begin(), end = lst.end();
bool result = false;
- QString type = item->mimetype();
+ TQString type = item->mimetype();
for (; it!=end; ++it) {
if (type.startsWith(*it)) {
result = true;
@@ -148,11 +148,11 @@ public:
if (!mFromDate.isValid() && !mToDate.isValid()) return result;
- // Convert item time to a QDate
+ // Convert item time to a TQDate
time_t time=TimeUtils::getTime(item);
- QDateTime dateTime;
+ TQDateTime dateTime;
dateTime.setTime_t(time);
- QDate date=dateTime.date();
+ TQDate date=dateTime.date();
if (mFromDate.isValid() && date < mFromDate) return false;
if (mToDate.isValid() && date > mToDate) return false;
@@ -162,8 +162,8 @@ public:
private:
mutable bool mError;
bool mCheck;
- QDate mFromDate;
- QDate mToDate;
+ TQDate mFromDate;
+ TQDate mToDate;
};
@@ -180,60 +180,60 @@ public:
FileViewController* that;
FilterBar* mFilterBar;
KToolBar* mToolBar;
- QWidgetStack* mStack;
+ TQWidgetStack* mStack;
KSelectAction* mSortAction;
KToggleAction* mRevertSortAction;
TipTracker* mSliderTracker;
- QHBox* mFilterHBox;
- QComboBox* mFilterComboBox;
- QCheckBox* mShowFilterBarCheckBox;
+ TQHBox* mFilterHBox;
+ TQComboBox* mFilterComboBox;
+ TQCheckBox* mShowFilterBarCheckBox;
void initFilterBar() {
mFilterBar=new FilterBar(that);
- mFilterBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ mFilterBar->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
mFilterBar->hide();
- QIconSet resetIS=BarIcon("locationbar_erase");
+ TQIconSet resetIS=BarIcon("locationbar_erase");
mFilterBar->mResetNameCombo->setIconSet(resetIS);
mFilterBar->mResetFrom->setIconSet(resetIS);
mFilterBar->mResetTo->setIconSet(resetIS);
- QObject::connect(
- mFilterBar->mResetNameCombo, SIGNAL(clicked()),
- that, SLOT(resetNameFilter()) );
- QObject::connect(
- mFilterBar->mResetFrom, SIGNAL(clicked()),
- that, SLOT(resetFromFilter()) );
- QObject::connect(
- mFilterBar->mResetTo, SIGNAL(clicked()),
- that, SLOT(resetToFilter()) );
-
- QObject::connect(
- mFilterBar->mFilterButton, SIGNAL(clicked()),
- that, SLOT(applyFilter()) );
+ TQObject::connect(
+ mFilterBar->mResetNameCombo, TQT_SIGNAL(clicked()),
+ that, TQT_SLOT(resetNameFilter()) );
+ TQObject::connect(
+ mFilterBar->mResetFrom, TQT_SIGNAL(clicked()),
+ that, TQT_SLOT(resetFromFilter()) );
+ TQObject::connect(
+ mFilterBar->mResetTo, TQT_SIGNAL(clicked()),
+ that, TQT_SLOT(resetToFilter()) );
+
+ TQObject::connect(
+ mFilterBar->mFilterButton, TQT_SIGNAL(clicked()),
+ that, TQT_SLOT(applyFilter()) );
}
void initFilterCombo() {
- mFilterHBox=new QHBox(mToolBar, "kde toolbar widget");
+ mFilterHBox=new TQHBox(mToolBar, "kde toolbar widget");
mFilterHBox->setSpacing(KDialog::spacingHint());
- mFilterComboBox=new QComboBox(mFilterHBox);
+ mFilterComboBox=new TQComboBox(mFilterHBox);
mFilterComboBox->insertItem(i18n("All files"), ALL);
mFilterComboBox->insertItem(i18n("Images only"), IMAGES_ONLY);
mFilterComboBox->insertItem(i18n("Videos only"), VIDEOS_ONLY);
- QObject::connect(
- mFilterComboBox, SIGNAL(activated(int)),
- that, SLOT(applyFilter()) );
-
- mShowFilterBarCheckBox = new QCheckBox(i18n("More"), mFilterHBox);
- QObject::connect(
- mShowFilterBarCheckBox, SIGNAL(toggled(bool)),
- mFilterBar, SLOT(setShown(bool)) );
- QObject::connect(
- mShowFilterBarCheckBox, SIGNAL(toggled(bool)),
- that, SLOT(applyFilter()) );
+ TQObject::connect(
+ mFilterComboBox, TQT_SIGNAL(activated(int)),
+ that, TQT_SLOT(applyFilter()) );
+
+ mShowFilterBarCheckBox = new TQCheckBox(i18n("More"), mFilterHBox);
+ TQObject::connect(
+ mShowFilterBarCheckBox, TQT_SIGNAL(toggled(bool)),
+ mFilterBar, TQT_SLOT(setShown(bool)) );
+ TQObject::connect(
+ mShowFilterBarCheckBox, TQT_SIGNAL(toggled(bool)),
+ that, TQT_SLOT(applyFilter()) );
}
@@ -252,11 +252,11 @@ public:
// FileViewController
//
//-----------------------------------------------------------------------
-FileViewController::FileViewController(QWidget* parent,KActionCollection* actionCollection)
-: QWidget(parent)
+FileViewController::FileViewController(TQWidget* tqparent,KActionCollection* actionCollection)
+: TQWidget(tqparent)
, mMode(FILE_LIST)
, mPrefetch( NULL )
-, mChangeDirStatus(CHANGE_DIR_STATUS_NONE)
+, mChangeDirtqStatus(CHANGE_DIR_STATUS_NONE)
, mBrowsing(false)
, mSelecting(false)
{
@@ -266,158 +266,158 @@ FileViewController::FileViewController(QWidget* parent,KActionCollection* action
d->mToolBar=new KToolBar(this, "", true);
d->initFilterBar();
d->initFilterCombo();
- d->mStack=new QWidgetStack(this);
+ d->mStack=new TQWidgetStack(this);
- QVBoxLayout *layout=new QVBoxLayout(this);
- layout->addWidget(d->mToolBar);
- layout->addWidget(d->mFilterBar);
- layout->addWidget(d->mStack);
+ TQVBoxLayout *tqlayout=new TQVBoxLayout(this);
+ tqlayout->addWidget(d->mToolBar);
+ tqlayout->addWidget(d->mFilterBar);
+ tqlayout->addWidget(d->mStack);
// Actions
mSelectFirst=new KAction(i18n("&First"),
- QApplication::reverseLayout() ? "2rightarrow":"2leftarrow", Key_Home,
- this,SLOT(slotSelectFirst()), actionCollection, "first");
+ TQApplication::reverseLayout() ? "2rightarrow":"2leftarrow", Key_Home,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirst()), actionCollection, "first");
mSelectLast=new KAction(i18n("&Last"),
- QApplication::reverseLayout() ? "2leftarrow":"2rightarrow", Key_End,
- this,SLOT(slotSelectLast()), actionCollection, "last");
+ TQApplication::reverseLayout() ? "2leftarrow":"2rightarrow", Key_End,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectLast()), actionCollection, "last");
mSelectPrevious=new KAction(i18n("&Previous"),
- QApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace,
- this,SLOT(slotSelectPrevious()), actionCollection, "previous");
+ TQApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectPrevious()), actionCollection, "previous");
mSelectNext=new KAction(i18n("&Next"),
- QApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space,
- this,SLOT(slotSelectNext()), actionCollection, "next");
+ TQApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectNext()), actionCollection, "next");
mSelectPreviousDir=new KAction(i18n("&Previous Folder"),
- QApplication::reverseLayout() ? "player_fwd":"player_rew", ALT + Key_BackSpace,
- this,SLOT(slotSelectPreviousDir()), actionCollection, "previous_folder");
+ TQApplication::reverseLayout() ? "player_fwd":"player_rew", ALT + Key_BackSpace,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectPreviousDir()), actionCollection, "previous_folder");
mSelectNextDir=new KAction(i18n("&Next Folder"),
- QApplication::reverseLayout() ? "player_rew":"player_fwd", ALT + Key_Space,
- this,SLOT(slotSelectNextDir()), actionCollection, "next_folder");
+ TQApplication::reverseLayout() ? "player_rew":"player_fwd", ALT + Key_Space,
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectNextDir()), actionCollection, "next_folder");
mSelectFirstSubDir=new KAction(i18n("&First Sub Folder"), "down", ALT + Key_Down,
- this,SLOT(slotSelectFirstSubDir()), actionCollection, "first_sub_folder");
+ TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirstSubDir()), actionCollection, "first_sub_folder");
- mListMode=new KRadioAction(i18n("Details"),"view_detailed",0,this,SLOT(updateViewMode()),actionCollection,"list_mode");
+ mListMode=new KRadioAction(i18n("Details"),"view_detailed",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"list_mode");
mListMode->setExclusiveGroup("thumbnails");
- mSideThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Side"),"view_multicolumn",0,this,SLOT(updateViewMode()),actionCollection,"side_thumbnail_mode");
+ mSideThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Side"),"view_multicolumn",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"side_thumbnail_mode");
mSideThumbnailMode->setExclusiveGroup("thumbnails");
- mBottomThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Bottom"),"view_icon",0,this,SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode");
+ mBottomThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Bottom"),"view_icon",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode");
mBottomThumbnailMode->setExclusiveGroup("thumbnails");
// Size slider
- mSizeSlider=new QSlider(Horizontal, d->mToolBar);
+ mSizeSlider=new TQSlider(Qt::Horizontal, d->mToolBar);
mSizeSlider->setFixedWidth(120);
mSizeSlider->setRange(
ThumbnailSize::MIN/SLIDER_RESOLUTION,
ThumbnailSize::LARGE/SLIDER_RESOLUTION);
mSizeSlider->setValue(FileViewConfig::thumbnailSize() / SLIDER_RESOLUTION);
- connect(mSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateThumbnailSize(int)) );
- connect(mListMode, SIGNAL(toggled(bool)), mSizeSlider, SLOT(setDisabled(bool)) );
+ connect(mSizeSlider, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(updateThumbnailSize(int)) );
+ connect(mListMode, TQT_SIGNAL(toggled(bool)), mSizeSlider, TQT_SLOT(setDisabled(bool)) );
KAction* sliderAction=new KWidgetAction(mSizeSlider, i18n("Thumbnail Size"), 0, 0, 0, actionCollection, "size_slider");
d->mSliderTracker=new TipTracker("", mSizeSlider);
// /Size slider
- mShowDotFiles=new KToggleAction(i18n("Show &Hidden Files"),CTRL + Key_H,this,SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files");
+ mShowDotFiles=new KToggleAction(i18n("Show &Hidden Files"),CTRL + Key_H,TQT_TQOBJECT(this),TQT_SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files");
- d->mSortAction=new KSelectAction(i18n("Sort"), 0, this, SLOT(setSorting()), actionCollection, "view_sort");
- QStringList sortItems;
+ d->mSortAction=new KSelectAction(i18n("Sort"), 0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "view_sort");
+ TQStringList sortItems;
sortItems << i18n("By Name") << i18n("By Date") << i18n("By Size");
d->mSortAction->setItems(sortItems);
d->mSortAction->setCurrentItem(0);
- d->mRevertSortAction=new KToggleAction(i18n("Descending"),0, this, SLOT(setSorting()), actionCollection, "descending");
- QPopupMenu* sortMenu=d->mSortAction->popupMenu();
+ d->mRevertSortAction=new KToggleAction(i18n("Descending"),0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "descending");
+ TQPopupMenu* sortMenu=d->mSortAction->popupMenu();
Q_ASSERT(sortMenu);
sortMenu->insertSeparator();
d->mRevertSortAction->plug(sortMenu);
// Dir lister
mDirLister=new DirLister;
- mDirLister->setMainWindow(topLevelWidget());
- connect(mDirLister,SIGNAL(clear()),
- this,SLOT(dirListerClear()) );
+ mDirLister->setMainWindow(tqtopLevelWidget());
+ connect(mDirLister,TQT_SIGNAL(clear()),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerClear()) );
- connect(mDirLister,SIGNAL(newItems(const KFileItemList&)),
- this,SLOT(dirListerNewItems(const KFileItemList&)) );
+ connect(mDirLister,TQT_SIGNAL(newItems(const KFileItemList&)),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerNewItems(const KFileItemList&)) );
- connect(mDirLister,SIGNAL(deleteItem(KFileItem*)),
- this,SLOT(dirListerDeleteItem(KFileItem*)) );
+ connect(mDirLister,TQT_SIGNAL(deleteItem(KFileItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerDeleteItem(KFileItem*)) );
- connect(mDirLister,SIGNAL(refreshItems(const KFileItemList&)),
- this,SLOT(dirListerRefreshItems(const KFileItemList&)) );
+ connect(mDirLister,TQT_SIGNAL(refreshItems(const KFileItemList&)),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerRefreshItems(const KFileItemList&)) );
- connect(mDirLister,SIGNAL(started(const KURL&)),
- this,SLOT(dirListerStarted()) );
+ connect(mDirLister,TQT_SIGNAL(started(const KURL&)),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerStarted()) );
- connect(mDirLister,SIGNAL(completed()),
- this,SLOT(dirListerCompleted()) );
+ connect(mDirLister,TQT_SIGNAL(completed()),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerCompleted()) );
- connect(mDirLister,SIGNAL(canceled()),
- this,SLOT(dirListerCanceled()) );
+ connect(mDirLister,TQT_SIGNAL(canceled()),
+ TQT_TQOBJECT(this),TQT_SLOT(dirListerCanceled()) );
// Propagate canceled signals
- connect(mDirLister,SIGNAL(canceled()),
- this,SIGNAL(canceled()) );
+ connect(mDirLister,TQT_SIGNAL(canceled()),
+ this,TQT_SIGNAL(canceled()) );
// File detail widget
mFileDetailView=new FileDetailView(d->mStack, "filedetailview");
d->mStack->addWidget(mFileDetailView,0);
mFileDetailView->viewport()->installEventFilter(this);
- connect(mFileDetailView,SIGNAL(executed(QListViewItem*)),
- this,SLOT(slotViewExecuted()) );
- connect(mFileDetailView,SIGNAL(returnPressed(QListViewItem*)),
- this,SLOT(slotViewExecuted()) );
- connect(mFileDetailView,SIGNAL(currentChanged(QListViewItem*)),
- this,SLOT(slotViewClicked()) );
- connect(mFileDetailView,SIGNAL(selectionChanged()),
- this,SLOT(slotViewClicked()) );
- connect(mFileDetailView,SIGNAL(clicked(QListViewItem*)),
- this,SLOT(slotViewClicked()) );
- connect(mFileDetailView,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this,SLOT(openContextMenu(KListView*, QListViewItem*, const QPoint&)) );
- connect(mFileDetailView,SIGNAL(dropped(QDropEvent*,KFileItem*)),
- this,SLOT(openDropURLMenu(QDropEvent*, KFileItem*)) );
- connect(mFileDetailView, SIGNAL(sortingChanged(QDir::SortSpec)),
- this, SLOT(updateSortMenu(QDir::SortSpec)) );
- connect(mFileDetailView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotViewDoubleClicked()) );
- connect(mFileDetailView, SIGNAL(selectionChanged()),
- this, SIGNAL(selectionChanged()) );
+ connect(mFileDetailView,TQT_SIGNAL(executed(TQListViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) );
+ connect(mFileDetailView,TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) );
+ connect(mFileDetailView,TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileDetailView,TQT_SIGNAL(selectionChanged()),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileDetailView,TQT_SIGNAL(clicked(TQListViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileDetailView,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ TQT_TQOBJECT(this),TQT_SLOT(openContextMenu(KListView*, TQListViewItem*, const TQPoint&)) );
+ connect(mFileDetailView,TQT_SIGNAL(dropped(TQDropEvent*,KFileItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(openDropURLMenu(TQDropEvent*, KFileItem*)) );
+ connect(mFileDetailView, TQT_SIGNAL(sortingChanged(TQDir::SortSpec)),
+ this, TQT_SLOT(updateSortMenu(TQDir::SortSpec)) );
+ connect(mFileDetailView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotViewDoubleClicked()) );
+ connect(mFileDetailView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SIGNAL(selectionChanged()) );
// Thumbnail widget
mFileThumbnailView=new FileThumbnailView(d->mStack);
d->mStack->addWidget(mFileThumbnailView,1);
mFileThumbnailView->viewport()->installEventFilter(this);
- connect(mFileThumbnailView,SIGNAL(executed(QIconViewItem*)),
- this,SLOT(slotViewExecuted()) );
- connect(mFileThumbnailView,SIGNAL(returnPressed(QIconViewItem*)),
- this,SLOT(slotViewExecuted()) );
- connect(mFileThumbnailView,SIGNAL(currentChanged(QIconViewItem*)),
- this,SLOT(slotViewClicked()) );
- connect(mFileThumbnailView,SIGNAL(selectionChanged()),
- this,SLOT(slotViewClicked()) );
- connect(mFileThumbnailView,SIGNAL(clicked(QIconViewItem*)),
- this,SLOT(slotViewClicked()) );
- connect(mFileThumbnailView,SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)),
- this,SLOT(openContextMenu(QIconViewItem*,const QPoint&)) );
- connect(mFileThumbnailView,SIGNAL(dropped(QDropEvent*,KFileItem*)),
- this,SLOT(openDropURLMenu(QDropEvent*, KFileItem*)) );
- connect(mFileThumbnailView, SIGNAL(doubleClicked(QIconViewItem*)),
- this, SLOT(slotViewDoubleClicked()) );
- connect(mFileThumbnailView, SIGNAL(selectionChanged()),
- this, SIGNAL(selectionChanged()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(executed(TQIconViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(returnPressed(TQIconViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(currentChanged(TQIconViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(selectionChanged()),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(clicked(TQIconViewItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) );
+ connect(mFileThumbnailView,TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)),
+ TQT_TQOBJECT(this),TQT_SLOT(openContextMenu(TQIconViewItem*,const TQPoint&)) );
+ connect(mFileThumbnailView,TQT_SIGNAL(dropped(TQDropEvent*,KFileItem*)),
+ TQT_TQOBJECT(this),TQT_SLOT(openDropURLMenu(TQDropEvent*, KFileItem*)) );
+ connect(mFileThumbnailView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)),
+ this, TQT_SLOT(slotViewDoubleClicked()) );
+ connect(mFileThumbnailView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SIGNAL(selectionChanged()) );
// Thumbnail details dialog
- KAction* thumbnailDetailsDialogAction=new KAction(i18n("Edit Thumbnail Details..."), "configure", 0, mFileThumbnailView, SLOT(showThumbnailDetailsDialog()), actionCollection, "thumbnail_details_dialog");
- connect(mBottomThumbnailMode, SIGNAL(toggled(bool)),
- thumbnailDetailsDialogAction, SLOT(setEnabled(bool)) );
+ KAction* thumbnailDetailsDialogAction=new KAction(i18n("Edit Thumbnail Details..."), "configure", 0, TQT_TQOBJECT(mFileThumbnailView), TQT_SLOT(showThumbnailDetailsDialog()), actionCollection, "thumbnail_details_dialog");
+ connect(mBottomThumbnailMode, TQT_SIGNAL(toggled(bool)),
+ thumbnailDetailsDialogAction, TQT_SLOT(setEnabled(bool)) );
// Fill toolbar
mListMode->plug(d->mToolBar);
@@ -438,7 +438,7 @@ FileViewController::FileViewController(QWidget* parent,KActionCollection* action
mSizeSlider->setEnabled(startWithThumbnails);
if (startWithThumbnails) {
- if (mFileThumbnailView->itemTextPos()==QIconView::Right) {
+ if (mFileThumbnailView->itemTextPos()==TQIconView::Right) {
mSideThumbnailMode->setChecked(true);
} else {
mBottomThumbnailMode->setChecked(true);
@@ -485,11 +485,11 @@ void FileViewController::setFocus() {
* Do not let double click events propagate if Ctrl or Shift is down, to avoid
* toggling fullscreen
*/
-bool FileViewController::eventFilter(QObject*, QEvent* event) {
- if (event->type()!=QEvent::MouseButtonDblClick) return false;
+bool FileViewController::eventFilter(TQObject*, TQEvent* event) {
+ if (event->type()!=TQEvent::MouseButtonDblClick) return false;
- QMouseEvent* mouseEvent=static_cast<QMouseEvent*>(event);
- if (mouseEvent->state() & Qt::ControlButton || mouseEvent->state() & Qt::ShiftButton) {
+ TQMouseEvent* mouseEvent=TQT_TQMOUSEEVENT(event);
+ if (mouseEvent->state() & TQt::ControlButton || mouseEvent->state() & TQt::ShiftButton) {
return true;
}
return false;
@@ -521,7 +521,7 @@ void FileViewController::setDirURL(const KURL& url) {
mDirLister->clearError();
currentFileView()->setShownFileItem(0L);
- mFileNameToSelect=QString::null;
+ mFileNameToSelect=TQString();
mDirLister->openURL(mDirURL);
emit urlChanged(mDirURL);
emit directoryChanged(mDirURL);
@@ -533,7 +533,7 @@ void FileViewController::setDirURL(const KURL& url) {
* Sets the file to select once the dir lister is done. If it's not running,
* immediatly selects the file.
*/
-void FileViewController::setFileNameToSelect(const QString& fileName) {
+void FileViewController::setFileNameToSelect(const TQString& fileName) {
mFileNameToSelect=fileName;
if (mDirLister->isFinished()) {
browseToFileNameToSelect();
@@ -543,13 +543,13 @@ void FileViewController::setFileNameToSelect(const QString& fileName) {
void FileViewController::prefetch( KFileItem* item ) {
prefetchDone();
if( item == NULL ) return;
- mPrefetch = ImageLoader::loader( item->url(), this, BUSY_PRELOADING );
- connect( mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone()));
+ mPrefetch = ImageLoader::loader( item->url(), TQT_TQOBJECT(this), BUSY_PRELOADING );
+ connect( mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone()));
}
void FileViewController::prefetchDone() {
if( mPrefetch != NULL ) {
- mPrefetch->release( this );
+ mPrefetch->release( TQT_TQOBJECT(this) );
mPrefetch = NULL;
}
}
@@ -575,13 +575,13 @@ void FileViewController::slotSelectNext() {
}
void FileViewController::slotSelectPreviousDir() {
- mChangeDirStatus = CHANGE_DIR_STATUS_PREV;
+ mChangeDirtqStatus = CHANGE_DIR_STATUS_PREV;
mDirLister->clearError();
mDirLister->openURL(mDirURL.upURL());
}
void FileViewController::slotSelectNextDir() {
- mChangeDirStatus = CHANGE_DIR_STATUS_NEXT;
+ mChangeDirtqStatus = CHANGE_DIR_STATUS_NEXT;
mDirLister->clearError();
mDirLister->openURL(mDirURL.upURL());
}
@@ -611,12 +611,12 @@ void FileViewController::resetNameFilter() {
void FileViewController::resetFromFilter() {
- d->mFilterBar->mFromDateEdit->setDate(QDate());
+ d->mFilterBar->mFromDateEdit->setDate(TQDate());
}
void FileViewController::resetToFilter() {
- d->mFilterBar->mToDateEdit->setDate(QDate());
+ d->mFilterBar->mToDateEdit->setDate(TQDate());
}
@@ -642,7 +642,7 @@ void FileViewController::browseToFileNameToSelect() {
// There's something to select
if (!mFileNameToSelect.isEmpty()) {
browseTo(findItemByFileName(mFileNameToSelect));
- mFileNameToSelect=QString::null;
+ mFileNameToSelect=TQString();
return;
}
@@ -722,9 +722,9 @@ void FileViewController::updateViewMode() {
return;
}
if (mSideThumbnailMode->isChecked()) {
- mFileThumbnailView->setItemTextPos(QIconView::Right);
+ mFileThumbnailView->setItemTextPos(TQIconView::Right);
} else {
- mFileThumbnailView->setItemTextPos(QIconView::Bottom);
+ mFileThumbnailView->setItemTextPos(TQIconView::Bottom);
}
// Only switch the view if we are going from no thumbs to either side or
@@ -747,7 +747,7 @@ void FileViewController::updateViewMode() {
void FileViewController::updateThumbnailSize(int size) {
size*=SLIDER_RESOLUTION;
- d->mSliderTracker->setText(i18n("Thumbnail size: %1x%2").arg(size).arg(size));
+ d->mSliderTracker->setText(i18n("Thumbnail size: %1x%2").tqarg(size).tqarg(size));
FileViewConfig::setThumbnailSize(size);
mFileThumbnailView->setThumbnailSize(size);
Cache::instance()->checkThumbnailSize(size);
@@ -760,17 +760,17 @@ void FileViewController::toggleShowDotFiles() {
}
-void FileViewController::updateSortMenu(QDir::SortSpec _spec) {
- int spec=_spec & (QDir::Name | QDir::Time | QDir::Size);
+void FileViewController::updateSortMenu(TQDir::SortSpec _spec) {
+ int spec=_spec & (TQDir::Name | TQDir::Time | TQDir::Size);
int item;
switch (spec) {
- case QDir::Name:
+ case TQDir::Name:
item=0;
break;
- case QDir::Time:
+ case TQDir::Time:
item=1;
break;
- case QDir::Size:
+ case TQDir::Size:
item=2;
break;
default:
@@ -782,25 +782,25 @@ void FileViewController::updateSortMenu(QDir::SortSpec _spec) {
void FileViewController::setSorting() {
- QDir::SortSpec spec;
+ TQDir::SortSpec spec;
switch (d->mSortAction->currentItem()) {
case 0: // Name
- spec=QDir::Name;
+ spec=TQDir::Name;
break;
case 1: // Date
- spec=QDir::Time;
+ spec=TQDir::Time;
break;
case 2: // Size
- spec=QDir::Size;
+ spec=TQDir::Size;
break;
default:
return;
}
if (d->mRevertSortAction->isChecked()) {
- spec=QDir::SortSpec(spec | QDir::Reversed);
+ spec=TQDir::SortSpec(spec | TQDir::Reversed);
}
- currentFileView()->setSorting(QDir::SortSpec(spec | QDir::DirsFirst));
+ currentFileView()->setSorting(TQDir::SortSpec(spec | TQDir::DirsFirst));
emit sortingChanged();
}
@@ -810,12 +810,12 @@ void FileViewController::setSorting() {
// Context menu
//
//-----------------------------------------------------------------------
-void FileViewController::openContextMenu(KListView*,QListViewItem* item,const QPoint& pos) {
+void FileViewController::openContextMenu(KListView*,TQListViewItem* item,const TQPoint& pos) {
emit requestContextMenu(pos, item!=0);
}
-void FileViewController::openContextMenu(QIconViewItem* item,const QPoint& pos) {
+void FileViewController::openContextMenu(TQIconViewItem* item,const TQPoint& pos) {
emit requestContextMenu(pos, item!=0);
}
@@ -825,7 +825,7 @@ void FileViewController::openContextMenu(QIconViewItem* item,const QPoint& pos)
// Drop URL menu
//
//-----------------------------------------------------------------------
-void FileViewController::openDropURLMenu(QDropEvent* event, KFileItem* item) {
+void FileViewController::openDropURLMenu(TQDropEvent* event, KFileItem* item) {
KURL dest;
if (item) {
@@ -884,7 +884,7 @@ KURL::List FileViewController::selectedImageURLs() const {
// Properties
//
//-----------------------------------------------------------------------
-QString FileViewController::fileName() const {
+TQString FileViewController::fileName() const {
KFileItem* item=currentFileView()->currentFileItem();
if (!item) return "";
return item->text();
@@ -1064,7 +1064,7 @@ void FileViewController::refreshItems(const KURL::List& urls) {
it != urls.end();
++it ) {
KURL dir = *it;
- dir.setFileName( QString::null );
+ dir.setFileName( TQString() );
if( dir != mDirURL ) continue;
// TODO this could be quite slow for many images?
KFileItem* item = findItemByFileName( (*it).filename());
@@ -1089,7 +1089,7 @@ void FileViewController::dirListerCompleted() {
LOG("");
// Delay the code to be executed when the dir lister has completed its job
// to avoid crash in KDirLister (see bug #57991)
- QTimer::singleShot(0,this,SLOT(delayedDirListerCompleted()));
+ TQTimer::singleShot(0,TQT_TQOBJECT(this),TQT_SLOT(delayedDirListerCompleted()));
}
@@ -1102,12 +1102,12 @@ void FileViewController::delayedDirListerCompleted() {
mFileThumbnailView->sort(mFileThumbnailView->sortDirection());
}
- if (mChangeDirStatus != CHANGE_DIR_STATUS_NONE) {
+ if (mChangeDirtqStatus != CHANGE_DIR_STATUS_NONE) {
KFileItem *item;
- QString fileName = mDirURL.filename();
+ TQString fileName = mDirURL.filename();
for (item=currentFileView()->firstFileItem(); item; item=currentFileView()->nextItem(item) ) {
if (item->name() == fileName) {
- if (mChangeDirStatus == CHANGE_DIR_STATUS_NEXT) {
+ if (mChangeDirtqStatus == CHANGE_DIR_STATUS_NEXT) {
do {
item=currentFileView()->nextItem(item);
} while (item && !Archive::fileItemIsDirOrArchive(item));
@@ -1119,7 +1119,7 @@ void FileViewController::delayedDirListerCompleted() {
break;
};
}
- mChangeDirStatus = CHANGE_DIR_STATUS_NONE;
+ mChangeDirtqStatus = CHANGE_DIR_STATUS_NONE;
if (!item) {
mDirLister->openURL(mDirURL);
} else {
@@ -1161,23 +1161,23 @@ void FileViewController::setFilterMode(int mode) {
}
-void FileViewController::setFilterName(const QString& name) {
+void FileViewController::setFilterName(const TQString& name) {
d->mFilterBar->mNameEdit->setText(name);
}
-void FileViewController::setFilterFromDate(const QDate& date) {
+void FileViewController::setFilterFromDate(const TQDate& date) {
d->mFilterBar->mFromDateEdit->setDate(date);
}
-void FileViewController::setFilterToDate(const QDate& date) {
+void FileViewController::setFilterToDate(const TQDate& date) {
d->mFilterBar->mToDateEdit->setDate(date);
}
void FileViewController::applyFilter() {
- QStringList mimeTypes;
+ TQStringList mimeTypes;
FilterMode filterMode = static_cast<FilterMode>( d->mFilterComboBox->currentItem() );
if (FileViewConfig::showDirs()) {
@@ -1195,15 +1195,15 @@ void FileViewController::applyFilter() {
}
if (d->mShowFilterBarCheckBox->isChecked()) {
- QString txt=d->mFilterBar->mNameEdit->text();
- QDate from=d->mFilterBar->mFromDateEdit->date();
- QDate to=d->mFilterBar->mToDateEdit->date();
+ TQString txt=d->mFilterBar->mNameEdit->text();
+ TQDate from=d->mFilterBar->mFromDateEdit->date();
+ TQDate to=d->mFilterBar->mToDateEdit->date();
mDirLister->setNameFilter(txt);
mDirLister->setDateFilter(from, to);
} else {
- mDirLister->setNameFilter(QString::null);
- mDirLister->setDateFilter(QDate(), QDate());
+ mDirLister->setNameFilter(TQString());
+ mDirLister->setDateFilter(TQDate(), TQDate());
}
mDirLister->setShowingDotFiles(mShowDotFiles->isChecked());
@@ -1305,7 +1305,7 @@ KFileItem* FileViewController::findNextImage() const {
return item;
}
-KFileItem* FileViewController::findItemByFileName(const QString& fileName) const {
+KFileItem* FileViewController::findItemByFileName(const TQString& fileName) const {
KFileItem *item;
if (fileName.isEmpty()) return 0L;
for (item=currentFileView()->firstFileItem();
diff --git a/src/gvcore/fileviewcontroller.h b/src/gvcore/fileviewcontroller.h
index 81d1269..8aae0d0 100644
--- a/src/gvcore/fileviewcontroller.h
+++ b/src/gvcore/fileviewcontroller.h
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef FILEVIEWCONTROLLER_H
#define FILEVIEWCONTROLLER_H
-// Qt
-#include <qdir.h>
-#include <qslider.h>
-#include <qwidget.h>
+// TQt
+#include <tqdir.h>
+#include <tqslider.h>
+#include <tqwidget.h>
// KDE
#include <kdirlister.h>
@@ -33,9 +33,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <kurl.h>
#include "libgwenview_export.h"
-class QIconViewItem;
-class QListViewItem;
-class QPopupMenu;
+class TQIconViewItem;
+class TQListViewItem;
+class TQPopupMenu;
class KAccel;
class KAction;
@@ -54,20 +54,21 @@ class ImageLoader;
class DirLister;
-class LIBGWENVIEW_EXPORT FileViewController : public QWidget {
+class LIBGWENVIEW_EXPORT FileViewController : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { FILE_LIST, THUMBNAIL};
enum FilterMode { ALL, IMAGES_ONLY, VIDEOS_ONLY };
- FileViewController(QWidget* parent,KActionCollection*);
+ FileViewController(TQWidget* tqparent,KActionCollection*);
~FileViewController();
// Properties
void setMode(Mode);
- QString fileName() const;
+ TQString fileName() const;
KURL url() const;
KURL dirURL() const;
uint fileCount() const;
@@ -112,7 +113,7 @@ public:
public slots:
void setDirURL(const KURL&);
- void setFileNameToSelect(const QString&);
+ void setFileNameToSelect(const TQString&);
void slotSelectFirst();
void slotSelectLast();
@@ -129,9 +130,9 @@ public slots:
void setShowFilterBar(bool);
// 'int' suck, but I don't want to #include fileviewconfig.h
void setFilterMode(int);
- void setFilterName(const QString&);
- void setFilterFromDate(const QDate&);
- void setFilterToDate(const QDate&);
+ void setFilterName(const TQString&);
+ void setFilterFromDate(const TQDate&);
+ void setFilterToDate(const TQDate&);
void applyFilter();
signals:
@@ -147,7 +148,7 @@ signals:
void imageDoubleClicked();
void shownFileItemRefreshed(const KFileItem*);
void sortingChanged();
- void requestContextMenu(const QPoint& pos, bool onItem);
+ void requestContextMenu(const TQPoint& pos, bool onItem);
private slots:
void delayedDirListerCompleted();
@@ -161,9 +162,9 @@ private slots:
void slotViewDoubleClicked();
// These two methods forward the context menu requests from either view to
- // openContextMenu(const QPoint&);
- void openContextMenu(KListView*, QListViewItem*, const QPoint&);
- void openContextMenu(QIconViewItem*,const QPoint&);
+ // openContextMenu(const TQPoint&);
+ void openContextMenu(KListView*, TQListViewItem*, const TQPoint&);
+ void openContextMenu(TQIconViewItem*,const TQPoint&);
// Get called by the thumbnail mode actions
void updateViewMode();
@@ -173,7 +174,7 @@ private slots:
void toggleShowDotFiles();
void setSorting();
- void updateSortMenu(QDir::SortSpec);
+ void updateSortMenu(TQDir::SortSpec);
// Dir lister slots
void dirListerDeleteItem(KFileItem* item);
@@ -184,7 +185,7 @@ private slots:
void dirListerCanceled();
void dirListerCompleted();
- void openDropURLMenu(QDropEvent*, KFileItem*);
+ void openDropURLMenu(TQDropEvent*, KFileItem*);
void prefetchDone();
@@ -215,18 +216,18 @@ private:
KRadioAction* mSideThumbnailMode;
KRadioAction* mBottomThumbnailMode;
- QSlider* mSizeSlider;
+ TQSlider* mSizeSlider;
KToggleAction* mShowDotFiles;
// Temp data used by the dir lister
bool mThumbnailsNeedUpdate;
- QString mFileNameToSelect;
+ TQString mFileNameToSelect;
enum ChangeDirStatusVals {
CHANGE_DIR_STATUS_NONE,
CHANGE_DIR_STATUS_PREV,
CHANGE_DIR_STATUS_NEXT
- } mChangeDirStatus;
+ } mChangeDirtqStatus;
bool mBrowsing;
bool mSelecting;
@@ -245,9 +246,9 @@ private:
KFileItem* findLastImage() const;
KFileItem* findPreviousImage() const;
KFileItem* findNextImage() const;
- KFileItem* findItemByFileName(const QString& fileName) const;
+ KFileItem* findItemByFileName(const TQString& fileName) const;
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
};
diff --git a/src/gvcore/filterbar.ui b/src/gvcore/filterbar.ui
index 461e9f7..5b33bed 100644
--- a/src/gvcore/filterbar.ui
+++ b/src/gvcore/filterbar.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>FilterBar</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>FilterBar</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -27,7 +27,7 @@
<property name="margin">
<number>3</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mResetNameCombo</cstring>
</property>
@@ -64,14 +64,14 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mResetFrom</cstring>
</property>
@@ -87,7 +87,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -106,7 +106,7 @@
<cstring>mFromDateEdit</cstring>
</property>
</widget>
- <widget class="QDateEdit">
+ <widget class="TQDateEdit">
<property name="name">
<cstring>mFromDateEdit</cstring>
</property>
@@ -125,14 +125,14 @@ equal to this date</string>
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mResetTo</cstring>
</property>
@@ -148,7 +148,7 @@ equal to this date</string>
<string></string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -167,7 +167,7 @@ equal to this date</string>
<cstring>mToDateEdit</cstring>
</property>
</widget>
- <widget class="QDateEdit">
+ <widget class="TQDateEdit">
<property name="name">
<cstring>mToDateEdit</cstring>
</property>
@@ -185,14 +185,14 @@ equal to this date</string>
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>mFilterButton</cstring>
</property>
@@ -210,7 +210,7 @@ equal to this date</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>16</height>
@@ -251,5 +251,5 @@ equal to this date</string>
<tabstop>mToDateEdit</tabstop>
<tabstop>mFilterButton</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/gvcore/fullscreenbar.cpp b/src/gvcore/fullscreenbar.cpp
index bd3b3de..46f0af8 100644
--- a/src/gvcore/fullscreenbar.cpp
+++ b/src/gvcore/fullscreenbar.cpp
@@ -18,12 +18,12 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qbitmap.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtimer.h>
+// TQt
+#include <tqbitmap.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -42,7 +42,7 @@ const int SLIDE_OUT_INTERVAL = 12;
const int SLIDE_STEP = 4;
-static void fillMask(QPainter& painter, const QRect& rect) {
+static void fillMask(TQPainter& painter, const TQRect& rect) {
painter.fillRect(
rect.left(),
rect.top(),
@@ -69,31 +69,31 @@ enum BarState { OUT, SLIDING_OUT, SLIDING_IN, IN };
struct FullScreenBar::Private {
- QTimer mTimer;
+ TQTimer mTimer;
BarState mState;
bool mFirstShow;
};
-FullScreenBar::FullScreenBar(QWidget* parent)
-: KToolBar(parent, "FullScreenBar") {
+FullScreenBar::FullScreenBar(TQWidget* tqparent)
+: KToolBar(tqparent, "FullScreenBar") {
d=new Private;
d->mState=OUT;
d->mFirstShow=true;
setIconSize(FULLSCREEN_ICON_SIZE);
setMovingEnabled(false);
- QColor bg=colorGroup().highlight();
- QColor fg=colorGroup().highlightedText();
- QPalette pal(palette());
- pal.setColor(QColorGroup::Background, bg);
- pal.setColor(QColorGroup::Foreground, fg);
- pal.setColor(QColorGroup::Button, bg);
- pal.setColor(QColorGroup::ButtonText, fg);
+ TQColor bg=tqcolorGroup().highlight();
+ TQColor fg=tqcolorGroup().highlightedText();
+ TQPalette pal(palette());
+ pal.setColor(TQColorGroup::Background, bg);
+ pal.setColor(TQColorGroup::Foreground, fg);
+ pal.setColor(TQColorGroup::Button, bg);
+ pal.setColor(TQColorGroup::ButtonText, fg);
setPalette(pal);
// Timer
- connect(&d->mTimer, SIGNAL(timeout()), this, SLOT(slotUpdateSlide()) );
+ connect(&d->mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateSlide()) );
}
@@ -102,28 +102,28 @@ FullScreenBar::~FullScreenBar() {
}
-void FullScreenBar::resizeEvent(QResizeEvent* event) {
+void FullScreenBar::resizeEvent(TQResizeEvent* event) {
KToolBar::resizeEvent(event);
- // Create a mask
- QPainter painter;
- QBitmap mask(size(), true);
- painter.begin(&mask);
- painter.setBrush(Qt::white);
+ // Create a tqmask
+ TQPainter painter;
+ TQBitmap tqmask(size(), true);
+ painter.begin(&tqmask);
+ painter.setBrush(TQt::white);
fillMask(painter, rect());
painter.end();
- setMask(mask);
+ setMask(tqmask);
}
-void FullScreenBar::showEvent(QShowEvent* event) {
+void FullScreenBar::showEvent(TQShowEvent* event) {
KToolBar::showEvent(event);
// Make sure the bar position corresponds to the OUT state
if (!d->mFirstShow) return;
d->mFirstShow=false;
move(0, -height());
- layout()->setResizeMode(QLayout::Fixed);
+ tqlayout()->setResizeMode(TQLayout::Fixed);
}
diff --git a/src/gvcore/fullscreenbar.h b/src/gvcore/fullscreenbar.h
index 8322aa4..729b69c 100644
--- a/src/gvcore/fullscreenbar.h
+++ b/src/gvcore/fullscreenbar.h
@@ -25,23 +25,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <ktoolbar.h>
-class QResizeEvent;
-class QShowEvent;
-class QString;
+class TQResizeEvent;
+class TQShowEvent;
+class TQString;
namespace Gwenview {
class FullScreenBar : public KToolBar {
Q_OBJECT
+ TQ_OBJECT
public:
- FullScreenBar(QWidget* parent);
+ FullScreenBar(TQWidget* tqparent);
~FullScreenBar();
void slideIn();
void slideOut();
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void showEvent(QShowEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void showEvent(TQShowEvent*);
private slots:
void slotUpdateSlide();
diff --git a/src/gvcore/gimp.h b/src/gvcore/gimp.h
index b93b491..552916b 100644
--- a/src/gvcore/gimp.h
+++ b/src/gvcore/gimp.h
@@ -1,6 +1,6 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/* -*- c++ -*-
- * gimp.h: Header for a Qt 3 plug-in for reading GIMP XCF image files
+ * gimp.h: Header for a TQt 3 plug-in for reading GIMP XCF image files
* Copyright (C) 2001 lignum Computing, Inc. <[email protected]>
*
* This plug-in is free software; you can redistribute it and/or
@@ -42,9 +42,9 @@ const uchar OPAQUE_OPACITY = 255; //!< Opaque value for 8-bit alpha component.
// From GIMP "apptypes.h" v1.2
-//! Basic GIMP image type. QImage converter may produce a deeper image
+//! Basic GIMP image type. TQImage converter may produce a deeper image
//! than is specified here. For example, a grayscale image with an
-//! alpha channel must (currently) use a 32-bit Qt image.
+//! alpha channel must (currently) use a 32-bit TQt image.
typedef enum
{
diff --git a/src/gvcore/imageframe.h b/src/gvcore/imageframe.h
index 13d4854..1ff3c33 100644
--- a/src/gvcore/imageframe.h
+++ b/src/gvcore/imageframe.h
@@ -21,21 +21,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGEFRAME_H
#define IMAGEFRAME_H
-// Qt
-#include <qimage.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqimage.h>
+#include <tqvaluevector.h>
namespace Gwenview {
// Local
struct ImageFrame {
- ImageFrame( const QImage& i, int d ) : image( i ), delay( d ) {};
- ImageFrame() : delay( 0 ) {} // stupid Qt containers
- QImage image;
+ ImageFrame( const TQImage& i, int d ) : image( i ), delay( d ) {};
+ ImageFrame() : delay( 0 ) {} // stupid TQt containers
+ TQImage image;
int delay; // how long this frame should be shown in the animation
};
-typedef QValueVector< ImageFrame > ImageFrames;
+typedef TQValueVector< ImageFrame > ImageFrames;
} // namespace
#endif /* IMAGEFRAME_H */
diff --git a/src/gvcore/imageloader.cpp b/src/gvcore/imageloader.cpp
index 8cbc442..c14de6e 100644
--- a/src/gvcore/imageloader.cpp
+++ b/src/gvcore/imageloader.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -23,9 +23,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <assert.h>
-// Qt
-#include <qtimer.h>
-#include <qwmatrix.h>
+// TQt
+#include <tqtimer.h>
+#include <tqwmatrix.h>
// KDE
#include <kapplication.h>
@@ -64,59 +64,59 @@ const int IMAGE_UPDATE_INTERVAL=100;
#define LOG2(x) ;
#endif
-static QMap< KURL, ImageLoader* > sLoaders;
+static TQMap< KURL, ImageLoader* > sLoaders;
//---------------------------------------------------------------------
//
// CancellableBuffer
-// This class acts like QBuffer, but will simulates a truncated file if the
+// This class acts like TQBuffer, but will simulates a truncated file if the
// TSThread which was passed to its constructor has been asked for cancellation
//
//---------------------------------------------------------------------
-class CancellableBuffer : public QBuffer {
+class CancellableBuffer : public TQBuffer {
public:
- CancellableBuffer(QByteArray buffer, TSThread* thread)
- : QBuffer(buffer), mThread(thread) {}
+ CancellableBuffer(TQByteArray buffer, TSThread* thread)
+ : TQBuffer(buffer), mThread(thread) {}
bool atEnd() const {
if (mThread->testCancel()) {
LOG("cancel detected");
return true;
}
- return QBuffer::atEnd();
+ return TQBuffer::atEnd();
}
- Q_LONG readBlock(char * data, Q_ULONG maxlen) {
+ TQ_LONG readBlock(char * data, TQ_ULONG maxlen) {
if (mThread->testCancel()) {
LOG("cancel detected");
return 0;
}
- return QBuffer::readBlock(data, maxlen);
+ return TQBuffer::readBlock(data, maxlen);
}
- Q_LONG readLine(char * data, Q_ULONG maxlen) {
+ TQ_LONG readLine(char * data, TQ_ULONG maxlen) {
if (mThread->testCancel()) {
LOG("cancel detected");
return 0;
}
- return QBuffer::readLine(data, maxlen);
+ return TQBuffer::readLine(data, maxlen);
}
- QByteArray readAll() {
+ TQByteArray readAll() {
if (mThread->testCancel()) {
LOG("cancel detected");
- return QByteArray();
+ return TQByteArray();
}
- return QBuffer::readAll();
+ return TQBuffer::readAll();
}
int getch() {
if (mThread->testCancel()) {
LOG("cancel detected");
- setStatus(IO_ReadError);
+ setqStatus(IO_ReadError);
return -1;
}
- return QBuffer::getch();
+ return TQBuffer::getch();
}
private:
@@ -130,17 +130,17 @@ private:
//
//---------------------------------------------------------------------
void DecoderThread::run() {
- QMutexLocker locker(&mMutex);
+ TQMutexLocker locker(&mMutex);
LOG("");
// This block makes sure imageIO won't access the image after the signal
// has been posted
{
- QImageIO imageIO;
+ TQImageIO imageIO;
CancellableBuffer buffer(mRawData, this);
buffer.open(IO_ReadOnly);
- imageIO.setIODevice(&buffer);
+ imageIO.setIODevice(TQT_TQIODEVICE(&buffer));
bool ok=imageIO.read();
if (testCancel()) {
LOG("cancelled");
@@ -149,7 +149,7 @@ void DecoderThread::run() {
if (!ok) {
LOG("failed");
- postSignal( this, SIGNAL(failed()) );
+ postSignal( this, TQT_SIGNAL(failed()) );
return;
}
@@ -158,20 +158,20 @@ void DecoderThread::run() {
}
LOG("succeeded, emitting signal");
- postSignal( this, SIGNAL(succeeded()) );
+ postSignal( this, TQT_SIGNAL(succeeded()) );
}
-void DecoderThread::setRawData(const QByteArray& data) {
- QMutexLocker locker(&mMutex);
+void DecoderThread::setRawData(const TQByteArray& data) {
+ TQMutexLocker locker(&mMutex);
mRawData=data.copy();
}
-QImage DecoderThread::popLoadedImage() {
- QMutexLocker locker(&mMutex);
- QImage img=mImage;
- mImage=QImage();
+TQImage DecoderThread::popLoadedImage() {
+ TQMutexLocker locker(&mMutex);
+ TQImage img=mImage;
+ mImage=TQImage();
return img;
}
@@ -183,7 +183,7 @@ QImage DecoderThread::popLoadedImage() {
//
//---------------------------------------------------------------------
struct OwnerData {
- const QObject* owner;
+ const TQObject* owner;
BusyLevel priority;
};
@@ -229,24 +229,24 @@ public:
KURL mURL;
// The file timestamp
- QDateTime mTimestamp;
+ TQDateTime mTimestamp;
// The raw data we get
- QByteArray mRawData;
+ TQByteArray mRawData;
// The async decoder and it's waking timer
- QImageDecoder mDecoder;
- QTimer mDecoderTimer;
+ TQImageDecoder mDecoder;
+ TQTimer mDecoderTimer;
// The decoder thread
DecoderThread mDecoderThread;
// A rect of recently loaded pixels that the rest of the application has
// not been notified about with the imageChanged() signal
- QRect mLoadChangedRect;
+ TQRect mLoadChangedRect;
// The time since we last emitted the imageChanged() signal
- QTime mTimeSinceLastUpdate;
+ TQTime mTimeSinceLastUpdate;
// Whether the loading should be suspended
bool mSuspended;
@@ -256,27 +256,27 @@ public:
bool mWasFrameData;
- QImage mProcessedImage; // image frame currently being decoded
+ TQImage mProcessedImage; // image frame currently being decoded
- QRegion mLoadedRegion; // loaded parts of mProcessedImage
+ TQRegion mLoadedRegion; // loaded parts of mProcessedImage
ImageFrames mFrames;
- QCString mImageFormat;
+ TQCString mImageFormat;
ImageUtils::Orientation mOrientation;
- QString mMimeType;
+ TQString mMimeType;
MimeTypeUtils::Kind mURLKind;
- QValueVector< OwnerData > mOwners; // loaders may be shared
+ TQValueVector< OwnerData > mOwners; // loaders may be shared
void determineImageFormat() {
Q_ASSERT(mRawData.size()>0);
- QBuffer buffer(mRawData);
+ TQBuffer buffer(mRawData);
buffer.open(IO_ReadOnly);
- mImageFormat = QImageIO::imageFormat(&buffer);
+ mImageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer));
}
};
@@ -289,8 +289,8 @@ public:
ImageLoader::ImageLoader() {
LOG("");
d = new ImageLoaderPrivate(this);
- connect( BusyLevelManager::instance(), SIGNAL( busyLevelChanged(BusyLevel)),
- this, SLOT( slotBusyLevelChanged(BusyLevel)));
+ connect( BusyLevelManager::instance(), TQT_SIGNAL( busyLevelChanged(BusyLevel)),
+ this, TQT_SLOT( slotBusyLevelChanged(BusyLevel)));
}
@@ -313,12 +313,12 @@ void ImageLoader::startLoading() {
d->mTimestamp = Cache::instance()->timestamp( d->mURL );
slotBusyLevelChanged( BusyLevelManager::instance()->busyLevel());
- connect(&d->mDecoderTimer, SIGNAL(timeout()), this, SLOT(decodeChunk()) );
+ connect(&d->mDecoderTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(decodeChunk()) );
- connect(&d->mDecoderThread, SIGNAL(succeeded()),
- this, SLOT(slotDecoderThreadSucceeded()) );
- connect(&d->mDecoderThread, SIGNAL(failed()),
- this, SLOT(slotDecoderThreadFailed()) );
+ connect(&d->mDecoderThread, TQT_SIGNAL(succeeded()),
+ this, TQT_SLOT(slotDecoderThreadSucceeded()) );
+ connect(&d->mDecoderThread, TQT_SIGNAL(failed()),
+ this, TQT_SLOT(slotDecoderThreadFailed()) );
checkPendingStat();
}
@@ -328,8 +328,8 @@ void ImageLoader::checkPendingStat() {
KIO::Job* job=KIO::stat( d->mURL, false );
job->setWindow(KApplication::kApplication()->mainWidget());
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotStatResult(KIO::Job*)) );
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotStatResult(KIO::Job*)) );
d->mGetState = GET_STATING;
}
@@ -339,7 +339,7 @@ void ImageLoader::slotStatResult(KIO::Job* job) {
// Get modification time of the original file
KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
KIO::UDSEntry::ConstIterator it= entry.begin();
- QDateTime urlTimestamp;
+ TQDateTime urlTimestamp;
for (; it!=entry.end(); it++) {
if ((*it).m_uds == KIO::UDS_MODIFICATION_TIME) {
urlTimestamp.setTime_t( (*it).m_long );
@@ -395,11 +395,11 @@ void ImageLoader::checkPendingGet() {
KIO::Job* getJob=KIO::get( d->mURL, false, false);
getJob->setWindow(KApplication::kApplication()->mainWidget());
- connect(getJob, SIGNAL(data(KIO::Job*, const QByteArray&)),
- this, SLOT(slotDataReceived(KIO::Job*, const QByteArray&)) );
+ connect(getJob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
+ this, TQT_SLOT(slotDataReceived(KIO::Job*, const TQByteArray&)) );
- connect(getJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotGetResult(KIO::Job*)) );
+ connect(getJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotGetResult(KIO::Job*)) );
d->mTimeSinceLastUpdate.start();
d->mGetState = GET_GETTING;
@@ -441,15 +441,15 @@ void ImageLoader::slotGetResult(KIO::Job* job) {
// There is no way in KImageIO to get the mimeType from the image format.
// This function assumes KImageIO::types and KImageIO::mimeTypes return items
// in the same order (which they do, according to the source code).
-static QString mimeTypeFromFormat(const char* format) {
- QStringList formats = KImageIO::types(KImageIO::Reading);
- QStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading);
- int pos = formats.findIndex(QString::fromAscii(format));
+static TQString mimeTypeFromFormat(const char* format) {
+ TQStringList formats = KImageIO::types(KImageIO::Reading);
+ TQStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading);
+ int pos = formats.tqfindIndex(TQString::fromAscii(format));
Q_ASSERT(pos != -1);
return mimeTypes[pos];
}
-void ImageLoader::slotDataReceived(KIO::Job* job, const QByteArray& chunk) {
+void ImageLoader::slotDataReceived(KIO::Job* job, const TQByteArray& chunk) {
LOG2("size: " << chunk.size());
if (chunk.size()<=0) return;
@@ -459,9 +459,9 @@ void ImageLoader::slotDataReceived(KIO::Job* job, const QByteArray& chunk) {
if (oldSize==0) {
// Try to determine the data type
- QBuffer buffer(d->mRawData);
+ TQBuffer buffer(d->mRawData);
buffer.open(IO_ReadOnly);
- const char* format = QImageIO::imageFormat(&buffer);
+ const char* format = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer));
if (format) {
// This is a raster image, get the mime type now
d->mURLKind = MimeTypeUtils::KIND_RASTER_IMAGE;
@@ -498,7 +498,7 @@ void ImageLoader::decodeChunk() {
return;
}
- int chunkSize = QMIN(DECODE_CHUNK_SIZE, int(d->mRawData.size())-d->mDecodedSize);
+ int chunkSize = TQMIN(DECODE_CHUNK_SIZE, int(d->mRawData.size())-d->mDecodedSize);
int decodedSize = 0;
if (chunkSize>0) {
decodedSize = d->mDecoder.decode(
@@ -581,9 +581,9 @@ void ImageLoader::finish( bool ok ) {
if (!ok) {
d->mFrames.clear();
- d->mRawData = QByteArray();
- d->mImageFormat = QCString();
- d->mProcessedImage = QImage();
+ d->mRawData = TQByteArray();
+ d->mImageFormat = TQCString();
+ d->mProcessedImage = TQImage();
emit imageLoaded( false );
return;
}
@@ -599,10 +599,10 @@ void ImageLoader::finish( bool ok ) {
BusyLevel ImageLoader::priority() const {
BusyLevel mylevel = BUSY_NONE;
- for( QValueVector< OwnerData >::ConstIterator it = d->mOwners.begin();
+ for( TQValueVector< OwnerData >::ConstIterator it = d->mOwners.begin();
it != d->mOwners.end();
++it ) {
- mylevel = QMAX( mylevel, (*it).priority );
+ mylevel = TQMAX( mylevel, (*it).priority );
}
return mylevel;
}
@@ -633,7 +633,7 @@ void ImageLoader::resumeLoading() {
//---------------------------------------------------------------------
//
-// QImageConsumer
+// TQImageConsumer
//
//---------------------------------------------------------------------
void ImageLoader::end() {
@@ -656,7 +656,7 @@ void ImageLoader::end() {
// when we return from this function we will be in decodeChunk(), after the
// call to decode(), so we don't want to switch to a new impl yet, since
// this means deleting "this".
- QTimer::singleShot(0, this, SLOT(callFinish()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(callFinish()) );
}
@@ -665,9 +665,9 @@ void ImageLoader::callFinish() {
}
-void ImageLoader::changed(const QRect& constRect) {
+void ImageLoader::changed(const TQRect& constRect) {
LOG2("");
- QRect rect = constRect;
+ TQRect rect = constRect;
if (d->mLoadedRegion.isEmpty()) {
// This is the first time we get called. Init mProcessedImage and emit
@@ -690,8 +690,8 @@ void ImageLoader::changed(const QRect& constRect) {
d->mOrientation = content.orientation();
if (MiscConfig::autoRotateImages() &&
d->mOrientation != ImageUtils::NOT_AVAILABLE && d->mOrientation != ImageUtils::NORMAL) {
- QSize size = content.size();
- d->mProcessedImage = QImage(size, d->mDecoder.image().depth());
+ TQSize size = content.size();
+ d->mProcessedImage = TQImage(size, d->mDecoder.image().depth());
}
d->mProcessedImage.setDotsPerMeterX(content.dotsPerMeterX());
d->mProcessedImage.setDotsPerMeterY(content.dotsPerMeterY());
@@ -711,7 +711,7 @@ void ImageLoader::changed(const QRect& constRect) {
// image, rotate the temp image and copy it to mProcessedImage
// Copy loaded rect
- QImage temp(rect.size(), d->mProcessedImage.depth());
+ TQImage temp(rect.size(), d->mProcessedImage.depth());
bitBlt(&temp, 0, 0,
&d->mDecoder.image(), rect.left(), rect.top(), rect.width(), rect.height());
@@ -719,9 +719,9 @@ void ImageLoader::changed(const QRect& constRect) {
temp = ImageUtils::transform(temp, d->mOrientation);
// Compute destination rect
- QWMatrix matrix = ImageUtils::transformMatrix(d->mOrientation);
+ TQWMatrix matrix = ImageUtils::transformMatrix(d->mOrientation);
- QRect imageRect = d->mDecoder.image().rect();
+ TQRect imageRect = d->mDecoder.image().rect();
imageRect = matrix.mapRect(imageRect);
rect = matrix.mapRect(rect);
@@ -740,17 +740,17 @@ void ImageLoader::changed(const QRect& constRect) {
LOG("emitting imageChanged " << d->mLoadChangedRect);
d->mTimeSinceLastUpdate.start();
emit imageChanged(d->mLoadChangedRect);
- d->mLoadChangedRect = QRect();
+ d->mLoadChangedRect = TQRect();
}
}
void ImageLoader::frameDone() {
- frameDone( QPoint( 0, 0 ), d->mDecoder.image().rect());
+ frameDone( TQPoint( 0, 0 ), d->mDecoder.image().rect());
}
-void ImageLoader::frameDone(const QPoint& offset, const QRect& rect) {
+void ImageLoader::frameDone(const TQPoint& offset, const TQRect& rect) {
LOG("");
- // Another case where the image loading in Qt's is a bit borken.
+ // Another case where the image loading in TQt's is a bit borken.
// It's possible to get several notes about a frame being done for one frame (with MNG).
if( !d->mWasFrameData ) {
// To make it even more fun, with MNG the sequence is actually
@@ -769,22 +769,22 @@ void ImageLoader::frameDone(const QPoint& offset, const QRect& rect) {
d->mWasFrameData = false;
if( !d->mLoadChangedRect.isEmpty()) {
emit imageChanged(d->mLoadChangedRect);
- d->mLoadChangedRect = QRect();
+ d->mLoadChangedRect = TQRect();
d->mTimeSinceLastUpdate.start();
}
- d->mLoadedRegion = QRegion();
+ d->mLoadedRegion = TQRegion();
- QImage image;
+ TQImage image;
if (d->mProcessedImage.isNull()) {
image = d->mDecoder.image().copy();
} else {
image = d->mProcessedImage.copy();
}
- if( offset != QPoint( 0, 0 ) || rect != image.rect()) {
+ if( offset != TQPoint( 0, 0 ) || rect != image.rect()) {
// Blit last frame below 'image'
if( !d->mFrames.isEmpty()) {
- QImage im = d->mFrames.last().image.copy();
+ TQImage im = d->mFrames.last().image.copy();
bitBlt( &im, offset.x(), offset.y(), &image, rect.x(), rect.y(), rect.width(), rect.height());
image = im;
}
@@ -809,7 +809,7 @@ void ImageLoader::setSize(int, int) {
}
-QImage ImageLoader::processedImage() const {
+TQImage ImageLoader::processedImage() const {
return d->mProcessedImage;
}
@@ -819,17 +819,17 @@ ImageFrames ImageLoader::frames() const {
}
-QCString ImageLoader::imageFormat() const {
+TQCString ImageLoader::imageFormat() const {
return d->mImageFormat;
}
-QByteArray ImageLoader::rawData() const {
+TQByteArray ImageLoader::rawData() const {
return d->mRawData;
}
-QString ImageLoader::mimeType() const {
+TQString ImageLoader::mimeType() const {
return d->mMimeType;
}
@@ -844,7 +844,7 @@ KURL ImageLoader::url() const {
}
-QRegion ImageLoader::loadedRegion() const {
+TQRegion ImageLoader::loadedRegion() const {
return d->mLoadedRegion;
}
@@ -854,16 +854,16 @@ bool ImageLoader::completed() const {
}
-void ImageLoader::ref( const QObject* owner, BusyLevel priority ) {
+void ImageLoader::ref( const TQObject* owner, BusyLevel priority ) {
OwnerData data;
data.owner = owner;
data.priority = priority;
d->mOwners.append( data );
- connect( owner, SIGNAL( destroyed()), SLOT( ownerDestroyed()));
+ connect( owner, TQT_SIGNAL( destroyed()), TQT_SLOT( ownerDestroyed()));
}
-void ImageLoader::deref( const QObject* owner ) {
- for( QValueVector< OwnerData >::Iterator it = d->mOwners.begin();
+void ImageLoader::deref( const TQObject* owner ) {
+ for( TQValueVector< OwnerData >::Iterator it = d->mOwners.begin();
it != d->mOwners.end();
++it ) {
if( (*it).owner == owner ) {
@@ -878,13 +878,13 @@ void ImageLoader::deref( const QObject* owner ) {
assert( false );
}
-void ImageLoader::release( const QObject* owner ) {
+void ImageLoader::release( const TQObject* owner ) {
disconnect( owner );
deref( owner );
}
void ImageLoader::ownerDestroyed() {
- deref( sender());
+ deref( TQT_TQOBJECT(sender()));
}
//---------------------------------------------------------------------
@@ -893,8 +893,8 @@ void ImageLoader::ownerDestroyed() {
//
//---------------------------------------------------------------------
-ImageLoader* ImageLoader::loader( const KURL& url, const QObject* owner, BusyLevel priority ) {
- if( sLoaders.contains( url )) {
+ImageLoader* ImageLoader::loader( const KURL& url, const TQObject* owner, BusyLevel priority ) {
+ if( sLoaders.tqcontains( url )) {
ImageLoader* loader = sLoaders[ url ];
loader->ref( owner, priority );
// resume if this owner has high priority
@@ -910,7 +910,7 @@ ImageLoader* ImageLoader::loader( const KURL& url, const QObject* owner, BusyLev
// This also helps with preloading jobs, since BUSY_LOADING busy level is not entered immediately
// when a new picture is selected, so preloading jobs without this delay could start working
// immediately.
- QTimer::singleShot( priority >= BUSY_LOADING ? 0 : 10, loader, SLOT( startLoading()));
+ TQTimer::singleShot( priority >= BUSY_LOADING ? 0 : 10, loader, TQT_SLOT( startLoading()));
return loader;
}
diff --git a/src/gvcore/imageloader.h b/src/gvcore/imageloader.h
index 1a61749..e972fc9 100644
--- a/src/gvcore/imageloader.h
+++ b/src/gvcore/imageloader.h
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGELOADER_H
#define IMAGELOADER_H
-// Qt
-#include <qasyncimageio.h>
-#include <qbuffer.h>
-#include <qcstring.h>
+// TQt
+#include <tqasyncimageio.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
// KDE
#include <kio/job.h>
@@ -39,9 +39,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
class DecoderThread : public TSThread {
Q_OBJECT
+ TQ_OBJECT
public:
- void setRawData(const QByteArray&);
- QImage popLoadedImage();
+ void setRawData(const TQByteArray&);
+ TQImage popLoadedImage();
signals:
void failed();
@@ -51,38 +52,39 @@ protected:
void run();
private:
- QMutex mMutex;
- QByteArray mRawData;
- QImage mImage;
+ TQMutex mMutex;
+ TQByteArray mRawData;
+ TQImage mImage;
};
class ImageLoaderPrivate;
-class LIBGWENVIEW_EXPORT ImageLoader : public QObject, public QImageConsumer {
+class LIBGWENVIEW_EXPORT ImageLoader : public TQObject, public TQImageConsumer {
Q_OBJECT
+ TQ_OBJECT
public:
- static ImageLoader* loader( const KURL& url, const QObject* owner, BusyLevel priority ); // use this instead of ctor
- void release( const QObject* owner ); // use this instead of dtor
+ static ImageLoader* loader( const KURL& url, const TQObject* owner, BusyLevel priority ); // use this instead of ctor
+ void release( const TQObject* owner ); // use this instead of dtor
- QImage processedImage() const;
+ TQImage processedImage() const;
ImageFrames frames() const;
- QCString imageFormat() const;
- QByteArray rawData() const;
- QString mimeType() const;
+ TQCString imageFormat() const;
+ TQByteArray rawData() const;
+ TQString mimeType() const;
MimeTypeUtils::Kind urlKind() const;
KURL url() const;
- QRegion loadedRegion() const; // valid parts of processedImage()
+ TQRegion loadedRegion() const; // valid parts of processedImage()
bool completed() const;
signals:
void urlKindDetermined();
void sizeLoaded(int, int);
- void imageChanged(const QRect&);
+ void imageChanged(const TQRect&);
void imageLoaded( bool ok );
private slots:
void slotStatResult(KIO::Job*);
- void slotDataReceived(KIO::Job*, const QByteArray& chunk);
+ void slotDataReceived(KIO::Job*, const TQByteArray& chunk);
void slotGetResult(KIO::Job*);
void decodeChunk();
void slotDecoderThreadFailed();
@@ -95,8 +97,8 @@ private slots:
private:
ImageLoader();
~ImageLoader();
- void ref( const QObject* owner, BusyLevel priority );
- void deref( const QObject* owner );
+ void ref( const TQObject* owner, BusyLevel priority );
+ void deref( const TQObject* owner );
void suspendLoading();
void resumeLoading();
void finish( bool ok );
@@ -106,11 +108,11 @@ private:
void checkPendingGet();
BusyLevel priority() const;
- // QImageConsumer methods
+ // TQImageConsumer methods
void end();
- void changed(const QRect&);
+ void changed(const TQRect&);
void frameDone();
- void frameDone(const QPoint& offset, const QRect& rect);
+ void frameDone(const TQPoint& offset, const TQRect& rect);
void setLooping(int);
void setFramePeriod(int milliseconds);
void setSize(int, int);
diff --git a/src/gvcore/imagesavedialog.cpp b/src/gvcore/imagesavedialog.cpp
index edb4f5b..81e4a44 100644
--- a/src/gvcore/imagesavedialog.cpp
+++ b/src/gvcore/imagesavedialog.cpp
@@ -18,8 +18,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt includes
-#include <qtimer.h>
+// TQt includes
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -34,18 +34,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview {
-static int findFormatInFilterList(const QStringList& filters, const QString& format) {
+static int findFormatInFilterList(const TQStringList& filters, const TQString& format) {
int pos=0;
- for(QStringList::const_iterator it=filters.begin(); it!=filters.end(); ++it,++pos) {
- QStringList list=QStringList::split("|",*it);
+ for(TQStringList::const_iterator it=filters.begin(); it!=filters.end(); ++it,++pos) {
+ TQStringList list=TQStringList::split("|",*it);
if ( list[1].startsWith(format) ) return pos;
}
return -1;
}
-ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget* parent)
-: KFileDialog(":ImageSaveDialog",QString::null,parent,"imagesavedialog",true)
+ImageSaveDialog::ImageSaveDialog(KURL& url, const TQCString& imageFormat, TQWidget* tqparent)
+: KFileDialog(":ImageSaveDialog",TQString(),tqparent,"imagesavedialog",true)
, mURL(url)
, mImageFormat(imageFormat)
{
@@ -55,27 +55,27 @@ ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget
KMimeType::List types;
setFilterMimeType(i18n("Format:"),types,KMimeType::mimeType(""));
- QStringList filters;
+ TQStringList filters;
// Create our filter list
- QStringList mimeTypes=KImageIO::mimeTypes();
- for(QStringList::const_iterator it=mimeTypes.begin(); it!=mimeTypes.end(); ++it) {
- QString format=KImageIO::typeForMime(*it);
+ TQStringList mimeTypes=KImageIO::mimeTypes();
+ for(TQStringList::const_iterator it=mimeTypes.begin(); it!=mimeTypes.end(); ++it) {
+ TQString format=KImageIO::typeForMime(*it);
// Create the pattern part of the filter string
KMimeType::Ptr mt=KMimeType::mimeType(*it);
- QStringList patterns;
- for (QStringList::const_iterator patIt=mt->patterns().begin();patIt!=mt->patterns().end();++patIt) {
- QString pattern=(*patIt).lower();
- if (!patterns.contains(pattern)) patterns.append(pattern);
+ TQStringList patterns;
+ for (TQStringList::const_iterator patIt=mt->patterns().begin();patIt!=mt->patterns().end();++patIt) {
+ TQString pattern=(*patIt).lower();
+ if (!patterns.tqcontains(pattern)) patterns.append(pattern);
}
if (patterns.isEmpty()) {
- patterns.append( QString("*.%1").arg(format.lower()) );
+ patterns.append( TQString("*.%1").tqarg(format.lower()) );
}
- QString patternString=patterns.join(" ");
+ TQString patternString=patterns.join(" ");
// Create the filter string
- QString filter=patternString + "|"
+ TQString filter=patternString + "|"
+ format + " - " + mt->comment()
+ " (" + patternString + ")";
@@ -98,12 +98,12 @@ ImageSaveDialog::ImageSaveDialog(KURL& url, const QCString& imageFormat, QWidget
// Tweak the filter widget
filterWidget->setEditable(false);
- connect(filterWidget,SIGNAL(activated(const QString&)),
- this,SLOT(updateImageFormat(const QString&)) );
+ connect(filterWidget,TQT_SIGNAL(activated(const TQString&)),
+ this,TQT_SLOT(updateImageFormat(const TQString&)) );
// Call slotFilterChanged() to get the list filtered by the filter we
// selected. If we don't use a single shot, it leads to a crash :-/
- QTimer::singleShot(0,this,SLOT(slotFilterChanged()));
+ TQTimer::singleShot(0,this,TQT_SLOT(slotFilterChanged()));
}
@@ -113,13 +113,13 @@ void ImageSaveDialog::accept() {
}
-void ImageSaveDialog::updateImageFormat(const QString& text) {
- QStringList list=QStringList::split(" ",text);
+void ImageSaveDialog::updateImageFormat(const TQString& text) {
+ TQStringList list=TQStringList::split(" ",text);
mImageFormat=list[0].local8Bit();
- QString name=locationEdit->currentText();
- QString suffix=KImageIO::suffix(mImageFormat);
- int dotPos=name.findRev('.');
+ TQString name=locationEdit->currentText();
+ TQString suffix=KImageIO::suffix(mImageFormat);
+ int dotPos=name.tqfindRev('.');
if (dotPos>-1) {
name=name.left(dotPos);
}
diff --git a/src/gvcore/imagesavedialog.h b/src/gvcore/imagesavedialog.h
index 0a31c21..6cd33f8 100644
--- a/src/gvcore/imagesavedialog.h
+++ b/src/gvcore/imagesavedialog.h
@@ -24,28 +24,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE includes
#include <kfiledialog.h>
-class QString;
-class QWidget;
+class TQString;
+class TQWidget;
class KURL;
namespace Gwenview {
class ImageSaveDialog : public KFileDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- ImageSaveDialog(KURL& url,const QCString& imageFormat,QWidget* parent);
- QCString imageFormat() const { return mImageFormat; }
+ ImageSaveDialog(KURL& url,const TQCString& imageFormat,TQWidget* tqparent);
+ TQCString imageFormat() const { return mImageFormat; }
protected slots:
void accept();
private slots:
- void updateImageFormat(const QString&);
+ void updateImageFormat(const TQString&);
private:
KURL& mURL;
- QCString mImageFormat;
- QMap<QString,QString> mImageFormats;
+ TQCString mImageFormat;
+ TQMap<TQString,TQString> mImageFormats;
};
} // namespace
diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp
index cd8a828..174d4f9 100644
--- a/src/gvcore/imageview.cpp
+++ b/src/gvcore/imageview.cpp
@@ -26,17 +26,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <assert.h>
#include <math.h>
-// Qt
-#include <qcolor.h>
-#include <qcombobox.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqcolor.h>
+#include <tqcombobox.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
// KDE
#include <kaction.h>
@@ -65,7 +65,7 @@ namespace Gwenview {
Coordinates:
The image can be zoomed, can have a position offset, and additionally there is
-QScrollView's viewport. This means there are several coordinate systems.
+TQScrollView's viewport. This means there are several coordinate systems.
@@ -113,7 +113,7 @@ as approximate as possible). However when converting from widget to image and ba
this can result in the final rectangle being smaller than the original.
The widgetToImageBounding() function converts from widget to image coordinates
in a way which makes sure the reverse conversion will be at least as large
-as the original geometry.
+as the original tqgeometry.
There are no conversion functions for only width/height, as their conversion
depends on the position (because of the rounding etc.). For similar reasons
@@ -122,7 +122,7 @@ but with the point next to it.
-For conversions from/to QScrollView's viewport, usually QScrollView methods should
+For conversions from/to TQScrollView's viewport, usually TQScrollView methods should
be used: contentsX(), contentsY(), contentsWidth(), contentsHeight(), visibleWidth(),
visibleHeight(), contentsToViewport() and viewportToContents().
@@ -159,13 +159,13 @@ struct ImageView::Private {
int mGamma, mBrightness, mContrast;
// Our actions
- QComboBox* mZoomCombo;
+ TQComboBox* mZoomCombo;
// We do not use KSelectAction because it's not possible to set the combo text
KWidgetAction* mZoomComboAction;
KToggleAction* mZoomToFit;
KToggleAction* mZoomToWidth;
KToggleAction* mZoomToHeight;
- QValueVector<KToggleAction*> mZoomComboActions;
+ TQValueVector<KToggleAction*> mZoomComboActions;
KAction* mZoomIn;
KAction* mZoomOut;
KAction* mResetZoom;
@@ -188,13 +188,13 @@ struct ImageView::Private {
double mZoomBeforeAuto;
int mXCenterBeforeAuto, mYCenterBeforeAuto;
- QMap< long long, PendingPaint > mPendingPaints;
- QRegion mPendingNormalRegion;
- QRegion mPendingSmoothRegion;
+ TQMap< long long, PendingPaint > mPendingPaints;
+ TQRegion mPendingNormalRegion;
+ TQRegion mPendingSmoothRegion;
int mPendingOperations;
- QTimer mPendingPaintTimer;
+ TQTimer mPendingPaintTimer;
bool mSmoothingSuspended;
- QRegion mValidImageArea;
+ TQRegion mValidImageArea;
int imageToWidgetX( int x ) const {
if( mZoom == 1.0 ) return x + mXOffset;
@@ -206,14 +206,14 @@ struct ImageView::Private {
return lround( y * mZoom ) + mYOffset;
}
- QPoint imageToWidget( const QPoint& p ) const {
- return QPoint( imageToWidgetX( p.x()), imageToWidgetY( p.y()));
+ TQPoint imageToWidget( const TQPoint& p ) const {
+ return TQPoint( imageToWidgetX( p.x()), imageToWidgetY( p.y()));
}
- QRect imageToWidget( const QRect& r ) const {
- return QRect( imageToWidget( r.topLeft()),
+ TQRect imageToWidget( const TQRect& r ) const {
+ return TQRect( imageToWidget( r.topLeft()),
// don't use bottomright corner for conversion, but the one next to it
- imageToWidget( r.bottomRight() + QPoint( 1, 1 )) - QPoint( 1, 1 ));
+ imageToWidget( r.bottomRight() + TQPoint( 1, 1 )) - TQPoint( 1, 1 ));
}
int widgetToImageX( int x ) const {
@@ -226,19 +226,19 @@ struct ImageView::Private {
return lround( ( y - mYOffset ) / mZoom );
}
- QPoint widgetToImage( const QPoint& p ) const {
- return QPoint( widgetToImageX( p.x()), widgetToImageY( p.y()));
+ TQPoint widgetToImage( const TQPoint& p ) const {
+ return TQPoint( widgetToImageX( p.x()), widgetToImageY( p.y()));
}
- QRect widgetToImage( const QRect& r ) const {
- return QRect( widgetToImage( r.topLeft()),
+ TQRect widgetToImage( const TQRect& r ) const {
+ return TQRect( widgetToImage( r.topLeft()),
// don't use bottomright corner for conversion, but the one next to it
- widgetToImage( r.bottomRight() + QPoint( 1, 1 )) - QPoint( 1, 1 ));
+ widgetToImage( r.bottomRight() + TQPoint( 1, 1 )) - TQPoint( 1, 1 ));
}
- QRect widgetToImageBounding( const QRect& r, int extra ) const {
- QRect ret = widgetToImage( r );
- // make sure converting to image and back always returns QRect at least as large as 'r'
+ TQRect widgetToImageBounding( const TQRect& r, int extra ) const {
+ TQRect ret = widgetToImage( r );
+ // make sure converting to image and back always returns TQRect at least as large as 'r'
extra += mZoom == 1.0 ? 0 : int( ceil( 1 / mZoom ));
ret.addCoords( -extra, -extra, extra, extra );
return ret;
@@ -246,18 +246,18 @@ struct ImageView::Private {
void initZoomCombo() {
mZoomCombo->clear();
- for (QValueVector<KToggleAction*>::iterator it=mZoomComboActions.begin();
+ for (TQValueVector<KToggleAction*>::iterator it=mZoomComboActions.begin();
it!=mZoomComboActions.end();
++it)
{
- QString txt=(*it)->plainText();
+ TQString txt=(*it)->plainText();
mZoomCombo->insertItem(txt);
}
const double zoomValues[] = { 0.5, 1, 2 };
int nbValues=sizeof(zoomValues) / sizeof(double);
for (int pos=0; pos<nbValues; ++pos) {
- QString txt=QString("%1%").arg( int(zoomValues[pos]*100) );
+ TQString txt=TQString("%1%").tqarg( int(zoomValues[pos]*100) );
mZoomCombo->insertItem(txt);
}
}
@@ -270,18 +270,18 @@ inline bool doDelayedSmoothing() {
}
-class ImageView::EventFilter : public QObject {
+class ImageView::EventFilter : public TQObject {
public:
- EventFilter(ImageView* parent)
- : QObject(parent) {}
+ EventFilter(ImageView* tqparent)
+ : TQObject(tqparent) {}
- bool eventFilter(QObject*, QEvent* event) {
+ bool eventFilter(TQObject*, TQEvent* event) {
switch (event->type()) {
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::AccelOverride:
- return static_cast< ImageView* >( parent())
- ->viewportKeyEvent(static_cast<QKeyEvent*>(event));
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::AccelOverride:
+ return static_cast< ImageView* >( TQT_TQWIDGET(tqparent()))
+ ->viewportKeyEvent(TQT_TQKEYEVENT(event));
default:
break;
}
@@ -291,8 +291,8 @@ public:
-ImageView::ImageView(QWidget* parent,Document* document, KActionCollection* actionCollection)
-: QScrollView(parent,0L,WResizeNoErase|WRepaintNoErase|WPaintClever)
+ImageView::ImageView(TQWidget* tqparent,Document* document, KActionCollection* actionCollection)
+: TQScrollView(tqparent,0L,WResizeNoErase|WRepaintNoErase|WPaintClever)
{
d=new Private;
d->mDocument=document;
@@ -312,7 +312,7 @@ ImageView::ImageView(QWidget* parent,Document* document, KActionCollection* acti
d->mContrast = 100;
d->mBCGDialog = 0;
- viewport()->setFocusPolicy(WheelFocus);
+ viewport()->setFocusPolicy(TQ_WheelFocus);
setFrameStyle(NoFrame);
setAcceptDrops( true );
viewport()->setAcceptDrops( true );
@@ -326,32 +326,32 @@ ImageView::ImageView(QWidget* parent,Document* document, KActionCollection* acti
// Create actions
d->mZoomToFit=new KToggleAction(i18n("Fit to &Window"),"viewmagfit",0,d->mActionCollection,"view_zoom_to_fit");
- connect(d->mZoomToFit,SIGNAL(toggled(bool)),
- this,SLOT(setZoomToFit(bool)) );
+ connect(d->mZoomToFit,TQT_SIGNAL(toggled(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(setZoomToFit(bool)) );
d->mZoomToWidth=new KToggleAction(i18n("Fit to &Width"),0,0,d->mActionCollection,"view_zoom_to_width");
- connect(d->mZoomToWidth,SIGNAL(toggled(bool)),
- this,SLOT(setZoomToWidth(bool)) );
+ connect(d->mZoomToWidth,TQT_SIGNAL(toggled(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(setZoomToWidth(bool)) );
d->mZoomToHeight=new KToggleAction(i18n("Fit to &Height"),0,0,d->mActionCollection,"view_zoom_to_height");
- connect(d->mZoomToHeight,SIGNAL(toggled(bool)),
- this,SLOT(setZoomToHeight(bool)) );
+ connect(d->mZoomToHeight,TQT_SIGNAL(toggled(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(setZoomToHeight(bool)) );
- d->mZoomIn=KStdAction::zoomIn(this,SLOT(slotZoomIn()),d->mActionCollection);
+ d->mZoomIn=KStdAction::zoomIn(TQT_TQOBJECT(this),TQT_SLOT(slotZoomIn()),d->mActionCollection);
- d->mZoomOut=KStdAction::zoomOut(this,SLOT(slotZoomOut()),d->mActionCollection);
+ d->mZoomOut=KStdAction::zoomOut(TQT_TQOBJECT(this),TQT_SLOT(slotZoomOut()),d->mActionCollection);
- d->mResetZoom=KStdAction::actualSize(this,SLOT(slotResetZoom()),d->mActionCollection);
+ d->mResetZoom=KStdAction::actualSize(TQT_TQOBJECT(this),TQT_SLOT(slotResetZoom()),d->mActionCollection);
d->mResetZoom->setIcon("viewmag1");
d->mLockZoom=new KToggleAction(i18n("&Lock Zoom"),"lock",0,d->mActionCollection,"view_zoom_lock");
d->mLockZoom->setChecked(ImageViewConfig::lockZoom());
- connect(d->mLockZoom,SIGNAL(toggled(bool)),
- this,SLOT(setLockZoom(bool)) );
+ connect(d->mLockZoom,TQT_SIGNAL(toggled(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(setLockZoom(bool)) );
- d->mZoomCombo=new QComboBox(true);
+ d->mZoomCombo=new TQComboBox(true);
// Avoid stealing focus
- d->mZoomCombo->setFocusPolicy(ClickFocus);
- connect(d->mZoomCombo, SIGNAL(activated(int)),
- this, SLOT(slotSelectZoom()) );
+ d->mZoomCombo->setFocusPolicy(TQ_ClickFocus);
+ connect(d->mZoomCombo, TQT_SIGNAL(activated(int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotSelectZoom()) );
d->mZoomComboAction=new KWidgetAction(d->mZoomCombo, i18n("Zoom"), 0, 0, 0, d->mActionCollection, "view_zoom_to");
@@ -364,45 +364,45 @@ ImageView::ImageView(QWidget* parent,Document* document, KActionCollection* acti
d->initZoomCombo();
d->mAdjustBCG=new KAction(i18n("Adjust Brightness/Contrast/Gamma"), "colorize", 0,
- this, SLOT(showBCGDialog()), d->mActionCollection, "adjust_bcg");
+ TQT_TQOBJECT(this), TQT_SLOT(showBCGDialog()), d->mActionCollection, "adjust_bcg");
d->mIncreaseGamma=new KAction(i18n("Increase Gamma"),0,CTRL+Key_G,
- this,SLOT(increaseGamma()),d->mActionCollection,"increase_gamma");
+ TQT_TQOBJECT(this), TQT_SLOT(increaseGamma()),d->mActionCollection,"increase_gamma");
d->mDecreaseGamma=new KAction(i18n("Decrease Gamma"),0,SHIFT+CTRL+Key_G,
- this,SLOT(decreaseGamma()),d->mActionCollection,"decrease_gamma");
+ TQT_TQOBJECT(this), TQT_SLOT(decreaseGamma()),d->mActionCollection,"decrease_gamma");
d->mIncreaseBrightness=new KAction(i18n("Increase Brightness" ),0,CTRL+Key_B,
- this,SLOT(increaseBrightness()),d->mActionCollection,"increase_brightness");
+ TQT_TQOBJECT(this), TQT_SLOT(increaseBrightness()),d->mActionCollection,"increase_brightness");
d->mDecreaseBrightness=new KAction(i18n("Decrease Brightness" ),0,SHIFT+CTRL+Key_B,
- this,SLOT(decreaseBrightness()),d->mActionCollection,"decrease_brightness");
+ TQT_TQOBJECT(this), TQT_SLOT(decreaseBrightness()),d->mActionCollection,"decrease_brightness");
d->mIncreaseContrast=new KAction(i18n("Increase Contrast" ),0,CTRL+Key_C,
- this,SLOT(increaseContrast()),d->mActionCollection,"increase_contrast");
+ TQT_TQOBJECT(this), TQT_SLOT(increaseContrast()),d->mActionCollection,"increase_contrast");
d->mDecreaseContrast=new KAction(i18n("Decrease Contrast" ),0,SHIFT+CTRL+Key_C,
- this,SLOT(decreaseContrast()),d->mActionCollection,"decrease_contrast");
+ TQT_TQOBJECT(this), TQT_SLOT(decreaseContrast()),d->mActionCollection,"decrease_contrast");
// Connect to some interesting signals
- connect(d->mDocument,SIGNAL(loaded(const KURL&)),
- this,SLOT(slotLoaded()) );
+ connect(d->mDocument,TQT_SIGNAL(loaded(const KURL&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotLoaded()) );
- connect(d->mDocument,SIGNAL(loading()),
- this,SLOT( loadingStarted()) );
+ connect(d->mDocument,TQT_SIGNAL(loading()),
+ TQT_TQOBJECT(this), TQT_SLOT( loadingStarted()) );
- connect(d->mDocument,SIGNAL(modified()),
- this,SLOT(slotModified()) );
+ connect(d->mDocument,TQT_SIGNAL(modified()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotModified()) );
- connect(d->mDocument, SIGNAL(sizeUpdated()),
- this, SLOT(slotImageSizeUpdated()) );
+ connect(d->mDocument, TQT_SIGNAL(sizeUpdated()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotImageSizeUpdated()) );
- connect(d->mDocument, SIGNAL(rectUpdated(const QRect&)),
- this, SLOT(slotImageRectUpdated(const QRect&)) );
+ connect(d->mDocument, TQT_SIGNAL(rectUpdated(const TQRect&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotImageRectUpdated(const TQRect&)) );
- connect(&d->mPendingPaintTimer,SIGNAL(timeout()),
- this,SLOT(checkPendingOperations()) );
+ connect(&d->mPendingPaintTimer,TQT_SIGNAL(timeout()),
+ TQT_TQOBJECT(this), TQT_SLOT(checkPendingOperations()) );
- connect(BusyLevelManager::instance(),SIGNAL(busyLevelChanged(BusyLevel)),
- this,SLOT(slotBusyLevelChanged(BusyLevel) ));
+ connect(BusyLevelManager::instance(),TQT_SIGNAL(busyLevelChanged(BusyLevel)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotBusyLevelChanged(BusyLevel) ));
// This event filter is here to make sure the pixmap view is aware of the changes
// in the keyboard modifiers, even if it isn't focused. However, making this widget
- // itself the filter would lead to doubled paint events, because QScrollView
+ // itself the filter would lead to doubled paint events, because TQScrollView
// installs an event filter on its viewport, and doesn't filter out the paint
// events -> it'd get it twice, first from app filter, second from viewport filter.
EventFilter* filter=new EventFilter(this);
@@ -423,7 +423,7 @@ ImageView::~ImageView() {
void ImageView::slotLoaded() {
if (d->mDocument->isNull()) {
resizeContents(0,0);
- viewport()->repaint(false);
+ viewport()->tqrepaint(false);
return;
}
@@ -446,7 +446,7 @@ void ImageView::slotModified() {
void ImageView::loadingStarted() {
cancelPending();
d->mSmoothingSuspended = true;
- d->mValidImageArea = QRegion();
+ d->mValidImageArea = TQRegion();
d->mGamma = 100;
d->mBrightness = 0;
d->mContrast = 100;
@@ -471,8 +471,8 @@ bool ImageView::fullScreen() const {
}
-QPoint ImageView::offset() const {
- return QPoint(d->mXOffset, d->mYOffset);
+TQPoint ImageView::offset() const {
+ return TQPoint(d->mXOffset, d->mYOffset);
}
@@ -488,7 +488,7 @@ KToggleAction* ImageView::zoomToFit() const {
void ImageView::updateFromSettings() {
- // Reset, so that next repaint doesn't possibly take longer because of
+ // Reset, so that next tqrepaint doesn't possibly take longer because of
// smoothing
ImageViewConfig::setMaxRepaintSize(DEFAULT_MAX_REPAINT_SIZE);
ImageViewConfig::setMaxScaleRepaintSize(DEFAULT_MAX_REPAINT_SIZE);
@@ -594,8 +594,8 @@ void ImageView::setFullScreen(bool fullScreen) {
// Overloaded methods
//
//------------------------------------------------------------------------
-void ImageView::resizeEvent(QResizeEvent* event) {
- QScrollView::resizeEvent(event);
+void ImageView::resizeEvent(TQResizeEvent* event) {
+ TQScrollView::resizeEvent(event);
if (d->mZoomMode!=ZOOM_FREE) {
updateZoom(d->mZoomMode);
} else {
@@ -617,22 +617,22 @@ inline void composite(uint* rgba,uint value) {
}
}
-void ImageView::drawContents(QPainter* painter,int clipx,int clipy,int clipw,int cliph) {
+void ImageView::drawContents(TQPainter* painter,int clipx,int clipy,int clipw,int cliph) {
// Erase borders
- QRect imageRect(0, 0, d->mDocument->width(), d->mDocument->height());
+ TQRect imageRect(0, 0, d->mDocument->width(), d->mDocument->height());
imageRect = d->imageToWidget(imageRect);
- QRect widgetRect = QRect(0, 0, visibleWidth(), visibleHeight());
+ TQRect widgetRect = TQRect(0, 0, visibleWidth(), visibleHeight());
- QRegion region = QRegion(widgetRect) - imageRect;
- QMemArray<QRect> rects = region.rects();
+ TQRegion region = TQRegion(widgetRect) - imageRect;
+ TQMemArray<TQRect> rects = region.tqrects();
for(unsigned int pos = 0; pos < rects.count(); ++pos ) {
painter->eraseRect(rects[pos]);
}
// Repaint
if( !d->mValidImageArea.isEmpty()) {
- addPendingPaint( false, QRect( clipx, clipy, clipw, cliph ));
+ addPendingPaint( false, TQRect( clipx, clipy, clipw, cliph ));
}
}
@@ -640,34 +640,34 @@ void ImageView::drawContents(QPainter* painter,int clipx,int clipy,int clipw,int
// There's a queue of areas to paint (each with bool saying whether it's smooth pass).
// Also, there's a bitfield of pending operations, operations are handled only after
// there's nothing more to paint (so that smooth pass is started).
-void ImageView::addPendingPaint( bool smooth, QRect rect ) {
+void ImageView::addPendingPaint( bool smooth, TQRect rect ) {
if( d->mSmoothingSuspended && smooth ) return;
// try to avoid scheduling already scheduled areas
- QRegion& region = smooth ? d->mPendingSmoothRegion : d->mPendingNormalRegion;
- if( region.intersect( rect ) == QRegion( rect ))
+ TQRegion& region = smooth ? d->mPendingSmoothRegion : d->mPendingNormalRegion;
+ if( region.intersect( rect ) == TQRegion( rect ))
return; // whole rect has already pending paints
// at least try to remove the part that's already scheduled
- rect = ( QRegion( rect ) - region ).boundingRect();
+ rect = ( TQRegion( rect ) - region ).boundingRect();
region += rect;
if( rect.isEmpty())
return;
addPendingPaintInternal( smooth, rect );
}
-void ImageView::addPendingPaintInternal( bool smooth, QRect rect ) {
+void ImageView::addPendingPaintInternal( bool smooth, TQRect rect ) {
const long long MAX_DIM = 1000000; // if monitors get larger than this, we're in trouble :)
- // QMap will ensure ordering (non-smooth first, top-to-bottom, left-to-right)
+ // TQMap will ensure ordering (non-smooth first, top-to-bottom, left-to-right)
long long key = ( smooth ? MAX_DIM * MAX_DIM : 0 ) + rect.y() * MAX_DIM + rect.x();
// handle the case of two different paints at the same position (just in case)
key *= 100;
bool insert = true;
- while( d->mPendingPaints.contains( key )) {
- if( d->mPendingPaints[ key ].rect.contains( rect )) {
+ while( d->mPendingPaints.tqcontains( key )) {
+ if( d->mPendingPaints[ key ].rect.tqcontains( rect )) {
insert = false;
break;
}
- if( rect.contains( d->mPendingPaints[ key ].rect )) {
+ if( rect.tqcontains( d->mPendingPaints[ key ].rect )) {
break;
}
++key;
@@ -700,10 +700,10 @@ void ImageView::limitPaintSize( PendingPaint& paint ) {
}
// don't paint more than max_size pixels at a time
int maxHeight = ( maxSize + paint.rect.width() - 1 ) / paint.rect.width(); // round up
- maxHeight = QMAX( maxHeight, 5 ); // at least 5 lines together
- // can't repaint whole paint at once, adjust height and schedule the rest
+ maxHeight = TQMAX( maxHeight, 5 ); // at least 5 lines together
+ // can't tqrepaint whole paint at once, adjust height and schedule the rest
if( maxHeight < paint.rect.height()) {
- QRect remaining = paint.rect;
+ TQRect remaining = paint.rect;
remaining.setTop( remaining.top() + maxHeight );
addPendingPaintInternal( paint.smooth, remaining );
paint.rect.setHeight( maxHeight );
@@ -718,12 +718,12 @@ void ImageView::checkPendingOperationsInternal() {
PendingPaint paint = *d->mPendingPaints.begin();
d->mPendingPaints.remove( d->mPendingPaints.begin());
limitPaintSize( paint ); // modifies paint.rect if necessary
- QRegion& region = paint.smooth ? d->mPendingSmoothRegion : d->mPendingNormalRegion;
+ TQRegion& region = paint.smooth ? d->mPendingSmoothRegion : d->mPendingNormalRegion;
region -= paint.rect;
- QRect visibleRect( contentsX(), contentsY(), visibleWidth(), visibleHeight());
- QRect paintRect = paint.rect.intersect( visibleRect );
+ TQRect visibleRect( contentsX(), contentsY(), visibleWidth(), visibleHeight());
+ TQRect paintRect = paint.rect.intersect( visibleRect );
if( !paintRect.isEmpty()) {
- QPainter painter( viewport());
+ TQPainter painter( viewport());
painter.translate( -contentsX(), -contentsY());
performPaint( &painter, paintRect.x(), paintRect.y(),
paintRect.width(), paintRect.height(), paint.smooth );
@@ -733,7 +733,7 @@ void ImageView::checkPendingOperationsInternal() {
if( d->mPendingOperations & SMOOTH_PASS ) {
d->mSmoothingSuspended = false;
if( doDelayedSmoothing() ) {
- QRect visibleRect( contentsX(), contentsY(), visibleWidth(), visibleHeight());
+ TQRect visibleRect( contentsX(), contentsY(), visibleWidth(), visibleHeight());
addPendingPaint( true, visibleRect );
}
d->mPendingOperations &= ~SMOOTH_PASS;
@@ -750,12 +750,12 @@ void ImageView::scheduleOperation( Operation operation )
void ImageView::updateBusyLevels() {
if( !d->mPendingPaintTimer.isActive()) {
- BusyLevelManager::instance()->setBusyLevel( this, BUSY_NONE );
+ BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_NONE );
} else if( !d->mPendingPaints.isEmpty() && !(*d->mPendingPaints.begin()).smooth ) {
- BusyLevelManager::instance()->setBusyLevel( this, BUSY_PAINTING );
+ BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_PAINTING );
} else if(( d->mPendingOperations & SMOOTH_PASS )
|| ( !d->mPendingPaints.isEmpty() && (*d->mPendingPaints.begin()).smooth )) {
- BusyLevelManager::instance()->setBusyLevel( this, BUSY_SMOOTHING );
+ BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_SMOOTHING );
} else {
assert( false );
}
@@ -779,20 +779,20 @@ void ImageView::slotBusyLevelChanged( BusyLevel level ) {
}
// How to do painting:
-// When something needs to be erased: QPainter on viewport and eraseRect()
-// When whole picture needs to be repainted: fullRepaint()
-// When a part of the picture needs to be updated: viewport()->repaint(area,false)
+// When something needs to be erased: TQPainter on viewport and eraseRect()
+// When whole picture needs to be tqrepainted: fullRepaint()
+// When a part of the picture needs to be updated: viewport()->tqrepaint(area,false)
// All other paints will be changed to progressive painting.
void ImageView::fullRepaint() {
if( !viewport()->isUpdatesEnabled()) return;
cancelPending();
- viewport()->repaint(false);
+ viewport()->tqrepaint(false);
}
void ImageView::cancelPending() {
d->mPendingPaints.clear();
- d->mPendingNormalRegion = QRegion();
- d->mPendingSmoothRegion = QRegion();
+ d->mPendingNormalRegion = TQRegion();
+ d->mPendingSmoothRegion = TQRegion();
d->mPendingPaintTimer.stop();
d->mPendingOperations = 0;
updateBusyLevels();
@@ -801,13 +801,13 @@ void ImageView::cancelPending() {
//#define DEBUG_RECTS
// do the actual painting
-void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw, int cliph, bool secondPass ) {
+void ImageView::performPaint( TQPainter* painter, int clipx, int clipy, int clipw, int cliph, bool secondPass ) {
#ifdef DEBUG_RECTS
- static QColor colors[4]={QColor(255,0,0),QColor(0,255,0),QColor(0,0,255),QColor(255,255,0) };
+ static TQColor colors[4]={TQColor(255,0,0),TQColor(0,255,0),TQColor(0,0,255),TQColor(255,255,0) };
static int numColor=0;
#endif
- QTime t;
+ TQTime t;
t.start();
if (d->mDocument->isNull()) {
@@ -822,7 +822,7 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
if( zoom() != 1.0 ) {
if (doDelayedSmoothing() && !secondPass) {
// Add a second, smoothing pass
- addPendingPaint( true, QRect( clipx, clipy, clipw, cliph ));
+ addPendingPaint( true, TQRect( clipx, clipy, clipw, cliph ));
} else {
// We need to smooth now
smoothAlgo = static_cast<ImageUtils::SmoothAlgorithm>( ImageViewConfig::smoothAlgorithm() );
@@ -830,31 +830,31 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
}
int extraPixels = ImageUtils::extraScalePixels( smoothAlgo, zoom());
- QRect imageRect = d->widgetToImageBounding( QRect(clipx,clipy,clipw,cliph), extraPixels );
- imageRect = imageRect.intersect( QRect( 0, 0, d->mDocument->width(), d->mDocument->height()));
- QMemArray< QRect > rects = d->mValidImageArea.intersect( imageRect ).rects();
+ TQRect imageRect = d->widgetToImageBounding( TQRect(clipx,clipy,clipw,cliph), extraPixels );
+ imageRect = imageRect.intersect( TQRect( 0, 0, d->mDocument->width(), d->mDocument->height()));
+ TQMemArray< TQRect > rects = TQRegion(d->mValidImageArea.intersect( imageRect )).tqrects();
for( unsigned int i = 1; i < rects.count(); ++i ) {
addPendingPaint( secondPass, d->imageToWidget( rects[ i ] ));
}
- imageRect = rects.count() > 0 ? rects[ 0 ] : QRect();
+ imageRect = rects.count() > 0 ? rects[ 0 ] : TQRect();
if (imageRect.isEmpty()) {
painter->eraseRect(clipx,clipy,clipw,cliph);
return;
}
- QRect widgetRect = d->imageToWidget( imageRect );
+ TQRect widgetRect = d->imageToWidget( imageRect );
if (widgetRect.isEmpty() || imageRect.isEmpty()) {
painter->eraseRect(clipx,clipy,clipw,cliph);
return;
}
-// With very large images, just getting a subimage using QImage::copy( QRect ) takes a significant
+// With very large images, just getting a subimage using TQImage::copy( TQRect ) takes a significant
// portion of time here (even though it's just copying of data - probably because it's a lot of data).
-// So don't do any subimage copying but instead use CroppedQImage which just manipulates scanline
+// So don't do any subimage copying but instead use CroppedTQImage which just manipulates scanline
// pointers. Note however that it's a bit hackish and there may be trouble if any code accesses
-// the image data directly as a whole. See CroppedQImage for details.
+// the image data directly as a whole. See CroppedTQImage for details.
-// QImage image = d->mDocument->image().copy( imageRect );
- ImageUtils::CroppedQImage image( d->mDocument->image(), imageRect );
+// TQImage image = d->mDocument->image().copy( imageRect );
+ ImageUtils::CroppedTQImage image( d->mDocument->image(), imageRect );
if( zoom() != 1.0 ) {
image=ImageUtils::scale(image,widgetRect.width(),widgetRect.height(), smoothAlgo );
@@ -875,9 +875,9 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
image = ImageUtils::changeGamma( image, d->mGamma );
}
-// Calling normalize() here would make image to be a proper QImage without modified scanlines,
-// so that even calling QImage::copy() would work. However, it seems it's not necessary to call
-// it here. The code above checks that QImage::copy() or similar doesn't occur (that zoom() != 1.0
+// Calling normalize() here would make image to be a proper TQImage without modified scanlines,
+// so that even calling TQImage::copy() would work. However, it seems it's not necessary to call
+// it here. The code above checks that TQImage::copy() or similar doesn't occur (that zoom() != 1.0
// is there primarily to avoid that). If any kind of redraw trouble occurs, try uncommenting this
// line below first.
// image.normalize(); // make it use its own data, if needed
@@ -905,10 +905,10 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
image.setAlphaBuffer(false);
}
- QRect paintRect( clipx, clipy, clipw, cliph );
- QPixmap buffer( paintRect.size());
+ TQRect paintRect( clipx, clipy, clipw, cliph );
+ TQPixmap buffer( paintRect.size());
{
- QPainter bufferPainter(&buffer);
+ TQPainter bufferPainter(&buffer);
bufferPainter.setBackgroundColor(painter->backgroundColor());
bufferPainter.eraseRect(0,0,paintRect.width(),paintRect.height());
bufferPainter.drawImage(widgetRect.topLeft()-paintRect.topLeft(),image,
@@ -916,9 +916,9 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
}
painter->drawPixmap(paintRect.topLeft(),buffer);
- if( paintRect.width() * paintRect.height() >= 10000 ) { // ignore small repaints
+ if( paintRect.width() * paintRect.height() >= 10000 ) { // ignore small tqrepaints
// try to do one step in 0.1sec
- int size = paintRect.width() * paintRect.height() * 100 / QMAX( t.elapsed(), 1 );
+ int size = paintRect.width() * paintRect.height() * 100 / TQMAX( t.elapsed(), 1 );
int maxRepaintSize;
if (zoom() == 1.0) {
@@ -952,11 +952,11 @@ void ImageView::performPaint( QPainter* painter, int clipx, int clipy, int clipw
painter->drawRect(paintRect);
#endif
- QApplication::flushX();
+ TQApplication::flushX();
}
-void ImageView::viewportMousePressEvent(QMouseEvent* event) {
+void ImageView::viewportMousePressEvent(TQMouseEvent* event) {
viewport()->setFocus();
switch (event->button()) {
case Qt::LeftButton:
@@ -971,13 +971,13 @@ void ImageView::viewportMousePressEvent(QMouseEvent* event) {
}
-void ImageView::viewportMouseMoveEvent(QMouseEvent* event) {
+void ImageView::viewportMouseMoveEvent(TQMouseEvent* event) {
selectTool(event->state(), true);
d->mTools[d->mToolID]->mouseMoveEvent(event);
}
-void ImageView::viewportMouseReleaseEvent(QMouseEvent* event) {
+void ImageView::viewportMouseReleaseEvent(TQMouseEvent* event) {
switch (event->button()) {
case Qt::LeftButton:
if (event->stateAfter() & Qt::RightButton) {
@@ -1011,26 +1011,26 @@ void ImageView::viewportMouseReleaseEvent(QMouseEvent* event) {
}
-bool ImageView::eventFilter(QObject* obj, QEvent* event) {
+bool ImageView::eventFilter(TQObject* obj, TQEvent* event) {
switch (event->type()) {
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::AccelOverride:
- return viewportKeyEvent(static_cast<QKeyEvent*>(event));
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::AccelOverride:
+ return viewportKeyEvent(TQT_TQKEYEVENT(event));
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (d->mToolID==ZOOM) return false;
emit doubleClicked();
return true;
- // Getting/loosing focus causes repaints, but repainting here is expensive,
- // and there's no need to repaint on focus changes, as the focus is not
+ // Getting/loosing focus causes tqrepaints, but tqrepainting here is expensive,
+ // and there's no need to tqrepaint on focus changes, as the focus is not
// indicated.
- case QEvent::FocusIn:
- case QEvent::FocusOut:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
return true;
- case QEvent::Enter:
+ case TQEvent::Enter:
selectTool( kapp->keyboardMouseState(), true );
emitRequestHintDisplay();
break;
@@ -1038,29 +1038,29 @@ bool ImageView::eventFilter(QObject* obj, QEvent* event) {
default:
break;
}
- return QScrollView::eventFilter(obj,event);
+ return TQScrollView::eventFilter(obj,event);
}
-bool ImageView::viewportKeyEvent(QKeyEvent* event) {
+bool ImageView::viewportKeyEvent(TQKeyEvent* event) {
selectTool(event->stateAfter(), false);
return false;
}
-void ImageView::contentsDragEnterEvent(QDragEnterEvent* event) {
- event->accept( QUriDrag::canDecode( event ));
+void ImageView::contentsDragEnterEvent(TQDragEnterEvent* event) {
+ event->accept( TQUriDrag::canDecode( event ));
}
-void ImageView::contentsDropEvent(QDropEvent* event) {
+void ImageView::contentsDropEvent(TQDropEvent* event) {
KURL::List list;
if( KURLDrag::decode( event, list )) {
d->mDocument->setURL( list.first());
}
}
-void ImageView::keyPressEvent( QKeyEvent *event ) {
- QScrollView::keyPressEvent( event );
+void ImageView::keyPressEvent( TQKeyEvent *event ) {
+ TQScrollView::keyPressEvent( event );
int deltaX, deltaY;
if (event->state() != Qt::NoButton) {
@@ -1112,7 +1112,7 @@ void ImageView::selectTool(ButtonState state, bool force) {
}
-void ImageView::wheelEvent(QWheelEvent* event) {
+void ImageView::wheelEvent(TQWheelEvent* event) {
d->mTools[d->mToolID]->wheelEvent(event);
}
@@ -1141,8 +1141,8 @@ void ImageView::slotSelectZoom() {
int currentItem=d->mZoomCombo->currentItem();
if (currentItem>=int(d->mZoomComboActions.count()) ) {
- QString txt=d->mZoomCombo->currentText();
- txt=txt.left(txt.find('%'));
+ TQString txt=d->mZoomCombo->currentText();
+ txt=txt.left(txt.tqfind('%'));
double value=KGlobal::locale()->readNumber(txt) / 100.0;
updateZoom(ZOOM_FREE, value);
} else {
@@ -1280,7 +1280,7 @@ void ImageView::slotImageSizeUpdated() {
d->mXOffset=0;
d->mYOffset=0;
- d->mValidImageArea = QRegion();
+ d->mValidImageArea = TQRegion();
if (d->mZoomMode!=ZOOM_FREE) {
d->mXCenterBeforeAuto=0;
d->mYCenterBeforeAuto=0;
@@ -1311,9 +1311,9 @@ void ImageView::slotImageSizeUpdated() {
fullRepaint();
}
-void ImageView::slotImageRectUpdated(const QRect& imageRect) {
+void ImageView::slotImageRectUpdated(const TQRect& imageRect) {
d->mValidImageArea += imageRect;
- viewport()->repaint( d->imageToWidget( imageRect ), false );
+ viewport()->tqrepaint( d->imageToWidget( imageRect ), false );
}
@@ -1338,8 +1338,8 @@ double ImageView::computeZoomToFit() const {
if (d->mDocument->isNull()) {
return 1.0;
}
- QSize size=d->mDocument->image().size();
- size.scale(width(),height(),QSize::ScaleMin);
+ TQSize size=d->mDocument->image().size();
+ size.tqscale(width(),height(),TQSize::ScaleMin);
double zoom=double(size.width())/d->mDocument->width();
if (zoom>1.0 && !ImageViewConfig::enlargeSmallImages()) return 1.0;
@@ -1350,7 +1350,7 @@ double ImageView::computeZoomToWidth() const {
if (d->mDocument->isNull()) {
return 1.0;
}
- int sw = verticalScrollBar()->sizeHint().width(); // geometry is not valid before first show()
+ int sw = verticalScrollBar()->tqsizeHint().width(); // tqgeometry is not valid before first show()
int w = width();
int dw = d->mDocument->width();
switch( vScrollBarMode()) {
@@ -1370,7 +1370,7 @@ double ImageView::computeZoomToHeight() const {
if (d->mDocument->isNull()) {
return 1.0;
}
- int sh = horizontalScrollBar()->sizeHint().height();
+ int sh = horizontalScrollBar()->tqsizeHint().height();
int h = height();
int dh = d->mDocument->height();
switch( vScrollBarMode()) {
@@ -1425,15 +1425,15 @@ void ImageView::updateImageOffset() {
int zpixHeight=int(d->mDocument->height() * d->mZoom);
if (zpixWidth>viewWidth && hScrollBarMode()!=AlwaysOff) {
- // use sizeHint() - geometry is not valid before first show()
- viewHeight-=horizontalScrollBar()->sizeHint().height();
+ // use tqsizeHint() - tqgeometry is not valid before first show()
+ viewHeight-=horizontalScrollBar()->tqsizeHint().height();
}
if (zpixHeight>viewHeight && vScrollBarMode()!=AlwaysOff) {
- viewWidth-=verticalScrollBar()->sizeHint().width();
+ viewWidth-=verticalScrollBar()->tqsizeHint().width();
}
- d->mXOffset=QMAX(0,(viewWidth-zpixWidth)/2);
- d->mYOffset=QMAX(0,(viewHeight-zpixHeight)/2);
+ d->mXOffset=TQMAX(0,(viewWidth-zpixWidth)/2);
+ d->mYOffset=TQMAX(0,(viewHeight-zpixHeight)/2);
}
@@ -1457,7 +1457,7 @@ void ImageView::updateZoomActions() {
if (d->mZoomMode==ZOOM_FREE) {
d->mZoomIn->setEnabled(d->mZoom<MAX_ZOOM);
d->mZoomOut->setEnabled(d->mZoom>1/MAX_ZOOM);
- QString zoomText=QString("%1%").arg(int(d->mZoom*100));
+ TQString zoomText=TQString("%1%").tqarg(int(d->mZoom*100));
d->mZoomCombo->setCurrentText(zoomText);
} else {
d->mZoomIn->setEnabled(true);
diff --git a/src/gvcore/imageview.h b/src/gvcore/imageview.h
index 7c1d919..f688e27 100644
--- a/src/gvcore/imageview.h
+++ b/src/gvcore/imageview.h
@@ -23,32 +23,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H
-// Qt
-#include <qmap.h>
-#include <qscrollview.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+// TQt
+#include <tqmap.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
// Local
#include "busylevelmanager.h"
#include "imageutils/imageutils.h"
#include "libgwenview_export.h"
-class QEvent;
-class QLabel;
-class QMouseEvent;
-class QPainter;
-class QTimer;
-class QWheelEvent;
+class TQEvent;
+class TQLabel;
+class TQMouseEvent;
+class TQPainter;
+class TQTimer;
+class TQWheelEvent;
class KAction;
class KActionCollection;
class KToggleAction;
-typedef QValueList<KAction *> KActionPtrList;
+typedef TQValueList<KAction *> KActionPtrList;
namespace Gwenview {
class Document;
-class LIBGWENVIEW_EXPORT ImageView : public QScrollView {
+class LIBGWENVIEW_EXPORT ImageView : public TQScrollView {
Q_OBJECT
+ TQ_OBJECT
public:
class ToolBase;
@@ -64,9 +65,9 @@ public:
enum ToolID { SCROLL, ZOOM };
enum ZoomMode { ZOOM_FIT, ZOOM_FIT_WIDTH, ZOOM_FIT_HEIGHT, ZOOM_FREE };
- typedef QMap<ToolID,ToolBase*> Tools;
+ typedef TQMap<ToolID,ToolBase*> Tools;
- ImageView(QWidget* parent,Document*,KActionCollection*);
+ ImageView(TQWidget* tqparent,Document*,KActionCollection*);
~ImageView();
// Properties
@@ -89,34 +90,34 @@ signals:
void selectPrevious();
void selectNext();
void doubleClicked();
- void requestContextMenu(const QPoint&);
+ void requestContextMenu(const TQPoint&);
// Emitted whenever an hint should be displayed
- void requestHintDisplay(const QString& hint);
+ void requestHintDisplay(const TQString& hint);
// Emitted whenever brightness, contrast or gamma changes
void bcgChanged();
protected:
- virtual void contentsDragEnterEvent(QDragEnterEvent*);
- virtual void contentsDropEvent(QDropEvent*);
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void contentsDragEnterEvent(TQDragEnterEvent*);
+ virtual void contentsDropEvent(TQDropEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
private:
struct Private;
Private* d;
struct PendingPaint {
- PendingPaint( bool s, const QRect& r ) : rect( r ), smooth( s ) {};
- PendingPaint() {}; // stupid Qt containers
- QRect rect;
+ PendingPaint( bool s, const TQRect& r ) : rect( r ), smooth( s ) {};
+ PendingPaint() {}; // stupid TQt containers
+ TQRect rect;
bool smooth;
};
enum Operation { CHECK_OPERATIONS = 0, SMOOTH_PASS = 1 << 0 };
- void addPendingPaint( bool smooth, QRect rect = QRect());
- void addPendingPaintInternal( bool smooth, QRect rect = QRect());
- void performPaint( QPainter* painter, int clipx, int clipy, int clipw, int cliph, bool smooth );
+ void addPendingPaint( bool smooth, TQRect rect = TQRect());
+ void addPendingPaintInternal( bool smooth, TQRect rect = TQRect());
+ void performPaint( TQPainter* painter, int clipx, int clipy, int clipw, int cliph, bool smooth );
void limitPaintSize( PendingPaint& paint );
void fullRepaint();
void cancelPending();
@@ -145,7 +146,7 @@ private:
void emitSelectNext() { emit selectNext(); }
// Used by the zoom tool
- QPoint offset() const;
+ TQPoint offset() const;
bool canZoom(bool in) const;
KToggleAction* zoomToFit() const;
@@ -167,7 +168,7 @@ private slots:
void increaseContrast();
void decreaseContrast();
void slotImageSizeUpdated();
- void slotImageRectUpdated(const QRect&);
+ void slotImageRectUpdated(const TQRect&);
void checkPendingOperations();
void loadingStarted();
void slotBusyLevelChanged(BusyLevel);
@@ -175,14 +176,14 @@ private slots:
protected:
// Overloaded methods
- bool eventFilter(QObject*, QEvent*);
- void viewportMousePressEvent(QMouseEvent*);
- void viewportMouseMoveEvent(QMouseEvent*);
- void viewportMouseReleaseEvent(QMouseEvent*);
- bool viewportKeyEvent(QKeyEvent*); // This one is not inherited, it's called from the eventFilter
- void wheelEvent(QWheelEvent* event);
- void resizeEvent(QResizeEvent* event);
- void drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph);
+ bool eventFilter(TQObject*, TQEvent*);
+ void viewportMousePressEvent(TQMouseEvent*);
+ void viewportMouseMoveEvent(TQMouseEvent*);
+ void viewportMouseReleaseEvent(TQMouseEvent*);
+ bool viewportKeyEvent(TQKeyEvent*); // This one is not inherited, it's called from the eventFilter
+ void wheelEvent(TQWheelEvent* event);
+ void resizeEvent(TQResizeEvent* event);
+ void drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph);
};
} // namespace
diff --git a/src/gvcore/imageviewconfig.kcfg b/src/gvcore/imageviewconfig.kcfg
index f13dfad..6424202 100644
--- a/src/gvcore/imageviewconfig.kcfg
+++ b/src/gvcore/imageviewconfig.kcfg
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
- <include>qapplication.h</include>
- <include>qpalette.h</include>
+ <include>tqapplication.h</include>
+ <include>tqpalette.h</include>
<kcfgfile name="gwenviewrc"/>
<group name="pixmap widget">
<entry name="smoothAlgorithm" key="smooth scale" type="Enum">
@@ -18,7 +18,7 @@
<default>false</default>
</entry>
<entry name="backgroundColor" key="background color" type="Color">
- <default code="true">QApplication::palette().active().dark()</default>
+ <default code="true">TQApplication::tqpalette().active().dark()</default>
</entry>
<entry name="enlargeSmallImages" key="enlarge small images" type="Bool">
<default>false</default>
diff --git a/src/gvcore/imageviewcontroller.cpp b/src/gvcore/imageviewcontroller.cpp
index cc88687..1ec4218 100644
--- a/src/gvcore/imageviewcontroller.cpp
+++ b/src/gvcore/imageviewcontroller.cpp
@@ -20,12 +20,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <imageviewcontroller.moc>
-// Qt
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
+// TQt
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
// KDE
#include <kaction.h>
@@ -64,11 +64,11 @@ namespace Gwenview {
*/
class XMLGUIBuilder : public KXMLGUIBuilder {
public:
- XMLGUIBuilder(QWidget* parent) : KXMLGUIBuilder(parent) {}
+ XMLGUIBuilder(TQWidget* tqparent) : KXMLGUIBuilder(tqparent) {}
- virtual QWidget* createContainer(QWidget *parent, int index, const QDomElement &element, int &id) {
+ virtual TQWidget* createContainer(TQWidget *tqparent, int index, const TQDomElement &element, int &id) {
if (element.tagName().lower() == "toolbar") {
- return KXMLGUIBuilder::createContainer(parent, index, element, id);
+ return KXMLGUIBuilder::createContainer(tqparent, index, element, id);
} else {
return 0;
}
@@ -89,17 +89,17 @@ struct ImageViewController::Private {
Document* mDocument;
KActionCollection* mActionCollection;
- QWidget* mContainer;
+ TQWidget* mContainer;
KToolBar* mToolBar;
KXMLGUIFactory* mFactory;
XMLGUIBuilder* mBuilder;
- QWidgetStack* mStack;
+ TQWidgetStack* mStack;
ImageView* mImageView;
KActionPtrList mImageViewActions;
// Hide cursor stuff
- QTimer* mAutoHideTimer;
+ TQTimer* mAutoHideTimer;
bool mCursorHidden;
KParts::ReadOnlyPart* mPlayerPart;
@@ -111,7 +111,7 @@ struct ImageViewController::Private {
void setXMLGUIClient(KXMLGUIClient* client) {
- QPtrList<KXMLGUIClient> list=mFactory->clients();
+ TQPtrList<KXMLGUIClient> list=mFactory->clients();
KXMLGUIClient* oldClient=list.getFirst();
if (oldClient) {
mFactory->removeClient(oldClient);
@@ -144,17 +144,17 @@ struct ImageViewController::Private {
}
mPlayerPart=0;
- QString mimeType=KMimeType::findByURL(mDocument->url())->name();
+ TQString mimeType=KMimeType::findByURL(mDocument->url())->name();
KService::Ptr service = KServiceTypeProfile::preferredService(mimeType, "KParts/ReadOnlyPart");
if (!service) {
kdWarning() << "Couldn't find a KPart for " << mimeType << endl;
return;
}
- QString library=service->library();
+ TQString library=service->library();
Q_ASSERT(!library.isNull());
LOG("Library:" << library);
- mPlayerPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>(service, mStack, 0, mStack, 0);
+ mPlayerPart = KParts::ComponentFactory::createPartInstanceFromService<KParts::ReadOnlyPart>(service, TQT_TQWIDGET(mStack), 0, TQT_TQOBJECT(mStack), 0);
if (!mPlayerPart) {
kdWarning() << "Failed to instantiate KPart from library " << library << endl;
return;
@@ -219,7 +219,7 @@ struct ImageViewController::Private {
void updateFullScreenBarPosition() {
- int mouseY=mStack->mapFromGlobal(QCursor::pos()).y();
+ int mouseY=mStack->mapFromGlobal(TQCursor::pos()).y();
bool visible = mFullScreenBar->y()==0;
if (visible && mouseY>mFullScreenBar->height()) {
@@ -264,23 +264,23 @@ struct ImageViewController::Private {
//------------------------------------------------------------------------
-ImageViewController::ImageViewController(QWidget* parent, Document* document, KActionCollection* actionCollection)
-: QObject(parent) {
+ImageViewController::ImageViewController(TQWidget* tqparent, Document* document, KActionCollection* actionCollection)
+: TQObject(tqparent) {
d=new Private;
d->mImageViewController=this;
d->mDocument=document;
d->mActionCollection=actionCollection;
- d->mAutoHideTimer=new QTimer(this);
+ d->mAutoHideTimer=new TQTimer(this);
d->mCursorHidden=false;
- d->mContainer=new QWidget(parent);
+ d->mContainer=new TQWidget(tqparent);
d->mContainer->setMinimumWidth(1); // Make sure we can resize the toolbar smaller than its minimum size
- QVBoxLayout* layout=new QVBoxLayout(d->mContainer);
+ TQVBoxLayout* tqlayout=new TQVBoxLayout(d->mContainer);
d->mToolBar=new KToolBar(d->mContainer, "", true);
- layout->add(d->mToolBar);
- d->mStack=new QWidgetStack(d->mContainer);
- layout->add(d->mStack);
+ tqlayout->add(d->mToolBar);
+ d->mStack=new TQWidgetStack(d->mContainer);
+ tqlayout->add(d->mStack);
d->mImageView=new ImageView(d->mStack, document, actionCollection);
d->mStack->addWidget(d->mImageView);
@@ -294,22 +294,22 @@ ImageViewController::ImageViewController(QWidget* parent, Document* document, KA
d->mFullScreen=false;
d->mFullScreenBar=0;
- connect(d->mDocument,SIGNAL(loaded(const KURL&)),
- this,SLOT(slotLoaded()) );
+ connect(d->mDocument,TQT_SIGNAL(loaded(const KURL&)),
+ this,TQT_SLOT(slotLoaded()) );
- connect(d->mImageView, SIGNAL(requestContextMenu(const QPoint&)),
- this, SLOT(openImageViewContextMenu(const QPoint&)) );
+ connect(d->mImageView, TQT_SIGNAL(requestContextMenu(const TQPoint&)),
+ this, TQT_SLOT(openImageViewContextMenu(const TQPoint&)) );
- connect(d->mImageView, SIGNAL(requestHintDisplay(const QString&)),
- this, SIGNAL(requestHintDisplay(const QString&)) );
+ connect(d->mImageView, TQT_SIGNAL(requestHintDisplay(const TQString&)),
+ this, TQT_SIGNAL(requestHintDisplay(const TQString&)) );
- connect(d->mAutoHideTimer,SIGNAL(timeout()),
- this,SLOT(slotAutoHide()) );
+ connect(d->mAutoHideTimer,TQT_SIGNAL(timeout()),
+ this,TQT_SLOT(slotAutoHide()) );
// Forward Image view signals
- connect(d->mImageView, SIGNAL(selectPrevious()), SIGNAL(selectPrevious()) );
- connect(d->mImageView, SIGNAL(selectNext()), SIGNAL(selectNext()) );
- connect(d->mImageView, SIGNAL(doubleClicked()), SIGNAL(doubleClicked()) );
+ connect(d->mImageView, TQT_SIGNAL(selectPrevious()), TQT_SIGNAL(selectPrevious()) );
+ connect(d->mImageView, TQT_SIGNAL(selectNext()), TQT_SIGNAL(selectNext()) );
+ connect(d->mImageView, TQT_SIGNAL(doubleClicked()), TQT_SIGNAL(doubleClicked()) );
}
@@ -320,7 +320,7 @@ ImageViewController::~ImageViewController() {
void ImageViewController::setFocus() {
- QWidget* view;
+ TQWidget* view;
if (d->mPlayerPart) {
view = d->mPlayerPart->widget();
} else {
@@ -351,7 +351,7 @@ void ImageViewController::setFullScreen(bool fullScreen) {
}
} else {
d->mAutoHideTimer->stop();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
d->mCursorHidden=false;
}
@@ -387,23 +387,23 @@ void ImageViewController::setImageViewActions(const KActionPtrList& actions) {
void ImageViewController::slotAutoHide() {
if (d->mFullScreenBar) {
// Do not auto hide if the cursor is over the bar
- QPoint pos=d->mFullScreenBar->mapFromGlobal(QCursor::pos());
- if (d->mFullScreenBar->rect().contains(pos)) {
+ TQPoint pos=d->mFullScreenBar->mapFromGlobal(TQCursor::pos());
+ if (TQT_TQRECT_OBJECT(d->mFullScreenBar->rect()).tqcontains(pos)) {
d->restartAutoHideTimer();
return;
}
}
// Only hide cursor if we are not over a dialog
- QWidget* widget = KApplication::kApplication()->activeWindow();
- if (!widget || !widget->inherits("QDialog")) {
- QApplication::setOverrideCursor(blankCursor);
+ TQWidget* widget = TQT_TQWIDGET(KApplication::kApplication()->activeWindow());
+ if (!widget || !widget->inherits(TQDIALOG_OBJECT_NAME_STRING)) {
+ TQApplication::setOverrideCursor(blankCursor);
d->mCursorHidden=true;
}
}
-QWidget* ImageViewController::widget() const {
+TQWidget* ImageViewController::widget() const {
return d->mContainer;
}
@@ -417,16 +417,16 @@ void ImageViewController::updateFromSettings() {
* This event filter monitors mouse moves and make sure the position of the
* fullscreen bar is updated.
*/
-bool ImageViewController::eventFilter(QObject* object, QEvent* event) {
+bool ImageViewController::eventFilter(TQObject* object, TQEvent* event) {
if (!d->mFullScreen) return false;
- if (!event->type()==QEvent::MouseMove) return false;
+ if (!event->type()==TQEvent::MouseMove) return false;
// Check we must filter this object. This is an application filter, so we
// have to check we are not dealing with another object.
bool isAChildOfStack=false;
- QObject* parentObject;
- for (parentObject=object->parent(); parentObject; parentObject=parentObject->parent()) {
- if (parentObject==d->mStack) {
+ TQObject* tqparentObject;
+ for (tqparentObject=object->tqparent(); tqparentObject; tqparentObject=tqparentObject->tqparent()) {
+ if (TQT_BASE_OBJECT(tqparentObject)==TQT_BASE_OBJECT(d->mStack)) {
isAChildOfStack=true;
break;
}
@@ -435,15 +435,15 @@ bool ImageViewController::eventFilter(QObject* object, QEvent* event) {
d->updateFullScreenBarPosition();
- if (event->type()==QEvent::MouseMove) {
+ if (event->type()==TQEvent::MouseMove) {
d->mCursorHidden=false;
d->restartAutoHideTimer();
}
if (d->mCursorHidden) {
- QApplication::setOverrideCursor(blankCursor,true);
+ TQApplication::setOverrideCursor(blankCursor,true);
} else {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
return false;
@@ -453,14 +453,14 @@ bool ImageViewController::eventFilter(QObject* object, QEvent* event) {
/**
* Little helper to plug an action if it exists
*/
-inline void plugAction(QPopupMenu* menu, KActionCollection* actionCollection, const char* actionName) {
+inline void plugAction(TQPopupMenu* menu, KActionCollection* actionCollection, const char* actionName) {
KAction* action=actionCollection->action(actionName);
if (action) action->plug(menu);
}
-void ImageViewController::openImageViewContextMenu(const QPoint& pos) {
- QPopupMenu menu(d->mImageView);
+void ImageViewController::openImageViewContextMenu(const TQPoint& pos) {
+ TQPopupMenu menu(d->mImageView);
bool noImage=d->mDocument->filename().isEmpty();
bool validImage=!d->mDocument->isNull();
@@ -490,7 +490,7 @@ void ImageViewController::openImageViewContextMenu(const QPoint& pos) {
if (validImage) {
menu.insertSeparator();
- QPopupMenu* editMenu=new QPopupMenu(&menu);
+ TQPopupMenu* editMenu=new TQPopupMenu(&menu);
plugAction(editMenu, d->mActionCollection, "rotate_left");
plugAction(editMenu, d->mActionCollection, "rotate_right");
plugAction(editMenu, d->mActionCollection, "mirror");
diff --git a/src/gvcore/imageviewcontroller.h b/src/gvcore/imageviewcontroller.h
index 9fe775e..641660b 100644
--- a/src/gvcore/imageviewcontroller.h
+++ b/src/gvcore/imageviewcontroller.h
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGEVIEWCONTROLLER_H
#define IMAGEVIEWCONTROLLER_H
-// Qt
-#include <qobject.h>
+// TQt
+#include <tqobject.h>
// KDE
#include <kaction.h>
@@ -30,8 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Local
#include "libgwenview_export.h"
-class QPoint;
-class QWidget;
+class TQPoint;
+class TQWidget;
class KToolBar;
@@ -42,13 +42,14 @@ class Document;
class ImageView;
-class LIBGWENVIEW_EXPORT ImageViewController : public QObject {
+class LIBGWENVIEW_EXPORT ImageViewController : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- ImageViewController(QWidget* parent, Document*, KActionCollection*);
+ ImageViewController(TQWidget* tqparent, Document*, KActionCollection*);
~ImageViewController();
- QWidget* widget() const;
+ TQWidget* widget() const;
void setImageViewActions(const KActionPtrList&);
@@ -58,20 +59,20 @@ public:
void setFocus();
protected:
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
public slots:
void updateFromSettings();
signals:
- void requestHintDisplay(const QString&);
+ void requestHintDisplay(const TQString&);
void selectPrevious();
void selectNext();
void doubleClicked();
private slots:
void slotLoaded();
- void openImageViewContextMenu(const QPoint&);
+ void openImageViewContextMenu(const TQPoint&);
void slotAutoHide();
private:
diff --git a/src/gvcore/imageviewtools.cpp b/src/gvcore/imageviewtools.cpp
index 5cb8fdd..699868a 100644
--- a/src/gvcore/imageviewtools.cpp
+++ b/src/gvcore/imageviewtools.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -34,10 +34,10 @@ namespace Gwenview {
// Helper function
-static QCursor loadCursor(const QString& name) {
- QString path;
- path=locate("data", QString("gwenview/cursors/%1.png").arg(name));
- return QCursor(QPixmap(path));
+static TQCursor loadCursor(const TQString& name) {
+ TQString path;
+ path=locate("data", TQString("gwenview/cursors/%1.png").tqarg(name));
+ return TQCursor(TQPixmap(path));
}
@@ -52,22 +52,22 @@ ImageView::ToolBase::ToolBase(ImageView* view)
ImageView::ToolBase::~ToolBase() {}
-void ImageView::ToolBase::mouseMoveEvent(QMouseEvent*) {}
-void ImageView::ToolBase::leftButtonPressEvent(QMouseEvent*) {}
-void ImageView::ToolBase::leftButtonReleaseEvent(QMouseEvent*) {}
+void ImageView::ToolBase::mouseMoveEvent(TQMouseEvent*) {}
+void ImageView::ToolBase::leftButtonPressEvent(TQMouseEvent*) {}
+void ImageView::ToolBase::leftButtonReleaseEvent(TQMouseEvent*) {}
-void ImageView::ToolBase::midButtonReleaseEvent(QMouseEvent*) {
+void ImageView::ToolBase::midButtonReleaseEvent(TQMouseEvent*) {
mView->zoomToFit()->activate();
}
-void ImageView::ToolBase::rightButtonPressEvent(QMouseEvent* event) {
+void ImageView::ToolBase::rightButtonPressEvent(TQMouseEvent* event) {
emit mView->requestContextMenu(event->globalPos());
}
-void ImageView::ToolBase::rightButtonReleaseEvent(QMouseEvent*) {
+void ImageView::ToolBase::rightButtonReleaseEvent(TQMouseEvent*) {
}
-void ImageView::ToolBase::wheelEvent(QWheelEvent* event) {
+void ImageView::ToolBase::wheelEvent(TQWheelEvent* event) {
event->accept();
}
@@ -87,12 +87,12 @@ ImageView::ZoomTool::ZoomTool(ImageView* view)
}
-void ImageView::ZoomTool::zoomTo(const QPoint& pos, bool in) {
+void ImageView::ZoomTool::zoomTo(const TQPoint& pos, bool in) {
if (!mView->canZoom(in)) return;
- QPoint centerPos=QPoint(mView->visibleWidth(), mView->visibleHeight())/2;
+ TQPoint centerPos=TQPoint(mView->visibleWidth(), mView->visibleHeight())/2;
// Compute image position
- QPoint imgPos=mView->viewportToContents(pos) - mView->offset();
+ TQPoint imgPos=mView->viewportToContents(pos) - mView->offset();
double newZoom=mView->computeZoom(in);
imgPos*=newZoom/mView->zoom();
@@ -101,22 +101,22 @@ void ImageView::ZoomTool::zoomTo(const QPoint& pos, bool in) {
}
-void ImageView::ZoomTool::leftButtonReleaseEvent(QMouseEvent* event) {
+void ImageView::ZoomTool::leftButtonReleaseEvent(TQMouseEvent* event) {
zoomTo(event->pos(), true);
}
-void ImageView::ZoomTool::wheelEvent(QWheelEvent* event) {
+void ImageView::ZoomTool::wheelEvent(TQWheelEvent* event) {
zoomTo(event->pos(), event->delta()>0);
event->accept();
}
-void ImageView::ZoomTool::rightButtonPressEvent(QMouseEvent*) {
+void ImageView::ZoomTool::rightButtonPressEvent(TQMouseEvent*) {
}
-void ImageView::ZoomTool::rightButtonReleaseEvent(QMouseEvent* event) {
+void ImageView::ZoomTool::rightButtonReleaseEvent(TQMouseEvent* event) {
zoomTo(event->pos(), false);
}
@@ -126,7 +126,7 @@ void ImageView::ZoomTool::updateCursor() {
}
-QString ImageView::ZoomTool::hint() const {
+TQString ImageView::ZoomTool::hint() const {
return i18n("Left click to zoom in, right click to zoom out. You can also use the mouse wheel.");
}
@@ -143,7 +143,7 @@ ImageView::ScrollTool::ScrollTool(ImageView* view)
}
-void ImageView::ScrollTool::leftButtonPressEvent(QMouseEvent* event) {
+void ImageView::ScrollTool::leftButtonPressEvent(TQMouseEvent* event) {
mScrollStartX=event->x();
mScrollStartY=event->y();
mView->viewport()->setCursor(SizeAllCursor);
@@ -151,7 +151,7 @@ void ImageView::ScrollTool::leftButtonPressEvent(QMouseEvent* event) {
}
-void ImageView::ScrollTool::mouseMoveEvent(QMouseEvent* event) {
+void ImageView::ScrollTool::mouseMoveEvent(TQMouseEvent* event) {
if (!mDragStarted) return;
int deltaX,deltaY;
@@ -165,7 +165,7 @@ void ImageView::ScrollTool::mouseMoveEvent(QMouseEvent* event) {
}
-void ImageView::ScrollTool::leftButtonReleaseEvent(QMouseEvent*) {
+void ImageView::ScrollTool::leftButtonReleaseEvent(TQMouseEvent*) {
if (!mDragStarted) return;
mDragStarted=false;
@@ -173,11 +173,11 @@ void ImageView::ScrollTool::leftButtonReleaseEvent(QMouseEvent*) {
}
-void ImageView::ScrollTool::wheelEvent(QWheelEvent* event) {
+void ImageView::ScrollTool::wheelEvent(TQWheelEvent* event) {
if (ImageViewConfig::mouseWheelScroll()) {
int deltaX, deltaY;
- if (event->state() & AltButton || event->orientation()==Horizontal) {
+ if (event->state() & AltButton || event->orientation()==Qt::Horizontal) {
deltaX = event->delta();
deltaY = 0;
} else {
@@ -205,7 +205,7 @@ void ImageView::ScrollTool::updateCursor() {
}
-QString ImageView::ScrollTool::hint() const {
+TQString ImageView::ScrollTool::hint() const {
return i18n("Drag to move the image, middle-click to toggle auto-zoom. Hold the Control key to switch to the zoom tool.");
}
diff --git a/src/gvcore/imageviewtools.h b/src/gvcore/imageviewtools.h
index f0d175b..5e23694 100644
--- a/src/gvcore/imageviewtools.h
+++ b/src/gvcore/imageviewtools.h
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGEVIEWTOOLS_H
#define IMAGEVIEWTOOLS_H
-// Qt
-#include <qcursor.h>
+// TQt
+#include <tqcursor.h>
// Local
#include "imageview.h"
@@ -36,42 +36,42 @@ protected:
public:
ToolBase(ImageView* view);
virtual ~ToolBase();
- virtual void mouseMoveEvent(QMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
- virtual void leftButtonPressEvent(QMouseEvent*);
- virtual void leftButtonReleaseEvent(QMouseEvent*);
+ virtual void leftButtonPressEvent(TQMouseEvent*);
+ virtual void leftButtonReleaseEvent(TQMouseEvent*);
- virtual void midButtonReleaseEvent(QMouseEvent*);
+ virtual void midButtonReleaseEvent(TQMouseEvent*);
- virtual void rightButtonPressEvent(QMouseEvent* event);
- virtual void rightButtonReleaseEvent(QMouseEvent*);
+ virtual void rightButtonPressEvent(TQMouseEvent* event);
+ virtual void rightButtonReleaseEvent(TQMouseEvent*);
- virtual void wheelEvent(QWheelEvent* event);
+ virtual void wheelEvent(TQWheelEvent* event);
virtual void updateCursor();
/**
* Return a hint about the use of the tool
*/
- virtual QString hint() const=0;
+ virtual TQString hint() const=0;
};
class ImageView::ZoomTool : public ImageView::ToolBase {
private:
- QCursor mZoomCursor;
- void zoomTo(const QPoint& pos, bool in);
+ TQCursor mZoomCursor;
+ void zoomTo(const TQPoint& pos, bool in);
public:
ZoomTool(ImageView* view);
- void leftButtonReleaseEvent(QMouseEvent* event);
+ void leftButtonReleaseEvent(TQMouseEvent* event);
- void wheelEvent(QWheelEvent* event);
- void rightButtonPressEvent(QMouseEvent*);
- void rightButtonReleaseEvent(QMouseEvent* event);
+ void wheelEvent(TQWheelEvent* event);
+ void rightButtonPressEvent(TQMouseEvent*);
+ void rightButtonReleaseEvent(TQMouseEvent* event);
void updateCursor();
- virtual QString hint() const;
+ virtual TQString hint() const;
};
@@ -81,13 +81,13 @@ class ImageView::ScrollTool : public ImageView::ToolBase {
public:
ScrollTool(ImageView* view);
- void leftButtonPressEvent(QMouseEvent* event);
- void mouseMoveEvent(QMouseEvent* event);
- void leftButtonReleaseEvent(QMouseEvent*);
- void wheelEvent(QWheelEvent* event);
+ void leftButtonPressEvent(TQMouseEvent* event);
+ void mouseMoveEvent(TQMouseEvent* event);
+ void leftButtonReleaseEvent(TQMouseEvent*);
+ void wheelEvent(TQWheelEvent* event);
void updateCursor();
- virtual QString hint() const;
+ virtual TQString hint() const;
};
diff --git a/src/gvcore/inputdialog.cpp b/src/gvcore/inputdialog.cpp
index e273969..cdd4267 100644
--- a/src/gvcore/inputdialog.cpp
+++ b/src/gvcore/inputdialog.cpp
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Self
#include "inputdialog.moc"
-// Qt
-#include <qlabel.h>
-#include <qvbox.h>
+// TQt
+#include <tqlabel.h>
+#include <tqvbox.h>
// KDE
#include <klineedit.h>
@@ -32,25 +32,25 @@ namespace Gwenview {
struct InputDialog::Private {
KLineEdit* mLineEdit;
- QLabel* mLabel;
+ TQLabel* mLabel;
};
-InputDialog::InputDialog(QWidget* parent)
-: KDialogBase(parent, "InputDialog", true, QString::null,
+InputDialog::InputDialog(TQWidget* tqparent)
+: KDialogBase(tqparent, "InputDialog", true, TQString(),
KDialogBase::Ok|KDialogBase::Cancel)
{
d = new Private;
- QVBox* page = makeVBoxMainWidget();
- d->mLabel = new QLabel(page);
+ TQVBox* page = makeVBoxMainWidget();
+ d->mLabel = new TQLabel(page);
d->mLineEdit = new KLineEdit(page);
d->mLineEdit->setFocus();
setMinimumWidth(350);
- connect(d->mLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(updateButtons()) );
+ connect(d->mLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(updateButtons()) );
}
@@ -59,7 +59,7 @@ InputDialog::~InputDialog() {
}
-void InputDialog::setLabel(const QString& label) {
+void InputDialog::setLabel(const TQString& label) {
d->mLabel->setText(label);
}
diff --git a/src/gvcore/inputdialog.h b/src/gvcore/inputdialog.h
index 09817d7..d34d465 100644
--- a/src/gvcore/inputdialog.h
+++ b/src/gvcore/inputdialog.h
@@ -36,10 +36,11 @@ namespace Gwenview {
*/
class InputDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- InputDialog(QWidget* parent);
+ InputDialog(TQWidget* tqparent);
~InputDialog();
- void setLabel(const QString& label);
+ void setLabel(const TQString& label);
KLineEdit* lineEdit() const;
private slots:
diff --git a/src/gvcore/jpegformattype.cpp b/src/gvcore/jpegformattype.cpp
index ccb020e..26dee4e 100644
--- a/src/gvcore/jpegformattype.cpp
+++ b/src/gvcore/jpegformattype.cpp
@@ -35,8 +35,8 @@ extern "C" {
#undef const
}
-// Qt
-#include <qdatetime.h>
+// TQt
+#include <tqdatetime.h>
// KDE
#include <kdebug.h>
@@ -72,9 +72,9 @@ struct JPEGSourceManager : public jpeg_source_mgr {
int valid_buffer_length;
size_t skip_input_bytes;
bool at_eof;
- QRect change_rect;
- QRect old_change_rect;
- QTime decoder_timestamp;
+ TQRect change_rect;
+ TQRect old_change_rect;
+ TQTime decoder_timestamp;
bool final_pass;
bool decoding_done;
bool do_progressive;
@@ -169,13 +169,13 @@ struct JPEGSourceManager : public jpeg_source_mgr {
// JPEGFormat
//
//-----------------------------------------------------------------------------
-class JPEGFormat : public QImageFormat {
+class JPEGFormat : public TQImageFormat {
public:
JPEGFormat();
virtual ~JPEGFormat();
- virtual int decode(QImage& img, QImageConsumer* consumer,
+ virtual int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
private:
@@ -216,7 +216,7 @@ JPEGFormat::~JPEGFormat() {
* return < 0 means "fatal error in image decoding, don't call me ever again"
*/
-int JPEGFormat::decode(QImage& image, QImageConsumer* consumer, const uchar* buffer, int length) {
+int JPEGFormat::decode(TQImage& image, TQImageConsumer* consumer, const uchar* buffer, int length) {
#ifdef JPEG_DEBUG
qDebug("JPEGFormat::decode(%p, %p, %p, %d)",
&image, consumer, buffer, length);
@@ -278,7 +278,7 @@ int JPEGFormat::decode(QImage& image, QImageConsumer* consumer, const uchar* buf
mDecompress.src->bytes_in_buffer = (size_t) mSourceManager.valid_buffer_length;
#ifdef BUFFER_DEBUG
- qDebug("buffer contains %d bytes", mSourceManager.valid_buffer_length);
+ qDebug("buffer tqcontains %d bytes", mSourceManager.valid_buffer_length);
#endif
if(mState == INIT) {
@@ -319,7 +319,7 @@ int JPEGFormat::decode(QImage& image, QImageConsumer* consumer, const uchar* buf
} else if ( mDecompress.output_components == 1 ) {
image.create( mDecompress.output_width, mDecompress.output_height, 8, 256 );
for (int i=0; i<256; i++) {
- image.setColor(i, qRgb(i,i,i));
+ image.setColor(i, tqRgb(i,i,i));
}
}
@@ -388,17 +388,17 @@ again:
// Expand 24->32 bpp.
for (int j=oldoutput_scanline; j<oldoutput_scanline+completed_scanlines; j++) {
uchar *in = image.scanLine(j) + mDecompress.output_width * 3;
- QRgb *out = (QRgb*)image.scanLine(j);
+ TQRgb *out = (TQRgb*)image.scanLine(j);
for (uint i=mDecompress.output_width; i--; ) {
in-=3;
- out[i] = qRgb(in[0], in[1], in[2]);
+ out[i] = tqRgb(in[0], in[1], in[2]);
}
}
}
if(consumer && completed_scanlines) {
- QRect r(0, oldoutput_scanline, mDecompress.output_width, completed_scanlines);
+ TQRect r(0, oldoutput_scanline, mDecompress.output_width, completed_scanlines);
#ifdef JPEG_DEBUG
qDebug("changing %d/%d %d/%d", r.x(), r.y(), r.width(), r.height());
#endif
@@ -407,10 +407,10 @@ again:
if ( mSourceManager.decoder_timestamp.elapsed() >= MAX_CONSUMING_TIME ) {
if( !mSourceManager.old_change_rect.isEmpty()) {
consumer->changed(mSourceManager.old_change_rect);
- mSourceManager.old_change_rect = QRect();
+ mSourceManager.old_change_rect = TQRect();
}
consumer->changed(mSourceManager.change_rect);
- mSourceManager.change_rect = QRect();
+ mSourceManager.change_rect = TQRect();
mSourceManager.decoder_timestamp.restart();
}
}
@@ -422,7 +422,7 @@ again:
mSourceManager.decoding_done = mSourceManager.final_pass && mDecompress.input_scan_number == mDecompress.output_scan_number;
if ( !mSourceManager.decoding_done ) {
mSourceManager.old_change_rect |= mSourceManager.change_rect;
- mSourceManager.change_rect = QRect();
+ mSourceManager.change_rect = TQRect();
}
} else {
mSourceManager.decoding_done = true;
@@ -508,7 +508,7 @@ again:
// JPEGFormatType
//
//-----------------------------------------------------------------------------
-QImageFormat* JPEGFormatType::decoderFor(const uchar* buffer, int length) {
+TQImageFormat* JPEGFormatType::decoderFor(const uchar* buffer, int length) {
if(length < 3) return 0;
if(buffer[0] == 0377 &&
diff --git a/src/gvcore/jpegformattype.h b/src/gvcore/jpegformattype.h
index b92b69d..3aeed7a 100644
--- a/src/gvcore/jpegformattype.h
+++ b/src/gvcore/jpegformattype.h
@@ -29,7 +29,7 @@
#ifndef gvjpegformattype_h
#define gvjpegformattype_h
-#include <qasyncimageio.h>
+#include <tqasyncimageio.h>
namespace Gwenview {
@@ -38,9 +38,9 @@ namespace Gwenview {
*
* An incremental loader factory for JPEG's.
*/
-class JPEGFormatType : public QImageFormatType {
+class JPEGFormatType : public TQImageFormatType {
public:
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
diff --git a/src/gvcore/mimetypeutils.cpp b/src/gvcore/mimetypeutils.cpp
index b2a7fb9..e5a210e 100644
--- a/src/gvcore/mimetypeutils.cpp
+++ b/src/gvcore/mimetypeutils.cpp
@@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "mimetypeutils.h"
-// Qt
-#include <qstringlist.h>
+// TQt
+#include <tqstringlist.h>
// KDE
#include <kapplication.h>
@@ -39,8 +39,8 @@ namespace Gwenview {
namespace MimeTypeUtils {
-const QStringList& rasterImageMimeTypes() {
- static QStringList list;
+const TQStringList& rasterImageMimeTypes() {
+ static TQStringList list;
if (list.isEmpty()) {
list=KImageIO::mimeTypes(KImageIO::Reading);
list.append("image/x-xcf-gimp");
@@ -52,14 +52,14 @@ const QStringList& rasterImageMimeTypes() {
}
-Kind mimeTypeKind(const QString& mimeType) {
+Kind mimeTypeKind(const TQString& mimeType) {
if (mimeType.startsWith("inode/directory")) {
return KIND_DIR;
}
- if (Archive::mimeTypes().contains(mimeType)) {
+ if (Archive::mimeTypes().tqcontains(mimeType)) {
return KIND_ARCHIVE;
}
- if (rasterImageMimeTypes().contains(mimeType)) {
+ if (rasterImageMimeTypes().tqcontains(mimeType)) {
return KIND_RASTER_IMAGE;
}
@@ -73,7 +73,7 @@ Kind fileItemKind(const KFileItem* item) {
Kind urlKind(const KURL& url) {
- QString mimeType;
+ TQString mimeType;
if (url.isLocalFile()) {
mimeType=KMimeType::findByURL(url)->name();
} else {
diff --git a/src/gvcore/mimetypeutils.h b/src/gvcore/mimetypeutils.h
index 0c13a5f..24dd21b 100644
--- a/src/gvcore/mimetypeutils.h
+++ b/src/gvcore/mimetypeutils.h
@@ -27,18 +27,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KFileItem;
class KURL;
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
namespace Gwenview {
namespace MimeTypeUtils {
enum Kind { KIND_UNKNOWN, KIND_DIR, KIND_ARCHIVE, KIND_FILE, KIND_RASTER_IMAGE };
-LIBGWENVIEW_EXPORT const QStringList& rasterImageMimeTypes();
+LIBGWENVIEW_EXPORT const TQStringList& rasterImageMimeTypes();
Kind fileItemKind(const KFileItem*);
Kind urlKind(const KURL&);
-Kind mimeTypeKind(const QString& mimeType);
+Kind mimeTypeKind(const TQString& mimeType);
} // namespace FileUtils
diff --git a/src/gvcore/mngformattype.cpp b/src/gvcore/mngformattype.cpp
index 60f64ef..f94f475 100644
--- a/src/gvcore/mngformattype.cpp
+++ b/src/gvcore/mngformattype.cpp
@@ -1,11 +1,11 @@
-// this code is copied from Qt, with fixes for not finishing decoding
+// this code is copied from TQt, with fixes for not finishing decoding
// prematurely
/* The actual patch is:
=====
--- /opt/_q/src/kernel/qmngio.cpp 2004-05-04 18:28:15.000000000 +0200
+++ gvmngformattype.cpp 2005-04-13 16:11:50.000000000 +0200
-@@ -411,8 +417,11 @@ int QMNGFormat::decode( QImage& img, QIm
+@@ -411,8 +417,11 @@ int TQMNGFormat::decode( TQImage& img, TQIm
}
losttime += losingtimer.elapsed();
@@ -19,7 +19,7 @@
losingtimer.start();
image = 0;
-@@ -422,6 +431,13 @@ int QMNGFormat::decode( QImage& img, QIm
+@@ -422,6 +431,13 @@ int TQMNGFormat::decode( TQImage& img, TQIm
// Move back unused tail
memcpy(buffer,buffer+ubuffer,nbuffer);
}
@@ -39,33 +39,33 @@
/****************************************************************************
**
**
-** Implementation of MNG QImage IOHandler
+** Implementation of MNG TQImage IOHandler
**
** Created : 970521
**
** Copyright (C) 1997-2004 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
@@ -75,40 +75,40 @@
#include <config.h>
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
+#ifndef TQT_CLEAN_NAMESPACE
+#define TQT_CLEAN_NAMESPACE
#endif
-#include "qdatetime.h"
+#include "tqdatetime.h"
#include "mngformattype.h"
-//#ifndef QT_NO_IMAGEIO_MNG
+//#ifndef TQT_NO_IMAGEIO_MNG
#ifdef HAVE_LIBMNG
-#include "qimage.h"
-#include "qasyncimageio.h"
-#include "qiodevice.h"
+#include "tqimage.h"
+#include "tqasyncimageio.h"
+#include "tqiodevice.h"
// Define XMD_H prohibits the included headers of libmng.h to typedef INT32.
// This is needed for Borland with STL support, since in that case, INT32 is
// already defined by some Borland header.
#define XMD_H
-#if defined(Q_OS_UNIXWARE)
+#if defined(TQ_OS_UNIXWARE)
# define HAVE_BOOLEAN // libjpeg under Unixware seems to need this
#endif
#include <libmng.h>
#include <stdlib.h>
-#ifndef QT_NO_ASYNC_IMAGE_IO
+#ifndef TQT_NO_ASYNC_IMAGE_IO
namespace Gwenview {
-class MNGFormat : public QImageFormat {
+class MNGFormat : public TQImageFormat {
public:
MNGFormat();
virtual ~MNGFormat();
- int decode(QImage& img, QImageConsumer* consumer,
+ int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
bool openstream()
@@ -177,7 +177,7 @@ public:
memset(image->bits(),0,iWidth*iHeight*4);
consumer->setSize(iWidth,iHeight);
mng_set_canvasstyle(handle,
- QImage::systemByteOrder() == QImage::LittleEndian
+ TQImage::systemByteOrder() == TQImage::LittleEndian
? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 );
return TRUE;
}
@@ -187,7 +187,7 @@ public:
}
mng_bool refresh( mng_uint32 x, mng_uint32 y, mng_uint32 w, mng_uint32 h )
{
- QRect r(x,y,w,h);
+ TQRect r(x,y,w,h);
consumer->changed(r);
consumer->setFramePeriod(0);
consumer->frameDone();
@@ -220,8 +220,8 @@ private:
uint nbuffer;
// Timing
- QTime timer;
- QTime losingtimer;
+ TQTime timer;
+ TQTime losingtimer;
int losttime;
void enlargeBuffer(uint n)
@@ -236,25 +236,25 @@ private:
const uchar* data;
uint ndata;
uint ubuffer;
- QImageConsumer* consumer;
- QImage* image;
+ TQImageConsumer* consumer;
+ TQImage* image;
};
-class MNGFormatType : public QImageFormatType
+class MNGFormatType : public TQImageFormatType
{
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
/*
- \class QMNGFormat qmngio.h
+ \class TQMNGFormat qmngio.h
\brief Incremental image decoder for MNG image format.
\ingroup images
\ingroup graphics
- This subclass of QImageFormat decodes MNG format images,
+ This subclass of TQImageFormat decodes MNG format images,
including animated MNGs.
Animated MNG images are standard MNG images. The MNG standard
@@ -280,20 +280,20 @@ TODO: decide on this point. gIFg gives disposal types, so it can be done.
*/
/*
- \class QMNGFormatType qasyncimageio.h
+ \class TQMNGFormatType qasyncimageio.h
\brief Incremental image decoder for MNG image format.
\ingroup images
\ingroup graphics
\ingroup io
- This subclass of QImageFormatType recognizes MNG
- format images, creating a QMNGFormat when required. An instance
+ This subclass of TQImageFormatType recognizes MNG
+ format images, creating a TQMNGFormat when required. An instance
of this class is created automatically before any other factories,
so you should have no need for such objects.
*/
-QImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
+TQImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
{
if (length < 8) return 0;
@@ -313,7 +313,7 @@ QImageFormat* MNGFormatType::decoderFor( const uchar* buffer, int length )
&& buffer[5]==10
&& buffer[6]==26
&& buffer[7]==10
-#ifdef QT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng
+#ifdef TQT_NO_IMAGEIO_PNG // if we don't have native PNG support use libmng
|| buffer[0]==137 // PNG signature
&& buffer[1]=='P'
&& buffer[2]=='N'
@@ -335,7 +335,7 @@ const char* MNGFormatType::formatName() const
/*!
- Constructs a QMNGFormat.
+ Constructs a TQMNGFormat.
*/
MNGFormat::MNGFormat()
{
@@ -348,7 +348,7 @@ MNGFormat::MNGFormat()
}
/*
- Destroys a QMNGFormat.
+ Destroys a TQMNGFormat.
*/
MNGFormat::~MNGFormat()
{
@@ -425,7 +425,7 @@ static void memfree( mng_ptr iPtr, mng_size_t /*iLen*/ )
Returns the number of bytes consumed.
*/
-int MNGFormat::decode( QImage& img, QImageConsumer* cons,
+int MNGFormat::decode( TQImage& img, TQImageConsumer* cons,
const uchar* buf, int length )
{
consumer = cons;
@@ -486,9 +486,9 @@ int MNGFormat::decode( QImage& img, QImageConsumer* cons,
static MNGFormatType* globalMngFormatTypeObject = 0;
-#endif // QT_NO_ASYNC_IMAGE_IO
+#endif // TQT_NO_ASYNC_IMAGE_IO
-#ifndef QT_NO_ASYNC_IMAGE_IO
+#ifndef TQT_NO_ASYNC_IMAGE_IO
void gvCleanupMngIO()
{
if ( globalMngFormatTypeObject ) {
@@ -503,7 +503,7 @@ void gvInitMngIO()
static bool done = FALSE;
if ( !done ) {
done = TRUE;
-#ifndef QT_NO_ASYNC_IMAGE_IO
+#ifndef TQT_NO_ASYNC_IMAGE_IO
globalMngFormatTypeObject = new MNGFormatType;
qAddPostRoutine( gvCleanupMngIO );
#endif
diff --git a/src/gvcore/mngformattype.h b/src/gvcore/mngformattype.h
index 9e60b64..39d5c46 100644
--- a/src/gvcore/mngformattype.h
+++ b/src/gvcore/mngformattype.h
@@ -1,36 +1,36 @@
-// this code is copied from Qt, with fixes for not finishing decoding
+// this code is copied from TQt, with fixes for not finishing decoding
// prematurely
/****************************************************************************
**
**
-** Definition of MNG QImage IOHandler
+** Definition of MNG TQImage IOHandler
**
** Created : 970521
**
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
@@ -38,11 +38,11 @@
**
**********************************************************************/
-#ifndef QMNGIO_H
-#define QMNGIO_H
+#ifndef TQMNGIO_H
+#define TQMNGIO_H
-#ifndef QT_H
-#endif // QT_H
+#ifndef TQT_H
+#endif // TQT_H
namespace Gwenview {
class MNG
@@ -52,4 +52,4 @@ public:
};
} // namespace
-#endif // QMNGIO_H
+#endif // TQMNGIO_H
diff --git a/src/gvcore/pngformattype.cpp b/src/gvcore/pngformattype.cpp
index 36c1064..d89032a 100644
--- a/src/gvcore/pngformattype.cpp
+++ b/src/gvcore/pngformattype.cpp
@@ -1,36 +1,36 @@
-// this code is copied from Qt, with code added to actually call consumer
+// this code is copied from TQt, with code added to actually call consumer
// methods that inform about the progress of loading
/****************************************************************************
**
**
-** Implementation of PNG QImage IOHandler
+** Implementation of PNG TQImage IOHandler
**
** Created : 970521
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
@@ -44,12 +44,12 @@
namespace Gwenview {
-class PNGFormat : public QImageFormat {
+class PNGFormat : public TQImageFormat {
public:
PNGFormat();
virtual ~PNGFormat();
- int decode(QImage& img, QImageConsumer* consumer,
+ int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
void info(png_structp png_ptr, png_infop info);
@@ -73,21 +73,21 @@ private:
png_infop info_ptr;
// Temporary locals during single data-chunk processing
- QImageConsumer* consumer;
- QImage* image;
+ TQImageConsumer* consumer;
+ TQImage* image;
int unused_data;
- QRect changed_rect;
+ TQRect changed_rect;
};
/*
- \class QPNGFormat qpngio.h
- \brief The QPNGFormat class provides an incremental image decoder for PNG
+ \class TQPNGFormat qpngio.h
+ \brief The TQPNGFormat class provides an incremental image decoder for PNG
image format.
\ingroup images
\ingroup graphics
- This subclass of QImageFormat decodes PNG format images,
+ This subclass of TQImageFormat decodes PNG format images,
including animated PNGs.
Animated PNG images are standard PNG images. The PNG standard
@@ -113,21 +113,21 @@ private:
*/
/*
- \class QPNGFormatType qasyncimageio.h
- \brief The QPNGFormatType class provides an incremental image decoder
+ \class TQPNGFormatType qasyncimageio.h
+ \brief The TQPNGFormatType class provides an incremental image decoder
for PNG image format.
\ingroup images
\ingroup graphics
\ingroup io
- This subclass of QImageFormatType recognizes PNG format images, creating
- a QPNGFormat when required. An instance of this class is created
+ This subclass of TQImageFormatType recognizes PNG format images, creating
+ a TQPNGFormat when required. An instance of this class is created
automatically before any other factories, so you should have no need for
such objects.
*/
-QImageFormat* PNGFormatType::decoderFor(
+TQImageFormat* PNGFormatType::decoderFor(
const uchar* buffer, int length)
{
if (length < 8) return 0;
@@ -192,7 +192,7 @@ static void qt_png_warning(png_structp /*png_ptr*/, png_const_charp message)
}
static
-void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
+void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
{
// For now, we will use the PC monitor gamma, if you own a Mac, you'd better use 1.8
const double SCREEN_GAMMA=2.2;
@@ -214,10 +214,10 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
if ( bit_depth == 1 && info_ptr->channels == 1 ) {
png_set_invert_mono( png_ptr );
png_read_update_info( png_ptr, info_ptr );
- if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+ if (!image.create( width, height, 1, 2, TQImage::BigEndian ))
return;
- image.setColor( 1, qRgb(0,0,0) );
- image.setColor( 0, qRgb(255,255,255) );
+ image.setColor( 1, tqRgb(0,0,0) );
+ image.setColor( 0, tqRgb(255,255,255) );
} else if (bit_depth == 16 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
png_set_expand(png_ptr);
png_set_strip_16(png_ptr);
@@ -227,7 +227,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
return;
image.setAlphaBuffer(TRUE);
- if (QImage::systemByteOrder() == QImage::BigEndian)
+ if (TQImage::systemByteOrder() == TQImage::BigEndian)
png_set_swap_alpha(png_ptr);
png_read_update_info(png_ptr, info_ptr);
@@ -242,13 +242,13 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
return;
for (int i=0; i<ncols; i++) {
int c = i*255/(ncols-1);
- image.setColor( i, qRgba(c,c,c,0xff) );
+ image.setColor( i, tqRgba(c,c,c,0xff) );
}
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
const int g = info_ptr->trans_values.gray;
if (g < ncols) {
image.setAlphaBuffer(TRUE);
- image.setColor(g, image.color(g) & RGB_MASK);
+ image.setColor(g, image.color(g) & TQRGB_MASK);
}
}
}
@@ -263,13 +263,13 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
png_get_IHDR(png_ptr, info_ptr,
&width, &height, &bit_depth, &color_type, 0, 0, 0);
if (!image.create(width, height, bit_depth, info_ptr->num_palette,
- QImage::BigEndian))
+ TQImage::BigEndian))
return;
int i = 0;
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
image.setAlphaBuffer( TRUE );
while ( i < info_ptr->num_trans ) {
- image.setColor(i, qRgba(
+ image.setColor(i, tqRgba(
info_ptr->palette[i].red,
info_ptr->palette[i].green,
info_ptr->palette[i].blue,
@@ -280,7 +280,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
}
}
while ( i < info_ptr->num_palette ) {
- image.setColor(i, qRgba(
+ image.setColor(i, tqRgba(
info_ptr->palette[i].red,
info_ptr->palette[i].green,
info_ptr->palette[i].blue,
@@ -306,22 +306,22 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
if (!(color_type & PNG_COLOR_MASK_ALPHA)
&& !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
png_set_filler(png_ptr, 0xff,
- QImage::systemByteOrder() == QImage::BigEndian ?
+ TQImage::systemByteOrder() == TQImage::BigEndian ?
PNG_FILLER_BEFORE : PNG_FILLER_AFTER);
// We want 4 bytes, but it isn't an alpha channel
} else {
image.setAlphaBuffer(TRUE);
}
- if ( QImage::systemByteOrder() == QImage::BigEndian ) {
+ if ( TQImage::systemByteOrder() == TQImage::BigEndian ) {
png_set_swap_alpha(png_ptr);
}
png_read_update_info(png_ptr, info_ptr);
}
- // Qt==ARGB==Big(ARGB)==Little(BGRA)
- if ( QImage::systemByteOrder() == QImage::LittleEndian ) {
+ // TQt==ARGB==Big(ARGB)==Little(BGRA)
+ if ( TQImage::systemByteOrder() == TQImage::LittleEndian ) {
png_set_bgr(png_ptr);
}
}
@@ -329,7 +329,7 @@ void setup_qt( QImage& image, png_structp png_ptr, png_infop info_ptr )
/*!
- Constructs a QPNGFormat object.
+ Constructs a TQPNGFormat object.
*/
PNGFormat::PNGFormat()
{
@@ -343,7 +343,7 @@ PNGFormat::PNGFormat()
/*!
- Destroys a QPNGFormat object.
+ Destroys a TQPNGFormat object.
*/
PNGFormat::~PNGFormat()
{
@@ -357,7 +357,7 @@ PNGFormat::~PNGFormat()
Returns the number of bytes consumed.
*/
-int PNGFormat::decode(QImage& img, QImageConsumer* cons,
+int PNGFormat::decode(TQImage& img, TQImageConsumer* cons,
const uchar* buffer, int length)
{
consumer = cons;
@@ -404,7 +404,7 @@ int PNGFormat::decode(QImage& img, QImageConsumer* cons,
}
state = Inside;
- changed_rect = QRect();
+ changed_rect = TQRect();
}
if ( !png_ptr ) return 0;
@@ -421,7 +421,7 @@ int PNGFormat::decode(QImage& img, QImageConsumer* cons,
if( !changed_rect.isNull()) {
consumer->changed( changed_rect );
- changed_rect = QRect();
+ changed_rect = TQRect();
}
if ( state != Inside ) {
@@ -445,7 +445,7 @@ void PNGFormat::row(png_structp png, png_bytep new_row,
{
uchar* old_row = image->scanLine(row_num);
png_progressive_combine_row(png, old_row, new_row);
- changed_rect |= QRect( 0, row_num, image->width(), 1 );
+ changed_rect |= TQRect( 0, row_num, image->width(), 1 );
}
@@ -458,7 +458,7 @@ void PNGFormat::end(png_structp png, png_infop info)
base_offy = offy;
first_frame = 0;
}
- image->setOffset(QPoint(offx,offy));
+ image->setOffset(TQPoint(offx,offy));
image->setDotsPerMeterX(png_get_x_pixels_per_meter(png,info));
image->setDotsPerMeterY(png_get_y_pixels_per_meter(png,info));
png_textp text_ptr;
@@ -470,10 +470,10 @@ void PNGFormat::end(png_structp png, png_infop info)
}
if( !changed_rect.isNull()) {
consumer->changed( changed_rect );
- changed_rect = QRect();
+ changed_rect = TQRect();
}
- QRect r(0,0,image->width(),image->height());
- consumer->frameDone(QPoint(offx,offy),r);
+ TQRect r(0,0,image->width(),image->height());
+ consumer->frameDone(TQPoint(offx,offy),r);
consumer->end();
state = FrameStart;
unused_data = (int)png->buffer_size; // Since libpng doesn't tell us
@@ -482,7 +482,7 @@ void PNGFormat::end(png_structp png, png_infop info)
#ifdef PNG_USER_CHUNKS_SUPPORTED
/*
-#ifndef QT_NO_IMAGE_TEXT
+#ifndef TQT_NO_IMAGE_TEXT
static bool skip(png_uint_32& max, png_bytep& data)
{
while (*data) {
@@ -506,15 +506,15 @@ int PNGFormat::user_chunk(png_structp png,
if ( 0==qstrcmp((char*)png->chunk_name, "gIFg")
&& length == 4 ) {
- //QPNGImageWriter::DisposalMethod disposal =
- // (QPNGImageWriter::DisposalMethod)data[0];
+ //TQPNGImageWriter::DisposalMethod disposal =
+ // (TQPNGImageWriter::DisposalMethod)data[0];
// ### TODO: use the disposal method
int ms_delay = ((data[2] << 8) | data[3])*10;
consumer->setFramePeriod(ms_delay);
return 1;
} else if ( 0==qstrcmp((char*)png->chunk_name, "gIFx")
&& length == 13 ) {
- if ( qstrncmp((char*)data,"NETSCAPE2.0",11)==0 ) {
+ if ( tqstrncmp((char*)data,"NETSCAPE2.0",11)==0 ) {
int looping = (data[0xC]<<8)|data[0xB];
consumer->setLooping(looping);
return 1;
@@ -546,7 +546,7 @@ int PNGFormat::user_chunk(png_structp png,
if ( !skip(length,data) ) return 0;
const char* text_utf8 = (const char*)data;
if ( !skip(length,data) ) return 0;
- QString text = QString::fromUtf8(text_utf8);
+ TQString text = TQString::fromUtf8(text_utf8);
image->setText(keyword,lang[0] ? lang : 0,text);
return 1;
}
diff --git a/src/gvcore/pngformattype.h b/src/gvcore/pngformattype.h
index 920ee0c..80d9c20 100644
--- a/src/gvcore/pngformattype.h
+++ b/src/gvcore/pngformattype.h
@@ -1,36 +1,36 @@
-// this code is copied from Qt, with code added to actually call consumer
+// this code is copied from TQt, with code added to actually call consumer
// methods that inform about the progress of loading
/****************************************************************************
**
**
-** Implementation of PNG QImage IOHandler
+** Implementation of PNG TQImage IOHandler
**
** Created : 970521
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
@@ -41,7 +41,7 @@
#ifndef gvpngformattype_h
#define gvpngformattype_h
-#include <qasyncimageio.h>
+#include <tqasyncimageio.h>
namespace Gwenview {
@@ -50,9 +50,9 @@ namespace Gwenview {
*
* An incremental loader factory for PNG's.
*/
-class PNGFormatType : public QImageFormatType {
+class PNGFormatType : public TQImageFormatType {
public:
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
diff --git a/src/gvcore/printdialog.cpp b/src/gvcore/printdialog.cpp
index cce06fb..2359793 100644
--- a/src/gvcore/printdialog.cpp
+++ b/src/gvcore/printdialog.cpp
@@ -18,12 +18,12 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Qt
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
+// TQt
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
// KDE
#include <kcombobox.h>
@@ -44,7 +44,7 @@ namespace Gwenview {
const char* STR_TRUE="true";
const char* STR_FALSE="false";
-static inline Unit stringToUnit(const QString& unit) {
+static inline Unit stringToUnit(const TQString& unit) {
if (unit == i18n("Millimeters")) {
return GV_MILLIMETERS;
} else if (unit == i18n("Centimeters")) {
@@ -54,7 +54,7 @@ static inline Unit stringToUnit(const QString& unit) {
}
}
-static inline QString unitToString(Unit unit) {
+static inline TQString unitToString(Unit unit) {
if (unit == GV_MILLIMETERS) {
return i18n("Millimeters");
} else if (unit == GV_CENTIMETERS) {
@@ -76,30 +76,30 @@ static inline double unitToMM(Unit unit) {
}
-PrintDialogPage::PrintDialogPage( Document* document, QWidget *parent, const char *name )
- : KPrintDialogPage( parent, name ) {
+PrintDialogPage::PrintDialogPage( Document* document, TQWidget *tqparent, const char *name )
+ : KPrintDialogPage( tqparent, name ) {
mDocument = document;
mContent = new PrintDialogPageBase(this);
setTitle( mContent->caption() );
- QVBoxLayout *layout = new QVBoxLayout( this );
- layout->addWidget( mContent );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( mContent );
- connect(mContent->mWidth, SIGNAL( valueChanged( double )), SLOT( slotWidthChanged( double )));
- connect(mContent->mHeight, SIGNAL( valueChanged( double )), SLOT( slotHeightChanged( double )));
- connect(mContent->mKeepRatio, SIGNAL( toggled( bool )), SLOT( toggleRatio( bool )));
- connect(mContent->mUnit, SIGNAL(activated(const QString &)), SLOT(slotUnitChanged(const QString& )));
+ connect(mContent->mWidth, TQT_SIGNAL( valueChanged( double )), TQT_SLOT( slotWidthChanged( double )));
+ connect(mContent->mHeight, TQT_SIGNAL( valueChanged( double )), TQT_SLOT( slotHeightChanged( double )));
+ connect(mContent->mKeepRatio, TQT_SIGNAL( toggled( bool )), TQT_SLOT( toggleRatio( bool )));
+ connect(mContent->mUnit, TQT_SIGNAL(activated(const TQString &)), TQT_SLOT(slotUnitChanged(const TQString& )));
mPreviousUnit = GV_MILLIMETERS;
}
PrintDialogPage::~PrintDialogPage() {}
-void PrintDialogPage::getOptions( QMap<QString,QString>& opts, bool /*incldef*/ ) {
- opts["app-gwenview-position"] = QString::number(getPosition(mContent->mPosition->currentText()));
+void PrintDialogPage::getOptions( TQMap<TQString,TQString>& opts, bool /*incldef*/ ) {
+ opts["app-gwenview-position"] = TQString::number(getPosition(mContent->mPosition->currentText()));
opts["app-gwenview-printFilename"] = mContent->mAddFileName->isChecked() ? STR_TRUE : STR_FALSE;
opts["app-gwenview-printComment"] = mContent->mAddComment->isChecked() ? STR_TRUE : STR_FALSE;
- opts["app-gwenview-scale"] = QString::number(
+ opts["app-gwenview-scale"] = TQString::number(
mContent->mNoScale->isChecked() ? GV_NOSCALE
: mContent->mFitToPage->isChecked() ? GV_FITTOPAGE
: GV_SCALE);
@@ -107,16 +107,16 @@ void PrintDialogPage::getOptions( QMap<QString,QString>& opts, bool /*incldef*/
opts["app-gwenview-enlargeToFit"] = mContent->mEnlargeToFit->isChecked() ? STR_TRUE : STR_FALSE;
opts["app-gwenview-scaleKeepRatio"] = mContent->mKeepRatio->isChecked() ? STR_TRUE : STR_FALSE;
- opts["app-gwenview-scaleUnit"] = QString::number(stringToUnit(mContent->mUnit->currentText()));
- opts["app-gwenview-scaleWidth"] = QString::number( scaleWidth() );
- opts["app-gwenview-scaleHeight"] = QString::number( scaleHeight() );
+ opts["app-gwenview-scaleUnit"] = TQString::number(stringToUnit(mContent->mUnit->currentText()));
+ opts["app-gwenview-scaleWidth"] = TQString::number( scaleWidth() );
+ opts["app-gwenview-scaleHeight"] = TQString::number( scaleHeight() );
}
-void PrintDialogPage::setOptions( const QMap<QString,QString>& opts ) {
+void PrintDialogPage::setOptions( const TQMap<TQString,TQString>& opts ) {
int val;
bool ok;
- QString stVal;
+ TQString stVal;
val = opts["app-gwenview-position"].toInt( &ok );
if (ok) {
@@ -168,58 +168,58 @@ void PrintDialogPage::setScaleHeight( double value ) {
mContent->mHeight->setValue(value);
}
-int PrintDialogPage::getPosition(const QString& align) {
- int alignment;
+int PrintDialogPage::getPosition(const TQString& align) {
+ int tqalignment;
if (align == i18n("Central-Left")) {
- alignment = Qt::AlignLeft | Qt::AlignVCenter;
+ tqalignment = TQt::AlignLeft | TQt::AlignVCenter;
} else if (align == i18n("Central-Right")) {
- alignment = Qt::AlignRight | Qt::AlignVCenter;
+ tqalignment = TQt::AlignRight | TQt::AlignVCenter;
} else if (align == i18n("Top-Left")) {
- alignment = Qt::AlignTop | Qt::AlignLeft;
+ tqalignment = TQt::AlignTop | TQt::AlignLeft;
} else if (align == i18n("Top-Right")) {
- alignment = Qt::AlignTop | Qt::AlignRight;
+ tqalignment = TQt::AlignTop | TQt::AlignRight;
} else if (align == i18n("Bottom-Left")) {
- alignment = Qt::AlignBottom | Qt::AlignLeft;
+ tqalignment = TQt::AlignBottom | TQt::AlignLeft;
} else if (align == i18n("Bottom-Right")) {
- alignment = Qt::AlignBottom | Qt::AlignRight;
+ tqalignment = TQt::AlignBottom | TQt::AlignRight;
} else if (align == i18n("Top-Central")) {
- alignment = Qt::AlignTop | Qt::AlignHCenter;
+ tqalignment = TQt::AlignTop | TQt::AlignHCenter;
} else if (align == i18n("Bottom-Central")) {
- alignment = Qt::AlignBottom | Qt::AlignHCenter;
+ tqalignment = TQt::AlignBottom | TQt::AlignHCenter;
} else {
// Central
- alignment = Qt::AlignCenter; // Qt::AlignHCenter || Qt::AlignVCenter
+ tqalignment = TQt::AlignCenter; // TQt::AlignHCenter || TQt::AlignVCenter
}
- return alignment;
+ return tqalignment;
}
-QString PrintDialogPage::setPosition(int align) {
- QString alignment;
-
- if (align == (Qt::AlignLeft | Qt::AlignVCenter)) {
- alignment = i18n("Central-Left");
- } else if (align == (Qt::AlignRight | Qt::AlignVCenter)) {
- alignment = i18n("Central-Right");
- } else if (align == (Qt::AlignTop | Qt::AlignLeft)) {
- alignment = i18n("Top-Left");
- } else if (align == (Qt::AlignTop | Qt::AlignRight)) {
- alignment = i18n("Top-Right");
- } else if (align == (Qt::AlignBottom | Qt::AlignLeft)) {
- alignment = i18n("Bottom-Left");
- } else if (align == (Qt::AlignBottom | Qt::AlignRight)) {
- alignment = i18n("Bottom-Right");
- } else if (align == (Qt::AlignTop | Qt::AlignHCenter)) {
- alignment = i18n("Top-Central");
- } else if (align == (Qt::AlignBottom | Qt::AlignHCenter)) {
- alignment = i18n("Bottom-Central");
+TQString PrintDialogPage::setPosition(int align) {
+ TQString tqalignment;
+
+ if (align == (TQt::AlignLeft | TQt::AlignVCenter)) {
+ tqalignment = i18n("Central-Left");
+ } else if (align == (TQt::AlignRight | TQt::AlignVCenter)) {
+ tqalignment = i18n("Central-Right");
+ } else if (align == (TQt::AlignTop | TQt::AlignLeft)) {
+ tqalignment = i18n("Top-Left");
+ } else if (align == (TQt::AlignTop | TQt::AlignRight)) {
+ tqalignment = i18n("Top-Right");
+ } else if (align == (TQt::AlignBottom | TQt::AlignLeft)) {
+ tqalignment = i18n("Bottom-Left");
+ } else if (align == (TQt::AlignBottom | TQt::AlignRight)) {
+ tqalignment = i18n("Bottom-Right");
+ } else if (align == (TQt::AlignTop | TQt::AlignHCenter)) {
+ tqalignment = i18n("Top-Central");
+ } else if (align == (TQt::AlignBottom | TQt::AlignHCenter)) {
+ tqalignment = i18n("Bottom-Central");
} else {
- // Central: Qt::AlignCenter or (Qt::AlignHCenter || Qt::AlignVCenter)
- alignment = i18n("Central");
+ // Central: TQt::AlignCenter or (TQt::AlignHCenter || TQt::AlignVCenter)
+ tqalignment = i18n("Central");
}
- return alignment;
+ return tqalignment;
}
// SLOTS
@@ -275,7 +275,7 @@ void PrintDialogPage::toggleRatio(bool enable) {
}
-void PrintDialogPage::slotUnitChanged(const QString& string) {
+void PrintDialogPage::slotUnitChanged(const TQString& string) {
Unit newUnit = stringToUnit(string);
double ratio = unitToMM(mPreviousUnit) / unitToMM(newUnit);
diff --git a/src/gvcore/printdialog.h b/src/gvcore/printdialog.h
index 63ff4d7..2dc9f24 100644
--- a/src/gvcore/printdialog.h
+++ b/src/gvcore/printdialog.h
@@ -21,9 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef PRINTDIALOG_H
#define PRINTDIALOG_H
-//Qt
-#include <qfontmetrics.h>
-#include <qstring.h>
+//TQt
+#include <tqfontmetrics.h>
+#include <tqstring.h>
// KDE
#include <kdockwidget.h>
@@ -48,17 +48,18 @@ enum ScaleId {
class LIBGWENVIEW_EXPORT PrintDialogPage : public KPrintDialogPage {
Q_OBJECT
+ TQ_OBJECT
public:
- PrintDialogPage( Document* document, QWidget *parent = 0L, const char *name = 0 );
+ PrintDialogPage( Document* document, TQWidget *tqparent = 0L, const char *name = 0 );
~PrintDialogPage();
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- virtual void setOptions(const QMap<QString,QString>& opts);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
private slots:
void toggleRatio(bool enable);
- void slotUnitChanged(const QString& string);
+ void slotUnitChanged(const TQString& string);
void slotHeightChanged(double value);
void slotWidthChanged(double value);
@@ -67,8 +68,8 @@ private:
double scaleHeight() const;
void setScaleWidth(double pixels);
void setScaleHeight(double pixels);
- int getPosition(const QString& align);
- QString setPosition(int align);
+ int getPosition(const TQString& align);
+ TQString setPosition(int align);
Document *mDocument;
PrintDialogPageBase* mContent;
diff --git a/src/gvcore/printdialogpagebase.ui b/src/gvcore/printdialogpagebase.ui
index f5d5c8c..5cd3c40 100644
--- a/src/gvcore/printdialogpagebase.ui
+++ b/src/gvcore/printdialogpagebase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>PrintDialogPageBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PrintDialogPageBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,15 +22,15 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -98,7 +98,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>101</width>
<height>21</height>
@@ -107,7 +107,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>mAddFileName</cstring>
</property>
@@ -118,7 +118,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>mAddComment</cstring>
</property>
@@ -129,7 +129,7 @@
<string></string>
</property>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>mScaleGroup</cstring>
</property>
@@ -140,7 +140,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mNoScale</cstring>
</property>
@@ -154,7 +154,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mFitToPage</cstring>
</property>
@@ -168,9 +168,9 @@
<number>2</number>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@@ -186,14 +186,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>mEnlargeToFit</cstring>
</property>
@@ -214,7 +214,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>240</width>
<height>21</height>
@@ -223,7 +223,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>mScale</cstring>
</property>
@@ -234,9 +234,9 @@
<number>3</number>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@@ -252,7 +252,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -279,7 +279,7 @@
<number>2</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -330,7 +330,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>mKeepRatio</cstring>
</property>
@@ -351,7 +351,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -398,7 +398,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/src/gvcore/qxcfi.cpp b/src/gvcore/qxcfi.cpp
index d25e0f0..f6da18f 100644
--- a/src/gvcore/qxcfi.cpp
+++ b/src/gvcore/qxcfi.cpp
@@ -1,5 +1,5 @@
/*
- * qxcfi.cpp: A Qt 3 plug-in for reading GIMP XCF image files
+ * qxcfi.cpp: A TQt 3 plug-in for reading GIMP XCF image files
* Copyright (C) 2001 lignum Computing, Inc. <[email protected]>
* $Id: qxcfi.cpp 531593 2006-04-19 15:46:52Z gateau $
*
@@ -19,16 +19,16 @@
*
*/
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include <kdeversion.h>
#include <stdlib.h>
#include "qxcfi.h"
-// Change a QRgb value's alpha only. (an optimization)
-inline QRgb qRgba ( QRgb rgb, int a )
+// Change a TQRgb value's alpha only. (an optimization)
+inline TQRgb tqRgba ( TQRgb rgb, int a )
{
- return ( ( a & 0xff ) << 24 | ( rgb & RGB_MASK ) );
+ return ( ( a & 0xff ) << 24 | ( rgb & TQRGB_MASK ) );
}
@@ -379,8 +379,8 @@ XCFImageFormat::XCFImageFormat() {
}
-bool XCFImageFormat::installIOHandler ( const QString& ) {
- QImageIO::defineIOHandler( "XCF", "gimp xcf", 0,
+bool XCFImageFormat::installIOHandler ( const TQString& ) {
+ TQImageIO::defineIOHandler( "XCF", "gimp xcf", 0,
&XCFImageFormat::readXCF,
#ifdef TMP_WRITE
&XCFImageFormat::writeXCF );
@@ -392,13 +392,13 @@ bool XCFImageFormat::installIOHandler ( const QString& ) {
void XCFImageFormat::registerFormat() {
- QImageIO::defineIOHandler( "XCF","^gimp xcf",
+ TQImageIO::defineIOHandler( "XCF","^gimp xcf",
0,XCFImageFormat::readXCF,0L);
}
/*!
- * The Qt QImageIO architecture invokes this routine to read the image.
+ * The TQt TQImageIO architecture invokes this routine to read the image.
* The file (or other data stream) is already open and the
* initial string indicating a XCF file has been matched (but the stream
* is positioned at its beginning).
@@ -410,11 +410,11 @@ void XCFImageFormat::registerFormat() {
* is suspect.
*
* Any failures while reading the XCF image are reported by the
- * QImage::status() method.
+ * TQImage::status() method.
*
- * \param image_io the QImageIO object connected to the XCF image.
+ * \param image_io the TQImageIO object connected to the XCF image.
*/
-void XCFImageFormat::readXCF ( QImageIO* image_io )
+void XCFImageFormat::readXCF ( TQImageIO* image_io )
{
XCFImage xcf_image;
@@ -446,10 +446,10 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
// all the data of all layers before beginning to construct the
// merged image).
- QValueStack< Q_INT32 > layer_offsets;
+ TQValueStack< TQ_INT32 > layer_offsets;
while ( true ) {
- Q_INT32 layer_offset;
+ TQ_INT32 layer_offset;
xcf_io >> layer_offset;
@@ -473,7 +473,7 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
// Load each layer and add it to the image
while ( !layer_offsets.isEmpty() ) {
- Q_INT32 layer_offset = layer_offsets.pop();
+ TQ_INT32 layer_offset = layer_offsets.pop();
xcf_io.device()->at( layer_offset );
@@ -486,14 +486,14 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
}
image_io->setImage( xcf_image.image );
- image_io->setStatus( 0 );
+ image_io->setqStatus( 0 );
}
/*!
- * Construct the QImage which will eventually be returned to the QImage
+ * Construct the TQImage which will eventually be returned to the TQImage
* loader.
*
- * There are a couple of situations which require that the QImage is not
+ * There are a couple of situations which require that the TQImage is not
* exactly the same as The GIMP's representation. The full table is:
* \verbatim
* Grayscale opaque : 8 bpp indexed
@@ -507,7 +507,7 @@ void XCFImageFormat::readXCF ( QImageIO* image_io )
* \endverbatim
* Whether the image is translucent or not is determined by the bottom layer's
* alpha channel. However, even if the bottom layer lacks an alpha channel,
- * it can still have an opacity < 1. In this case, the QImage is promoted
+ * it can still have an opacity < 1. In this case, the TQImage is promoted
* to 32-bit. (Note this is different from the output from the GIMP image
* exporter, which seems to ignore this attribute.)
*
@@ -521,19 +521,19 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
{
// (Aliases to make the code look a little better.)
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
switch ( layer.type ) {
case RGB_GIMAGE:
if ( layer.opacity == OPAQUE_OPACITY ) {
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgb( 255, 255, 255 ) );
+ image.fill( tqRgb( 255, 255, 255 ) );
break;
} // else, fall through to 32-bit representation
case RGBA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
// Turning this on prevents fill() from affecting the alpha channel,
// by the way.
image.setAlphaBuffer( true );
@@ -549,7 +549,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
case GRAYA_GIMAGE:
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
image.setAlphaBuffer( true );
break;
@@ -560,8 +560,8 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
// supported by The GIMP for indexed images) and the number of
// individual colors.
- // Note: Qt treats a bitmap with a Black and White color palette
- // as a mask, so only the "on" bits are drawn, regardless of the
+ // Note: TQt treats a bitmap with a Black and White color palette
+ // as a tqmask, so only the "on" bits are drawn, regardless of the
// order color table entries. Otherwise (i.e., at least one of the
// color table entries is not black or white), it obeys the one-
// or two-color palette. Have to ask about this...
@@ -569,7 +569,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
if ( xcf_image.num_colors <= 2 ) {
image.create( xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
}
@@ -577,7 +577,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
else if ( xcf_image.num_colors <= 256 ) {
image.create( xcf_image.width, xcf_image.height,
8, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
}
@@ -593,11 +593,11 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
xcf_image.num_colors++;
xcf_image.palette.resize( xcf_image.num_colors );
xcf_image.palette[1] = xcf_image.palette[0];
- xcf_image.palette[0] = qRgba( 255, 255, 255, 0 );
+ xcf_image.palette[0] = tqRgba( 255, 255, 255, 0 );
image.create( xcf_image.width, xcf_image.height,
1, xcf_image.num_colors,
- QImage::LittleEndian );
+ TQImage::LittleEndian );
image.fill( 0 );
setPalette( xcf_image, image );
image.setAlphaBuffer( true );
@@ -611,7 +611,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
xcf_image.palette.resize( xcf_image.num_colors );
for ( int c = xcf_image.num_colors-1; c >= 1; c-- )
xcf_image.palette[c] = xcf_image.palette[c-1];
- xcf_image.palette[0] = qRgba( 255, 255, 255, 0 );
+ xcf_image.palette[0] = tqRgba( 255, 255, 255, 0 );
image.create( xcf_image.width, xcf_image.height,
8, xcf_image.num_colors );
@@ -625,7 +625,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
// true color. (There is no equivalent PNG representation output
// from The GIMP as of v1.2.)
image.create( xcf_image.width, xcf_image.height, 32 );
- image.fill( qRgba( 255, 255, 255, 0 ) );
+ image.fill( tqRgba( 255, 255, 255, 0 ) );
image.setAlphaBuffer( true );
}
@@ -638,7 +638,7 @@ void XCFImageFormat::initializeImage ( XCFImage& xcf_image )
/*!
* Compute the number of tiles in the current layer and allocate
- * QImage structures for each of them.
+ * TQImage structures for each of them.
* \param xcf_image contains the current layer.
*/
void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
@@ -653,8 +653,8 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
if ( layer.type == GRAYA_GIMAGE || layer.type == INDEXEDA_GIMAGE )
layer.alpha_tiles.resize( layer.nrows );
- if ( layer.mask_offset != 0 )
- layer.mask_tiles.resize( layer.nrows );
+ if ( layer.tqmask_offset != 0 )
+ layer.tqmask_tiles.resize( layer.nrows );
for ( uint j = 0; j < layer.nrows; j++ ) {
layer.image_tiles[j].resize( layer.ncols );
@@ -662,8 +662,8 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
if ( layer.type == GRAYA_GIMAGE || layer.type == INDEXEDA_GIMAGE )
layer.alpha_tiles[j].resize( layer.ncols );
- if ( layer.mask_offset != 0 )
- layer.mask_tiles[j].resize( layer.ncols );
+ if ( layer.tqmask_offset != 0 )
+ layer.tqmask_tiles[j].resize( layer.ncols );
}
for ( uint j = 0; j < layer.nrows; j++ ) {
@@ -675,74 +675,74 @@ void XCFImageFormat::composeTiles ( XCFImage& xcf_image )
uint tile_height = (j+1) * TILE_HEIGHT <= layer.height ?
TILE_HEIGHT : layer.height - j*TILE_HEIGHT;
- // Try to create the most appropriate QImage (each GIMP layer
+ // Try to create the most appropriate TQImage (each GIMP layer
// type is treated slightly differently)
switch ( layer.type ) {
case RGB_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 32, 0 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 32, 0 );
layer.image_tiles[j][i].setAlphaBuffer( false );
break;
case RGBA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 32, 0 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 32, 0 );
layer.image_tiles[j][i].setAlphaBuffer( true );
break;
case GRAY_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.image_tiles[j][i] );
break;
case GRAYA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.image_tiles[j][i] );
- layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.alpha_tiles[j][i] );
break;
case INDEXED_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8,
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8,
xcf_image.num_colors );
setPalette( xcf_image, layer.image_tiles[j][i] );
break;
case INDEXEDA_GIMAGE:
- layer.image_tiles[j][i] = QImage( tile_width, tile_height, 8,
+ layer.image_tiles[j][i] = TQImage( tile_width, tile_height, 8,
xcf_image.num_colors );
setPalette( xcf_image, layer.image_tiles[j][i] );
- layer.alpha_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
+ layer.alpha_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
setGrayPalette( layer.alpha_tiles[j][i] );
}
- if ( layer.mask_offset != 0 ) {
- layer.mask_tiles[j][i] = QImage( tile_width, tile_height, 8, 256 );
- setGrayPalette( layer.mask_tiles[j][i] );
+ if ( layer.tqmask_offset != 0 ) {
+ layer.tqmask_tiles[j][i] = TQImage( tile_width, tile_height, 8, 256 );
+ setGrayPalette( layer.tqmask_tiles[j][i] );
}
}
}
}
/*!
- * Apply a grayscale palette to the QImage. Note that Qt does not distinguish
+ * Apply a grayscale palette to the TQImage. Note that TQt does not distinguish
* between grayscale and indexed images. A grayscale image is just
* an indexed image with a 256-color, grayscale palette.
* \param image image to set to a grayscale palette.
*/
-void XCFImageFormat::setGrayPalette ( QImage& image )
+void XCFImageFormat::setGrayPalette ( TQImage& image )
{
for ( int i = 0; i < 256; i++ )
- image.setColor( i, qRgb(i,i,i) );
+ image.setColor( i, tqRgb(i,i,i) );
}
/*!
- * Copy the indexed palette from the XCF image into the QImage.
+ * Copy the indexed palette from the XCF image into the TQImage.
* \param xcf_image XCF image containing the palette read from the data stream.
* \param image image to apply the palette to.
*/
-void XCFImageFormat::setPalette ( XCFImage& xcf_image, QImage& image )
+void XCFImageFormat::setPalette ( XCFImage& xcf_image, TQImage& image )
{
for ( int i = 0; i < xcf_image.num_colors; i++ )
image.setColor( i, xcf_image.palette[i] );
@@ -750,7 +750,7 @@ void XCFImageFormat::setPalette ( XCFImage& xcf_image, QImage& image )
/*!
* An XCF file can contain an arbitrary number of properties associated
- * with the image (and layer and mask).
+ * with the image (and layer and tqmask).
* \param xcf_io the data stream connected to the XCF image
* \param xcf_image XCF image data.
* \return true if there were no I/O errors.
@@ -760,14 +760,14 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading global image properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
@@ -792,11 +792,11 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
case PROP_PARASITES:
while ( !property.atEnd() ) {
char* tag;
- Q_UINT32 size;
+ TQ_UINT32 size;
property.readBytes( tag, size );
- Q_UINT32 flags;
+ TQ_UINT32 flags;
char* data;
property >> flags >> data;
@@ -828,7 +828,7 @@ bool XCFImageFormat::loadImageProperties ( SafeDataStream& xcf_io,
for ( int i = 0; i < xcf_image.num_colors; i++ ) {
uchar r, g, b;
property >> r >> g >> b;
- xcf_image.palette.push_back( qRgb(r,g,b) );
+ xcf_image.palette.push_back( tqRgb(r,g,b) );
}
break;
@@ -872,16 +872,16 @@ bool XCFImageFormat::loadLayer ( SafeDataStream& xcf_io, XCFImage& xcf_image )
if ( layer.visible == 0 ) return true;
- // If there are any more layers, merge them into the final QImage.
+ // If there are any more layers, merge them into the final TQImage.
- xcf_io >> layer.hierarchy_offset >> layer.mask_offset;
+ xcf_io >> layer.hierarchy_offset >> layer.tqmask_offset;
if ( xcf_io.failed() ) {
qDebug( "XCF: read failure on layer image offsets" );
return false;
}
- // Allocate the individual tile QImages based on the size and type
+ // Allocate the individual tile TQImages based on the size and type
// of this layer.
composeTiles( xcf_image );
@@ -896,15 +896,15 @@ bool XCFImageFormat::loadLayer ( SafeDataStream& xcf_io, XCFImage& xcf_image )
if ( !loadHierarchy( xcf_io, layer ) ) return false;
- if ( layer.mask_offset != 0 ) {
- xcf_io.device()->at( layer.mask_offset );
+ if ( layer.tqmask_offset != 0 ) {
+ xcf_io.device()->at( layer.tqmask_offset );
if ( !loadMask( xcf_io, layer ) ) return false;
}
// Now we should have enough information to initialize the final
- // QImage. The first visible layer determines the attributes
- // of the QImage.
+ // TQImage. The first visible layer determines the attributes
+ // of the TQImage.
if ( !xcf_image.initialized ) {
initializeImage( xcf_image );
@@ -930,14 +930,14 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading layer properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
@@ -964,15 +964,15 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
break;
case PROP_APPLY_MASK:
- property >> layer.apply_mask;
+ property >> layer.apply_tqmask;
break;
case PROP_EDIT_MASK:
- property >> layer.edit_mask;
+ property >> layer.edit_tqmask;
break;
case PROP_SHOW_MASK:
- property >> layer.show_mask;
+ property >> layer.show_tqmask;
break;
case PROP_OFFSETS:
@@ -995,47 +995,47 @@ bool XCFImageFormat::loadLayerProperties ( SafeDataStream& xcf_io, Layer& layer
/*!
* An XCF file can contain an arbitrary number of properties associated
- * with a channel. Note that this routine only reads mask channel properties.
+ * with a channel. Note that this routine only reads tqmask channel properties.
* \param xcf_io the data stream connected to the XCF image.
- * \param layer layer containing the mask channel to collect the properties.
+ * \param layer layer containing the tqmask channel to collect the properties.
* \return true if there were no I/O errors.
*/
bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& layer )
{
while ( true ) {
PropType type;
- QByteArray bytes;
+ TQByteArray bytes;
if ( !loadProperty( xcf_io, type, bytes ) ) {
qDebug( "XCF: error loading channel properties" );
return false;
}
- QDataStream property( bytes, IO_ReadOnly );
+ TQDataStream property( bytes, IO_ReadOnly );
switch ( type ) {
case PROP_END:
return true;
case PROP_OPACITY:
- property >> layer.mask_channel.opacity;
+ property >> layer.tqmask_channel.opacity;
break;
case PROP_VISIBLE:
- property >> layer.mask_channel.visible;
+ property >> layer.tqmask_channel.visible;
break;
case PROP_SHOW_MASKED:
- property >> layer.mask_channel.show_masked;
+ property >> layer.tqmask_channel.show_tqmasked;
break;
case PROP_COLOR:
- property >> layer.mask_channel.red >> layer.mask_channel.green
- >> layer.mask_channel.blue;
+ property >> layer.tqmask_channel.red >> layer.tqmask_channel.green
+ >> layer.tqmask_channel.blue;
break;
case PROP_TATTOO:
- property >> layer.mask_channel.tattoo;
+ property >> layer.tqmask_channel.tattoo;
break;
default:
@@ -1045,7 +1045,7 @@ bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& laye
}
/*!
- * The GIMP stores images in a "mipmap"-like hierarchy. As far as the QImage
+ * The GIMP stores images in a "mipmap"-like hierarchy. As far as the TQImage
* is concerned, however, only the top level (i.e., the full resolution image)
* is used.
* \param xcf_io the data stream connected to the XCF image.
@@ -1054,10 +1054,10 @@ bool XCFImageFormat::loadChannelProperties ( SafeDataStream& xcf_io, Layer& laye
*/
bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
{
- Q_INT32 width;
- Q_INT32 height;
- Q_INT32 bpp;
- Q_UINT32 offset;
+ TQ_INT32 width;
+ TQ_INT32 height;
+ TQ_INT32 bpp;
+ TQ_UINT32 offset;
xcf_io >> width >> height >> bpp >> offset;
@@ -1070,7 +1070,7 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
// increasingly lower resolution). Only the top level is used here,
// however.
- Q_UINT32 junk;
+ TQ_UINT32 junk;
do {
xcf_io >> junk;
@@ -1080,7 +1080,7 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
}
} while ( junk != 0 );
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
xcf_io.device()->at( offset );
@@ -1099,11 +1099,11 @@ bool XCFImageFormat::loadHierarchy ( SafeDataStream& xcf_io, Layer& layer )
* \return true if there were no I/O errors.
* \sa loadTileRLE().
*/
-bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 bpp )
+bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, TQ_INT32 bpp )
{
- Q_INT32 width;
- Q_INT32 height;
- Q_UINT32 offset;
+ TQ_INT32 width;
+ TQ_INT32 height;
+ TQ_UINT32 offset;
xcf_io >> width >> height >> offset;
@@ -1122,9 +1122,9 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
return false;
}
- QIODevice::Offset saved_pos = xcf_io.device()->at();
+ TQIODevice::Offset saved_pos = xcf_io.device()->at();
- Q_UINT32 offset2;
+ TQ_UINT32 offset2;
xcf_io >> offset2;
@@ -1147,7 +1147,7 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
return false;
// The bytes in the layer tile are juggled differently depending on
- // the target QImage. The caller has set layer.assignBytes to the
+ // the target TQImage. The caller has set layer.assignBytes to the
// appropriate routine.
layer.assignBytes( layer, i, j );
@@ -1167,21 +1167,21 @@ bool XCFImageFormat::loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 b
}
/*!
- * A layer can have a one channel image which is used as a mask.
+ * A layer can have a one channel image which is used as a tqmask.
* \param xcf_io the data stream connected to the XCF image.
- * \param layer the layer to collect the mask image.
+ * \param layer the layer to collect the tqmask image.
* \return true if there were no I/O errors.
*/
bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
{
- Q_INT32 width;
- Q_INT32 height;
+ TQ_INT32 width;
+ TQ_INT32 height;
char* name;
xcf_io >> width >> height >> name;
if ( xcf_io.failed() ) {
- qDebug( "XCF: read failure on mask info" );
+ qDebug( "XCF: read failure on tqmask info" );
return false;
}
@@ -1189,12 +1189,12 @@ bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
if ( !loadChannelProperties( xcf_io, layer ) ) return false;
- Q_UINT32 hierarchy_offset;
+ TQ_UINT32 hierarchy_offset;
xcf_io >> hierarchy_offset;
if ( xcf_io.failed() ) {
- qDebug( "XCF: read failure on mask image offset" );
+ qDebug( "XCF: read failure on tqmask image offset" );
return false;
}
@@ -1231,7 +1231,7 @@ bool XCFImageFormat::loadMask ( SafeDataStream& xcf_io, Layer& layer )
* the RLE data.
*/
bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int image_size,
- int data_length, Q_INT32 bpp )
+ int data_length, TQ_INT32 bpp )
{
uchar* data;
@@ -1288,7 +1288,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
while ( length-- > 0 ) {
*data = *xcfdata++;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
}
else {
@@ -1315,7 +1315,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
while ( length-- > 0 ) {
*data = val;
- data += sizeof(QRgb);
+ data += sizeof(TQRgb);
}
}
}
@@ -1332,7 +1332,7 @@ bool XCFImageFormat::loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int imag
}
/*!
- * Copy the bytes from the tile buffer into the image tile QImage, taking into
+ * Copy the bytes from the tile buffer into the image tile TQImage, taking into
* account all the myriad different modes.
* \param layer layer containing the tile buffer and the image tile matrix.
* \param i column index of current tile.
@@ -1346,8 +1346,8 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
case RGB_GIMAGE:
for ( int l = 0; l < layer.image_tiles[j][i].height(); l++ ) {
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
- layer.image_tiles[j][i].setPixel( k, l, qRgb( tile[0], tile[1], tile[2] ) );
- tile += sizeof(QRgb);
+ layer.image_tiles[j][i].setPixel( k, l, tqRgb( tile[0], tile[1], tile[2] ) );
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1356,8 +1356,8 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
for ( int l = 0; l < layer.image_tiles[j][i].height(); l++ ) {
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
layer.image_tiles[j][i].setPixel( k, l,
- qRgba( tile[0], tile[1], tile[2], tile[3] ) );
- tile += sizeof(QRgb);
+ tqRgba( tile[0], tile[1], tile[2], tile[3] ) );
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1367,7 +1367,7 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
for ( int l = 0; l < layer.image_tiles[j][i].height(); l++ ) {
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
layer.image_tiles[j][i].setPixel( k, l, tile[0] );
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1377,7 +1377,7 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
for ( int l = 0; l < layer.image_tiles[j][i].height(); l++ ) {
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
- // The "if" here should not be necessary, but apparently there
+ // The "if" here should not be necessary, but aptqparently there
// are some cases where the image can contain larger indices
// than there are colors in the palette. (A bug in The GIMP?)
@@ -1385,7 +1385,7 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
layer.image_tiles[j][i].setPixel( k, l, tile[0] );
layer.alpha_tiles[j][i].setPixel( k, l, tile[1] );
- tile += sizeof(QRgb);
+ tile += sizeof(TQRgb);
}
}
break;
@@ -1393,8 +1393,8 @@ void XCFImageFormat::assignImageBytes ( Layer& layer, uint i, uint j )
}
/*!
- * Copy the bytes from the tile buffer into the mask tile QImage.
- * \param layer layer containing the tile buffer and the mask tile matrix.
+ * Copy the bytes from the tile buffer into the tqmask tile TQImage.
+ * \param layer layer containing the tile buffer and the tqmask tile matrix.
* \param i column index of current tile.
* \param j row index of current tile.
*/
@@ -1404,8 +1404,8 @@ void XCFImageFormat::assignMaskBytes ( Layer& layer, uint i, uint j )
for ( int l = 0; l < layer.image_tiles[j][i].height(); l++ ) {
for ( int k = 0; k < layer.image_tiles[j][i].width(); k++ ) {
- layer.mask_tiles[j][i].setPixel( k, l, tile[0] );
- tile += sizeof(QRgb);
+ layer.tqmask_tiles[j][i].setPixel( k, l, tile[0] );
+ tile += sizeof(TQRgb);
}
}
}
@@ -1418,9 +1418,9 @@ void XCFImageFormat::assignMaskBytes ( Layer& layer, uint i, uint j )
* \param bytes returns with the property data.
* \return true if there were no IO errors. */
bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
- QByteArray& bytes )
+ TQByteArray& bytes )
{
- Q_UINT32 tmp;
+ TQ_UINT32 tmp;
xcf_io >> tmp;
type=static_cast<PropType>(tmp);
@@ -1430,7 +1430,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
}
char* data;
- Q_UINT32 size;
+ TQ_UINT32 size;
// The COLORMAP property is tricky: in version of GIMP older than 2.0.2, the
// property size was wrong (it was 4 + ncolors instead of 4 + 3*ncolors).
@@ -1442,7 +1442,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
// * See http://bugzilla.gnome.org/show_bug.cgi?id=142149 and
// gimp/app/xcf-save.c, revision 1.42
if ( type == PROP_COLORMAP ) {
- Q_UINT32 ignoredSize, ncolors;
+ TQ_UINT32 ignoredSize, ncolors;
xcf_io >> ignoredSize;
if ( xcf_io.failed() ) {
qDebug( "XCF: read failure on property %d size", type );
@@ -1469,7 +1469,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
else if ( type == PROP_USER_UNIT ) {
float factor;
- Q_INT32 digits;
+ TQ_INT32 digits;
char* unit_strings;
xcf_io >> size >> factor >> digits;
@@ -1520,7 +1520,7 @@ bool XCFImageFormat::loadProperty ( SafeDataStream& xcf_io, PropType& type,
void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
{
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
PixelCopyOperation copy = 0;
@@ -1555,7 +1555,7 @@ void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
// This seems the best place to apply the dissolve because it
// depends on the global position of each tile's
- // pixels. Apparently it's the only mode which can apply to a
+ // pixels. Aptqparently it's the only mode which can apply to a
// single layer.
if ( layer.mode == DISSOLVE_MODE ) {
@@ -1596,22 +1596,22 @@ void XCFImageFormat::copyLayerToImage ( XCFImage& xcf_image )
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.opacity;
if ( layer.type == RGBA_GIMAGE )
- src_a = INT_MULT( src_a, qAlpha( src ) );
+ src_a = INT_MULT( src_a, tqAlpha( src ) );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1626,7 +1626,7 @@ void XCFImageFormat::copyRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1647,13 +1647,13 @@ void XCFImageFormat::copyGrayToGray ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.opacity;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1670,21 +1670,21 @@ void XCFImageFormat::copyGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1699,7 +1699,7 @@ void XCFImageFormat::copyGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedToIndexed ( Layer& layer, uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1718,7 +1718,7 @@ void XCFImageFormat::copyIndexedToIndexed ( Layer& layer, uint i,uint j,int k,in
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
uchar src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -1726,11 +1726,11 @@ void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,in
src_a = INT_MULT( src_a, layer.opacity );
- if ( layer.apply_mask == 1 &&
- layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
+ if ( layer.apply_tqmask == 1 &&
+ layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
src_a = INT_MULT( src_a,
- layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
if ( src_a > 127 )
src++;
@@ -1754,19 +1754,19 @@ void XCFImageFormat::copyIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,in
* \param n y pixel of destination image.
*/
void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
// This is what appears in the GIMP window
@@ -1775,7 +1775,7 @@ void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, in
else
src_a = OPAQUE_OPACITY;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -1785,7 +1785,7 @@ void XCFImageFormat::copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, in
void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
{
Layer& layer( xcf_image.layer );
- QImage& image( xcf_image.image );
+ TQImage& image( xcf_image.image );
PixelMergeOperation merge = 0;
@@ -1822,7 +1822,7 @@ void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
// This seems the best place to apply the dissolve because it
// depends on the global position of each tile's
- // pixels. Apparently it's the only mode which can apply to a
+ // pixels. Aptqparently it's the only mode which can apply to a
// single layer.
if ( layer.mode == DISSOLVE_MODE ) {
@@ -1863,20 +1863,20 @@ void XCFImageFormat::mergeLayerIntoImage ( XCFImage& xcf_image )
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
- QRgb dst = image.pixel( m, n );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb dst = image.pixel( m, n );
- uchar src_r = qRed( src );
- uchar src_g = qGreen( src );
- uchar src_b = qBlue( src );
- uchar src_a = qAlpha( src );
+ uchar src_r = tqRed( src );
+ uchar src_g = tqGreen( src );
+ uchar src_b = tqBlue( src );
+ uchar src_a = tqAlpha( src );
- uchar dst_r = qRed( dst );
- uchar dst_g = qGreen( dst );
- uchar dst_b = qBlue( dst );
- uchar dst_a = qAlpha( dst );
+ uchar dst_r = tqRed( dst );
+ uchar dst_g = tqGreen( dst );
+ uchar dst_b = tqBlue( dst );
+ uchar dst_a = tqAlpha( dst );
switch ( layer.mode ) {
case MULTIPLY_MODE: {
@@ -2019,11 +2019,11 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_r, new_g, new_b, new_a;
@@ -2039,7 +2039,7 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
if ( !layer_modes[layer.mode].affect_alpha )
new_a = dst_a;
- image.setPixel( m, n, qRgba( new_r, new_g, new_b, new_a ) );
+ image.setPixel( m, n, tqRgba( new_r, new_g, new_b, new_a ) );
}
/*!
@@ -2054,7 +2054,7 @@ void XCFImageFormat::mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2073,9 +2073,9 @@ void XCFImageFormat::mergeGrayToGray ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- int src = qGray( layer.image_tiles[j][i].pixel( k, l ) );
+ int src = tqGray( layer.image_tiles[j][i].pixel( k, l ) );
int dst = image.pixelIndex( m, n );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
@@ -2121,11 +2121,11 @@ void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_a = OPAQUE_OPACITY;
@@ -2151,13 +2151,13 @@ void XCFImageFormat::mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.opacity;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -2174,13 +2174,13 @@ void XCFImageFormat::mergeGrayToRGB ( Layer& layer, uint i, uint j, int k, int l
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- int src = qGray( layer.image_tiles[j][i].pixel( k, l ) );
- int dst = qGray( image.pixel( m, n ) );
+ int src = tqGray( layer.image_tiles[j][i].pixel( k, l ) );
+ int dst = tqGray( image.pixel( m, n ) );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
- uchar dst_a = qAlpha( image.pixel( m, n ) );
+ uchar dst_a = tqAlpha( image.pixel( m, n ) );
switch ( layer.mode ) {
case MULTIPLY_MODE: {
@@ -2232,11 +2232,11 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
uchar new_a = dst_a + INT_MULT( OPAQUE_OPACITY - dst_a, src_a );
@@ -2248,7 +2248,7 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
if ( !layer_modes[layer.mode].affect_alpha )
new_a = dst_a;
- image.setPixel( m, n, qRgba( new_g, new_g, new_g, new_a ) );
+ image.setPixel( m, n, tqRgba( new_g, new_g, new_g, new_a ) );
}
/*!
@@ -2263,7 +2263,7 @@ void XCFImageFormat::mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedToIndexed ( Layer& layer, uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
int src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2282,7 +2282,7 @@ void XCFImageFormat::mergeIndexedToIndexed ( Layer& layer, uint i,uint j,int k,i
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
uchar src = layer.image_tiles[j][i].pixelIndex( k, l );
@@ -2290,11 +2290,11 @@ void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,i
src_a = INT_MULT( src_a, layer.opacity );
- if ( layer.apply_mask == 1 &&
- layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
+ if ( layer.apply_tqmask == 1 &&
+ layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
src_a = INT_MULT( src_a,
- layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
if ( src_a > 127 ) {
src++;
@@ -2316,19 +2316,19 @@ void XCFImageFormat::mergeIndexedAToIndexed ( Layer& layer,uint i,uint j,int k,i
* \param n y pixel of destination image.
*/
void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n )
+ TQImage& image, int m, int n )
{
- QRgb src = layer.image_tiles[j][i].pixel( k, l );
+ TQRgb src = layer.image_tiles[j][i].pixel( k, l );
uchar src_a = layer.alpha_tiles[j][i].pixelIndex( k, l );
src_a = INT_MULT( src_a, layer.opacity );
- // Apply the mask (if any)
+ // Apply the tqmask (if any)
- if ( layer.apply_mask == 1 && layer.mask_tiles.size() > j &&
- layer.mask_tiles[j].size() > i )
- src_a = INT_MULT( src_a, layer.mask_tiles[j][i].pixelIndex( k, l ) );
+ if ( layer.apply_tqmask == 1 && layer.tqmask_tiles.size() > j &&
+ layer.tqmask_tiles[j].size() > i )
+ src_a = INT_MULT( src_a, layer.tqmask_tiles[j][i].pixelIndex( k, l ) );
// This is what appears in the GIMP window
@@ -2337,7 +2337,7 @@ void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, i
else
src_a = OPAQUE_OPACITY;
- image.setPixel( m, n, qRgba( src, src_a ) );
+ image.setPixel( m, n, tqRgba( src, src_a ) );
}
/*!
@@ -2347,9 +2347,9 @@ void XCFImageFormat::mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, i
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveRGBPixels ( TQImage& image, int x, int y )
{
- // The apparently spurious rand() calls are to wind the random
+ // The aptqparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
for ( int l = 0; l < image.height(); l++ ) {
@@ -2360,10 +2360,10 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
for ( int k = 0; k < image.width(); k++ ) {
int rand_val = rand() & 0xff;
- QRgb pixel = image.pixel( k, l );
+ TQRgb pixel = image.pixel( k, l );
- if ( rand_val > qAlpha( pixel ) ) {
- image.setPixel( k, l, qRgba( pixel, 0 ) );
+ if ( rand_val > tqAlpha( pixel ) ) {
+ image.setPixel( k, l, tqRgba( pixel, 0 ) );
}
}
}
@@ -2378,9 +2378,9 @@ void XCFImageFormat::dissolveRGBPixels ( QImage& image, int x, int y )
* \param x the global x position of the tile.
* \param y the global y position of the tile.
*/
-void XCFImageFormat::dissolveAlphaPixels ( QImage& image, int x, int y )
+void XCFImageFormat::dissolveAlphaPixels ( TQImage& image, int x, int y )
{
- // The apparently spurious rand() calls are to wind the random
+ // The aptqparently spurious rand() calls are to wind the random
// numbers up to the same point for each tile.
for ( int l = 0; l < image.height(); l++ ) {
diff --git a/src/gvcore/qxcfi.h b/src/gvcore/qxcfi.h
index ac82173..e98f226 100644
--- a/src/gvcore/qxcfi.h
+++ b/src/gvcore/qxcfi.h
@@ -1,10 +1,10 @@
-#ifndef QXCFI_H
-#define QXCFI_H
+#ifndef TQXCFI_H
+#define TQXCFI_H
-#include <qimage.h>
-#include <qimageformatplugin.h>
-#include <qvaluestack.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqimageformatplugin.h>
+#include <tqvaluestack.h>
+#include <tqvaluevector.h>
#include "gimp.h"
namespace Gwenview {
@@ -12,11 +12,11 @@ namespace Gwenview {
// Safe readBlock helper functions
class SafeDataStream {
public:
- SafeDataStream(QIODevice* device)
+ SafeDataStream(TQIODevice* device)
: mDevice(device), mFailed(false) {}
bool failed() const { return mFailed; }
- QIODevice* device() const { return mDevice; }
+ TQIODevice* device() const { return mDevice; }
SafeDataStream& readRawBytes(char* data, uint length) {
if (mFailed) return *this;
@@ -26,11 +26,11 @@ public:
return *this;
}
- SafeDataStream& operator>>(Q_INT8& value) {
+ SafeDataStream& operator>>(TQ_INT8& value) {
return readRawBytes((char*)&value, 1);
}
- SafeDataStream& operator>>(Q_UINT32& value) {
+ SafeDataStream& operator>>(TQ_UINT32& value) {
if (mFailed) return *this;
uchar *p = (uchar *)(&value);
char b[4];
@@ -45,18 +45,18 @@ public:
return *this;
}
- SafeDataStream& operator>>(Q_INT32& value) {
- return *this >>((Q_UINT32&)value);
+ SafeDataStream& operator>>(TQ_INT32& value) {
+ return *this >>((TQ_UINT32&)value);
}
SafeDataStream& operator>>(float& value) {
- return *this >>((Q_UINT32&)value);
+ return *this >>((TQ_UINT32&)value);
}
SafeDataStream& operator>>(char*& value) {
if (mFailed) return *this;
- Q_UINT32 len;
+ TQ_UINT32 len;
*this >> len;
if (mFailed) return *this;
if ( len == 0 ) {
@@ -95,17 +95,17 @@ public:
int at() const;
private:
- QIODevice* mDevice;
+ TQIODevice* mDevice;
bool mFailed;
};
//! Plug-in for loading a GIMP XCF image file directly.
/*!
- * This class uses the Qt 3.0 Image format plug-in loader to provide
+ * This class uses the TQt 3.0 Image format plug-in loader to provide
* the ability to read The GIMP XCF image files. This plug-in will
* be dynamically loaded as needed.
*/
-class XCFImageFormat : public QImageFormatPlugin {
+class XCFImageFormat : public TQImageFormatPlugin {
/*!
* Each layer in an XCF file is stored as a matrix of
@@ -114,7 +114,7 @@ class XCFImageFormat : public QImageFormatPlugin {
* parallel processing on a tile-by-tile basis. Here, though,
* we just read them in en-masse and store them in a matrix.
*/
- typedef QValueVector< QValueVector< QImage > > Tiles;
+ typedef TQValueVector< TQValueVector< TQImage > > Tiles;
/*!
* Each GIMP image is composed of one or more layers. A layer can
@@ -122,15 +122,15 @@ class XCFImageFormat : public QImageFormatPlugin {
* optional alpha channel, there are six possible types altogether.
*
* Note: there is only ever one instance of this structure. The
- * layer info is discarded after it is merged into the final QImage.
+ * layer info is discarded after it is merged into the final TQImage.
*/
struct Layer {
- Q_UINT32 width; //!< Width of the layer
- Q_UINT32 height; //!< Height of the layer
- Q_INT32 type; //!< Type of the layer (GimpImageType)
+ TQ_UINT32 width; //!< Width of the layer
+ TQ_UINT32 height; //!< Height of the layer
+ TQ_INT32 type; //!< Type of the layer (GimpImageType)
char* name; //!< Name of the layer
- Q_UINT32 hierarchy_offset; //!< File position of Tile hierarchy
- Q_UINT32 mask_offset; //!< File position of mask image
+ TQ_UINT32 hierarchy_offset; //!< File position of Tile hierarchy
+ TQ_UINT32 tqmask_offset; //!< File position of tqmask image
uint nrows; //!< Number of rows of tiles (y direction)
uint ncols; //!< Number of columns of tiles (x direction)
@@ -139,36 +139,36 @@ class XCFImageFormat : public QImageFormatPlugin {
//! For Grayscale and Indexed images, the alpha channel is stored
//! separately (in this data structure, anyway).
Tiles alpha_tiles;
- Tiles mask_tiles; //!< The layer mask (optional)
+ Tiles tqmask_tiles; //!< The layer tqmask (optional)
- //! Additional information about a layer mask.
+ //! Additional information about a layer tqmask.
struct {
- Q_UINT32 opacity;
- Q_UINT32 visible;
- Q_UINT32 show_masked;
+ TQ_UINT32 opacity;
+ TQ_UINT32 visible;
+ TQ_UINT32 show_tqmasked;
uchar red, green, blue;
- Q_UINT32 tattoo;
- } mask_channel;
+ TQ_UINT32 tattoo;
+ } tqmask_channel;
bool active; //!< Is this layer the active layer?
- Q_UINT32 opacity; //!< The opacity of the layer
- Q_UINT32 visible; //!< Is the layer visible?
- Q_UINT32 linked; //!< Is this layer linked (geometrically)
- Q_UINT32 preserve_transparency; //!< Preserve alpha when drawing on layer?
- Q_UINT32 apply_mask; //!< Apply the layer mask?
- Q_UINT32 edit_mask; //!< Is the layer mask the being edited?
- Q_UINT32 show_mask; //!< Show the layer mask rather than the image?
- Q_INT32 x_offset; //!< x offset of the layer relative to the image
- Q_INT32 y_offset; //!< y offset of the layer relative to the image
- Q_UINT32 mode; //!< Combining mode of layer (LayerModeEffects)
- Q_UINT32 tattoo; //!< (unique identifier?)
+ TQ_UINT32 opacity; //!< The opacity of the layer
+ TQ_UINT32 visible; //!< Is the layer visible?
+ TQ_UINT32 linked; //!< Is this layer linked (geometrically)
+ TQ_UINT32 preserve_transparency; //!< Preserve alpha when drawing on layer?
+ TQ_UINT32 apply_tqmask; //!< Apply the layer tqmask?
+ TQ_UINT32 edit_tqmask; //!< Is the layer tqmask the being edited?
+ TQ_UINT32 show_tqmask; //!< Show the layer tqmask rather than the image?
+ TQ_INT32 x_offset; //!< x offset of the layer relative to the image
+ TQ_INT32 y_offset; //!< y offset of the layer relative to the image
+ TQ_UINT32 mode; //!< Combining mode of layer (LayerModeEffects)
+ TQ_UINT32 tattoo; //!< (unique identifier?)
//! As each tile is read from the file, it is buffered here.
- uchar tile[TILE_WIDTH * TILE_HEIGHT * sizeof(QRgb)];
+ uchar tile[TILE_WIDTH * TILE_HEIGHT * sizeof(TQRgb)];
//! The data from tile buffer is copied to the Tile by this
//! method. Depending on the type of the tile (RGB, Grayscale,
- //! Indexed) and use (image or mask), the bytes in the buffer are
+ //! Indexed) and use (image or tqmask), the bytes in the buffer are
//! copied in different ways.
void (*assignBytes)( Layer& layer, uint i, uint j );
@@ -183,36 +183,36 @@ class XCFImageFormat : public QImageFormatPlugin {
* metadata items, but is mostly a container for the layer information.
*/
struct XCFImage {
- Q_UINT32 width; //!< width of the XCF image
- Q_UINT32 height; //!< height of the XCF image
- Q_INT32 type; //!< type of the XCF image (GimpImageBaseType)
+ TQ_UINT32 width; //!< width of the XCF image
+ TQ_UINT32 height; //!< height of the XCF image
+ TQ_INT32 type; //!< type of the XCF image (GimpImageBaseType)
- Q_UINT8 compression; //!< tile compression method (CompressionType)
+ TQ_UINT8 compression; //!< tile compression method (CompressionType)
float x_resolution; //!< x resolution in dots per inch
float y_resolution; //!< y resolution in dots per inch
- Q_INT32 tattoo; //!< (unique identifier?)
- Q_UINT32 unit; //!< Units of The GIMP (inch, mm, pica, etc...)
- Q_INT32 num_colors; //!< number of colors in an indexed image
- QValueVector< QRgb > palette; //!< indexed image color palette
+ TQ_INT32 tattoo; //!< (unique identifier?)
+ TQ_UINT32 unit; //!< Units of The GIMP (inch, mm, pica, etc...)
+ TQ_INT32 num_colors; //!< number of colors in an indexed image
+ TQValueVector< TQRgb > palette; //!< indexed image color palette
int num_layers; //!< number of layers
Layer layer; //!< most recently read layer
- bool initialized; //!< Is the QImage initialized?
- QImage image; //!< final QImage
+ bool initialized; //!< Is the TQImage initialized?
+ TQImage image; //!< final TQImage
//! Simple constructor.
XCFImage ( void ) : initialized( false ) {}
};
- //! The bottom-most layer is copied into the final QImage by this
+ //! The bottom-most layer is copied into the final TQImage by this
//! routine.
typedef void (*PixelCopyOperation) ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
- //! Higher layers are merged into the the final QImage by this routine.
+ //! Higher layers are merged into the the final TQImage by this routine.
typedef void (*PixelMergeOperation) ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
//! In layer DISSOLVE mode, a random number is chosen to compare to a
//! pixel's alpha. If the alpha is greater than the random number, the
@@ -245,31 +245,31 @@ public:
/*!
* The image loader makes no (direct) use of dynamic memory
- * and the Qt infrastructure takes care of constructing and destructing
+ * and the TQt infrastructure takes care of constructing and destructing
* the loader so there is not much to do here.
*/
~XCFImageFormat () {}
/*!
- * You can query Qt about the types of image file formats it knows about
- * via QImage::inputFormats or QImage::inputFormatList().
+ * You can query TQt about the types of image file formats it knows about
+ * via TQImage::inputFormats or TQImage::inputFormatList().
* This method returns "xcf".
*/
- QStringList keys () const {
- return QStringList() << "XCF";
+ TQStringList keys () const {
+ return TQStringList() << "XCF";
}
/*!
* This method installs the XCF reader on demand.
*/
- bool installIOHandler ( const QString& );
+ bool installIOHandler ( const TQString& );
static void registerFormat();
private:
- static void readXCF ( QImageIO* image_io );
+ static void readXCF ( TQImageIO* image_io );
#ifdef TMP_WRITE
- static void writeXCF ( QImageIO* ) {}
+ static void writeXCF ( TQImageIO* ) {}
#endif
static void initializeImage ( XCFImage& xcf_image );
static void composeTiles ( XCFImage& xcf_image );
@@ -279,52 +279,52 @@ private:
static bool loadChannelProperties ( SafeDataStream& xcf_io, Layer& layer );
static bool loadHierarchy ( SafeDataStream& xcf_io, Layer& layer );
static bool loadMask ( SafeDataStream& xcf_io, Layer& layer );
- static bool loadLevel ( SafeDataStream& xcf_io, Layer& layer, Q_INT32 bpp );
+ static bool loadLevel ( SafeDataStream& xcf_io, Layer& layer, TQ_INT32 bpp );
static bool loadTileRLE ( SafeDataStream& xcf_io, uchar* tile, int size,
- int data_length, Q_INT32 bpp );
+ int data_length, TQ_INT32 bpp );
static bool loadProperty ( SafeDataStream& xcf_io, PropType& type,
- QByteArray& bytes );
- static void setGrayPalette ( QImage& image );
- static void setPalette ( XCFImage& xcf_image, QImage& image );
+ TQByteArray& bytes );
+ static void setGrayPalette ( TQImage& image );
+ static void setPalette ( XCFImage& xcf_image, TQImage& image );
static void assignImageBytes ( Layer& layer, uint i, uint j );
static void assignMaskBytes ( Layer& layer, uint i, uint j );
static void copyLayerToImage ( XCFImage& xcf_image );
static void copyRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyIndexedToIndexed ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyIndexedAToIndexed ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void copyIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeLayerIntoImage ( XCFImage& xcf_image );
static void mergeRGBToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeGrayToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeGrayAToGray ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeGrayToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeGrayAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeIndexedToIndexed ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeIndexedAToIndexed ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
static void mergeIndexedAToRGB ( Layer& layer, uint i, uint j, int k, int l,
- QImage& image, int m, int n );
+ TQImage& image, int m, int n );
- static void dissolveRGBPixels ( QImage& image, int x, int y );
- static void dissolveAlphaPixels ( QImage& image, int x, int y );
+ static void dissolveRGBPixels ( TQImage& image, int x, int y );
+ static void dissolveAlphaPixels ( TQImage& image, int x, int y );
};
} // namespace
diff --git a/src/gvcore/slideshow.cpp b/src/gvcore/slideshow.cpp
index a22b619..aef2a9c 100644
--- a/src/gvcore/slideshow.cpp
+++ b/src/gvcore/slideshow.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// STL
#include <algorithm>
-// Qt
-#include <qtimer.h>
+// TQt
+#include <tqtimer.h>
// KDE
#include <kconfig.h>
@@ -51,11 +51,11 @@ namespace Gwenview {
SlideShow::SlideShow(Document* document)
: mDocument(document), mStarted(false), mPrefetch( NULL ) {
- mTimer=new QTimer(this);
- connect(mTimer, SIGNAL(timeout()),
- this, SLOT(slotTimeout()) );
- connect(mDocument, SIGNAL(loaded(const KURL&)),
- this, SLOT(slotLoaded()) );
+ mTimer=new TQTimer(this);
+ connect(mTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotTimeout()) );
+ connect(mDocument, TQT_SIGNAL(loaded(const KURL&)),
+ this, TQT_SLOT(slotLoaded()) );
}
SlideShow::~SlideShow() {
@@ -82,12 +82,12 @@ int SlideShow::timerInterval() {
void SlideShow::start(const KURL::List& urls) {
mURLs.resize(urls.size());
- qCopy(urls.begin(), urls.end(), mURLs.begin());
+ tqCopy(urls.begin(), urls.end(), mURLs.begin());
if (SlideShowConfig::random()) {
std::random_shuffle(mURLs.begin(), mURLs.end());
}
- mStartIt=qFind(mURLs.begin(), mURLs.end(), mDocument->url());
+ mStartIt=tqFind(mURLs.begin(), mURLs.end(), mDocument->url());
if (mStartIt==mURLs.end()) {
kdWarning() << k_funcinfo << "Current URL not found in list, aborting.\n";
return;
@@ -111,8 +111,8 @@ void SlideShow::stop() {
}
-QValueVector<KURL>::ConstIterator SlideShow::findNextURL() const {
- QValueVector<KURL>::ConstIterator it=qFind(mURLs.begin(), mURLs.end(), mDocument->url());
+TQValueVector<KURL>::ConstIterator SlideShow::findNextURL() const {
+ TQValueVector<KURL>::ConstIterator it=tqFind(mURLs.begin(), mURLs.end(), mDocument->url());
if (it==mURLs.end()) {
kdWarning() << k_funcinfo << "Current URL not found in list. This should not happen.\n";
return it;
@@ -143,7 +143,7 @@ void SlideShow::slotTimeout() {
return;
}
- QValueVector<KURL>::ConstIterator it=findNextURL();
+ TQValueVector<KURL>::ConstIterator it=findNextURL();
if (it==mURLs.end()) {
stop();
return;
@@ -162,7 +162,7 @@ void SlideShow::slotLoaded() {
void SlideShow::prefetch() {
LOG("");
- QValueVector<KURL>::ConstIterator it=findNextURL();
+ TQValueVector<KURL>::ConstIterator it=findNextURL();
if (it==mURLs.end()) {
return;
}
@@ -175,8 +175,8 @@ void SlideShow::prefetch() {
if( !mPriorityURL.isEmpty()) Cache::instance()->setPriorityURL( mPriorityURL, false );
mPriorityURL = *it;
Cache::instance()->setPriorityURL( mPriorityURL, true ); // make sure it will stay in the cache
- connect( mPrefetch, SIGNAL( urlKindDetermined()), SLOT( slotUrlKindDetermined()));
- connect( mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone()));
+ connect( mPrefetch, TQT_SIGNAL( urlKindDetermined()), TQT_SLOT( slotUrlKindDetermined()));
+ connect( mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone()));
if (mPrefetch->urlKind()==MimeTypeUtils::KIND_FILE) {
// Prefetch is already done, and this is not a raster image
diff --git a/src/gvcore/slideshow.h b/src/gvcore/slideshow.h
index 1539347..59cf81d 100644
--- a/src/gvcore/slideshow.h
+++ b/src/gvcore/slideshow.h
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -23,14 +23,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef SLIDESHOW_H
#define SLIDESHOW_H
-// Qt
-#include <qobject.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqobject.h>
+#include <tqvaluevector.h>
// KDE
#include <kurl.h>
#include "libgwenview_export.h"
-class QTimer;
+class TQTimer;
class KConfig;
@@ -38,9 +38,10 @@ namespace Gwenview {
class Document;
class ImageLoader;
-class LIBGWENVIEW_EXPORT SlideShow : public QObject
+class LIBGWENVIEW_EXPORT SlideShow : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
SlideShow(Document* document);
virtual ~SlideShow();
@@ -68,15 +69,15 @@ private slots:
void prefetchDone();
private:
- QValueVector<KURL>::ConstIterator findNextURL() const;
+ TQValueVector<KURL>::ConstIterator findNextURL() const;
void prefetch();
int timerInterval();
- QTimer* mTimer;
+ TQTimer* mTimer;
Document* mDocument;
bool mStarted;
- QValueVector<KURL> mURLs;
- QValueVector<KURL>::ConstIterator mStartIt;
+ TQValueVector<KURL> mURLs;
+ TQValueVector<KURL>::ConstIterator mStartIt;
ImageLoader* mPrefetch;
KURL mPriorityURL;
};
diff --git a/src/gvcore/threadgate.cpp b/src/gvcore/threadgate.cpp
index fb0c65b..290059d 100644
--- a/src/gvcore/threadgate.cpp
+++ b/src/gvcore/threadgate.cpp
@@ -33,8 +33,8 @@ namespace Gwenview {
// there's even no need to do any locking.
ThreadGate::ThreadGate() {
- connect( this, SIGNAL( signalColor( QColor&, const char* )),
- this, SLOT( slotColor( QColor&, const char* )));
+ connect( this, TQT_SIGNAL( signalColor( TQColor&, const char* )),
+ this, TQT_SLOT( slotColor( TQColor&, const char* )));
}
ThreadGate* ThreadGate::instance() {
@@ -42,19 +42,19 @@ ThreadGate* ThreadGate::instance() {
return &gate;
}
-QColor ThreadGate::color( const char* name ) {
+TQColor ThreadGate::color( const char* name ) {
if( name == NULL || name[ 0 ] == '\0' || name[ 0 ] == '#' )
- return QColor( name );
+ return TQColor( name );
// named color ... needs to be created in the main thread
if( TSThread::currentThread() == TSThread::mainThread())
- return QColor( name );
- QColor col;
- TSThread::currentThread()->emitCancellableSignal( this, SIGNAL( signalColor( QColor&, const char* )), col, name );
+ return TQColor( name );
+ TQColor col;
+ TSThread::currentThread()->emitCancellableSignal( this, TQT_SIGNAL( signalColor( TQColor&, const char* )), col, name );
return col;
}
-void ThreadGate::slotColor( QColor& col, const char* name ) {
- col = QColor( name );
+void ThreadGate::slotColor( TQColor& col, const char* name ) {
+ col = TQColor( name );
}
} // namespace
diff --git a/src/gvcore/threadgate.h b/src/gvcore/threadgate.h
index f88fffb..57c7654 100644
--- a/src/gvcore/threadgate.h
+++ b/src/gvcore/threadgate.h
@@ -22,22 +22,23 @@ Copyright 2000-2004 Aur�lien G�teau
#ifndef THREADGATE_H
#define THREADGATE_H
-#include <qobject.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqcolor.h>
namespace Gwenview {
-class ThreadGate : public QObject
+class ThreadGate : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
static ThreadGate* instance();
- QColor color( const char* name );
+ TQColor color( const char* name );
private:
ThreadGate();
signals:
- void signalColor( QColor&, const char* );
+ void signalColor( TQColor&, const char* );
private slots:
- void slotColor( QColor&, const char* );
+ void slotColor( TQColor&, const char* );
};
} // namespace
diff --git a/src/gvcore/thumbnaildetailsdialog.cpp b/src/gvcore/thumbnaildetailsdialog.cpp
index 0610488..2ed2ec9 100644
--- a/src/gvcore/thumbnaildetailsdialog.cpp
+++ b/src/gvcore/thumbnaildetailsdialog.cpp
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "thumbnaildetailsdialog.moc"
-// Qt
-#include <qcheckbox.h>
+// TQt
+#include <tqcheckbox.h>
// Local
#include "filethumbnailview.h"
@@ -38,7 +38,7 @@ struct ThumbnailDetailsDialog::Private {
ThumbnailDetailsDialog::ThumbnailDetailsDialog(FileThumbnailView* view)
: KDialogBase(
- view, 0, false /* modal */, QString::null, KDialogBase::Close,
+ view, 0, false /* modal */, TQString(), KDialogBase::Close,
KDialogBase::Close, true /* separator */)
, d(new ThumbnailDetailsDialog::Private)
{
@@ -53,10 +53,10 @@ ThumbnailDetailsDialog::ThumbnailDetailsDialog(FileThumbnailView* view)
d->mContent->mShowFileSize->setChecked(details & FileThumbnailView::FILESIZE);
d->mContent->mShowImageSize->setChecked(details & FileThumbnailView::IMAGESIZE);
- connect(d->mContent->mShowFileName, SIGNAL(toggled(bool)), SLOT(applyChanges()) );
- connect(d->mContent->mShowFileDate, SIGNAL(toggled(bool)), SLOT(applyChanges()) );
- connect(d->mContent->mShowFileSize, SIGNAL(toggled(bool)), SLOT(applyChanges()) );
- connect(d->mContent->mShowImageSize, SIGNAL(toggled(bool)), SLOT(applyChanges()) );
+ connect(d->mContent->mShowFileName, TQT_SIGNAL(toggled(bool)), TQT_SLOT(applyChanges()) );
+ connect(d->mContent->mShowFileDate, TQT_SIGNAL(toggled(bool)), TQT_SLOT(applyChanges()) );
+ connect(d->mContent->mShowFileSize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(applyChanges()) );
+ connect(d->mContent->mShowImageSize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(applyChanges()) );
}
ThumbnailDetailsDialog::~ThumbnailDetailsDialog() {
diff --git a/src/gvcore/thumbnaildetailsdialog.h b/src/gvcore/thumbnaildetailsdialog.h
index b6ce6ad..c3e152a 100644
--- a/src/gvcore/thumbnaildetailsdialog.h
+++ b/src/gvcore/thumbnaildetailsdialog.h
@@ -30,6 +30,7 @@ class FileThumbnailView;
class ThumbnailDetailsDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
ThumbnailDetailsDialog(FileThumbnailView* view);
~ThumbnailDetailsDialog();
diff --git a/src/gvcore/thumbnaildetailsdialogbase.ui b/src/gvcore/thumbnaildetailsdialogbase.ui
index 4057968..748480c 100644
--- a/src/gvcore/thumbnaildetailsdialogbase.ui
+++ b/src/gvcore/thumbnaildetailsdialogbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ThumbnailDetailsDialogBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ThumbnailDetailsDialogBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -27,9 +27,9 @@
<string>Information to display in the thumbnail text:</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<grid>
<property name="name">
@@ -45,14 +45,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>mShowFileName</cstring>
</property>
@@ -60,7 +60,7 @@
<string>File name</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1">
+ <widget class="TQCheckBox" row="3" column="1">
<property name="name">
<cstring>mShowImageSize</cstring>
</property>
@@ -68,7 +68,7 @@
<string>Image size</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>mShowFileSize</cstring>
</property>
@@ -76,7 +76,7 @@
<string>File size</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>mShowFileDate</cstring>
</property>
@@ -96,14 +96,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -113,5 +113,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/gvcore/thumbnailloadjob.cpp b/src/gvcore/thumbnailloadjob.cpp
index 09cec44..f4335df 100644
--- a/src/gvcore/thumbnailloadjob.cpp
+++ b/src/gvcore/thumbnailloadjob.cpp
@@ -1,6 +1,6 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
/* Gwenview - A simple image viewer for KDE
- Copyright 2000-2004 Aur�lien G�teau
+ Copyright 2000-2004 Aur�lien G�teau
This class is based on the ImagePreviewJob class from Konqueror.
Original copyright follows.
*/
@@ -29,12 +29,12 @@
#include <unistd.h>
#include <assert.h>
-// Qt
-#include <qdir.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+// TQt
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
// KDE
#include <kapplication.h>
@@ -74,17 +74,17 @@ namespace Gwenview {
#endif
-static QString generateOriginalURI(KURL url) {
+static TQString generateOriginalURI(KURL url) {
// Don't include the password if any
- url.setPass(QString::null);
+ url.setPass(TQString());
return url.url();
}
-static QString generateThumbnailPath(const QString& uri, int size) {
- KMD5 md5( QFile::encodeName(uri) );
- QString baseDir=ThumbnailLoadJob::thumbnailBaseDir(size);
- return baseDir + QString(QFile::encodeName( md5.hexDigest())) + ".png";
+static TQString generateThumbnailPath(const TQString& uri, int size) {
+ KMD5 md5( TQFile::encodeName(uri).data() );
+ TQString baseDir=ThumbnailLoadJob::thumbnailBaseDir(size);
+ return baseDir + TQString(TQFile::encodeName( md5.hexDigest())) + ".png";
}
//------------------------------------------------------------------------
@@ -93,12 +93,12 @@ static QString generateThumbnailPath(const QString& uri, int size) {
//
//------------------------------------------------------------------------
void ThumbnailThread::load(
- const QString& originalURI, time_t originalTime, int originalSize, const QString& originalMimeType,
- const QString& pixPath,
- const QString& thumbnailPath,
+ const TQString& originalURI, time_t originalTime, int originalSize, const TQString& originalMimeType,
+ const TQString& pixPath,
+ const TQString& thumbnailPath,
int size, bool storeThumbnail)
{
- QMutexLocker lock( &mMutex );
+ TQMutexLocker lock( &mMutex );
assert( mPixPath.isNull());
mOriginalURI = TSDeepCopy(originalURI);
@@ -114,7 +114,7 @@ void ThumbnailThread::load(
}
void ThumbnailThread::run() {
- QMutexLocker lock( &mMutex );
+ TQMutexLocker lock( &mMutex );
while( !testCancel()) {
// empty mPixPath means nothing to do
while( mPixPath.isNull()) {
@@ -122,14 +122,14 @@ void ThumbnailThread::run() {
if( testCancel()) return;
}
loadThumbnail();
- mPixPath = QString(); // done, ready for next
- QSize size(mOriginalWidth, mOriginalHeight);
- emitCancellableSignal( this, SIGNAL( done( const QImage&, const QSize&)), mImage, size);
+ mPixPath = TQString(); // done, ready for next
+ TQSize size(mOriginalWidth, mOriginalHeight);
+ emitCancellableSignal( this, TQT_SIGNAL( done( const TQImage&, const TQSize&)), mImage, size);
}
}
void ThumbnailThread::loadThumbnail() {
- mImage = QImage();
+ mImage = TQImage();
bool loaded=false;
bool needCaching=true;
@@ -156,9 +156,9 @@ void ThumbnailThread::loadThumbnail() {
mImage=ImageUtils::transform(mImage,orientation);
}
}
- // File is not a JPEG, or JPEG optimized load failed, load file using Qt
+ // File is not a JPEG, or JPEG optimized load failed, load file using TQt
if (!loaded) {
- QImage originalImage;
+ TQImage originalImage;
if (originalImage.load(mPixPath)) {
mOriginalWidth=originalImage.width();
mOriginalHeight=originalImage.height();
@@ -166,11 +166,11 @@ void ThumbnailThread::loadThumbnail() {
if( testCancel()) return;
- if (QMAX(mOriginalWidth, mOriginalHeight)<=thumbSize ) {
+ if (TQMAX(mOriginalWidth, mOriginalHeight)<=thumbSize ) {
mImage=originalImage;
needCaching = false;
} else {
- mImage=ImageUtils::scale(originalImage,thumbSize,thumbSize,ImageUtils::SMOOTH_FAST,QImage::ScaleMin);
+ mImage=ImageUtils::scale(originalImage,thumbSize,thumbSize,ImageUtils::SMOOTH_FAST,TQ_ScaleMin);
}
loaded = true;
}
@@ -180,20 +180,20 @@ void ThumbnailThread::loadThumbnail() {
if( mStoreThumbnailsInCache && needCaching ) {
mImage.setText("Thumb::URI", 0, mOriginalURI);
- mImage.setText("Thumb::MTime", 0, QString::number(mOriginalTime));
- mImage.setText("Thumb::Size", 0, QString::number(mOriginalSize));
+ mImage.setText("Thumb::MTime", 0, TQString::number(mOriginalTime));
+ mImage.setText("Thumb::Size", 0, TQString::number(mOriginalSize));
mImage.setText("Thumb::Mimetype", 0, mOriginalMimeType);
- mImage.setText("Thumb::Image::Width", 0, QString::number(mOriginalWidth));
- mImage.setText("Thumb::Image::Height", 0, QString::number(mOriginalHeight));
+ mImage.setText("Thumb::Image::Width", 0, TQString::number(mOriginalWidth));
+ mImage.setText("Thumb::Image::Height", 0, TQString::number(mOriginalHeight));
mImage.setText("Software", 0, "Gwenview");
- QString thumbnailDir = ThumbnailLoadJob::thumbnailBaseDir(mThumbnailSize);
+ TQString thumbnailDir = ThumbnailLoadJob::thumbnailBaseDir(mThumbnailSize);
KStandardDirs::makeDir(thumbnailDir, 0700);
KTempFile tmp(thumbnailDir + "/gwenview", ".png");
tmp.setAutoDelete(true);
if (tmp.status()!=0) {
- QString reason( strerror(tmp.status()) );
+ TQString reason( strerror(tmp.status()) );
kdWarning() << "Could not create a temporary file.\nReason: " << reason << endl;
return;
}
@@ -203,13 +203,13 @@ void ThumbnailThread::loadThumbnail() {
return;
}
- rename(QFile::encodeName(tmp.name()), QFile::encodeName(mThumbnailPath));
+ rename(TQFile::encodeName(tmp.name()), TQFile::encodeName(mThumbnailPath));
}
}
bool ThumbnailThread::isJPEG() {
- QString format=QImageIO::imageFormat(mPixPath);
+ TQString format=TQImageIO::imageFormat(mPixPath);
return format=="JPEG";
}
@@ -229,7 +229,7 @@ bool ThumbnailThread::loadJPEG() {
struct jpeg_decompress_struct cinfo;
// Open file
- FILE* inputFile=fopen(QFile::encodeName( mPixPath ).data(), "rb");
+ FILE* inputFile=fopen(TQFile::encodeName( mPixPath ).data(), "rb");
if(!inputFile) return false;
// Error handling
@@ -249,7 +249,7 @@ bool ThumbnailThread::loadJPEG() {
// Get image size and check if we need a thumbnail
int size= mThumbnailSize <= ThumbnailSize::NORMAL ? ThumbnailSize::NORMAL : ThumbnailSize::LARGE;
- int imgSize = QMAX(cinfo.image_width, cinfo.image_height);
+ int imgSize = TQMAX(cinfo.image_width, cinfo.image_height);
if (imgSize<=size) {
fclose(inputFile);
@@ -266,7 +266,7 @@ bool ThumbnailThread::loadJPEG() {
cinfo.scale_num=1;
cinfo.scale_denom=scale;
- // Create QImage
+ // Create TQImage
jpeg_start_decompress(&cinfo);
switch(cinfo.output_components) {
@@ -277,7 +277,7 @@ bool ThumbnailThread::loadJPEG() {
case 1: // B&W image
mImage.create( cinfo.output_width, cinfo.output_height, 8, 256 );
for (int i=0; i<256; i++)
- mImage.setColor(i, qRgb(i,i,i));
+ mImage.setColor(i, tqRgb(i,i,i));
break;
default:
jpeg_destroy_decompress(&cinfo);
@@ -295,16 +295,16 @@ bool ThumbnailThread::loadJPEG() {
if ( cinfo.output_components == 3 ) {
for (uint j=0; j<cinfo.output_height; j++) {
uchar *in = mImage.scanLine(j) + cinfo.output_width*3;
- QRgb *out = (QRgb*)( mImage.scanLine(j) );
+ TQRgb *out = (TQRgb*)( mImage.scanLine(j) );
for (uint i=cinfo.output_width; i--; ) {
in-=3;
- out[i] = qRgb(in[0], in[1], in[2]);
+ out[i] = tqRgb(in[0], in[1], in[2]);
}
}
}
- int newMax = QMAX(cinfo.output_width, cinfo.output_height);
+ int newMax = TQMAX(cinfo.output_width, cinfo.output_height);
int newx = size*cinfo.output_width / newMax;
int newy = size*cinfo.output_height / newMax;
@@ -322,16 +322,16 @@ bool ThumbnailThread::loadJPEG() {
// ThumbnailLoadJob static methods
//
//------------------------------------------------------------------------
-QString ThumbnailLoadJob::thumbnailBaseDir() {
- static QString dir;
+TQString ThumbnailLoadJob::thumbnailBaseDir() {
+ static TQString dir;
if (!dir.isEmpty()) return dir;
- dir=QDir::homeDirPath() + "/.thumbnails/";
+ dir=TQDir::homeDirPath() + "/.thumbnails/";
return dir;
}
-QString ThumbnailLoadJob::thumbnailBaseDir(int size) {
- QString dir = thumbnailBaseDir();
+TQString ThumbnailLoadJob::thumbnailBaseDir(int size) {
+ TQString dir = thumbnailBaseDir();
if (size<=ThumbnailSize::NORMAL) {
dir+="normal/";
} else {
@@ -342,9 +342,9 @@ QString ThumbnailLoadJob::thumbnailBaseDir(int size) {
void ThumbnailLoadJob::deleteImageThumbnail(const KURL& url) {
- QString uri=generateOriginalURI(url);
- QFile::remove(generateThumbnailPath(uri, ThumbnailSize::NORMAL));
- QFile::remove(generateThumbnailPath(uri, ThumbnailSize::LARGE));
+ TQString uri=generateOriginalURI(url);
+ TQFile::remove(generateThumbnailPath(uri, ThumbnailSize::NORMAL));
+ TQFile::remove(generateThumbnailPath(uri, ThumbnailSize::LARGE));
}
@@ -371,7 +371,7 @@ void ThumbnailLoadJob::deleteImageThumbnail(const KURL& url) {
updateItemsOrder() builds mItems from mAllItems
*/
-ThumbnailLoadJob::ThumbnailLoadJob(const QValueVector<const KFileItem*>* items, int size)
+ThumbnailLoadJob::ThumbnailLoadJob(const TQValueVector<const KFileItem*>* items, int size)
: KIO::Job(false), mState( STATE_NEXTTHUMB ),
mCurrentVisibleIndex( -1 ), mFirstVisibleIndex( -1 ), mLastVisibleIndex( -1 ),
mThumbnailSize(size), mSuspended( false )
@@ -385,11 +385,11 @@ ThumbnailLoadJob::ThumbnailLoadJob(const QValueVector<const KFileItem*>* items,
Q_ASSERT(!items->empty());
mAllItems=*items;
mProcessedState.resize( mAllItems.count());
- qFill( mProcessedState.begin(), mProcessedState.end(), false );
+ tqFill( mProcessedState.begin(), mProcessedState.end(), false );
mCurrentItem = NULL;
- connect(&mThumbnailThread, SIGNAL(done(const QImage&, const QSize&)),
- SLOT(thumbnailReady(const QImage&, const QSize&)) );
+ connect(&mThumbnailThread, TQT_SIGNAL(done(const TQImage&, const TQSize&)),
+ TQT_SLOT(thumbnailReady(const TQImage&, const TQSize&)) );
Cache::instance()->updateAge(); // see addThumbnail in Cache
}
@@ -547,9 +547,9 @@ void ThumbnailLoadJob::determineNextIcon() {
if( mCurrentURL.isLocalFile()
&& !KIO::probably_slow_mounted( mCurrentURL.path())) {
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(mCurrentURL.path()), &buff ) == 0 ) {
+ if ( KDE_stat( TQFile::encodeName(mCurrentURL.path()), &buff ) == 0 ) {
mOriginalTime = buff.st_mtime;
- QTimer::singleShot( 0, this, SLOT( checkThumbnail()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( checkThumbnail()));
}
}
if( mOriginalTime == 0 ) { // KIO must be used
@@ -598,8 +598,8 @@ void ThumbnailLoadJob::slotResult(KIO::Job * job) {
if (job->error()) {
emitThumbnailLoadingFailed();
LOG("Delete temp file " << mTempPath);
- QFile::remove(mTempPath);
- mTempPath = QString::null;
+ TQFile::remove(mTempPath);
+ mTempPath = TQString();
determineNextIcon();
} else {
startCreatingThumbnail(mTempPath);
@@ -613,9 +613,9 @@ void ThumbnailLoadJob::slotResult(KIO::Job * job) {
}
-void ThumbnailLoadJob::thumbnailReady( const QImage& im, const QSize& _size) {
- QImage img = TSDeepCopy( im );
- QSize size = _size;
+void ThumbnailLoadJob::thumbnailReady( const TQImage& im, const TQSize& _size) {
+ TQImage img = TSDeepCopy( im );
+ TQSize size = _size;
if ( !img.isNull()) {
emitThumbnailLoaded(img, size);
} else {
@@ -623,8 +623,8 @@ void ThumbnailLoadJob::thumbnailReady( const QImage& im, const QSize& _size) {
}
if( !mTempPath.isEmpty()) {
LOG("Delete temp file " << mTempPath);
- QFile::remove(mTempPath);
- mTempPath = QString::null;
+ TQFile::remove(mTempPath);
+ mTempPath = TQString();
}
determineNextIcon();
}
@@ -634,14 +634,14 @@ void ThumbnailLoadJob::checkThumbnail() {
if (mCurrentURL.isLocalFile()
&& mCurrentURL.directory(false).startsWith(thumbnailBaseDir()) )
{
- QImage image(mCurrentURL.path());
+ TQImage image(mCurrentURL.path());
emitThumbnailLoaded(image, image.size());
determineNextIcon();
return;
}
- QSize imagesize;
+ TQSize imagesize;
if( mOriginalTime == time_t( Cache::instance()->timestamp( mCurrentURL ).toTime_t())) {
- QPixmap cached = Cache::instance()->thumbnail( mCurrentURL, imagesize );
+ TQPixmap cached = Cache::instance()->thumbnail( mCurrentURL, imagesize );
if( !cached.isNull()) {
emit thumbnailLoaded(mCurrentItem, cached, imagesize);
determineNextIcon();
@@ -654,19 +654,19 @@ void ThumbnailLoadJob::checkThumbnail() {
LOG("Stat thumb " << mThumbnailPath);
- QImage thumb;
+ TQImage thumb;
if ( thumb.load(mThumbnailPath) ) {
if (thumb.text("Thumb::URI", 0) == mOriginalURI &&
thumb.text("Thumb::MTime", 0).toInt() == mOriginalTime )
{
int width=0, height=0;
- QSize size;
+ TQSize size;
bool ok;
width=thumb.text("Thumb::Image::Width", 0).toInt(&ok);
if (ok) height=thumb.text("Thumb::Image::Height", 0).toInt(&ok);
if (ok) {
- size=QSize(width, height);
+ size=TQSize(width, height);
} else {
LOG("Thumbnail for " << mOriginalURI << " does not contain correct image size information");
KFileMetaInfo fmi(mCurrentURL);
@@ -688,7 +688,7 @@ void ThumbnailLoadJob::checkThumbnail() {
}
// Thumbnail not found or not valid
- if ( MimeTypeUtils::rasterImageMimeTypes().contains(mCurrentItem->mimetype()) ) {
+ if ( MimeTypeUtils::rasterImageMimeTypes().tqcontains(mCurrentItem->mimetype()) ) {
// This is a raster image
if (mCurrentURL.isLocalFile()) {
// Original is a local file, create the thumbnail
@@ -712,16 +712,16 @@ void ThumbnailLoadJob::checkThumbnail() {
list.append(mCurrentItem);
KIO::Job* job=KIO::filePreview(list, mThumbnailSize);
job->setWindow(KApplication::kApplication()->mainWidget());
- connect(job, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)),
- this, SLOT(slotGotPreview(const KFileItem*, const QPixmap&)) );
- connect(job, SIGNAL(failed(const KFileItem*)),
- this, SLOT(emitThumbnailLoadingFailed()) );
+ connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
+ this, TQT_SLOT(slotGotPreview(const KFileItem*, const TQPixmap&)) );
+ connect(job, TQT_SIGNAL(failed(const KFileItem*)),
+ this, TQT_SLOT(emitThumbnailLoadingFailed()) );
addSubjob(job);
return;
}
}
-void ThumbnailLoadJob::startCreatingThumbnail(const QString& pixPath) {
+void ThumbnailLoadJob::startCreatingThumbnail(const TQString& pixPath) {
LOG("Creating thumbnail from " << pixPath);
mThumbnailThread.load( mOriginalURI, mOriginalTime, mCurrentItem->size(),
mCurrentItem->mimetype(), pixPath, mThumbnailPath, mThumbnailSize,
@@ -729,33 +729,33 @@ void ThumbnailLoadJob::startCreatingThumbnail(const QString& pixPath) {
}
-void ThumbnailLoadJob::slotGotPreview(const KFileItem* item, const QPixmap& pixmap) {
+void ThumbnailLoadJob::slotGotPreview(const KFileItem* item, const TQPixmap& pixmap) {
LOG("");
- QSize size;
+ TQSize size;
emit thumbnailLoaded(item, pixmap, size);
}
-void ThumbnailLoadJob::emitThumbnailLoaded(const QImage& img, QSize size) {
- int biggestDimension=QMAX(img.width(), img.height());
+void ThumbnailLoadJob::emitThumbnailLoaded(const TQImage& img, TQSize size) {
+ int biggestDimension=TQMAX(img.width(), img.height());
- QImage thumbImg;
+ TQImage thumbImg;
if (biggestDimension>mThumbnailSize) {
// Scale down thumbnail if necessary
- thumbImg=ImageUtils::scale(img,mThumbnailSize, mThumbnailSize, ImageUtils::SMOOTH_FAST,QImage::ScaleMin);
+ thumbImg=ImageUtils::scale(img,mThumbnailSize, mThumbnailSize, ImageUtils::SMOOTH_FAST,TQ_ScaleMin);
} else {
thumbImg=img;
}
- QDateTime tm;
+ TQDateTime tm;
tm.setTime_t( mOriginalTime );
- QPixmap thumb( thumbImg ); // store as QPixmap in cache (faster to retrieve, no conversion needed)
+ TQPixmap thumb( thumbImg ); // store as TQPixmap in cache (faster to retrieve, no conversion needed)
Cache::instance()->addThumbnail( mCurrentURL, thumb, size, tm );
emit thumbnailLoaded(mCurrentItem, thumb, size);
}
void ThumbnailLoadJob::emitThumbnailLoadingFailed() {
- QSize size;
+ TQSize size;
emit thumbnailLoaded(mCurrentItem, mBrokenPixmap, size);
}
diff --git a/src/gvcore/thumbnailloadjob.h b/src/gvcore/thumbnailloadjob.h
index fd7791e..fc33fdf 100644
--- a/src/gvcore/thumbnailloadjob.h
+++ b/src/gvcore/thumbnailloadjob.h
@@ -1,6 +1,6 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/* Gwenview - A simple image viewer for KDE
- Copyright 2000-2004 Aur�lien G�teau
+ Copyright 2000-2004 Aur�lien G�teau
This class is based on the ImagePreviewJob class from Konqueror.
Original copyright follows.
*/
@@ -25,11 +25,11 @@
#ifndef THUMBNAILLOADJOB_H
#define THUMBNAILLOADJOB_H
-// Qt
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+// TQt
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
// KDE
#include <kio/job.h>
@@ -42,39 +42,40 @@
class KConfig;
class KFileItem;
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
namespace Gwenview {
class ThumbnailThread : public TSThread {
Q_OBJECT
+ TQ_OBJECT
public:
void load(
- const QString& originalURI,
+ const TQString& originalURI,
time_t originalTime,
int originalSize,
- const QString& originalMimeType,
- const QString& pixPath,
- const QString& thumbnailPath,
+ const TQString& originalMimeType,
+ const TQString& pixPath,
+ const TQString& thumbnailPath,
int size,
bool storeThumbnail);
protected:
virtual void run();
signals:
- void done( const QImage&, const QSize&);
+ void done( const TQImage&, const TQSize&);
private:
bool isJPEG();
bool loadJPEG();
void loadThumbnail();
- QImage mImage;
- QString mPixPath;
- QString mThumbnailPath;
- QString mOriginalURI;
+ TQImage mImage;
+ TQString mPixPath;
+ TQString mThumbnailPath;
+ TQString mOriginalURI;
time_t mOriginalTime;
int mOriginalSize;
- QString mOriginalMimeType;
+ TQString mOriginalMimeType;
int mOriginalWidth;
int mOriginalHeight;
- QMutex mMutex;
+ TQMutex mMutex;
TSWaitCondition mCond;
int mThumbnailSize;
bool mStoreThumbnailsInCache;
@@ -85,11 +86,12 @@ private:
*/
class LIBGWENVIEW_EXPORT ThumbnailLoadJob : public KIO::Job {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a job for determining the pixmaps of the images in the @p itemList
*/
- ThumbnailLoadJob(const QValueVector<const KFileItem*>* itemList, int size);
+ ThumbnailLoadJob(const TQValueVector<const KFileItem*>* itemList, int size);
virtual ~ThumbnailLoadJob();
/**
@@ -128,12 +130,12 @@ public:
/**
* Returns the thumbnail base dir, independent of the thumbnail size
*/
- static QString thumbnailBaseDir();
+ static TQString thumbnailBaseDir();
/**
* Returns the thumbnail base dir, for the @p size
*/
- static QString thumbnailBaseDir(int size);
+ static TQString thumbnailBaseDir(int size);
/**
@@ -145,21 +147,21 @@ signals:
/**
* Emitted when the thumbnail for the @p item has been loaded
*/
- void thumbnailLoaded(const KFileItem* item, const QPixmap&, const QSize&);
+ void thumbnailLoaded(const KFileItem* item, const TQPixmap&, const TQSize&);
private slots:
void slotResult( KIO::Job *job );
- void slotGotPreview(const KFileItem*, const QPixmap&);
+ void slotGotPreview(const KFileItem*, const TQPixmap&);
void checkThumbnail();
- void thumbnailReady(const QImage& im, const QSize&);
+ void thumbnailReady(const TQImage& im, const TQSize&);
void emitThumbnailLoadingFailed();
private:
enum { STATE_STATORIG, STATE_DOWNLOADORIG, STATE_PREVIEWJOB, STATE_NEXTTHUMB } mState;
- QValueList<const KFileItem*> mItems;
- QValueVector<const KFileItem* > mAllItems;
- QValueVector< bool > mProcessedState;
+ TQValueList<const KFileItem*> mItems;
+ TQValueVector<const KFileItem* > mAllItems;
+ TQValueVector< bool > mProcessedState;
const KFileItem *mCurrentItem;
int thumbnailIndex( const KFileItem* item ) const;
void updateItemsOrder();
@@ -171,37 +173,37 @@ private:
KURL mCurrentURL;
// The URI of the original image (might be different from mCurrentURL.url())
- QString mOriginalURI;
+ TQString mOriginalURI;
// The modification time of the original image
time_t mOriginalTime;
// The thumbnail path
- QString mThumbnailPath;
+ TQString mThumbnailPath;
// The temporary path for remote urls
- QString mTempPath;
+ TQString mTempPath;
// Thumbnail size
int mThumbnailSize;
- QPixmap mBrokenPixmap;
+ TQPixmap mBrokenPixmap;
bool mSuspended;
ThumbnailThread mThumbnailThread;
void determineNextIcon();
- void startCreatingThumbnail(const QString& path);
+ void startCreatingThumbnail(const TQString& path);
- void emitThumbnailLoaded(const QImage& img, QSize size);
+ void emitThumbnailLoaded(const TQImage& img, TQSize size);
void updateItemsOrderHelper( int forward, int backward, int first, int last );
};
inline
int ThumbnailLoadJob::thumbnailIndex( const KFileItem* item ) const {
- QValueVector<const KFileItem* >::ConstIterator pos = qFind( mAllItems.begin(), mAllItems.end(), item );
+ TQValueVector<const KFileItem* >::ConstIterator pos = tqFind( mAllItems.begin(), mAllItems.end(), item );
if( pos != mAllItems.end()) return pos - mAllItems.begin();
return -1;
}
diff --git a/src/gvcore/timeutils.cpp b/src/gvcore/timeutils.cpp
index 3893aa5..bed1157 100644
--- a/src/gvcore/timeutils.cpp
+++ b/src/gvcore/timeutils.cpp
@@ -33,8 +33,8 @@ namespace TimeUtils {
time_t getTime(const KFileItem* item) {
const KFileMetaInfo& info = item->metaInfo();
if (info.isValid()) {
- QVariant value = info.value("Date/time");
- QDateTime dt = value.toDateTime();
+ TQVariant value = info.value("Date/time");
+ TQDateTime dt = value.toDateTime();
if (dt.isValid()) {
return dt.toTime_t();
}
@@ -42,8 +42,8 @@ time_t getTime(const KFileItem* item) {
return item->time(KIO::UDS_MODIFICATION_TIME);
}
-QString formatTime(time_t time) {
- QDateTime dt;
+TQString formatTime(time_t time) {
+ TQDateTime dt;
dt.setTime_t(time);
return KGlobal::locale()->formatDateTime(dt);
}
diff --git a/src/gvcore/timeutils.h b/src/gvcore/timeutils.h
index db50bdd..e59469e 100644
--- a/src/gvcore/timeutils.h
+++ b/src/gvcore/timeutils.h
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <time.h>
class KFileItem;
-class QString;
+class TQString;
namespace Gwenview {
namespace TimeUtils {
@@ -34,7 +34,7 @@ namespace TimeUtils {
*/
time_t getTime(const KFileItem*);
-QString formatTime(time_t);
+TQString formatTime(time_t);
} // namespace TimeUtils
} // namespace Gwenview
diff --git a/src/gvcore/xcursor.cpp b/src/gvcore/xcursor.cpp
index 79df377..d3c3acc 100644
--- a/src/gvcore/xcursor.cpp
+++ b/src/gvcore/xcursor.cpp
@@ -24,9 +24,9 @@
#include "xcursor.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#ifdef GV_HAVE_XCURSOR
#include <X11/Xlib.h>
@@ -37,12 +37,12 @@
namespace Gwenview {
#ifdef GV_HAVE_XCURSOR
-class XCursorFormat : public QImageFormat {
+class XCursorFormat : public TQImageFormat {
public:
XCursorFormat();
- virtual int decode(QImage& img, QImageConsumer* consumer,
+ virtual int decode(TQImage& img, TQImageConsumer* consumer,
const uchar* buffer, int length);
- QByteArray array;
+ TQByteArray array;
int pos;
bool was_seek_error;
};
@@ -89,7 +89,7 @@ XCursorFormat::XCursorFormat()
{
}
-int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
+int XCursorFormat::decode(TQImage& img, TQImageConsumer* cons,
const uchar* buffer, int length)
{
if( length > 0 )
@@ -98,11 +98,11 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
array.resize( old_size + length );
memcpy( array.data() + old_size, buffer, length );
}
-// Qt's image async IO and Xcursor library have so nicely incompatible data reading :-/
+// TQt's image async IO and Xcursor library have so nicely incompatible data reading :-/
// Xcursor can read a file only as a whole. One can provide XcursorFile with functions
// for reading, writing and seeking. And seeking is the stupid part on Xcursor's side,
// as there's no way to suspend reading until more data is available. This means we
-// basically have to read the whole file first. However, Qt's image async IO just keeps
+// basically have to read the whole file first. However, TQt's image async IO just keeps
// feeding data and when there's end of the data it just does nothing and doesn't tell
// the decoder.
// So the trick will be calling XcursorXcFileLoadImage() but whenever there will be
@@ -124,19 +124,19 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
++cur )
{
XcursorImage* cursor = cursors->images[ cur ];
- img = QImage( reinterpret_cast<uchar *>( cursor->pixels ),
- cursor->width, cursor->height, 32, NULL, 0, QImage::BigEndian );
+ img = TQImage( reinterpret_cast<uchar *>( cursor->pixels ),
+ cursor->width, cursor->height, 32, NULL, 0, TQImage::BigEndian );
img.setAlphaBuffer( true );
// Convert the image to non-premultiplied alpha
- Q_UINT32 *pixels = reinterpret_cast<Q_UINT32 *>( img.bits() );
+ TQ_UINT32 *pixels = reinterpret_cast<TQ_UINT32 *>( img.bits() );
for ( int i = 0; i < (img.width() * img.height()); i++ )
{
- float alpha = qAlpha( pixels[i] ) / 255.0;
+ float alpha = tqAlpha( pixels[i] ) / 255.0;
if ( alpha > 0.0 && alpha < 1.0 )
- pixels[i] = qRgba( int( qRed(pixels[i]) / alpha ),
- int( qGreen(pixels[i]) / alpha ),
- int( qBlue(pixels[i]) / alpha ),
- qAlpha(pixels[i]) );
+ pixels[i] = tqRgba( int( tqRed(pixels[i]) / alpha ),
+ int( tqGreen(pixels[i]) / alpha ),
+ int( tqBlue(pixels[i]) / alpha ),
+ tqAlpha(pixels[i]) );
}
// Create a deep copy of the image so the image data is preserved
img = img.copy();
@@ -148,7 +148,7 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
if( cursors->nimage > 1 )
cons->setLooping( 0 );
}
- cons->changed( QRect( QPoint( 0, 0 ), img.size()));
+ cons->changed( TQRect( TQPoint( 0, 0 ), img.size()));
cons->frameDone();
cons->setFramePeriod( cursor->delay );
}
@@ -164,7 +164,7 @@ int XCursorFormat::decode(QImage& img, QImageConsumer* cons,
}
#endif
-QImageFormat* XCursorFormatType::decoderFor(
+TQImageFormat* XCursorFormatType::decoderFor(
const uchar* buffer, int length)
{
#ifdef GV_HAVE_XCURSOR
diff --git a/src/gvcore/xcursor.h b/src/gvcore/xcursor.h
index 27bec9a..977b93b 100644
--- a/src/gvcore/xcursor.h
+++ b/src/gvcore/xcursor.h
@@ -21,13 +21,13 @@
#ifndef gvxcursor_h
#define gvxcursor_h
-#include <qasyncimageio.h>
+#include <tqasyncimageio.h>
namespace Gwenview {
-class XCursorFormatType : public QImageFormatType {
+class XCursorFormatType : public TQImageFormatType {
public:
- QImageFormat* decoderFor(const uchar* buffer, int length);
+ TQImageFormat* decoderFor(const uchar* buffer, int length);
const char* formatName() const;
};
diff --git a/src/gvcore/xpm.cpp b/src/gvcore/xpm.cpp
index ce7656f..49acb8e 100644
--- a/src/gvcore/xpm.cpp
+++ b/src/gvcore/xpm.cpp
@@ -4,33 +4,33 @@
/****************************************************************************
**
**
-** Implementation of QImage and QImageIO classes
+** Implementation of TQImage and TQImageIO classes
**
** Created : 950207
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
@@ -42,7 +42,7 @@
This code is xpm loader copied from qimage.cpp, with changes making it
possible to use this class from another thread. The problem is that
- QColor::setNamedColor() isn't reentrant without thread-safe Xlib,
+ TQColor::setNamedColor() isn't reentrant without thread-safe Xlib,
i.e. without XInitThreads() called. Current KDE applications
don't call XInitThreads(), and since it needs to be the very first
Xlib function called, and Gwenview is also a KPart, it's not possible
@@ -56,25 +56,25 @@
#include "xpm.h"
-#include <qimage.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include "threadgate.h"
namespace Gwenview {
-// Qt code start ---------------------------
-static QString fbname( const QString &fileName ) // get file basename (sort of)
+// TQt code start ---------------------------
+static TQString fbname( const TQString &fileName ) // get file basename (sort of)
{
- QString s = fileName;
+ TQString s = fileName;
if ( !s.isEmpty() ) {
int i;
- if ( (i = s.findRev('/')) >= 0 )
+ if ( (i = s.tqfindRev('/')) >= 0 )
s = s.mid( i );
- if ( (i = s.findRev('\\')) >= 0 )
+ if ( (i = s.tqfindRev('\\')) >= 0 )
s = s.mid( i );
- QRegExp r( QString::fromLatin1("[a-zA-Z][a-zA-Z0-9_]*") );
+ TQRegExp r( TQString::tqfromLatin1("[a-zA-Z][a-zA-Z0-9_]*") );
int p = r.search( s );
if ( p == -1 )
s.truncate( 0 );
@@ -82,7 +82,7 @@ static QString fbname( const QString &fileName ) // get file basename (sort of)
s = s.mid( p, r.matchedLength() );
}
if ( s.isEmpty() )
- s = QString::fromLatin1( "dummy" );
+ s = TQString::tqfromLatin1( "dummy" );
return s;
}
@@ -94,7 +94,7 @@ static QString fbname( const QString &fileName ) // get file basename (sort of)
// Skip until ", read until the next ", return the rest in *buf
// Returns FALSE on error, TRUE on success
-static bool read_xpm_string( QCString &buf, QIODevice *d,
+static bool read_xpm_string( TQCString &buf, TQIODevice *d,
const char * const *source, int &index )
{
if ( source ) {
@@ -130,42 +130,42 @@ static bool read_xpm_string( QCString &buf, QIODevice *d,
-static int nextColorSpec(const QCString & buf)
+static int nextColorSpec(const TQCString & buf)
{
- int i = buf.find(" c ");
+ int i = buf.tqfind(" c ");
if (i < 0)
- i = buf.find(" g ");
+ i = buf.tqfind(" g ");
if (i < 0)
- i = buf.find(" g4 ");
+ i = buf.tqfind(" g4 ");
if (i < 0)
- i = buf.find(" m ");
+ i = buf.tqfind(" m ");
if (i < 0)
- i = buf.find(" s ");
+ i = buf.tqfind(" s ");
return i;
}
//
// INTERNAL
//
-// Reads an .xpm from either the QImageIO or from the QString *.
+// Reads an .xpm from either the TQImageIO or from the TQString *.
// One of the two HAS to be 0, the other one is used.
//
-static void read_xpm_image_or_array( QImageIO * iio, const char * const * source,
- QImage & image)
+static void read_xpm_image_or_array( TQImageIO * iio, const char * const * source,
+ TQImage & image)
{
- QCString buf;
- QIODevice *d = 0;
+ TQCString buf;
+ TQIODevice *d = 0;
buf.resize( 200 );
int i, cpp, ncols, w, h, index = 0;
if ( iio ) {
- iio->setStatus( 1 );
+ iio->setqStatus( 1 );
d = iio ? iio->ioDevice() : 0;
d->readLine( buf.data(), buf.size() ); // "/* XPM */"
- QRegExp r( QString::fromLatin1("/\\*.XPM.\\*/") );
- if ( buf.find(r) == -1 )
+ TQRegExp r( TQString::tqfromLatin1("/\\*.XPM.\\*/") );
+ if ( buf.tqfind(r) == -1 )
return; // bad magic
} else if ( !source ) {
return;
@@ -189,24 +189,24 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
if (image.isNull())
return;
- QMap<QString, int> colorMap;
+ TQMap<TQString, int> colorMap;
int currentColor;
for( currentColor=0; currentColor < ncols; ++currentColor ) {
if ( !read_xpm_string( buf, d, source, index ) ) {
-#if defined(QT_CHECK_RANGE)
- qWarning( "QImage: XPM color specification missing");
+#if defined(TQT_CHECK_RANGE)
+ qWarning( "TQImage: XPM color specification missing");
#endif
return;
}
- QString index;
+ TQString index;
index = buf.left( cpp );
buf = buf.mid( cpp ).simplifyWhiteSpace().lower();
buf.prepend( " " );
i = nextColorSpec(buf);
if ( i < 0 ) {
-#if defined(QT_CHECK_RANGE)
- qWarning( "QImage: XPM color specification is missing: %s", buf.data());
+#if defined(TQT_CHECK_RANGE)
+ qWarning( "TQImage: XPM color specification is missing: %s", buf.data());
#endif
return; // no c/g/g4/m/s specification at all
}
@@ -221,10 +221,10 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
int transparentColor = currentColor;
if ( image.depth() == 8 ) {
image.setColor( transparentColor,
- RGB_MASK & qRgb(198,198,198) );
+ TQRGB_MASK & tqRgb(198,198,198) );
colorMap.insert( index, transparentColor );
} else {
- QRgb rgb = RGB_MASK & qRgb(198,198,198);
+ TQRgb rgb = TQRGB_MASK & tqRgb(198,198,198);
colorMap.insert( index, rgb );
}
} else {
@@ -232,15 +232,15 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
buf.truncate (((buf.length()-1) / 4 * 3) + 1); // remove alpha channel left by imagemagick
}
#ifdef GV_XPM_CHANGES
- QColor c = ThreadGate::instance()->color( buf.data());
+ TQColor c = ThreadGate::instance()->color( buf.data());
#else
- QColor c( buf.data() );
+ TQColor c( buf.data() );
#endif
if ( image.depth() == 8 ) {
image.setColor( currentColor, 0xff000000 | c.rgb() );
colorMap.insert( index, currentColor );
} else {
- QRgb rgb = 0xff000000 | c.rgb();
+ TQRgb rgb = 0xff000000 | c.rgb();
colorMap.insert( index, rgb );
}
}
@@ -249,8 +249,8 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
// Read pixels
for( int y=0; y<h; y++ ) {
if ( !read_xpm_string( buf, d, source, index ) ) {
-#if defined(QT_CHECK_RANGE)
- qWarning( "QImage: XPM pixels missing on image line %d", y);
+#if defined(TQT_CHECK_RANGE)
+ qWarning( "TQImage: XPM pixels missing on image line %d", y);
#endif
return;
}
@@ -276,7 +276,7 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
}
}
} else {
- QRgb *p = (QRgb*)image.scanLine(y);
+ TQRgb *p = (TQRgb*)image.scanLine(y);
uchar *d = (uchar *)buf.data();
uchar *end = d + buf.length();
int x;
@@ -284,21 +284,21 @@ static void read_xpm_image_or_array( QImageIO * iio, const char * const * source
b[cpp] = '\0';
for ( x=0; x<w && d<end; x++ ) {
strncpy( b, (char *)d, cpp );
- *p++ = (QRgb)colorMap[b];
+ *p++ = (TQRgb)colorMap[b];
d += cpp;
}
}
}
if ( iio ) {
iio->setImage( image );
- iio->setStatus( 0 ); // image ok
+ iio->setqStatus( 0 ); // image ok
}
}
-static void read_xpm_image( QImageIO * iio )
+static void read_xpm_image( TQImageIO * iio )
{
- QImage i;
+ TQImage i;
(void)read_xpm_image_or_array( iio, 0, i );
return;
}
@@ -308,7 +308,7 @@ static const char* xpm_color_name( int cpp, int index )
{
static char returnable[5];
static const char code[] = ".#abcdefghijklmnopqrstuvwxyzABCD"
- "EFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ "EFGHIJKLMNOPTQRSTUVWXYZ0123456789";
// cpp is limited to 4 and index is limited to 64^cpp
if ( cpp > 1 ) {
if ( cpp > 2 ) {
@@ -337,31 +337,31 @@ static const char* xpm_color_name( int cpp, int index )
// write XPM image data
-static void write_xpm_image( QImageIO * iio )
+static void write_xpm_image( TQImageIO * iio )
{
if ( iio )
- iio->setStatus( 1 );
+ iio->setqStatus( 1 );
else
return;
// ### 8-bit case could be made faster
- QImage image;
+ TQImage image;
if ( iio->image().depth() != 32 )
image = iio->image().convertDepth( 32 );
else
image = iio->image();
- QMap<QRgb, int> colorMap;
+ TQMap<TQRgb, int> colorMap;
int w = image.width(), h = image.height(), ncolors = 0;
int x, y;
// build color table
for( y=0; y<h; y++ ) {
- QRgb * yp = (QRgb *)image.scanLine( y );
+ TQRgb * yp = (TQRgb *)image.scanLine( y );
for( x=0; x<w; x++ ) {
- QRgb color = *(yp + x);
- if ( !colorMap.contains(color) )
+ TQRgb color = *(yp + x);
+ if ( !colorMap.tqcontains(color) )
colorMap.insert( color, ncolors++ );
}
}
@@ -376,27 +376,27 @@ static void write_xpm_image( QImageIO * iio )
break;
}
- QString line;
+ TQString line;
// write header
- QTextStream s( iio->ioDevice() );
+ TQTextStream s( iio->ioDevice() );
s << "/* XPM */" << endl
<< "static char *" << fbname(iio->fileName()) << "[]={" << endl
<< "\"" << w << " " << h << " " << ncolors << " " << cpp << "\"";
// write palette
- QMap<QRgb, int>::Iterator c = colorMap.begin();
+ TQMap<TQRgb, int>::Iterator c = colorMap.begin();
while ( c != colorMap.end() ) {
- QRgb color = c.key();
- if ( image.hasAlphaBuffer() && color == (color & RGB_MASK) )
+ TQRgb color = c.key();
+ if ( image.hasAlphaBuffer() && color == (color & TQRGB_MASK) )
line.sprintf( "\"%s c None\"",
xpm_color_name(cpp, *c) );
else
line.sprintf( "\"%s c #%02x%02x%02x\"",
xpm_color_name(cpp, *c),
- qRed(color),
- qGreen(color),
- qBlue(color) );
+ tqRed(color),
+ tqGreen(color),
+ tqBlue(color) );
++c;
s << "," << endl << line;
}
@@ -404,11 +404,11 @@ static void write_xpm_image( QImageIO * iio )
// write pixels, limit to 4 characters per pixel
line.truncate( cpp*w );
for( y=0; y<h; y++ ) {
- QRgb * yp = (QRgb *) image.scanLine( y );
+ TQRgb * yp = (TQRgb *) image.scanLine( y );
int cc = 0;
for( x=0; x<w; x++ ) {
int color = (int)(*(yp + x));
- QCString chars = xpm_color_name( cpp, colorMap[color] );
+ TQCString chars = xpm_color_name( cpp, colorMap[color] );
line[cc++] = chars[0];
if ( cpp > 1 ) {
line[cc++] = chars[1];
@@ -424,15 +424,15 @@ static void write_xpm_image( QImageIO * iio )
}
s << "};" << endl;
- iio->setStatus( 0 );
+ iio->setqStatus( 0 );
}
-// Qt code end ---------------------------
+// TQt code end ---------------------------
XPM::XPM()
{
- QImageIO::inputFormats(); // trigger registration of Qt's handlers
- QImageIO::defineIOHandler( "XPM", "/\\*.XPM.\\*/", "T",
+ TQImageIO::inputFormats(); // trigger registration of TQt's handlers
+ TQImageIO::defineIOHandler( "XPM", "/\\*.XPM.\\*/", "T",
read_xpm_image, write_xpm_image );
}
diff --git a/src/gvcore/xpm.h b/src/gvcore/xpm.h
index f506ea6..bec456b 100644
--- a/src/gvcore/xpm.h
+++ b/src/gvcore/xpm.h
@@ -4,33 +4,33 @@
/****************************************************************************
**
**
-** Implementation of QImage and QImageIO classes
+** Implementation of TQImage and TQImageIO classes
**
** Created : 950207
**
** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
**
-** This file is part of the kernel module of the Qt GUI Toolkit.
+** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
-** LICENSE.QPL included in the packaging of this file.
+** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
-** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** information about TQt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact [email protected] if any conditions of this licensing are
diff --git a/src/gvdirpart/gvdirpart.cpp b/src/gvdirpart/gvdirpart.cpp
index d2bde68..d9aff69 100644
--- a/src/gvdirpart/gvdirpart.cpp
+++ b/src/gvdirpart/gvdirpart.cpp
@@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "gvdirpart.moc"
-#include <qcursor.h>
-#include <qfile.h>
-#include <qsplitter.h>
-#include <qvaluelist.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqsplitter.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -59,8 +59,8 @@ const char CONFIG_CACHE_GROUP[]="cache";
typedef KParts::GenericFactory<GVDirPart> GVDirFactory;
K_EXPORT_COMPONENT_FACTORY( libgvdirpart /*library name*/, GVDirFactory )
-GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject* parent, const char* name,
- const QStringList &) : KParts::ReadOnlyPart( parent, name ) {
+GVDirPart::GVDirPart(TQWidget* tqparentWidget, const char* /*widgetName*/, TQObject* tqparent, const char* name,
+ const TQStringList &) : KParts::ReadOnlyPart( tqparent, name ) {
GVDirFactory::instance()->iconLoader()->addAppDir( "gwenview");
setInstance( GVDirFactory::instance() );
KGlobal::locale()->insertCatalogue("gwenview");
@@ -68,8 +68,8 @@ GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject*
mBrowserExtension = new GVDirPartBrowserExtension(this);
- mSplitter = new QSplitter(Qt::Horizontal, parentWidget, "gwenview-kpart-splitter");
- mSplitter->setFocusPolicy(QWidget::ClickFocus);
+ mSplitter = new TQSplitter(Qt::Horizontal, tqparentWidget, "gwenview-kpart-splitter");
+ mSplitter->setFocusPolicy(TQ_ClickFocus);
mSplitter->setOpaqueResize(true);
// Create the widgets
@@ -80,44 +80,44 @@ GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject*
mFileViewController->resize(width, 10);
}
mImageView = new ImageView(mSplitter, mDocument, actionCollection());
- mSplitter->setResizeMode(mFileViewController, QSplitter::KeepSize);
+ mSplitter->setResizeMode(mFileViewController, TQSplitter::KeepSize);
mSlideShow = new SlideShow(mDocument);
setWidget(mSplitter);
- KStdAction::saveAs( mDocument, SLOT(saveAs()), actionCollection(), "saveAs" );
- new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, SLOT(rotateLeft()), actionCollection(), "rotate_left");
- new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, SLOT(rotateRight()), actionCollection(), "rotate_right");
+ KStdAction::saveAs( mDocument, TQT_SLOT(saveAs()), actionCollection(), "saveAs" );
+ new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, TQT_SLOT(rotateLeft()), actionCollection(), "rotate_left");
+ new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, TQT_SLOT(rotateRight()), actionCollection(), "rotate_right");
- connect(mFileViewController, SIGNAL(requestContextMenu(const QPoint&, bool)),
- mBrowserExtension, SLOT(openFileViewContextMenu(const QPoint&, bool)) );
+ connect(mFileViewController, TQT_SIGNAL(requestContextMenu(const TQPoint&, bool)),
+ mBrowserExtension, TQT_SLOT(openFileViewContextMenu(const TQPoint&, bool)) );
- connect(mFileViewController, SIGNAL(urlChanged(const KURL&)),
- mDocument, SLOT(setURL(const KURL&)) );
+ connect(mFileViewController, TQT_SIGNAL(urlChanged(const KURL&)),
+ mDocument, TQT_SLOT(setURL(const KURL&)) );
- connect(mFileViewController, SIGNAL(directoryChanged(const KURL&)),
- this, SLOT(directoryChanged(const KURL&)) );
+ connect(mFileViewController, TQT_SIGNAL(directoryChanged(const KURL&)),
+ this, TQT_SLOT(directoryChanged(const KURL&)) );
- connect(mFileViewController, SIGNAL(selectionChanged()),
- mBrowserExtension, SLOT(updateActions()) );
+ connect(mFileViewController, TQT_SIGNAL(selectionChanged()),
+ mBrowserExtension, TQT_SLOT(updateActions()) );
- connect(mImageView, SIGNAL(requestContextMenu(const QPoint&)),
- mBrowserExtension, SLOT(openImageViewContextMenu(const QPoint&)) );
+ connect(mImageView, TQT_SIGNAL(requestContextMenu(const TQPoint&)),
+ mBrowserExtension, TQT_SLOT(openImageViewContextMenu(const TQPoint&)) );
- connect(mSlideShow, SIGNAL(nextURL(const KURL&)),
- this, SLOT(slotSlideShowChanged(const KURL&)) );
+ connect(mSlideShow, TQT_SIGNAL(nextURL(const KURL&)),
+ this, TQT_SLOT(slotSlideShowChanged(const KURL&)) );
- connect(mDocument, SIGNAL(loaded(const KURL&)),
- this, SLOT(loaded(const KURL&)) );
+ connect(mDocument, TQT_SIGNAL(loaded(const KURL&)),
+ this, TQT_SLOT(loaded(const KURL&)) );
// For wheel browsing
- connect(mImageView, SIGNAL(selectPrevious()),
- mFileViewController, SLOT(slotSelectPrevious()) );
- connect(mImageView, SIGNAL(selectNext()),
- mFileViewController, SLOT(slotSelectNext()) );
+ connect(mImageView, TQT_SIGNAL(selectPrevious()),
+ mFileViewController, TQT_SLOT(slotSelectPrevious()) );
+ connect(mImageView, TQT_SIGNAL(selectNext()),
+ mFileViewController, TQT_SLOT(slotSelectNext()) );
- mToggleSlideShow = new KToggleAction(i18n("Slide Show..."), "slideshow", 0, this, SLOT(toggleSlideShow()), actionCollection(), "slideshow");
+ mToggleSlideShow = new KToggleAction(i18n("Slide Show..."), "slideshow", 0, this, TQT_SLOT(toggleSlideShow()), actionCollection(), "slideshow");
mToggleSlideShow->setCheckedState( i18n("Stop Slide Show" ));
setXMLFile( "gvdirpart/gvdirpart.rc" );
@@ -171,9 +171,9 @@ bool GVDirPart::openURL(const KURL& url) {
}
void GVDirPart::loaded(const KURL& url) {
- QString caption = url.filename();
+ TQString caption = url.filename();
if( !mDocument->image().isNull())
- caption += QString(" %1 x %2").arg(mDocument->width()).arg(mDocument->height());
+ caption += TQString(" %1 x %2").tqarg(mDocument->width()).tqarg(mDocument->height());
emit setWindowCaption(caption);
emit completed();
}
@@ -210,7 +210,7 @@ void GVDirPart::print() {
printer.setDocName( m_url.filename() );
KPrinter::addDialogPage( new PrintDialogPage( mDocument, mImageView, "GV page"));
- if (printer.setup(mImageView, QString::null, true)) {
+ if (printer.setup(mImageView, TQString(), true)) {
mDocument->print(&printer);
}
}
@@ -264,7 +264,7 @@ void GVDirPartBrowserExtension::trash() {
}
-void GVDirPartBrowserExtension::openFileViewContextMenu(const QPoint& pos, bool onItem) {
+void GVDirPartBrowserExtension::openFileViewContextMenu(const TQPoint& pos, bool onItem) {
if (onItem) {
const KFileItemList* items = mGVDirPart->fileViewController()->currentFileView()->selectedItems();
emit popupMenu(pos, *items);
@@ -274,9 +274,9 @@ void GVDirPartBrowserExtension::openFileViewContextMenu(const QPoint& pos, bool
}
-void GVDirPartBrowserExtension::openImageViewContextMenu(const QPoint& pos) {
+void GVDirPartBrowserExtension::openImageViewContextMenu(const TQPoint& pos) {
KURL url=mGVDirPart->url();
- QString mimeType=KMimeType::findByURL(url)->name();
+ TQString mimeType=KMimeType::findByURL(url)->name();
emit popupMenu(pos, url, mimeType);
}
diff --git a/src/gvdirpart/gvdirpart.h b/src/gvdirpart/gvdirpart.h
index 0cd3df7..339471f 100644
--- a/src/gvdirpart/gvdirpart.h
+++ b/src/gvdirpart/gvdirpart.h
@@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
#include <kparts/browserextension.h>
// Forward declarations
-class QPoint;
-class QSplitter;
+class TQPoint;
+class TQSplitter;
class KAboutData;
class KAction;
class KToggleAction;
@@ -44,6 +44,7 @@ class GVDirPart;
*/
class GVDirPartBrowserExtension: public KParts::BrowserExtension {
Q_OBJECT
+ TQ_OBJECT
public:
GVDirPartBrowserExtension(GVDirPart* viewPart, const char* name=0L);
@@ -58,8 +59,8 @@ public slots:
void print();
private slots:
- void openFileViewContextMenu(const QPoint&, bool onItem);
- void openImageViewContextMenu(const QPoint&);
+ void openFileViewContextMenu(const TQPoint&, bool onItem);
+ void openImageViewContextMenu(const TQPoint&);
private:
GVDirPart* mGVDirPart;
@@ -70,8 +71,9 @@ private:
*/
class GVDirPart : public KParts::ReadOnlyPart {
Q_OBJECT
+ TQ_OBJECT
public:
- GVDirPart(QWidget*, const char*, QObject*, const char*, const QStringList &);
+ GVDirPart(TQWidget*, const char*, TQObject*, const char*, const TQStringList &);
virtual ~GVDirPart();
/**
@@ -139,7 +141,7 @@ protected:
* The component's widget, contains the files view on the left
* and scroll view on the right.
*/
- QSplitter* mSplitter;
+ TQSplitter* mSplitter;
/**
* Scroll widget
diff --git a/src/gvimagepart/gvimagepart.cpp b/src/gvimagepart/gvimagepart.cpp
index 6fcceee..8f273d6 100644
--- a/src/gvimagepart/gvimagepart.cpp
+++ b/src/gvimagepart/gvimagepart.cpp
@@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "gvimagepart.moc"
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qfile.h>
-#include <qpoint.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqpoint.h>
#include <kaction.h>
#include <kapplication.h>
@@ -59,11 +59,11 @@ const char CONFIG_CACHE_GROUP[]="cache";
#endif
-static bool storeData(QWidget* parent, QFile* file, const QByteArray& data) {
+static bool storeData(TQWidget* tqparent, TQFile* file, const TQByteArray& data) {
uint sizeWritten = file->writeBlock(data);
if (sizeWritten != data.size()) {
KMessageBox::error(
- parent,
+ tqparent,
i18n("Could not save image to a temporary file"));
return false;
}
@@ -75,9 +75,9 @@ static bool storeData(QWidget* parent, QFile* file, const QByteArray& data) {
typedef KParts::GenericFactory<GVImagePart> GVImageFactory;
K_EXPORT_COMPONENT_FACTORY( libgvimagepart /*library name*/, GVImageFactory )
-GVImagePart::GVImagePart(QWidget* parentWidget, const char* /*widgetName*/, QObject* parent,
- const char* name, const QStringList &)
- : KParts::ReadOnlyPart( parent, name )
+GVImagePart::GVImagePart(TQWidget* tqparentWidget, const char* /*widgetName*/, TQObject* tqparent,
+ const char* name, const TQStringList &)
+ : KParts::ReadOnlyPart( tqparent, name )
, mPrefetch( NULL )
, mLastDirection( DirectionUnknown ) {
GVImageFactory::instance()->iconLoader()->addAppDir( "gwenview");
@@ -89,35 +89,35 @@ GVImagePart::GVImagePart(QWidget* parentWidget, const char* /*widgetName*/, QObj
// Create the widgets
mDocument = new Document(this);
- connect( mDocument, SIGNAL( loading()), SLOT( slotLoading()));
- connect( mDocument, SIGNAL( loaded(const KURL&)), SLOT( slotLoaded(const KURL&)));
- mImageView = new ImageView(parentWidget, mDocument, actionCollection());
- connect( mImageView, SIGNAL(requestContextMenu(const QPoint&)),
- this, SLOT(openContextMenu(const QPoint&)) );
+ connect( mDocument, TQT_SIGNAL( loading()), TQT_SLOT( slotLoading()));
+ connect( mDocument, TQT_SIGNAL( loaded(const KURL&)), TQT_SLOT( slotLoaded(const KURL&)));
+ mImageView = new ImageView(tqparentWidget, mDocument, actionCollection());
+ connect( mImageView, TQT_SIGNAL(requestContextMenu(const TQPoint&)),
+ this, TQT_SLOT(openContextMenu(const TQPoint&)) );
setWidget(mImageView);
mDirLister = new KDirLister;
mDirLister->setAutoErrorHandlingEnabled( false, 0 );
mDirLister->setMainWindow(KApplication::kApplication()->mainWidget());
- connect( mDirLister, SIGNAL( clear()), SLOT( dirListerClear()));
- connect( mDirLister, SIGNAL( newItems( const KFileItemList& )),
- SLOT( dirListerNewItems( const KFileItemList& )));
- connect(mDirLister,SIGNAL(deleteItem(KFileItem*)),
- SLOT(dirListerDeleteItem(KFileItem*)) );
+ connect( mDirLister, TQT_SIGNAL( clear()), TQT_SLOT( dirListerClear()));
+ connect( mDirLister, TQT_SIGNAL( newItems( const KFileItemList& )),
+ TQT_SLOT( dirListerNewItems( const KFileItemList& )));
+ connect(mDirLister,TQT_SIGNAL(deleteItem(KFileItem*)),
+ TQT_SLOT(dirListerDeleteItem(KFileItem*)) );
- QStringList mimeTypes=MimeTypeUtils::rasterImageMimeTypes();
+ TQStringList mimeTypes=MimeTypeUtils::rasterImageMimeTypes();
mDirLister->setMimeFilter(mimeTypes);
mPreviousImage=new KAction(i18n("&Previous Image"),
- QApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace,
- this,SLOT(slotSelectPrevious()), actionCollection(), "previous");
+ TQApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace,
+ this,TQT_SLOT(slotSelectPrevious()), actionCollection(), "previous");
mNextImage=new KAction(i18n("&Next Image"),
- QApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space,
- this,SLOT(slotSelectNext()), actionCollection(), "next");
+ TQApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space,
+ this,TQT_SLOT(slotSelectNext()), actionCollection(), "next");
updateNextPrevious();
- KStdAction::saveAs( this, SLOT(saveAs()), actionCollection(), "saveAs" );
- new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, SLOT(rotateLeft()), actionCollection(), "rotate_left");
- new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, SLOT(rotateRight()), actionCollection(), "rotate_right");
+ KStdAction::saveAs( this, TQT_SLOT(saveAs()), actionCollection(), "saveAs" );
+ new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, TQT_SLOT(rotateLeft()), actionCollection(), "rotate_left");
+ new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, TQT_SLOT(rotateRight()), actionCollection(), "rotate_right");
setXMLFile( "gvimagepart/gvimagepart.rc" );
}
@@ -163,9 +163,9 @@ bool GVImagePart::openURL(const KURL& url) {
return false;
}
KURL oldURLDir = m_url;
- oldURLDir.setFileName( QString::null );
+ oldURLDir.setFileName( TQString() );
KURL newURLDir = url;
- newURLDir.setFileName( QString::null );
+ newURLDir.setFileName( TQString() );
bool sameDir = oldURLDir == newURLDir;
m_url = url;
emit started( 0 );
@@ -181,7 +181,7 @@ bool GVImagePart::openURL(const KURL& url) {
return true;
}
-QString GVImagePart::filePath() {
+TQString GVImagePart::filePath() {
return m_file;
}
@@ -194,14 +194,14 @@ void GVImagePart::slotLoading() {
}
void GVImagePart::slotLoaded(const KURL& url) {
- QString caption = url.filename() + QString(" - %1x%2").arg(mDocument->width()).arg(mDocument->height());
+ TQString caption = url.filename() + TQString(" - %1x%2").tqarg(mDocument->width()).tqarg(mDocument->height());
emit setWindowCaption(caption);
emit completed();
emit setStatusBarText(i18n("Done."));
prefetchDone();
mPrefetch = ImageLoader::loader( mLastDirection == DirectionPrevious ? previousURL() : nextURL(),
this, BUSY_PRELOADING );
- connect( mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone()));
+ connect( mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone()));
}
void GVImagePart::prefetchDone() {
@@ -217,7 +217,7 @@ void GVImagePart::print() {
printer.setDocName( m_url.filename() );
KPrinter::addDialogPage( new PrintDialogPage( mDocument, mImageView, "GV page"));
- if (printer.setup(mImageView, QString::null, true)) {
+ if (printer.setup(mImageView, TQString(), true)) {
mDocument->print(&printer);
}
}
@@ -236,7 +236,7 @@ void GVImagePart::dirListerClear() {
}
void GVImagePart::dirListerNewItems( const KFileItemList& list ) {
- QPtrListIterator<KFileItem> it(list);
+ TQPtrListIterator<KFileItem> it(list);
for( ; it.current(); ++it ) {
mImagesInDirectory.append( (*it)->name());
}
@@ -250,7 +250,7 @@ void GVImagePart::dirListerDeleteItem( KFileItem* item ) {
}
void GVImagePart::updateNextPrevious() {
- QStringList::ConstIterator current = mImagesInDirectory.find( mDocument->filename());
+ TQStringList::ConstIterator current = mImagesInDirectory.tqfind( mDocument->filename());
if( current == mImagesInDirectory.end()) {
mNextImage->setEnabled( false );
mPreviousImage->setEnabled( false );
@@ -262,7 +262,7 @@ void GVImagePart::updateNextPrevious() {
}
KURL GVImagePart::nextURL() const {
- QStringList::ConstIterator current = mImagesInDirectory.find( mDocument->filename());
+ TQStringList::ConstIterator current = mImagesInDirectory.tqfind( mDocument->filename());
if( current == mImagesInDirectory.end()) {
return KURL();
}
@@ -286,7 +286,7 @@ void GVImagePart::slotSelectNext() {
}
KURL GVImagePart::previousURL() const {
- QStringList::ConstIterator current = mImagesInDirectory.find( mDocument->filename());
+ TQStringList::ConstIterator current = mImagesInDirectory.tqfind( mDocument->filename());
if( current == mImagesInDirectory.end() || current == mImagesInDirectory.begin()) {
return KURL();
}
@@ -340,30 +340,30 @@ void GVImagePart::saveOriginalAs() {
KURL srcURL = mDocument->url();
KURL dstURL = KFileDialog::getSaveURL(
srcURL.fileName(),
- QString::null,
+ TQString(),
widget());
if (!dstURL.isValid()) return;
// Try to get data from the cache to avoid downloading the image again.
- QByteArray data = Cache::instance()->file(srcURL);
+ TQByteArray data = Cache::instance()->file(srcURL);
if (data.size() == 0) {
// We need to read the image again. Let KIO::copy do the work.
KIO::Job* job = KIO::copy(srcURL, dstURL);
job->setWindow(widget());
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(showJobError(KIO::Job*)) );
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(showJobError(KIO::Job*)) );
return;
}
if (dstURL.isLocalFile()) {
// Destination is a local file, store it ourself
- QString path = dstURL.path();
- QFile file(path);
+ TQString path = dstURL.path();
+ TQFile file(path);
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(
widget(),
- i18n("Could not open '%1' for writing.").arg(path));
+ i18n("Could not open '%1' for writing.").tqarg(path));
return;
}
storeData(widget(), &file, data);
@@ -375,7 +375,7 @@ void GVImagePart::saveOriginalAs() {
}
-DataUploader::DataUploader(QWidget* dialogParent, const QByteArray& data, const KURL& dstURL)
+DataUploader::DataUploader(TQWidget* dialogParent, const TQByteArray& data, const KURL& dstURL)
: mDialogParent(dialogParent)
{
mTempFile.setAutoDelete(true);
@@ -388,8 +388,8 @@ DataUploader::DataUploader(QWidget* dialogParent, const QByteArray& data, const
tmpURL.setPath(mTempFile.name());
KIO::Job* job = KIO::copy(tmpURL, dstURL);
job->setWindow(dialogParent);
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotJobFinished(KIO::Job*)) );
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotJobFinished(KIO::Job*)) );
}
@@ -407,18 +407,18 @@ void DataUploader::slotJobFinished(KIO::Job* job) {
*/
class PopupGUIClient : public KXMLGUIClient {
public:
- PopupGUIClient( KInstance *inst, const QString &doc ) {
+ PopupGUIClient( KInstance *inst, const TQString &doc ) {
setInstance( inst );
setXML( doc );
}
};
-void GVImagePart::openContextMenu(const QPoint& pos) {
- QString doc = KXMLGUIFactory::readConfigFile( "gvimagepartpopup.rc", true, instance() );
+void GVImagePart::openContextMenu(const TQPoint& pos) {
+ TQString doc = KXMLGUIFactory::readConfigFile( "gvimagepartpopup.rc", true, instance() );
PopupGUIClient guiClient(instance(), doc);
- KStdAction::saveAs( this, SLOT(saveAs()), guiClient.actionCollection(), "saveAs" );
+ KStdAction::saveAs( this, TQT_SLOT(saveAs()), guiClient.actionCollection(), "saveAs" );
KParts::URLArgs urlArgs;
urlArgs.serviceType = mDocument->mimeType();
diff --git a/src/gvimagepart/gvimagepart.h b/src/gvimagepart/gvimagepart.h
index 3930e2c..7ba2be2 100644
--- a/src/gvimagepart/gvimagepart.h
+++ b/src/gvimagepart/gvimagepart.h
@@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
#include <ktempfile.h>
// Forward declarations
-class QFile;
-class QPoint;
+class TQFile;
+class TQPoint;
class KAboutData;
class KAction;
@@ -45,6 +45,7 @@ class GVImagePart;
*/
class GVImagePartBrowserExtension: public KParts::BrowserExtension {
Q_OBJECT
+ TQ_OBJECT
public:
GVImagePartBrowserExtension(GVImagePart* viewPart, const char* name=0L);
@@ -63,8 +64,9 @@ private:
*/
class GVImagePart : public KParts::ReadOnlyPart {
Q_OBJECT
+ TQ_OBJECT
public:
- GVImagePart(QWidget*, const char*, QObject*, const char*, const QStringList &);
+ GVImagePart(TQWidget*, const char*, TQObject*, const char*, const TQStringList &);
virtual ~GVImagePart();
/**
@@ -75,7 +77,7 @@ public:
/**
* Returns m_file
*/
- QString filePath();
+ TQString filePath();
/**
* Print the image being viewed
@@ -118,7 +120,7 @@ private slots:
void slotLoading();
void slotLoaded(const KURL& url);
- void openContextMenu(const QPoint&);
+ void openContextMenu(const TQPoint&);
void saveAs();
@@ -153,7 +155,7 @@ private:
KAction* mNextImage;
KAction* mPreviousImage;
// alphabetically sorted filenames of images in the picture's directory
- QStringList mImagesInDirectory;
+ TQStringList mImagesInDirectory;
ImageLoader* mPrefetch;
enum LastDirection { DirectionUnknown, DirectionNext, DirectionPrevious };
@@ -164,17 +166,18 @@ private:
/**
* This simple helper class uploads data to a remote URL asynchronously
*/
-class DataUploader : public QObject {
+class DataUploader : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- DataUploader(QWidget* dialogParent, const QByteArray& data, const KURL& destURL);
+ DataUploader(TQWidget* dialogParent, const TQByteArray& data, const KURL& destURL);
private slots:
void slotJobFinished(KIO::Job*);
private:
KTempFile mTempFile;
- QWidget* mDialogParent;
+ TQWidget* mDialogParent;
};
} // namespace
diff --git a/src/imageutils/croppedqimage.cpp b/src/imageutils/croppedqimage.cpp
index 0271e85..7f47366 100644
--- a/src/imageutils/croppedqimage.cpp
+++ b/src/imageutils/croppedqimage.cpp
@@ -23,43 +23,43 @@
namespace ImageUtils
{
-// This class is used in ImageView::performPaint(). Just using QImage::copy( QRect )
+// This class is used in ImageView::performPaint(). Just using TQImage::copy( TQRect )
// takes a significant time with very large images. So instead of copying the image data
-// just create CroppedQImage which fakes a subimage by manipulating its scanline pointers.
+// just create CroppedTQImage which fakes a subimage by manipulating its scanline pointers.
// That will of course break if something doesn't use scanlines but accesses the image
-// data directly, QImage::copy() being the most notable case. There are two ways
+// data directly, TQImage::copy() being the most notable case. There are two ways
// to handle that: 1) It is possible to manually call normalize() which will make
-// CroppedQImage copy the image data and own it, just like proper QImage. 2) CroppedQImage
-// has as a data member also QImage holding the original image. This ensures that all
-// the original image data are still available for the whole lifetime of CroppedQImage.
+// CroppedTQImage copy the image data and own it, just like proper TQImage. 2) CroppedTQImage
+// has as a data member also TQImage holding the original image. This ensures that all
+// the original image data are still available for the whole lifetime of CroppedTQImage.
-CroppedQImage::CroppedQImage( const QImage& im, const QRect& rect )
- : QImage( rect.size(), im.depth(), im.numColors(), im.bitOrder())
+CroppedTQImage::CroppedTQImage( const TQImage& im, const TQRect& rect )
+ : TQImage( rect.size(), im.depth(), im.numColors(), im.bitOrder())
, orig( im )
{
if( im.isNull())
return;
- memcpy( colorTable(), im.colorTable(), im.numColors() * sizeof( QRgb ));
+ memcpy( tqcolorTable(), im.tqcolorTable(), im.numColors() * sizeof( TQRgb ));
setAlphaBuffer( im.hasAlphaBuffer());
setDotsPerMeterX( im.dotsPerMeterX());
setDotsPerMeterY( im.dotsPerMeterY());
//data->offset = im.offset();
- // make scanlines point to right places in the original QImage
+ // make scanlines point to right places in the original TQImage
for( int i = 0;
i < height();
++i )
- jumpTable()[ i ] = im.scanLine( rect.y() + i ) + rect.x() * ( depth() / 8 );
+ const_cast<CroppedTQImage*>(this)->jumpTable()[ i ] = const_cast<TQImage&>(im).scanLine( rect.y() + i ) + rect.x() * ( depth() / 8 );
}
-CroppedQImage& CroppedQImage::operator= ( const QImage& im )
+CroppedTQImage& CroppedTQImage::operator= ( const TQImage& im )
{
- QImage::operator=( im );
+ TQImage::operator=( im );
return *this;
}
-void CroppedQImage::normalize()
+void CroppedTQImage::normalize()
{
- // is it a normal QImage with its own data?
+ // is it a normal TQImage with its own data?
uchar* firstdata = ( uchar* )( jumpTable() + height());
if( scanLine( 0 ) == firstdata )
return;
diff --git a/src/imageutils/croppedqimage.h b/src/imageutils/croppedqimage.h
index c8c2ac3..f13334f 100644
--- a/src/imageutils/croppedqimage.h
+++ b/src/imageutils/croppedqimage.h
@@ -18,23 +18,23 @@
*/
-#ifndef CROPPED_QIMAGE_H
-#define CROPPED_QIMAGE_H
+#ifndef CROPPED_TQIMAGE_H
+#define CROPPED_TQIMAGE_H
-#include <qimage.h>
+#include <tqimage.h>
namespace ImageUtils
{
-class CroppedQImage
- : public QImage
+class CroppedTQImage
+ : public TQImage
{
public:
- CroppedQImage( const QImage& im, const QRect& rect );
- CroppedQImage& operator= ( const QImage& im );
+ CroppedTQImage( const TQImage& im, const TQRect& rect );
+ CroppedTQImage& operator= ( const TQImage& im );
void normalize();
private:
- QImage orig;
+ TQImage orig;
};
} // namespace
diff --git a/src/imageutils/imageutils.cpp b/src/imageutils/imageutils.cpp
index 0dce222..2ec1209 100644
--- a/src/imageutils/imageutils.cpp
+++ b/src/imageutils/imageutils.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -20,9 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <math.h>
-// Qt
-#include <qimage.h>
-#include <qwmatrix.h>
+// TQt
+#include <tqimage.h>
+#include <tqwmatrix.h>
// KDE
#include <kdebug.h>
@@ -35,8 +35,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace ImageUtils {
-QWMatrix transformMatrix(Orientation orientation) {
- QWMatrix matrix;
+TQWMatrix transformMatrix(Orientation orientation) {
+ TQWMatrix matrix;
switch (orientation) {
case NOT_AVAILABLE:
case NORMAL:
@@ -77,7 +77,7 @@ QWMatrix transformMatrix(Orientation orientation) {
}
-QImage transform(const QImage& img, Orientation orientation) {
+TQImage transform(const TQImage& img, Orientation orientation) {
if (orientation != NOT_AVAILABLE && orientation != NORMAL) {
return img.xForm(transformMatrix(orientation));
} else {
@@ -123,9 +123,9 @@ int changeUsingTable( int value, const int table[] )
template< int operation( int, int ) >
static
-QImage changeImage( const QImage& image, int value )
+TQImage changeImage( const TQImage& image, int value )
{
- QImage im = image;
+ TQImage im = image;
im.detach();
if( im.numColors() == 0 ) /* truecolor */
{
@@ -142,14 +142,14 @@ QImage changeImage( const QImage& image, int value )
y < im.height();
++y )
{
- QRgb* line = reinterpret_cast< QRgb* >( im.scanLine( y ));
+ TQRgb* line = reinterpret_cast< TQRgb* >( im.scanLine( y ));
for( int x = 0;
x < im.width();
++x )
- line[ x ] = qRgba( changeUsingTable( qRed( line[ x ] ), table ),
- changeUsingTable( qGreen( line[ x ] ), table ),
- changeUsingTable( qBlue( line[ x ] ), table ),
- changeUsingTable( qAlpha( line[ x ] ), table ));
+ line[ x ] = tqRgba( changeUsingTable( tqRed( line[ x ] ), table ),
+ changeUsingTable( tqGreen( line[ x ] ), table ),
+ changeUsingTable( tqBlue( line[ x ] ), table ),
+ changeUsingTable( tqAlpha( line[ x ] ), table ));
}
}
else
@@ -158,32 +158,32 @@ QImage changeImage( const QImage& image, int value )
y < im.height();
++y )
{
- QRgb* line = reinterpret_cast< QRgb* >( im.scanLine( y ));
+ TQRgb* line = reinterpret_cast< TQRgb* >( im.scanLine( y ));
for( int x = 0;
x < im.width();
++x )
- line[ x ] = qRgb( changeUsingTable( qRed( line[ x ] ), table ),
- changeUsingTable( qGreen( line[ x ] ), table ),
- changeUsingTable( qBlue( line[ x ] ), table ));
+ line[ x ] = tqRgb( changeUsingTable( tqRed( line[ x ] ), table ),
+ changeUsingTable( tqGreen( line[ x ] ), table ),
+ changeUsingTable( tqBlue( line[ x ] ), table ));
}
}
}
else
{
- QRgb* colors = im.colorTable();
+ TQRgb* colors = im.tqcolorTable();
for( int i = 0;
i < im.numColors();
++i )
- colors[ i ] = qRgb( operation( qRed( colors[ i ] ), value ),
- operation( qGreen( colors[ i ] ), value ),
- operation( qBlue( colors[ i ] ), value ));
+ colors[ i ] = tqRgb( operation( tqRed( colors[ i ] ), value ),
+ operation( tqGreen( colors[ i ] ), value ),
+ operation( tqBlue( colors[ i ] ), value ));
}
return im;
}
// brightness is multiplied by 100 in order to avoid floating point numbers
-QImage changeBrightness( const QImage& image, int brightness )
+TQImage changeBrightness( const TQImage& image, int brightness )
{
if( brightness == 0 ) // no change
return image;
@@ -192,7 +192,7 @@ QImage changeBrightness( const QImage& image, int brightness )
// contrast is multiplied by 100 in order to avoid floating point numbers
-QImage changeContrast( const QImage& image, int contrast )
+TQImage changeContrast( const TQImage& image, int contrast )
{
if( contrast == 100 ) // no change
return image;
@@ -200,7 +200,7 @@ QImage changeContrast( const QImage& image, int contrast )
}
// gamma is multiplied by 100 in order to avoid floating point numbers
-QImage changeGamma( const QImage& image, int gamma )
+TQImage changeGamma( const TQImage& image, int gamma )
{
if( gamma == 100 ) // no change
return image;
diff --git a/src/imageutils/imageutils.h b/src/imageutils/imageutils.h
index f234a07..b661eda 100644
--- a/src/imageutils/imageutils.h
+++ b/src/imageutils/imageutils.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,8 +21,8 @@ Copyright 2000-2004 Aur�lien G�teau
#ifndef IMAGEUTILS_H
#define IMAGEUTILS_H
-// Qt
-#include <qimage.h>
+// TQt
+#include <tqimage.h>
// Local
#include "imageutils/orientation.h"
@@ -30,20 +30,20 @@ Copyright 2000-2004 Aur�lien G�teau
namespace ImageUtils {
enum SmoothAlgorithm { SMOOTH_NONE, SMOOTH_FAST, SMOOTH_NORMAL, SMOOTH_BEST };
- QImage scale(const QImage& image, int width, int height,
- SmoothAlgorithm alg, QImage::ScaleMode mode = QImage::ScaleFree, double blur = 1.0);
+ TQImage scale(const TQImage& image, int width, int height,
+ SmoothAlgorithm alg, TQ_ScaleMode mode = TQ_ScaleFree, double blur = 1.0);
int extraScalePixels( SmoothAlgorithm alg, double zoom, double blur = 1.0 );
- QImage transform(const QImage& img, Orientation orientation);
+ TQImage transform(const TQImage& img, Orientation orientation);
- QImage changeBrightness( const QImage& image, int brightness );
+ TQImage changeBrightness( const TQImage& image, int brightness );
- QImage changeContrast( const QImage& image, int contrast );
+ TQImage changeContrast( const TQImage& image, int contrast );
- QImage changeGamma( const QImage& image, int gamma );
+ TQImage changeGamma( const TQImage& image, int gamma );
- QWMatrix transformMatrix(Orientation orientation);
+ TQWMatrix transformMatrix(Orientation orientation);
}
#endif
diff --git a/src/imageutils/jpegcontent.cpp b/src/imageutils/jpegcontent.cpp
index d23d74f..5bcb7ef 100644
--- a/src/imageutils/jpegcontent.cpp
+++ b/src/imageutils/jpegcontent.cpp
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -28,12 +28,12 @@ extern "C" {
#include "transupp.h"
}
-// Qt
-#include <qbuffer.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qmap.h>
-#include <qwmatrix.h>
+// TQt
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqwmatrix.h>
// KDE
#include <kdebug.h>
@@ -69,7 +69,7 @@ const int INMEM_DST_DELTA=4096;
//
//------------------------------------------
struct inmem_src_mgr : public jpeg_source_mgr {
- QByteArray* mInput;
+ TQByteArray* mInput;
};
void inmem_init_source(j_decompress_ptr cinfo) {
@@ -107,7 +107,7 @@ void inmem_term_source(j_decompress_ptr /*cinfo*/) {
//
//-----------------------------------------------
struct inmem_dest_mgr : public jpeg_destination_mgr {
- QByteArray* mOutput;
+ TQByteArray* mOutput;
void dump() {
kdDebug() << "dest_mgr:\n";
@@ -120,7 +120,7 @@ struct inmem_dest_mgr : public jpeg_destination_mgr {
void inmem_init_destination(j_compress_ptr cinfo) {
inmem_dest_mgr* dest=(inmem_dest_mgr*)(cinfo->dest);
if (dest->mOutput->size()==0) {
- bool result=dest->mOutput->resize(INMEM_DST_DELTA);
+ bool result=dest->mOutput->tqresize(INMEM_DST_DELTA);
Q_ASSERT(result);
}
dest->free_in_buffer=dest->mOutput->size();
@@ -129,7 +129,7 @@ void inmem_init_destination(j_compress_ptr cinfo) {
int inmem_empty_output_buffer(j_compress_ptr cinfo) {
inmem_dest_mgr* dest=(inmem_dest_mgr*)(cinfo->dest);
- bool result=dest->mOutput->resize(dest->mOutput->size() + INMEM_DST_DELTA);
+ bool result=dest->mOutput->tqresize(dest->mOutput->size() + INMEM_DST_DELTA);
Q_ASSERT(result);
dest->next_output_byte=(JOCTET*)( dest->mOutput->data() + dest->mOutput->size() - INMEM_DST_DELTA );
dest->free_in_buffer=INMEM_DST_DELTA;
@@ -141,7 +141,7 @@ void inmem_term_destination(j_compress_ptr cinfo) {
inmem_dest_mgr* dest=(inmem_dest_mgr*)(cinfo->dest);
int finalSize=dest->next_output_byte - (JOCTET*)(dest->mOutput->data());
Q_ASSERT(finalSize>=0);
- dest->mOutput->resize(finalSize);
+ dest->mOutput->tqresize(finalSize);
}
@@ -151,16 +151,16 @@ void inmem_term_destination(j_compress_ptr cinfo) {
//
//---------------------
struct JPEGContent::Private {
- QByteArray mRawData;
- QSize mSize;
- QString mComment;
- QString mAperture;
- QString mExposureTime;
- QString mFocalLength;
- QString mIso;
+ TQByteArray mRawData;
+ TQSize mSize;
+ TQString mComment;
+ TQString mAperture;
+ TQString mExposureTime;
+ TQString mFocalLength;
+ TQString mIso;
bool mPendingTransformation;
- QWMatrix mTransformMatrix;
+ TQWMatrix mTransformMatrix;
Exiv2::ExifData mExifData;
Private() {
@@ -184,7 +184,7 @@ struct JPEGContent::Private {
}
- void setupInmemDestination(j_compress_ptr cinfo, QByteArray* outputData) {
+ void setupInmemDestination(j_compress_ptr cinfo, TQByteArray* outputData) {
Q_ASSERT(!cinfo->dest);
inmem_dest_mgr* dest = (inmem_dest_mgr*)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
@@ -223,7 +223,7 @@ struct JPEGContent::Private {
jpeg_destroy_decompress(&srcinfo);
return false;
}
- mSize=QSize(srcinfo.image_width, srcinfo.image_height);
+ mSize=TQSize(srcinfo.image_width, srcinfo.image_height);
jpeg_destroy_decompress(&srcinfo);
return true;
@@ -246,8 +246,8 @@ JPEGContent::~JPEGContent() {
}
-bool JPEGContent::load(const QString& path) {
- QFile file(path);
+bool JPEGContent::load(const TQString& path) {
+ TQFile file(path);
if (!file.open(IO_ReadOnly)) {
kdError() << "Could not open '" << path << "' for reading\n";
return false;
@@ -256,7 +256,7 @@ bool JPEGContent::load(const QString& path) {
}
-bool JPEGContent::loadFromData(const QByteArray& data) {
+bool JPEGContent::loadFromData(const TQByteArray& data) {
d->mPendingTransformation = false;
d->mTransformMatrix.reset();
@@ -278,7 +278,7 @@ bool JPEGContent::loadFromData(const QByteArray& data) {
}
d->mExifData = image->exifData();
- d->mComment = QString::fromUtf8( image->comment().c_str() );
+ d->mComment = TQString::fromUtf8( image->comment().c_str() );
d->mAperture=aperture();
d->mExposureTime=exposureTime();
@@ -321,14 +321,14 @@ int JPEGContent::dotsPerMeterY() const {
}
-int JPEGContent::dotsPerMeter(const QString& keyName) const {
+int JPEGContent::dotsPerMeter(const TQString& keyName) const {
Exiv2::ExifKey keyResUnit("Exif.Image.ResolutionUnit");
Exiv2::ExifData::iterator it = d->mExifData.findKey(keyResUnit);
if (it == d->mExifData.end()) {
return 0;
}
int res = it->toLong();
- QString keyVal = "Exif.Image." + keyName;
+ TQString keyVal = "Exif.Image." + keyName;
Exiv2::ExifKey keyResolution(keyVal.ascii());
it = d->mExifData.findKey(keyResolution);
if (it == d->mExifData.end()) {
@@ -368,17 +368,17 @@ void JPEGContent::resetOrientation() {
}
-QSize JPEGContent::size() const {
+TQSize JPEGContent::size() const {
return d->mSize;
}
-QString JPEGContent::comment() const {
+TQString JPEGContent::comment() const {
return d->mComment;
}
-QString JPEGContent::getExifInformation(const QString exifkey) const {
- QString ret;
+TQString JPEGContent::getExifInformation(const TQString exifkey) const {
+ TQString ret;
Exiv2::ExifKey key(exifkey.latin1());
Exiv2::ExifData::iterator it = d->mExifData.findKey(key);
@@ -386,7 +386,7 @@ QString JPEGContent::getExifInformation(const QString exifkey) const {
if (it != d->mExifData.end()) {
std::ostringstream outputString;
outputString << *it;
- ret=QString(outputString.str().c_str());
+ ret=TQString(outputString.str().c_str());
}
else {
ret="n/a";
@@ -394,39 +394,39 @@ QString JPEGContent::getExifInformation(const QString exifkey) const {
return ret;
}
-QString JPEGContent::aperture() const {
+TQString JPEGContent::aperture() const {
d->mAperture=getExifInformation("Exif.Photo.FNumber");
return d->mAperture;
}
-QString JPEGContent::exposureTime() const {
+TQString JPEGContent::exposureTime() const {
d->mExposureTime=getExifInformation("Exif.Photo.ExposureTime");
return d->mExposureTime;
}
-QString JPEGContent::iso() const {
+TQString JPEGContent::iso() const {
d->mIso=getExifInformation("Exif.Photo.ISOSpeedRatings");
return d->mIso;
}
-QString JPEGContent::focalLength() const {
+TQString JPEGContent::focalLength() const {
d->mFocalLength=getExifInformation("Exif.Photo.FocalLength");
return d->mFocalLength;
}
-void JPEGContent::setComment(const QString& comment) {
+void JPEGContent::setComment(const TQString& comment) {
d->mComment = comment;
}
-static QWMatrix createRotMatrix(int angle) {
- QWMatrix matrix;
+static TQWMatrix createRotMatrix(int angle) {
+ TQWMatrix matrix;
matrix.rotate(angle);
return matrix;
}
-static QWMatrix createScaleMatrix(int dx, int dy) {
- QWMatrix matrix;
+static TQWMatrix createScaleMatrix(int dx, int dy) {
+ TQWMatrix matrix;
matrix.scale(dx, dy);
return matrix;
}
@@ -435,25 +435,25 @@ static QWMatrix createScaleMatrix(int dx, int dy) {
struct OrientationInfo {
OrientationInfo() {}
- OrientationInfo(Orientation o, QWMatrix m, JXFORM_CODE j)
+ OrientationInfo(Orientation o, TQWMatrix m, JXFORM_CODE j)
: orientation(o), matrix(m), jxform(j) {}
Orientation orientation;
- QWMatrix matrix;
+ TQWMatrix matrix;
JXFORM_CODE jxform;
};
-typedef QValueList<OrientationInfo> OrientationInfoList;
+typedef TQValueList<OrientationInfo> OrientationInfoList;
static const OrientationInfoList& orientationInfoList() {
static OrientationInfoList list;
if (list.size() == 0) {
- QWMatrix rot90 = createRotMatrix(90);
- QWMatrix hflip = createScaleMatrix(-1, 1);
- QWMatrix vflip = createScaleMatrix(1, -1);
+ TQWMatrix rot90 = createRotMatrix(90);
+ TQWMatrix hflip = createScaleMatrix(-1, 1);
+ TQWMatrix vflip = createScaleMatrix(1, -1);
list
- << OrientationInfo(NOT_AVAILABLE, QWMatrix(), JXFORM_NONE)
- << OrientationInfo(NORMAL, QWMatrix(), JXFORM_NONE)
+ << OrientationInfo(NOT_AVAILABLE, TQWMatrix(), JXFORM_NONE)
+ << OrientationInfo(NORMAL, TQWMatrix(), JXFORM_NONE)
<< OrientationInfo(HFLIP, hflip, JXFORM_FLIP_H)
<< OrientationInfo(ROT_180, createRotMatrix(180), JXFORM_ROT_180)
<< OrientationInfo(VFLIP, vflip, JXFORM_FLIP_V)
@@ -485,7 +485,7 @@ void JPEGContent::transform(Orientation orientation) {
#if 0
-static void dumpMatrix(const QWMatrix& matrix) {
+static void dumpMatrix(const TQWMatrix& matrix) {
kdDebug() << "matrix | " << matrix.m11() << ", " << matrix.m12() << " |\n";
kdDebug() << " | " << matrix.m21() << ", " << matrix.m22() << " |\n";
kdDebug() << " ( " << matrix.dx() << ", " << matrix.dy() << " )\n";
@@ -493,7 +493,7 @@ static void dumpMatrix(const QWMatrix& matrix) {
#endif
-static bool matricesAreSame(const QWMatrix& m1, const QWMatrix& m2, double tolerance) {
+static bool matricesAreSame(const TQWMatrix& m1, const TQWMatrix& m2, double tolerance) {
return fabs( m1.m11() - m2.m11() ) < tolerance
&& fabs( m1.m12() - m2.m12() ) < tolerance
&& fabs( m1.m21() - m2.m21() ) < tolerance
@@ -503,7 +503,7 @@ static bool matricesAreSame(const QWMatrix& m1, const QWMatrix& m2, double toler
}
-static JXFORM_CODE findJxform(const QWMatrix& matrix) {
+static JXFORM_CODE findJxform(const TQWMatrix& matrix) {
OrientationInfoList::ConstIterator it(orientationInfoList().begin()), end(orientationInfoList().end());
for (; it!=end; ++it) {
if ( matricesAreSame( (*it).matrix, matrix, 0.001) ) {
@@ -576,7 +576,7 @@ void JPEGContent::applyPendingTransformation() {
&transformoption);
/* Specify data destination for compression */
- QByteArray output;
+ TQByteArray output;
output.resize(d->mRawData.size());
d->setupInmemDestination(&dstinfo, &output);
@@ -602,8 +602,8 @@ void JPEGContent::applyPendingTransformation() {
}
-QImage JPEGContent::thumbnail() const {
- QImage image;
+TQImage JPEGContent::thumbnail() const {
+ TQImage image;
if (!d->mExifData.empty()) {
#if (EXIV2_TEST_VERSION(0,17,91))
Exiv2::ExifThumbC thumb(d->mExifData);
@@ -617,15 +617,15 @@ QImage JPEGContent::thumbnail() const {
}
-void JPEGContent::setThumbnail(const QImage& thumbnail) {
+void JPEGContent::setThumbnail(const TQImage& thumbnail) {
if (d->mExifData.empty()) {
return;
}
- QByteArray array;
- QBuffer buffer(array);
+ TQByteArray array;
+ TQBuffer buffer(array);
buffer.open(IO_WriteOnly);
- QImageIO iio(&buffer, "JPEG");
+ TQImageIO iio(&buffer, "JPEG");
iio.setImage(thumbnail);
if (!iio.write()) {
kdError() << "Could not write thumbnail\n";
@@ -641,8 +641,8 @@ void JPEGContent::setThumbnail(const QImage& thumbnail) {
}
-bool JPEGContent::save(const QString& path) {
- QFile file(path);
+bool JPEGContent::save(const TQString& path) {
+ TQFile file(path);
if (!file.open(IO_WriteOnly)) {
kdError() << "Could not open '" << path << "' for writing\n";
return false;
@@ -652,7 +652,7 @@ bool JPEGContent::save(const QString& path) {
}
-bool JPEGContent::save(QFile* file) {
+bool JPEGContent::save(TQFile* file) {
if (d->mRawData.size()==0) {
kdError() << "No data to store in '" << file->name() << "'\n";
return false;
@@ -675,7 +675,7 @@ bool JPEGContent::save(QFile* file) {
d->mRawData.resize(io.size());
io.read((unsigned char*)d->mRawData.data(), io.size());
- QDataStream stream(file);
+ TQDataStream stream(file);
stream.writeRawBytes(d->mRawData.data(), d->mRawData.size());
// Make sure we are up to date
diff --git a/src/imageutils/jpegcontent.h b/src/imageutils/jpegcontent.h
index 7aa03fc..dddc28d 100644
--- a/src/imageutils/jpegcontent.h
+++ b/src/imageutils/jpegcontent.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -21,17 +21,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef JPEGCONTENT_H
#define JPEGCONTENT_H
-// Qt
-#include <qcstring.h>
+// TQt
+#include <tqcstring.h>
// Local
#include <imageutils/orientation.h>
#include "../gvcore/libgwenview_export.h"
-class QImage;
-class QString;
-class QFile;
+class TQImage;
+class TQString;
+class TQFile;
namespace ImageUtils {
@@ -47,27 +47,27 @@ public:
int dotsPerMeterX() const;
int dotsPerMeterY() const;
- QSize size() const;
+ TQSize size() const;
- QString comment() const;
- void setComment(const QString&);
+ TQString comment() const;
+ void setComment(const TQString&);
- QString aperture() const;
- QString exposureTime() const;
- QString iso() const;
- QString focalLength() const;
+ TQString aperture() const;
+ TQString exposureTime() const;
+ TQString iso() const;
+ TQString focalLength() const;
- QString getExifInformation(const QString exifkey) const;
+ TQString getExifInformation(const TQString exifkey) const;
void transform(Orientation);
- QImage thumbnail() const;
- void setThumbnail(const QImage&);
+ TQImage thumbnail() const;
+ void setThumbnail(const TQImage&);
- bool load(const QString& file);
- bool loadFromData(const QByteArray& rawData);
- bool save(const QString& file);
- bool save(QFile*);
+ bool load(const TQString& file);
+ bool loadFromData(const TQByteArray& rawData);
+ bool save(const TQString& file);
+ bool save(TQFile*);
private:
struct Private;
@@ -76,7 +76,7 @@ private:
JPEGContent(const JPEGContent&);
void operator=(const JPEGContent&);
void applyPendingTransformation();
- int dotsPerMeter(const QString& keyName) const;
+ int dotsPerMeter(const TQString& keyName) const;
};
diff --git a/src/imageutils/jpegint.h b/src/imageutils/jpegint.h
index 95b00d4..9d00c59 100644
--- a/src/imageutils/jpegint.h
+++ b/src/imageutils/jpegint.h
@@ -43,9 +43,9 @@ typedef enum { /* Operating modes for buffer controllers */
/* Master control module */
struct jpeg_comp_master {
- JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
- JMETHOD(void, pass_startup, (j_compress_ptr cinfo));
- JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, prepare_for_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, pass_startup, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo));
/* State variables made visible to other modules */
boolean call_pass_startup; /* True if pass_startup must be called */
@@ -54,16 +54,16 @@ struct jpeg_comp_master {
/* Main buffer control (downsampled-data buffer) */
struct jpeg_c_main_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, process_data, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+ JTQT_METHOD(void, process_data, (j_compress_ptr cinfo,
JSAMPARRAY input_buf, JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail));
};
/* Compression preprocessing (downsampling input buffer control) */
struct jpeg_c_prep_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, pre_process_data, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+ JTQT_METHOD(void, pre_process_data, (j_compress_ptr cinfo,
JSAMPARRAY input_buf,
JDIMENSION *in_row_ctr,
JDIMENSION in_rows_avail,
@@ -74,23 +74,23 @@ struct jpeg_c_prep_controller {
/* Coefficient buffer control */
struct jpeg_c_coef_controller {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(boolean, compress_data, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode));
+ JTQT_METHOD(boolean, compress_data, (j_compress_ptr cinfo,
JSAMPIMAGE input_buf));
};
/* Colorspace conversion */
struct jpeg_color_converter {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
- JMETHOD(void, color_convert, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, color_convert, (j_compress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows));
};
/* Downsampling */
struct jpeg_downsampler {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
- JMETHOD(void, downsample, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, downsample, (j_compress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION in_row_index,
JSAMPIMAGE output_buf,
JDIMENSION out_row_group_index));
@@ -100,9 +100,9 @@ struct jpeg_downsampler {
/* Forward DCT (also controls coefficient quantization) */
struct jpeg_forward_dct {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo));
/* perhaps this should be an array??? */
- JMETHOD(void, forward_DCT, (j_compress_ptr cinfo,
+ JTQT_METHOD(void, forward_DCT, (j_compress_ptr cinfo,
jpeg_component_info * compptr,
JSAMPARRAY sample_data, JBLOCKROW coef_blocks,
JDIMENSION start_row, JDIMENSION start_col,
@@ -111,23 +111,23 @@ struct jpeg_forward_dct {
/* Entropy encoding */
struct jpeg_entropy_encoder {
- JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
- JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
- JMETHOD(void, finish_pass, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics));
+ JTQT_METHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data));
+ JTQT_METHOD(void, finish_pass, (j_compress_ptr cinfo));
};
/* Marker writing */
struct jpeg_marker_writer {
- JMETHOD(void, write_file_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_frame_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_scan_header, (j_compress_ptr cinfo));
- JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo));
- JMETHOD(void, write_tables_only, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, write_file_header, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, write_frame_header, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, write_scan_header, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, write_file_trailer, (j_compress_ptr cinfo));
+ JTQT_METHOD(void, write_tables_only, (j_compress_ptr cinfo));
/* These routines are exported to allow insertion of extra markers */
/* Probably only COM and APPn markers should be written this way */
- JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
+ JTQT_METHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker,
unsigned int datalen));
- JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
+ JTQT_METHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val));
};
@@ -135,8 +135,8 @@ struct jpeg_marker_writer {
/* Master control module */
struct jpeg_decomp_master {
- JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, finish_output_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
@@ -144,10 +144,10 @@ struct jpeg_decomp_master {
/* Input control module */
struct jpeg_input_controller {
- JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
- JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
- JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(int, consume_input, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, reset_input_controller, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, finish_input_pass, (j_decompress_ptr cinfo));
/* State variables made visible to other modules */
boolean has_multiple_scans; /* True if file has multiple scans */
@@ -156,18 +156,18 @@ struct jpeg_input_controller {
/* Main buffer control (downsampled-data buffer) */
struct jpeg_d_main_controller {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, process_data, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+ JTQT_METHOD(void, process_data, (j_decompress_ptr cinfo,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail));
};
/* Coefficient buffer control */
struct jpeg_d_coef_controller {
- JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo));
- JMETHOD(int, consume_data, (j_decompress_ptr cinfo));
- JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo));
- JMETHOD(int, decompress_data, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_input_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(int, consume_data, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, start_output_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(int, decompress_data, (j_decompress_ptr cinfo,
JSAMPIMAGE output_buf));
/* Pointer to array of coefficient virtual arrays, or NULL if none */
jvirt_barray_ptr *coef_arrays;
@@ -175,8 +175,8 @@ struct jpeg_d_coef_controller {
/* Decompression postprocessing (color quantization buffer control) */
struct jpeg_d_post_controller {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
- JMETHOD(void, post_process_data, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
+ JTQT_METHOD(void, post_process_data, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
@@ -187,12 +187,12 @@ struct jpeg_d_post_controller {
/* Marker reading & parsing */
struct jpeg_marker_reader {
- JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, reset_marker_reader, (j_decompress_ptr cinfo));
/* Read markers until SOS or EOI.
* Returns same codes as are defined for jpeg_consume_input:
* JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI.
*/
- JMETHOD(int, read_markers, (j_decompress_ptr cinfo));
+ JTQT_METHOD(int, read_markers, (j_decompress_ptr cinfo));
/* Read a restart marker --- exported for use by entropy decoder only */
jpeg_marker_parser_method read_restart_marker;
@@ -207,8 +207,8 @@ struct jpeg_marker_reader {
/* Entropy decoding */
struct jpeg_entropy_decoder {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(boolean, decode_mcu, (j_decompress_ptr cinfo,
JBLOCKROW *MCU_data));
/* This is here to share code between baseline and progressive decoders; */
@@ -217,21 +217,21 @@ struct jpeg_entropy_decoder {
};
/* Inverse DCT (also performs dequantization) */
-typedef JMETHOD(void, inverse_DCT_method_ptr,
+typedef JTQT_METHOD(void, inverse_DCT_method_ptr,
(j_decompress_ptr cinfo, jpeg_component_info * compptr,
JCOEFPTR coef_block,
JSAMPARRAY output_buf, JDIMENSION output_col));
struct jpeg_inverse_dct {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
/* It is useful to allow each component to have a separate IDCT method. */
inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS];
};
/* Upsampling (note that upsampler must also call color converter) */
struct jpeg_upsampler {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, upsample, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, upsample, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf,
JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
@@ -244,20 +244,20 @@ struct jpeg_upsampler {
/* Colorspace conversion */
struct jpeg_color_deconverter {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, color_convert, (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows));
};
/* Color quantization or color precision reduction */
struct jpeg_color_quantizer {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
- JMETHOD(void, color_quantize, (j_decompress_ptr cinfo,
+ JTQT_METHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan));
+ JTQT_METHOD(void, color_quantize, (j_decompress_ptr cinfo,
JSAMPARRAY input_buf, JSAMPARRAY output_buf,
int num_rows));
- JMETHOD(void, finish_pass, (j_decompress_ptr cinfo));
- JMETHOD(void, new_color_map, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, finish_pass, (j_decompress_ptr cinfo));
+ JTQT_METHOD(void, new_color_map, (j_decompress_ptr cinfo));
};
diff --git a/src/imageutils/orientation.h b/src/imageutils/orientation.h
index cd4b535..d223e3b 100644
--- a/src/imageutils/orientation.h
+++ b/src/imageutils/orientation.h
@@ -1,7 +1,7 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab
/*
Gwenview - A simple image viewer for KDE
-Copyright 2000-2004 Aur�lien G�teau
+Copyright 2000-2004 Aur�lien G�teau
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
diff --git a/src/imageutils/scale.cpp b/src/imageutils/scale.cpp
index 99ed186..0d78886 100644
--- a/src/imageutils/scale.cpp
+++ b/src/imageutils/scale.cpp
@@ -6,7 +6,7 @@
// ImageMagick code begin
// ----------------------
-// This code is ImageMagick's resize code, adapted for QImage, with
+// This code is ImageMagick's resize code, adapted for TQImage, with
// fastfloat class added as an optimization.
// The original license text follows.
@@ -69,9 +69,9 @@
#endif
#endif
-// Qt
-#include <qimage.h>
-#include <qcolor.h>
+// TQt
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kdeversion.h>
#include <kcpuinfo.h>
@@ -86,8 +86,8 @@
namespace ImageUtils {
-#define Max QMAX
-#define Min QMIN
+#define Max TQMAX
+#define Min TQMIN
// mustn't be less than used precision (i.e. 1/fastfloat::RATIO)
#define MagickEpsilon 0.0002
@@ -423,7 +423,7 @@ static fastfloat Triangle(const fastfloat x,const fastfloat)
return(0.0);
}
-static void HorizontalFilter(const QImage& source,QImage& destination,
+static void HorizontalFilter(const TQImage& source,TQImage& destination,
const fastfloat x_factor,const fastfloat blur,
ContributionInfo *contribution, Filter filter, fastfloat filtersupport)
{
@@ -492,23 +492,23 @@ static void HorizontalFilter(const QImage& source,QImage& destination,
{
int px = contribution[i].pixel;
int py = y;
- QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ];
- red+=contribution[i].weight*qRed(p);
- green+=contribution[i].weight*qGreen(p);
- blue+=contribution[i].weight*qBlue(p);
- alpha+=contribution[i].weight*qAlpha(p);
+ TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ];
+ red+=contribution[i].weight*tqRed(p);
+ green+=contribution[i].weight*tqGreen(p);
+ blue+=contribution[i].weight*tqBlue(p);
+ alpha+=contribution[i].weight*tqAlpha(p);
}
- QRgb pix = qRgba(
+ TQRgb pix = tqRgba(
fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ),
fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ),
fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ),
fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 ));
- reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix;
+ reinterpret_cast< TQRgb* >( const_cast<TQImage&>(destination).jumpTable()[ y ])[ x ] = pix;
}
}
}
-static void VerticalFilter(const QImage& source,QImage& destination,
+static void VerticalFilter(const TQImage& source,TQImage& destination,
const fastfloat y_factor,const fastfloat blur,
ContributionInfo *contribution, Filter filter, fastfloat filtersupport )
{
@@ -577,23 +577,23 @@ static void VerticalFilter(const QImage& source,QImage& destination,
{
int px = x;
int py = contribution[i].pixel;
- QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ];
- red+=contribution[i].weight*qRed(p);
- green+=contribution[i].weight*qGreen(p);
- blue+=contribution[i].weight*qBlue(p);
- alpha+=contribution[i].weight*qAlpha(p);
+ TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ];
+ red+=contribution[i].weight*tqRed(p);
+ green+=contribution[i].weight*tqGreen(p);
+ blue+=contribution[i].weight*tqBlue(p);
+ alpha+=contribution[i].weight*tqAlpha(p);
}
- QRgb pix = qRgba(
+ TQRgb pix = tqRgba(
fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ),
fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ),
fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ),
fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 ));
- reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix;
+ reinterpret_cast< TQRgb* >( const_cast<TQImage&>(destination).jumpTable()[ y ])[ x ] = pix;
}
}
}
-static QImage ResizeImage(const QImage& image,const int columns,
+static TQImage ResizeImage(const TQImage& image,const int columns,
const int rows, Filter filter, fastfloat filtersupport, double blur)
{
ContributionInfo
@@ -611,7 +611,7 @@ static QImage ResizeImage(const QImage& image,const int columns,
*/
if ((columns == image.width()) && (rows == image.height()) && (blur == 1.0))
return image.copy();
- QImage resize_image( columns, rows, 32 );
+ TQImage resize_image( columns, rows, 32 );
resize_image.setAlphaBuffer( image.hasAlphaBuffer());
/*
Allocate filter contribution info.
@@ -638,20 +638,20 @@ static QImage ResizeImage(const QImage& image,const int columns,
if (((fastfloat) columns*(image.height()+rows)) >
((fastfloat) rows*(image.width()+columns)))
{
- QImage source_image( columns, image.height(), 32 );
+ TQImage source_image( columns, image.height(), 32 );
source_image.setAlphaBuffer( image.hasAlphaBuffer());
- HorizontalFilter(image,source_image,x_factor,blur,
+ HorizontalFilter(image,source_image,x_factor,blur,
contribution,filter,filtersupport);
- VerticalFilter(source_image,resize_image,y_factor,
+ VerticalFilter(source_image,resize_image,y_factor,
blur,contribution,filter,filtersupport);
}
else
{
- QImage source_image( image.width(), rows, 32 );
+ TQImage source_image( image.width(), rows, 32 );
source_image.setAlphaBuffer( image.hasAlphaBuffer());
- VerticalFilter(image,source_image,y_factor,blur,
+ VerticalFilter(image,source_image,y_factor,blur,
contribution,filter,filtersupport);
- HorizontalFilter(source_image,resize_image,x_factor,
+ HorizontalFilter(source_image,resize_image,x_factor,
blur,contribution,filter,filtersupport);
}
/*
@@ -724,7 +724,7 @@ static QImage ResizeImage(const QImage& image,const int columns,
%
%
*/
-QImage SampleImage(const QImage& image,const int columns,
+TQImage SampleImage(const TQImage& image,const int columns,
const int rows)
{
int
@@ -756,7 +756,7 @@ QImage SampleImage(const QImage& image,const int columns,
// 32bit like the ImageMagick original. This avoids the relatively
// expensive conversion.
const int d = image.depth() / 8;
- QImage sample_image( columns, rows, image.depth());
+ TQImage sample_image( columns, rows, image.depth());
sample_image.setAlphaBuffer( image.hasAlphaBuffer());
/*
Allocate scan line buffer and column offset buffers.
@@ -769,7 +769,7 @@ QImage SampleImage(const QImage& image,const int columns,
*/
// In the following several code 0.5 needs to be added, otherwise the image
// would be moved by half a pixel to bottom-right, just like
-// with Qt's QImage::scale()
+// with TQt's TQImage::scale()
for (x=0; x < (long) sample_image.width(); x++)
{
x_offset[x]=int((x+0.5)*image.width()/sample_image.width());
@@ -808,7 +808,7 @@ QImage SampleImage(const QImage& image,const int columns,
case 4: // 32bit
for (x=0; x < (long) sample_image.width(); x++)
{
- *(QRgb*)q=((QRgb*)pixels)[ x_offset[x] ];
+ *(TQRgb*)q=((TQRgb*)pixels)[ x_offset[x] ];
q += d;
}
break;
@@ -848,11 +848,11 @@ QImage SampleImage(const QImage& image,const int columns,
/**
* This is the normal smoothscale method, based on Imlib2's smoothscale.
*
- * Originally I took the algorithm used in NetPBM and Qt and added MMX/3dnow
- * optimizations. It ran in about 1/2 the time as Qt. Then I ported Imlib's
+ * Originally I took the algorithm used in NetPBM and TQt and added MMX/3dnow
+ * optimizations. It ran in about 1/2 the time as TQt. Then I ported Imlib's
* C algorithm and it ran at about the same speed as my MMX optimized one...
* Finally I ported Imlib's MMX version and it ran in less than half the
- * time as my MMX algorithm, (taking only a quarter of the time Qt does).
+ * time as my MMX algorithm, (taking only a quarter of the time TQt does).
*
* Changes include formatting, namespaces and other C++'ings, removal of old
* #ifdef'ed code, and removal of unneeded border calculation code.
@@ -933,7 +933,7 @@ namespace MImageScale{
int* mimageCalcXPoints(int sw, int dw);
int* mimageCalcApoints(int s, int d, int up);
MImageScaleInfo* mimageFreeScaleInfo(MImageScaleInfo *isi);
- MImageScaleInfo *mimageCalcScaleInfo(QImage &img, int sw, int sh,
+ MImageScaleInfo *mimageCalcScaleInfo(TQImage &img, int sw, int sh,
int dw, int dh, char aa, int sow);
void mimageSampleRGBA(MImageScaleInfo *isi, unsigned int *dest, int dxx,
int dyy, int dx, int dy, int dw, int dh, int dow);
@@ -943,7 +943,7 @@ namespace MImageScale{
void mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, int dxx,
int dyy, int dx, int dy, int dw, int dh, int dow, int
sow);
- QImage smoothScale(const QImage& img, int dw, int dh);
+ TQImage smoothScale(const TQImage& img, int dw, int dh);
typedef long long llong;
}
@@ -958,14 +958,14 @@ extern "C" {
using namespace MImageScale;
-QImage MImageScale::smoothScale(const QImage& image, int dw, int dh)
+TQImage MImageScale::smoothScale(const TQImage& image, int dw, int dh)
{
- QImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image;
+ TQImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image;
int w = img.width();
int h = img.height();
int sow = img.bytesPerLine();
- // handle CroppedQImage
+ // handle CroppedTQImage
if( img.height() > 1 && sow != img.scanLine( 1 ) - img.scanLine( 0 ))
sow = img.scanLine( 1 ) - img.scanLine( 0 );
sow = sow / ( img.depth() / 8 );
@@ -973,9 +973,9 @@ QImage MImageScale::smoothScale(const QImage& image, int dw, int dh)
MImageScaleInfo *scaleinfo =
mimageCalcScaleInfo(img, w, h, dw, dh, true, sow);
if(!scaleinfo)
- return QImage();
+ return TQImage();
- QImage buffer(dw, dh, 32);
+ TQImage buffer(dw, dh, 32);
buffer.setAlphaBuffer(img.hasAlphaBuffer());
#ifdef HAVE_X86_MMX
@@ -1143,7 +1143,7 @@ MImageScaleInfo* MImageScale::mimageFreeScaleInfo(MImageScaleInfo *isi)
return(NULL);
}
-MImageScaleInfo* MImageScale::mimageCalcScaleInfo(QImage &img, int sw, int sh,
+MImageScaleInfo* MImageScale::mimageCalcScaleInfo(TQImage &img, int sw, int sh,
int dw, int dh, char aa, int sow)
{
MImageScaleInfo *isi;
@@ -1254,7 +1254,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest,
g = ((gg * YAP) + (g * INV_YAP)) >> 16;
b = ((bb * YAP) + (b * INV_YAP)) >> 16;
a = ((aa * YAP) + (a * INV_YAP)) >> 16;
- *dptr++ = qRgba(r, g, b, a);
+ *dptr++ = tqRgba(r, g, b, a);
}
else{
pix = ypoints[dyy + y] + xpoints[x];
@@ -1271,7 +1271,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest,
g >>= 8;
b >>= 8;
a >>= 8;
- *dptr++ = qRgba(r, g, b, a);
+ *dptr++ = tqRgba(r, g, b, a);
}
}
}
@@ -1295,7 +1295,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest,
g >>= 8;
b >>= 8;
a >>= 8;
- *dptr++ = qRgba(r, g, b, a);
+ *dptr++ = tqRgba(r, g, b, a);
}
else
*dptr++ = sptr[xpoints[x] ];
@@ -1372,7 +1372,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest,
b >>= 4;
a >>= 4;
}
- *dptr = qRgba(r, g, b, a);
+ *dptr = tqRgba(r, g, b, a);
dptr++;
}
}
@@ -1446,7 +1446,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest,
b >>= 4;
a >>= 4;
}
- *dptr = qRgba(r, g, b, a);
+ *dptr = tqRgba(r, g, b, a);
dptr++;
}
}
@@ -1610,7 +1610,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest,
r = ((rr * YAP) + (r * INV_YAP)) >> 16;
g = ((gg * YAP) + (g * INV_YAP)) >> 16;
b = ((bb * YAP) + (b * INV_YAP)) >> 16;
- *dptr++ = qRgba(r, g, b, 0xff);
+ *dptr++ = tqRgba(r, g, b, 0xff);
}
else{
pix = ypoints[dyy + y] + xpoints[x];
@@ -1624,7 +1624,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest,
r >>= 8;
g >>= 8;
b >>= 8;
- *dptr++ = qRgba(r, g, b, 0xff);
+ *dptr++ = tqRgba(r, g, b, 0xff);
}
}
}
@@ -1645,7 +1645,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest,
r >>= 8;
g >>= 8;
b >>= 8;
- *dptr++ = qRgba(r, g, b, 0xff);
+ *dptr++ = tqRgba(r, g, b, 0xff);
}
else
*dptr++ = sptr[xpoints[x] ];
@@ -1713,7 +1713,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest,
g >>= 4;
b >>= 4;
}
- *dptr = qRgba(r, g, b, 0xff);
+ *dptr = tqRgba(r, g, b, 0xff);
dptr++;
}
}
@@ -1778,7 +1778,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest,
g >>= 4;
b >>= 4;
}
- *dptr = qRgba(r, g, b, 0xff);
+ *dptr = tqRgba(r, g, b, 0xff);
dptr++;
}
}
@@ -1917,20 +1917,20 @@ int extraScalePixels( SmoothAlgorithm alg, double zoom, double blur )
// Imlib2/Mosfet scale - I have really no idea how many pixels it needs
if( filter == Box && blur == 1.0 ) return int( 3 / zoom + 1 );
// This is support size for ImageMagick's scaling.
- double scale=blur*QMAX(1.0/zoom,1.0);
+ double scale=blur*TQMAX(1.0/zoom,1.0);
double support=scale* filtersupport;
if (support <= 0.5) support=0.5+0.000001;
return int( support + 1 );
}
-QImage scale(const QImage& image, int width, int height,
- SmoothAlgorithm alg, QImage::ScaleMode mode, double blur )
+TQImage scale(const TQImage& image, int width, int height,
+ SmoothAlgorithm alg, TQ_ScaleMode mode, double blur )
{
if( image.isNull()) return image.copy();
- QSize newSize( image.size() );
- newSize.scale( QSize( width, height ), (QSize::ScaleMode)mode ); // ### remove cast in Qt 4.0
- newSize = newSize.expandedTo( QSize( 1, 1 )); // make sure it doesn't become null
+ TQSize newSize( image.size() );
+ newSize.tqscale( TQSize( width, height ), (TQSize::ScaleMode)mode ); // ### remove cast in TQt 4.0
+ newSize = newSize.expandedTo( TQSize( 1, 1 )); // make sure it doesn't become null
if ( newSize == image.size() ) return image.copy();
@@ -1972,7 +1972,7 @@ QImage scale(const QImage& image, int width, int height,
}
return ResizeImage( image.convertDepth( 32 ), width, height, filter, filtersupport, blur );
- // unlike Qt's smoothScale() this function introduces new colors to grayscale images ... oh well
+ // unlike TQt's smoothScale() this function introduces new colors to grayscale images ... oh well
}
diff --git a/src/imageutils/testjpegcontent.cpp b/src/imageutils/testjpegcontent.cpp
index fa9128d..c810506 100644
--- a/src/imageutils/testjpegcontent.cpp
+++ b/src/imageutils/testjpegcontent.cpp
@@ -20,11 +20,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <iostream>
-// Qt
-#include <qdir.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qstring.h>
+// TQt
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqstring.h>
// KDE
#include <kapplication.h>
@@ -43,8 +43,8 @@ const char* ORIENT6_FILE="orient6.jpg";
const int ORIENT6_WIDTH=128; // This size is the size *after* orientation
const int ORIENT6_HEIGHT=256; // has been applied
const char* CUT_FILE="cut.jpg";
-const QString ORIENT6_COMMENT="a comment";
-const QString ORIENT1_VFLIP_FILE="test_orient1_vflip.jpg";
+const TQString ORIENT6_COMMENT="a comment";
+const TQString ORIENT1_VFLIP_FILE="test_orient1_vflip.jpg";
const char* THUMBNAIL_FILE="test_thumbnail.jpg";
const char* TMP_FILE="tmp.jpg";
@@ -53,18 +53,18 @@ class TestEnvironment {
public:
TestEnvironment() {
bool result;
- QFile in(ORIENT6_FILE);
+ TQFile in(ORIENT6_FILE);
result=in.open(IO_ReadOnly);
Q_ASSERT(result);
- QFileInfo info(in);
+ TQFileInfo info(in);
int size=info.size()/2;
char* data=new char[size];
int readSize=in.readBlock(data, size);
Q_ASSERT(size==readSize);
- QFile out(CUT_FILE);
+ TQFile out(CUT_FILE);
result=out.open(IO_WriteOnly);
Q_ASSERT(result);
@@ -74,17 +74,17 @@ public:
}
~TestEnvironment() {
- QDir::current().remove(CUT_FILE);
+ TQDir::current().remove(CUT_FILE);
}
};
-typedef QMap<QString,QString> MetaInfoMap;
+typedef TQMap<TQString,TQString> MetaInfoMap;
-MetaInfoMap getMetaInfo(const QString& path) {
+MetaInfoMap getMetaInfo(const TQString& path) {
KFileMetaInfo fmi(path);
- QStringList list=fmi.supportedKeys();
- QStringList::ConstIterator it=list.begin();
+ TQStringList list=fmi.supportedKeys();
+ TQStringList::ConstIterator it=list.begin();
MetaInfoMap map;
for ( ; it!=list.end(); ++it) {
@@ -95,16 +95,16 @@ MetaInfoMap getMetaInfo(const QString& path) {
return map;
}
-void compareMetaInfo(const QString& path1, const QString& path2, const QStringList& ignoredKeys) {
+void compareMetaInfo(const TQString& path1, const TQString& path2, const TQStringList& ignoredKeys) {
MetaInfoMap mim1=getMetaInfo(path1);
MetaInfoMap mim2=getMetaInfo(path2);
Q_ASSERT(mim1.keys()==mim2.keys());
- QValueList<QString> keys=mim1.keys();
- QValueList<QString>::ConstIterator it=keys.begin();
+ TQValueList<TQString> keys=mim1.keys();
+ TQValueList<TQString>::ConstIterator it=keys.begin();
for ( ; it!=keys.end(); ++it) {
- QString key=*it;
- if (ignoredKeys.contains(key)) continue;
+ TQString key=*it;
+ if (ignoredKeys.tqcontains(key)) continue;
if (mim1[key]!=mim2[key]) {
kdError() << "Meta info differs. Key:" << key << ", V1:" << mim1[key] << ", V2:" << mim2[key] << endl;
@@ -154,7 +154,7 @@ void testResetOrientation() {
*/
void testTransform() {
bool result;
- QImage finalImage, expectedImage;
+ TQImage finalImage, expectedImage;
ImageUtils::JPEGContent content;
result = content.load(ORIENT6_FILE);
@@ -181,7 +181,7 @@ void testTransform() {
void testSetComment() {
- QString comment = "test comment";
+ TQString comment = "test comment";
ImageUtils::JPEGContent content;
bool result;
result = content.load(ORIENT6_FILE);
@@ -211,10 +211,10 @@ int main(int argc, char* argv[]) {
Q_ASSERT(result);
Q_ASSERT(content.orientation() == 6);
Q_ASSERT(content.comment() == ORIENT6_COMMENT);
- Q_ASSERT(content.size() == QSize(ORIENT6_WIDTH, ORIENT6_HEIGHT));
+ Q_ASSERT(content.size() == TQSize(ORIENT6_WIDTH, ORIENT6_HEIGHT));
// thumbnail()
- QImage thumbnail=content.thumbnail();
+ TQImage thumbnail=content.thumbnail();
result=thumbnail.save(THUMBNAIL_FILE, "JPEG");
Q_ASSERT(result);
@@ -236,12 +236,12 @@ int main(int argc, char* argv[]) {
result = content.load(TMP_FILE);
Q_ASSERT(result);
- Q_ASSERT(content.size() == QSize(ORIENT6_HEIGHT, ORIENT6_WIDTH));
+ Q_ASSERT(content.size() == TQSize(ORIENT6_HEIGHT, ORIENT6_WIDTH));
// Check the other meta info are still here
- QStringList ignoredKeys;
- ignoredKeys << "Orientation" << "Comment";
+ TQStringList ignoredKeys;
+ ignoredKeys << "Qt::Orientation" << "Comment";
compareMetaInfo(ORIENT6_FILE, ORIENT1_VFLIP_FILE, ignoredKeys);
// Test that loading and manipulating a truncated file does not crash
diff --git a/src/imageutils/transupp.c b/src/imageutils/transupp.c
index e5ec564..3bc6f20 100644
--- a/src/imageutils/transupp.c
+++ b/src/imageutils/transupp.c
@@ -30,7 +30,7 @@
* or recompression of the image.
* Thanks to Guido Vollbeding for the initial design and code of this feature.
*
- * Horizontal flipping is done in-place, using a single top-to-bottom
+ *Qt::Horizontal flipping is done in-place, using a single top-to-bottom
* pass through the virtual source array. It will thus be much the
* fastest option for images larger than main memory.
*
@@ -65,7 +65,7 @@
LOCAL(void)
do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays)
-/* Horizontal flip; done in-place, so no separate dest array is required */
+/*Qt::Horizontal flip; done in-place, so no separate dest array is required */
{
JDIMENSION MCU_cols, comp_width, blk_x, blk_y;
int ci, k, offset_y;
@@ -74,7 +74,7 @@ do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
JCOEF temp1, temp2;
jpeg_component_info *compptr;
- /* Horizontal mirroring of DCT blocks is accomplished by swapping
+ /*Qt::Horizontal mirroring of DCT blocks is accomplished by swapping
* pairs of blocks in-place. Within a DCT block, we perform horizontal
* mirroring by changing the signs of odd-numbered columns.
* Partial iMCUs at the right edge are left untouched.
@@ -115,7 +115,7 @@ LOCAL(void)
do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jvirt_barray_ptr *dst_coef_arrays)
-/* Vertical flip */
+/*Qt::Vertical flip */
{
JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y;
int ci, i, j, offset_y;
@@ -232,7 +232,7 @@ do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *dst_coef_arrays)
/* 90 degree rotation is equivalent to
* 1. Transposing the image;
- * 2. Horizontal mirroring.
+ * 2.Qt::Horizontal mirroring.
* These two steps are merged into a single processing routine.
*/
{
@@ -295,7 +295,7 @@ do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jvirt_barray_ptr *dst_coef_arrays)
/* 270 degree rotation is equivalent to
- * 1. Horizontal mirroring;
+ * 1.Qt::Horizontal mirroring;
* 2. Transposing the image.
* These two steps are merged into a single processing routine.
*/
@@ -359,8 +359,8 @@ do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jvirt_barray_ptr *dst_coef_arrays)
/* 180 degree rotation is equivalent to
- * 1. Vertical mirroring;
- * 2. Horizontal mirroring.
+ * 1.Qt::Vertical mirroring;
+ * 2.Qt::Horizontal mirroring.
* These two steps are merged into a single processing routine.
*/
{
@@ -463,9 +463,9 @@ do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
* 1. 180 degree rotation;
* 2. Transposition;
* or
- * 1. Horizontal mirroring;
+ * 1.Qt::Horizontal mirroring;
* 2. Transposition;
- * 3. Horizontal mirroring.
+ * 3.Qt::Horizontal mirroring.
* These steps are merged into a single processing routine.
*/
{
diff --git a/src/spec/gwenview-mdk.spec b/src/spec/gwenview-mdk.spec
index a78f9c2..7a642f6 100644
--- a/src/spec/gwenview-mdk.spec
+++ b/src/spec/gwenview-mdk.spec
@@ -272,7 +272,7 @@ rm -rf $RPM_BUILD_ROOT
o Update the EXIF thumbnail when rotating a JPEG file.
o In the folder view, folders now open with a single click (By Daniel Thaler).
o Reworked coordinate conversions in order to avoid subtle paint errors.
- o Remember computed optimal repaint sizes in the config file,
+ o Remember computed optimal tqrepaint sizes in the config file,
so they are available immediately after next start.
o Remember shown URL after session restore.
* Sat Oct 16 2004 Angelo Naselli <[email protected]> 1.1.5-0.3mdk
@@ -317,7 +317,7 @@ rm -rf $RPM_BUILD_ROOT
- Avoid data loss if the JPEG images are saved while being rotated by
JPEGTran.
- The back button in Konqueror now works correctly with gvimagepart.
- - The default layout is more user-friendly.
+ - The default tqlayout is more user-friendly.
- Non-trivial URLs (e.g. http query URL) are correctly handled.
- You can now drop images on the image view.
@@ -384,7 +384,7 @@ rm -rf $RPM_BUILD_ROOT
- Fixes:
- Gave contributors the credit they deserve in the about box.
- Updated to libexif 0.5.12 and applied patch from libexif CVS.
- - When going to the parent folder, make sure the folder we were in before is selected.
+ - When going to the tqparent folder, make sure the folder we were in before is selected.
- If there's no image in the current folder, select the first visible file.
- When holding down Shift to zoom, keep the same area of the image under the cursor.
- Nicer drag cursor.
diff --git a/src/tsthread/tsthread.cpp b/src/tsthread/tsthread.cpp
index 16b4538..43b902c 100644
--- a/src/tsthread/tsthread.cpp
+++ b/src/tsthread/tsthread.cpp
@@ -24,15 +24,15 @@ DEALINGS IN THE SOFTWARE.
#include "tsthread.h"
-#include <qapplication.h>
-#include <qmetaobject.h>
+#include <tqapplication.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <assert.h>
-#ifdef TS_QTHREADSTORAGE
-QThreadStorage< TSThread** >* TSThread::current_thread;
+#ifdef TS_TQTHREADSTORAGE
+TQThreadStorage< TSThread** >* TSThread::current_thread;
#else
TSCurrentThread* TSThread::current_thread;
#endif
@@ -45,10 +45,10 @@ class TSMainThread
virtual void run() { assert( false ); }
};
-TSThread::Helper::Helper( TSThread* parent )
- : thread( parent )
+TSThread::Helper::Helper( TSThread* tqparent )
+ : thread( tqparent )
{
- assert( parent );
+ assert( tqparent );
}
void TSThread::Helper::run()
@@ -82,11 +82,11 @@ void TSThread::start()
void TSThread::cancel()
{
- QMutexLocker lock( &mutex );
+ TQMutexLocker lock( &mutex );
cancelling = true;
if( cancel_mutex != NULL )
{
- QMutexLocker lock( cancel_mutex );
+ TQMutexLocker lock( cancel_mutex );
cancel_cond->wakeAll();
}
}
@@ -108,8 +108,8 @@ bool TSThread::running() const
void TSThread::initCurrentThread()
{
-#ifdef TS_QTHREADSTORAGE
- current_thread = new QThreadStorage< TSThread** >();
+#ifdef TS_TQTHREADSTORAGE
+ current_thread = new TQThreadStorage< TSThread** >();
typedef TSThread* TSThreadPtr;
// set pointer for main thread (this must be main thread)
current_thread->setLocalData( new TSThreadPtr( NULL )); // TODO NULL ?
@@ -123,9 +123,9 @@ void TSThread::initCurrentThread()
void TSThread::executeThread()
{
-#ifdef TS_QTHREADSTORAGE
+#ifdef TS_TQTHREADSTORAGE
// store dynamically allocated pointer, so that
- // QThreadStorage deletes the pointer and not TSThread
+ // TQThreadStorage deletes the pointer and not TSThread
typedef TSThread* TSThreadPtr;
current_thread->setLocalData( new TSThreadPtr( this ));
#else
@@ -135,35 +135,35 @@ void TSThread::executeThread()
postSignal( this, NULL ); // = terminated()
}
-void TSThread::postSignal( QObject* obj, const char* signal )
+void TSThread::postSignal( TQObject* obj, const char* signal )
{
assert( currentThread() == this );
- qApp->postEvent( this, new SignalEvent( signal, obj, NULL ));
+ tqApp->postEvent( this, new SignalEvent( signal, obj, NULL ));
}
-void TSThread::emitSignalInternal( QObject* obj, const char* signal, QUObject* o )
+void TSThread::emitSignalInternal( TQObject* obj, const char* signal, TQUObject* o )
{
assert( currentThread() == this );
- QMutexLocker locker( &signal_mutex );
+ TQMutexLocker locker( &signal_mutex );
emit_pending = true;
- qApp->postEvent( this, new SignalEvent( signal, obj, o ));
+ tqApp->postEvent( this, new SignalEvent( signal, obj, o ));
while( emit_pending )
signal_cond.wait( &signal_mutex );
}
-void TSThread::emitCancellableSignalInternal( QObject* obj, const char* signal, QUObject* o )
+void TSThread::emitCancellableSignalInternal( TQObject* obj, const char* signal, TQUObject* o )
{
assert( currentThread() == this );
// can't use this->mutex, because its locking will be triggered by TSWaitCondition
- QMutexLocker locker( &signal_mutex );
+ TQMutexLocker locker( &signal_mutex );
emit_pending = true;
- qApp->postEvent( this, new SignalEvent( signal, obj, o ));
+ tqApp->postEvent( this, new SignalEvent( signal, obj, o ));
while( emit_pending && !testCancel())
signal_cond.cancellableWait( &signal_mutex );
emit_pending = false; // in case of cancel
}
-void TSThread::customEvent( QCustomEvent* ev )
+void TSThread::customEvent( TQCustomEvent* ev )
{
SignalEvent* e = static_cast< SignalEvent* >( ev );
if( e->signal.isEmpty()) // = terminated()
@@ -174,8 +174,8 @@ void TSThread::customEvent( QCustomEvent* ev )
return;
}
bool deleted = false;
- deleted_flag = &deleted; // this is like QGuardedPtr for self, but faster
- int signal_id = e->object->metaObject()->findSignal( normalizeSignalSlot( e->signal ).data() + 1, true );
+ deleted_flag = &deleted; // this is like TQGuardedPtr for self, but faster
+ int signal_id = e->object->tqmetaObject()->tqfindSignal( normalizeSignalSlot( e->signal ).data() + 1, true );
if( signal_id >= 0 )
e->object->qt_emit( signal_id, e->args );
else
@@ -183,7 +183,7 @@ void TSThread::customEvent( QCustomEvent* ev )
if( deleted ) // some slot deleted 'this'
return;
deleted_flag = NULL;
- QMutexLocker locker( &signal_mutex );
+ TQMutexLocker locker( &signal_mutex );
if( emit_pending )
{
emit_pending = false;
diff --git a/src/tsthread/tsthread.h b/src/tsthread/tsthread.h
index 5b98890..91b64e6 100644
--- a/src/tsthread/tsthread.h
+++ b/src/tsthread/tsthread.h
@@ -25,15 +25,15 @@ DEALINGS IN THE SOFTWARE.
#ifndef TSTHREAD_H
#define TSTHREAD_H
-#include <qobject.h>
-#include <qthread.h>
-#include <qwaitcondition.h>
-#include <qdeepcopy.h>
-#include <qmutex.h>
-#include <private/qucomextra_p.h>
-
-#ifdef TS_QTHREADSTORAGE
-#include <qthreadstorage.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqwaitcondition.h>
+#include <tqdeepcopy.h>
+#include <tqmutex.h>
+#include <tqucomextra_p.h>
+
+#ifdef TS_TQTHREADSTORAGE
+#include <tqthreadstorage.h>
#else
#include <pthread.h>
#endif
@@ -44,42 +44,43 @@ DEALINGS IN THE SOFTWARE.
template< typename T >
T TSDeepCopy( const T& t )
{
- return QDeepCopy< T >( t );
+ return TQDeepCopy< T >( t );
}
class TSCurrentThread;
/**
- Thread class, internally based on QThread, which intentionally doesn't have
- dangerous crap like QThread::terminate() and intentionally has useful features
+ Thread class, internally based on TQThread, which intentionally doesn't have
+ dangerous crap like TQThread::terminate() and intentionally has useful features
like emitting signals to the main thread, currentThread() or support
for cancelling.
*/
class TSThread
- : public QObject
+ : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
TSThread();
virtual ~TSThread();
/**
* Starts the thread.
- * @see QThread::start()
+ * @see TQThread::start()
*/
void start();
/**
* Waits for the thread to finish.
- * @see QThread::wait()
+ * @see TQThread::wait()
*/
void wait( unsigned long time = ULONG_MAX );
/**
* Returns true if the thread has finished.
- * @see QThread::finished()
+ * @see TQThread::finished()
*/
bool finished() const;
/**
* Returns true if the thread is running.
- * @see QThread::running()
+ * @see TQThread::running()
*/
bool running() const;
/**
@@ -108,44 +109,44 @@ class TSThread
* Emits the specified signal in the main thread. This function returns
* only after all slots connected to the signal have been executed (i.e.
* it works like normal signal). The signal can have one pointer argument,
- * which can be used for communication in either direction. QObject::sender()
+ * which can be used for communication in either direction. TQObject::sender()
* in slots is valid.
* Example:
* \code
- * emitSignal( this, SIGNAL( result( int* )), &result_data );
+ * emitSignal( this, TQT_SIGNAL( result( int* )), &result_data );
* \endcode
* @see postSignal
* @see emitCancellableSignal
*/
- void emitSignal( QObject* obj, const char* signal );
+ void emitSignal( TQObject* obj, const char* signal );
template< typename T1 >
- void emitSignal( QObject* obj, const char* signal, const T1& p1 );
+ void emitSignal( TQObject* obj, const char* signal, const T1& p1 );
template< typename T1, typename T2 >
- void emitSignal( QObject* obj, const char* signal, const T1& p1, const T2& p2 );
+ void emitSignal( TQObject* obj, const char* signal, const T1& p1, const T2& p2 );
/**
* This function works like emitSignal(), but additionally acts as a cancellation
* point, i.e. calling cancel() on the thread causes premature return.
* @see emitSignal
* @see postSignal
*/
- void emitCancellableSignal( QObject* obj, const char* signal );
+ void emitCancellableSignal( TQObject* obj, const char* signal );
template< typename T1 >
- void emitCancellableSignal( QObject* obj, const char* signal, const T1& p1 );
+ void emitCancellableSignal( TQObject* obj, const char* signal, const T1& p1 );
template< typename T1, typename T2 >
- void emitCancellableSignal( QObject* obj, const char* signal, const T1& p1, const T2& p2 );
+ void emitCancellableSignal( TQObject* obj, const char* signal, const T1& p1, const T2& p2 );
/**
* Posts (i.e. it is not executed immediatelly like normal signals)
* a signal to be emitted in the main thread. The signal cannot
* have any parameters, use your TSThread derived class instance
- * data members instead. QObject::sender() in slots is valid, unless
+ * data members instead. TQObject::sender() in slots is valid, unless
* the thread instance is destroyed before the signal is processed.
* @see emitSignal
*/
- void postSignal( QObject* obj, const char* signal ); // is emitted _always_ in main thread
+ void postSignal( TQObject* obj, const char* signal ); // is emitted _always_ in main thread
protected:
/**
* The code to be executed in the started thread.
- * @see QThread::run()
+ * @see TQThread::run()
*/
virtual void run() = 0;
signals:
@@ -157,25 +158,25 @@ class TSThread
/**
* @internal
*/
- void customEvent( QCustomEvent* e );
+ void customEvent( TQCustomEvent* e );
private:
class SignalEvent
- : public QCustomEvent
+ : public TQCustomEvent
{
public:
- SignalEvent( const char* sig, QObject* obj, QUObject* o )
- : QCustomEvent( QEvent::User ), signal( sig ), object( obj ), args( o )
+ SignalEvent( const char* sig, TQObject* obj, TQUObject* o )
+ : TQCustomEvent( TQEvent::User ), signal( sig ), object( obj ), args( o )
{
}
- const QCString signal;
- QObject* object;
- QUObject* args;
+ const TQCString signal;
+ TQObject* object;
+ TQUObject* args;
};
class Helper
- : public QThread
+ : public TQThread
{
public:
- Helper( TSThread* parent );
+ Helper( TSThread* tqparent );
protected:
virtual void run();
private:
@@ -183,29 +184,29 @@ class TSThread
};
void executeThread();
static void initCurrentThread();
- bool setCancelData( QMutex*m, QWaitCondition* c );
- void setSignalData( QUObject* o, int i );
- void setSignalData( QUObject* o, const QImage& i );
- void setSignalData( QUObject* o, const QString& s );
- void setSignalData( QUObject* o, bool b );
- void setSignalData( QUObject* o, const QColor& c );
- void setSignalData( QUObject* o, const char* s );
- void setSignalData( QUObject* o, const QSize& );
- void emitSignalInternal( QObject* obj, const char* signal, QUObject* o );
- void emitCancellableSignalInternal( QObject* obj, const char* signal, QUObject* o );
+ bool setCancelData( TQMutex*m, TQWaitCondition* c );
+ void setSignalData( TQUObject* o, int i );
+ void setSignalData( TQUObject* o, const TQImage& i );
+ void setSignalData( TQUObject* o, const TQString& s );
+ void setSignalData( TQUObject* o, bool b );
+ void setSignalData( TQUObject* o, const TQColor& c );
+ void setSignalData( TQUObject* o, const char* s );
+ void setSignalData( TQUObject* o, const TQSize& );
+ void emitSignalInternal( TQObject* obj, const char* signal, TQUObject* o );
+ void emitCancellableSignalInternal( TQObject* obj, const char* signal, TQUObject* o );
friend class Helper;
friend class TSWaitCondition;
Helper thread;
bool cancelling;
bool emit_pending;
- mutable QMutex mutex;
- QMutex signal_mutex;
+ mutable TQMutex mutex;
+ TQMutex signal_mutex;
TSWaitCondition signal_cond;
- QMutex* cancel_mutex;
- QWaitCondition* cancel_cond;
+ TQMutex* cancel_mutex;
+ TQWaitCondition* cancel_cond;
bool* deleted_flag;
-#ifdef TS_QTHREADSTORAGE
- static QThreadStorage< TSThread** >* current_thread;
+#ifdef TS_TQTHREADSTORAGE
+ static TQThreadStorage< TSThread** >* current_thread;
#else
static TSCurrentThread* current_thread;
#endif
@@ -215,7 +216,7 @@ class TSThread
TSThread& operator=( const TSThread& );
};
-#ifndef TS_QTHREADSTORAGE
+#ifndef TS_TQTHREADSTORAGE
/**
* @internal
*/
@@ -255,15 +256,15 @@ inline TSThread* TSCurrentThread::localData() const
inline
bool TSThread::testCancel() const
{
- QMutexLocker lock( &mutex );
+ TQMutexLocker lock( &mutex );
return cancelling;
}
#include <kdebug.h>
inline
-bool TSThread::setCancelData( QMutex* m, QWaitCondition* c )
+bool TSThread::setCancelData( TQMutex* m, TQWaitCondition* c )
{
- QMutexLocker lock( &mutex );
+ TQMutexLocker lock( &mutex );
if( cancelling && m != NULL )
return false;
cancel_mutex = m;
@@ -276,7 +277,7 @@ TSThread* TSThread::currentThread()
{
if( current_thread == NULL )
initCurrentThread();
-#ifdef TS_QTHREADSTORAGE
+#ifdef TS_TQTHREADSTORAGE
return *current_thread->localData();
#else
return current_thread->localData();
@@ -290,94 +291,94 @@ TSThread* TSThread::mainThread()
}
inline
-void TSThread::setSignalData( QUObject* o, int i )
+void TSThread::setSignalData( TQUObject* o, int i )
{
- static_QUType_int.set( o, i );
+ static_TQUType_int.set( o, i );
}
inline
-void TSThread::setSignalData( QUObject* o, const QImage& i )
+void TSThread::setSignalData( TQUObject* o, const TQImage& i )
{
- static_QUType_varptr.set( o, &i );
+ static_TQUType_varptr.set( o, &i );
}
inline
-void TSThread::setSignalData( QUObject* o, const QString& s )
+void TSThread::setSignalData( TQUObject* o, const TQString& s )
{
- static_QUType_QString.set( o, s );
+ static_TQUType_TQString.set( o, s );
}
inline
-void TSThread::setSignalData( QUObject* o, bool b )
+void TSThread::setSignalData( TQUObject* o, bool b )
{
- static_QUType_bool.set( o, b );
+ static_TQUType_bool.set( o, b );
}
inline
-void TSThread::setSignalData( QUObject* o, const QColor& c )
+void TSThread::setSignalData( TQUObject* o, const TQColor& c )
{
- static_QUType_varptr.set( o, &c );
+ static_TQUType_varptr.set( o, &c );
}
inline
-void TSThread::setSignalData( QUObject* o, const char* s )
+void TSThread::setSignalData( TQUObject* o, const char* s )
{
- static_QUType_charstar.set( o, s );
+ static_TQUType_charstar.set( o, s );
}
inline
-void TSThread::setSignalData( QUObject* o, const QSize& s )
+void TSThread::setSignalData( TQUObject* o, const TQSize& s )
{
- static_QUType_varptr.set( o, &s );
+ static_TQUType_varptr.set( o, &s );
}
inline
-void TSThread::emitSignal( QObject* obj, const char* signal )
+void TSThread::emitSignal( TQObject* obj, const char* signal )
{
- QUObject o[ 1 ];
+ TQUObject o[ 1 ];
emitSignalInternal( obj, signal, o );
}
template< typename T1 >
inline
-void TSThread::emitSignal( QObject* obj, const char* signal, const T1& p1 )
+void TSThread::emitSignal( TQObject* obj, const char* signal, const T1& p1 )
{
- QUObject o[ 2 ];
+ TQUObject o[ 2 ];
setSignalData( o + 1, p1 );
emitSignalInternal( obj, signal, o );
}
template< typename T1, typename T2 >
inline
-void TSThread::emitSignal( QObject* obj, const char* signal, const T1& p1, const T2& p2 )
+void TSThread::emitSignal( TQObject* obj, const char* signal, const T1& p1, const T2& p2 )
{
- QUObject o[ 3 ];
+ TQUObject o[ 3 ];
setSignalData( o + 1, p1 );
setSignalData( o + 2, p2 );
emitSignalInternal( obj, signal, o );
}
inline
-void TSThread::emitCancellableSignal( QObject* obj, const char* signal )
+void TSThread::emitCancellableSignal( TQObject* obj, const char* signal )
{
- QUObject o[ 1 ];
+ TQUObject o[ 1 ];
emitCancellableSignalInternal( obj, signal, o );
}
template< typename T1 >
inline
-void TSThread::emitCancellableSignal( QObject* obj, const char* signal, const T1& p1 )
+void TSThread::emitCancellableSignal( TQObject* obj, const char* signal, const T1& p1 )
{
- QUObject o[ 2 ];
+ TQUObject o[ 2 ];
setSignalData( o + 1, p1 );
emitCancellableSignalInternal( obj, signal, o );
}
template< typename T1, typename T2 >
inline
-void TSThread::emitCancellableSignal( QObject* obj, const char* signal, const T1& p1, const T2& p2 )
+void TSThread::emitCancellableSignal( TQObject* obj, const char* signal, const T1& p1, const T2& p2 )
{
- QUObject o[ 3 ];
+ TQUObject o[ 3 ];
setSignalData( o + 1, p1 );
setSignalData( o + 2, p2 );
emitCancellableSignalInternal( obj, signal, o );
diff --git a/src/tsthread/tswaitcondition.cpp b/src/tsthread/tswaitcondition.cpp
index e11e989..fb038ff 100644
--- a/src/tsthread/tswaitcondition.cpp
+++ b/src/tsthread/tswaitcondition.cpp
@@ -26,12 +26,12 @@ DEALINGS IN THE SOFTWARE.
#include "tsthread.h"
-bool TSWaitCondition::wait( QMutex* m, unsigned long time )
+bool TSWaitCondition::wait( TQMutex* m, unsigned long time )
{
return cond.wait( m, time ); // TODO?
}
-bool TSWaitCondition::cancellableWait( QMutex* m, unsigned long time )
+bool TSWaitCondition::cancellableWait( TQMutex* m, unsigned long time )
{
mutex.lock();
if( !TSThread::currentThread()->setCancelData( &mutex, &cond ))
@@ -49,12 +49,12 @@ bool TSWaitCondition::cancellableWait( QMutex* m, unsigned long time )
void TSWaitCondition::wakeOne()
{
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
cond.wakeOne();
}
void TSWaitCondition::wakeAll()
{
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
cond.wakeAll();
}
diff --git a/src/tsthread/tswaitcondition.h b/src/tsthread/tswaitcondition.h
index 09f9cab..b13695f 100644
--- a/src/tsthread/tswaitcondition.h
+++ b/src/tsthread/tswaitcondition.h
@@ -25,23 +25,23 @@ DEALINGS IN THE SOFTWARE.
#ifndef TSWAITCONDITION_H
#define TSWAITCONDITION_H
-#include <qmutex.h>
-#include <qwaitcondition.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
class TSWaitCondition
{
public:
TSWaitCondition();
~TSWaitCondition();
- bool wait( QMutex* mutex, unsigned long time = ULONG_MAX );
- bool wait( QMutex& mutex, unsigned long time = ULONG_MAX );
- bool cancellableWait( QMutex* mutex, unsigned long time = ULONG_MAX );
- bool cancellableWait( QMutex& mutex, unsigned long time = ULONG_MAX );
+ bool wait( TQMutex* mutex, unsigned long time = ULONG_MAX );
+ bool wait( TQMutex& mutex, unsigned long time = ULONG_MAX );
+ bool cancellableWait( TQMutex* mutex, unsigned long time = ULONG_MAX );
+ bool cancellableWait( TQMutex& mutex, unsigned long time = ULONG_MAX );
void wakeOne();
void wakeAll();
private:
- QMutex mutex;
- QWaitCondition cond;
+ TQMutex mutex;
+ TQWaitCondition cond;
private:
TSWaitCondition( const TSWaitCondition& );
TSWaitCondition& operator=( const TSWaitCondition& );
@@ -58,13 +58,13 @@ TSWaitCondition::~TSWaitCondition()
}
inline
-bool TSWaitCondition::wait( QMutex& mutex, unsigned long time )
+bool TSWaitCondition::wait( TQMutex& mutex, unsigned long time )
{
return wait( &mutex, time );
}
inline
-bool TSWaitCondition::cancellableWait( QMutex& mutex, unsigned long time )
+bool TSWaitCondition::cancellableWait( TQMutex& mutex, unsigned long time )
{
return cancellableWait( &mutex, time );
}