diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 21:04:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-26 21:04:57 +0000 |
commit | bf7f88413be3831a9372d323d02fc0335b9f9188 (patch) | |
tree | 516fdef9206245b40a14f99b4e3d9ef9289196e0 /src/app | |
parent | e238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff) | |
download | gwenview-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
Diffstat (limited to 'src/app')
33 files changed, 675 insertions, 663 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><b>Moving & Copying Files</b></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><b>Deleting Files</b></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><b>On Screen Display</b></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><b>Thumbnail View</b></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><b>Thumbnail Cache</b></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 &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><b>Smoothing</b></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><b>Mouse Wheel Behavior over Image</b></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)"), "mililani@pobox.com"); aboutData.addCredit("GeniusR13", I18N_NOOP("Fixed compilation on KDE 3.0 (v0.16.1)"), "geniusr13@gmx.net"); aboutData.addCredit("Ian Koenig", I18N_NOOP("First RPM spec file"), "iguy@ionsphere.org"); - aboutData.addCredit("Meni Livne", I18N_NOOP("Toolbar layout patch for RTL languages (v0.16.0)"), "livne@kde.org"); + aboutData.addCredit("Meni Livne", I18N_NOOP("Toolbar tqlayout patch for RTL languages (v0.16.0)"), "livne@kde.org"); aboutData.addCredit("Angelo Naselli", I18N_NOOP("Printing support (v1.0.0)"), "anaselli@linux.it"); aboutData.addCredit("Jos van den Oever", I18N_NOOP("File info view (v1.0.0)\nPatch to toggle auto-zoom on click (v1.0.0)"), "jos@vandenoever.info"); aboutData.addCredit("Jeroen Peters", I18N_NOOP("Configurable mouse wheel behavior (v1.1.1)"), "jpeters@coldmail.nl"); @@ -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); |