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/gvcore/fileviewcontroller.cpp | |
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/gvcore/fileviewcontroller.cpp')
-rw-r--r-- | src/gvcore/fileviewcontroller.cpp | 378 |
1 files changed, 189 insertions, 189 deletions
diff --git a/src/gvcore/fileviewcontroller.cpp b/src/gvcore/fileviewcontroller.cpp index 95dc47c..e58e654 100644 --- a/src/gvcore/fileviewcontroller.cpp +++ b/src/gvcore/fileviewcontroller.cpp @@ -19,15 +19,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Qt -#include <qcheckbox.h> -#include <qdatetimeedit.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qwidgetstack.h> +// TQt +#include <tqcheckbox.h> +#include <tqdatetimeedit.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqwidgetstack.h> // KDE #include <kaction.h> @@ -116,7 +116,7 @@ public: mCheck = c; } - void setDateFilter(const QDate& from, const QDate& to) { + void setDateFilter(const TQDate& from, const TQDate& to) { mFromDate = from; mToDate =to; } @@ -129,10 +129,10 @@ public: public: virtual bool matchesMimeFilter(const KFileItem* item) const { // Do mime filtering ourself because we use startsWith instead of == - QStringList lst = mimeFilters(); - QStringList::Iterator it = lst.begin(), end = lst.end(); + TQStringList lst = mimeFilters(); + TQStringList::Iterator it = lst.begin(), end = lst.end(); bool result = false; - QString type = item->mimetype(); + TQString type = item->mimetype(); for (; it!=end; ++it) { if (type.startsWith(*it)) { result = true; @@ -148,11 +148,11 @@ public: if (!mFromDate.isValid() && !mToDate.isValid()) return result; - // Convert item time to a QDate + // Convert item time to a TQDate time_t time=TimeUtils::getTime(item); - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t(time); - QDate date=dateTime.date(); + TQDate date=dateTime.date(); if (mFromDate.isValid() && date < mFromDate) return false; if (mToDate.isValid() && date > mToDate) return false; @@ -162,8 +162,8 @@ public: private: mutable bool mError; bool mCheck; - QDate mFromDate; - QDate mToDate; + TQDate mFromDate; + TQDate mToDate; }; @@ -180,60 +180,60 @@ public: FileViewController* that; FilterBar* mFilterBar; KToolBar* mToolBar; - QWidgetStack* mStack; + TQWidgetStack* mStack; KSelectAction* mSortAction; KToggleAction* mRevertSortAction; TipTracker* mSliderTracker; - QHBox* mFilterHBox; - QComboBox* mFilterComboBox; - QCheckBox* mShowFilterBarCheckBox; + TQHBox* mFilterHBox; + TQComboBox* mFilterComboBox; + TQCheckBox* mShowFilterBarCheckBox; void initFilterBar() { mFilterBar=new FilterBar(that); - mFilterBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + mFilterBar->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); mFilterBar->hide(); - QIconSet resetIS=BarIcon("locationbar_erase"); + TQIconSet resetIS=BarIcon("locationbar_erase"); mFilterBar->mResetNameCombo->setIconSet(resetIS); mFilterBar->mResetFrom->setIconSet(resetIS); mFilterBar->mResetTo->setIconSet(resetIS); - QObject::connect( - mFilterBar->mResetNameCombo, SIGNAL(clicked()), - that, SLOT(resetNameFilter()) ); - QObject::connect( - mFilterBar->mResetFrom, SIGNAL(clicked()), - that, SLOT(resetFromFilter()) ); - QObject::connect( - mFilterBar->mResetTo, SIGNAL(clicked()), - that, SLOT(resetToFilter()) ); - - QObject::connect( - mFilterBar->mFilterButton, SIGNAL(clicked()), - that, SLOT(applyFilter()) ); + TQObject::connect( + mFilterBar->mResetNameCombo, TQT_SIGNAL(clicked()), + that, TQT_SLOT(resetNameFilter()) ); + TQObject::connect( + mFilterBar->mResetFrom, TQT_SIGNAL(clicked()), + that, TQT_SLOT(resetFromFilter()) ); + TQObject::connect( + mFilterBar->mResetTo, TQT_SIGNAL(clicked()), + that, TQT_SLOT(resetToFilter()) ); + + TQObject::connect( + mFilterBar->mFilterButton, TQT_SIGNAL(clicked()), + that, TQT_SLOT(applyFilter()) ); } void initFilterCombo() { - mFilterHBox=new QHBox(mToolBar, "kde toolbar widget"); + mFilterHBox=new TQHBox(mToolBar, "kde toolbar widget"); mFilterHBox->setSpacing(KDialog::spacingHint()); - mFilterComboBox=new QComboBox(mFilterHBox); + mFilterComboBox=new TQComboBox(mFilterHBox); mFilterComboBox->insertItem(i18n("All files"), ALL); mFilterComboBox->insertItem(i18n("Images only"), IMAGES_ONLY); mFilterComboBox->insertItem(i18n("Videos only"), VIDEOS_ONLY); - QObject::connect( - mFilterComboBox, SIGNAL(activated(int)), - that, SLOT(applyFilter()) ); - - mShowFilterBarCheckBox = new QCheckBox(i18n("More"), mFilterHBox); - QObject::connect( - mShowFilterBarCheckBox, SIGNAL(toggled(bool)), - mFilterBar, SLOT(setShown(bool)) ); - QObject::connect( - mShowFilterBarCheckBox, SIGNAL(toggled(bool)), - that, SLOT(applyFilter()) ); + TQObject::connect( + mFilterComboBox, TQT_SIGNAL(activated(int)), + that, TQT_SLOT(applyFilter()) ); + + mShowFilterBarCheckBox = new TQCheckBox(i18n("More"), mFilterHBox); + TQObject::connect( + mShowFilterBarCheckBox, TQT_SIGNAL(toggled(bool)), + mFilterBar, TQT_SLOT(setShown(bool)) ); + TQObject::connect( + mShowFilterBarCheckBox, TQT_SIGNAL(toggled(bool)), + that, TQT_SLOT(applyFilter()) ); } @@ -252,11 +252,11 @@ public: // FileViewController // //----------------------------------------------------------------------- -FileViewController::FileViewController(QWidget* parent,KActionCollection* actionCollection) -: QWidget(parent) +FileViewController::FileViewController(TQWidget* tqparent,KActionCollection* actionCollection) +: TQWidget(tqparent) , mMode(FILE_LIST) , mPrefetch( NULL ) -, mChangeDirStatus(CHANGE_DIR_STATUS_NONE) +, mChangeDirtqStatus(CHANGE_DIR_STATUS_NONE) , mBrowsing(false) , mSelecting(false) { @@ -266,158 +266,158 @@ FileViewController::FileViewController(QWidget* parent,KActionCollection* action d->mToolBar=new KToolBar(this, "", true); d->initFilterBar(); d->initFilterCombo(); - d->mStack=new QWidgetStack(this); + d->mStack=new TQWidgetStack(this); - QVBoxLayout *layout=new QVBoxLayout(this); - layout->addWidget(d->mToolBar); - layout->addWidget(d->mFilterBar); - layout->addWidget(d->mStack); + TQVBoxLayout *tqlayout=new TQVBoxLayout(this); + tqlayout->addWidget(d->mToolBar); + tqlayout->addWidget(d->mFilterBar); + tqlayout->addWidget(d->mStack); // Actions mSelectFirst=new KAction(i18n("&First"), - QApplication::reverseLayout() ? "2rightarrow":"2leftarrow", Key_Home, - this,SLOT(slotSelectFirst()), actionCollection, "first"); + TQApplication::reverseLayout() ? "2rightarrow":"2leftarrow", Key_Home, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirst()), actionCollection, "first"); mSelectLast=new KAction(i18n("&Last"), - QApplication::reverseLayout() ? "2leftarrow":"2rightarrow", Key_End, - this,SLOT(slotSelectLast()), actionCollection, "last"); + TQApplication::reverseLayout() ? "2leftarrow":"2rightarrow", Key_End, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectLast()), actionCollection, "last"); mSelectPrevious=new KAction(i18n("&Previous"), - QApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace, - this,SLOT(slotSelectPrevious()), actionCollection, "previous"); + TQApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectPrevious()), actionCollection, "previous"); mSelectNext=new KAction(i18n("&Next"), - QApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space, - this,SLOT(slotSelectNext()), actionCollection, "next"); + TQApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectNext()), actionCollection, "next"); mSelectPreviousDir=new KAction(i18n("&Previous Folder"), - QApplication::reverseLayout() ? "player_fwd":"player_rew", ALT + Key_BackSpace, - this,SLOT(slotSelectPreviousDir()), actionCollection, "previous_folder"); + TQApplication::reverseLayout() ? "player_fwd":"player_rew", ALT + Key_BackSpace, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectPreviousDir()), actionCollection, "previous_folder"); mSelectNextDir=new KAction(i18n("&Next Folder"), - QApplication::reverseLayout() ? "player_rew":"player_fwd", ALT + Key_Space, - this,SLOT(slotSelectNextDir()), actionCollection, "next_folder"); + TQApplication::reverseLayout() ? "player_rew":"player_fwd", ALT + Key_Space, + TQT_TQOBJECT(this),TQT_SLOT(slotSelectNextDir()), actionCollection, "next_folder"); mSelectFirstSubDir=new KAction(i18n("&First Sub Folder"), "down", ALT + Key_Down, - this,SLOT(slotSelectFirstSubDir()), actionCollection, "first_sub_folder"); + TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirstSubDir()), actionCollection, "first_sub_folder"); - mListMode=new KRadioAction(i18n("Details"),"view_detailed",0,this,SLOT(updateViewMode()),actionCollection,"list_mode"); + mListMode=new KRadioAction(i18n("Details"),"view_detailed",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"list_mode"); mListMode->setExclusiveGroup("thumbnails"); - mSideThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Side"),"view_multicolumn",0,this,SLOT(updateViewMode()),actionCollection,"side_thumbnail_mode"); + mSideThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Side"),"view_multicolumn",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"side_thumbnail_mode"); mSideThumbnailMode->setExclusiveGroup("thumbnails"); - mBottomThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Bottom"),"view_icon",0,this,SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode"); + mBottomThumbnailMode=new KRadioAction(i18n("Thumbnails with Info on Bottom"),"view_icon",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode"); mBottomThumbnailMode->setExclusiveGroup("thumbnails"); // Size slider - mSizeSlider=new QSlider(Horizontal, d->mToolBar); + mSizeSlider=new TQSlider(Qt::Horizontal, d->mToolBar); mSizeSlider->setFixedWidth(120); mSizeSlider->setRange( ThumbnailSize::MIN/SLIDER_RESOLUTION, ThumbnailSize::LARGE/SLIDER_RESOLUTION); mSizeSlider->setValue(FileViewConfig::thumbnailSize() / SLIDER_RESOLUTION); - connect(mSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateThumbnailSize(int)) ); - connect(mListMode, SIGNAL(toggled(bool)), mSizeSlider, SLOT(setDisabled(bool)) ); + connect(mSizeSlider, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(updateThumbnailSize(int)) ); + connect(mListMode, TQT_SIGNAL(toggled(bool)), mSizeSlider, TQT_SLOT(setDisabled(bool)) ); KAction* sliderAction=new KWidgetAction(mSizeSlider, i18n("Thumbnail Size"), 0, 0, 0, actionCollection, "size_slider"); d->mSliderTracker=new TipTracker("", mSizeSlider); // /Size slider - mShowDotFiles=new KToggleAction(i18n("Show &Hidden Files"),CTRL + Key_H,this,SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files"); + mShowDotFiles=new KToggleAction(i18n("Show &Hidden Files"),CTRL + Key_H,TQT_TQOBJECT(this),TQT_SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files"); - d->mSortAction=new KSelectAction(i18n("Sort"), 0, this, SLOT(setSorting()), actionCollection, "view_sort"); - QStringList sortItems; + d->mSortAction=new KSelectAction(i18n("Sort"), 0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "view_sort"); + TQStringList sortItems; sortItems << i18n("By Name") << i18n("By Date") << i18n("By Size"); d->mSortAction->setItems(sortItems); d->mSortAction->setCurrentItem(0); - d->mRevertSortAction=new KToggleAction(i18n("Descending"),0, this, SLOT(setSorting()), actionCollection, "descending"); - QPopupMenu* sortMenu=d->mSortAction->popupMenu(); + d->mRevertSortAction=new KToggleAction(i18n("Descending"),0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "descending"); + TQPopupMenu* sortMenu=d->mSortAction->popupMenu(); Q_ASSERT(sortMenu); sortMenu->insertSeparator(); d->mRevertSortAction->plug(sortMenu); // Dir lister mDirLister=new DirLister; - mDirLister->setMainWindow(topLevelWidget()); - connect(mDirLister,SIGNAL(clear()), - this,SLOT(dirListerClear()) ); + mDirLister->setMainWindow(tqtopLevelWidget()); + connect(mDirLister,TQT_SIGNAL(clear()), + TQT_TQOBJECT(this),TQT_SLOT(dirListerClear()) ); - connect(mDirLister,SIGNAL(newItems(const KFileItemList&)), - this,SLOT(dirListerNewItems(const KFileItemList&)) ); + connect(mDirLister,TQT_SIGNAL(newItems(const KFileItemList&)), + TQT_TQOBJECT(this),TQT_SLOT(dirListerNewItems(const KFileItemList&)) ); - connect(mDirLister,SIGNAL(deleteItem(KFileItem*)), - this,SLOT(dirListerDeleteItem(KFileItem*)) ); + connect(mDirLister,TQT_SIGNAL(deleteItem(KFileItem*)), + TQT_TQOBJECT(this),TQT_SLOT(dirListerDeleteItem(KFileItem*)) ); - connect(mDirLister,SIGNAL(refreshItems(const KFileItemList&)), - this,SLOT(dirListerRefreshItems(const KFileItemList&)) ); + connect(mDirLister,TQT_SIGNAL(refreshItems(const KFileItemList&)), + TQT_TQOBJECT(this),TQT_SLOT(dirListerRefreshItems(const KFileItemList&)) ); - connect(mDirLister,SIGNAL(started(const KURL&)), - this,SLOT(dirListerStarted()) ); + connect(mDirLister,TQT_SIGNAL(started(const KURL&)), + TQT_TQOBJECT(this),TQT_SLOT(dirListerStarted()) ); - connect(mDirLister,SIGNAL(completed()), - this,SLOT(dirListerCompleted()) ); + connect(mDirLister,TQT_SIGNAL(completed()), + TQT_TQOBJECT(this),TQT_SLOT(dirListerCompleted()) ); - connect(mDirLister,SIGNAL(canceled()), - this,SLOT(dirListerCanceled()) ); + connect(mDirLister,TQT_SIGNAL(canceled()), + TQT_TQOBJECT(this),TQT_SLOT(dirListerCanceled()) ); // Propagate canceled signals - connect(mDirLister,SIGNAL(canceled()), - this,SIGNAL(canceled()) ); + connect(mDirLister,TQT_SIGNAL(canceled()), + this,TQT_SIGNAL(canceled()) ); // File detail widget mFileDetailView=new FileDetailView(d->mStack, "filedetailview"); d->mStack->addWidget(mFileDetailView,0); mFileDetailView->viewport()->installEventFilter(this); - connect(mFileDetailView,SIGNAL(executed(QListViewItem*)), - this,SLOT(slotViewExecuted()) ); - connect(mFileDetailView,SIGNAL(returnPressed(QListViewItem*)), - this,SLOT(slotViewExecuted()) ); - connect(mFileDetailView,SIGNAL(currentChanged(QListViewItem*)), - this,SLOT(slotViewClicked()) ); - connect(mFileDetailView,SIGNAL(selectionChanged()), - this,SLOT(slotViewClicked()) ); - connect(mFileDetailView,SIGNAL(clicked(QListViewItem*)), - this,SLOT(slotViewClicked()) ); - connect(mFileDetailView,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this,SLOT(openContextMenu(KListView*, QListViewItem*, const QPoint&)) ); - connect(mFileDetailView,SIGNAL(dropped(QDropEvent*,KFileItem*)), - this,SLOT(openDropURLMenu(QDropEvent*, KFileItem*)) ); - connect(mFileDetailView, SIGNAL(sortingChanged(QDir::SortSpec)), - this, SLOT(updateSortMenu(QDir::SortSpec)) ); - connect(mFileDetailView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotViewDoubleClicked()) ); - connect(mFileDetailView, SIGNAL(selectionChanged()), - this, SIGNAL(selectionChanged()) ); + connect(mFileDetailView,TQT_SIGNAL(executed(TQListViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) ); + connect(mFileDetailView,TQT_SIGNAL(returnPressed(TQListViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) ); + connect(mFileDetailView,TQT_SIGNAL(currentChanged(TQListViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileDetailView,TQT_SIGNAL(selectionChanged()), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileDetailView,TQT_SIGNAL(clicked(TQListViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileDetailView,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + TQT_TQOBJECT(this),TQT_SLOT(openContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); + connect(mFileDetailView,TQT_SIGNAL(dropped(TQDropEvent*,KFileItem*)), + TQT_TQOBJECT(this),TQT_SLOT(openDropURLMenu(TQDropEvent*, KFileItem*)) ); + connect(mFileDetailView, TQT_SIGNAL(sortingChanged(TQDir::SortSpec)), + this, TQT_SLOT(updateSortMenu(TQDir::SortSpec)) ); + connect(mFileDetailView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotViewDoubleClicked()) ); + connect(mFileDetailView, TQT_SIGNAL(selectionChanged()), + this, TQT_SIGNAL(selectionChanged()) ); // Thumbnail widget mFileThumbnailView=new FileThumbnailView(d->mStack); d->mStack->addWidget(mFileThumbnailView,1); mFileThumbnailView->viewport()->installEventFilter(this); - connect(mFileThumbnailView,SIGNAL(executed(QIconViewItem*)), - this,SLOT(slotViewExecuted()) ); - connect(mFileThumbnailView,SIGNAL(returnPressed(QIconViewItem*)), - this,SLOT(slotViewExecuted()) ); - connect(mFileThumbnailView,SIGNAL(currentChanged(QIconViewItem*)), - this,SLOT(slotViewClicked()) ); - connect(mFileThumbnailView,SIGNAL(selectionChanged()), - this,SLOT(slotViewClicked()) ); - connect(mFileThumbnailView,SIGNAL(clicked(QIconViewItem*)), - this,SLOT(slotViewClicked()) ); - connect(mFileThumbnailView,SIGNAL(contextMenuRequested(QIconViewItem*,const QPoint&)), - this,SLOT(openContextMenu(QIconViewItem*,const QPoint&)) ); - connect(mFileThumbnailView,SIGNAL(dropped(QDropEvent*,KFileItem*)), - this,SLOT(openDropURLMenu(QDropEvent*, KFileItem*)) ); - connect(mFileThumbnailView, SIGNAL(doubleClicked(QIconViewItem*)), - this, SLOT(slotViewDoubleClicked()) ); - connect(mFileThumbnailView, SIGNAL(selectionChanged()), - this, SIGNAL(selectionChanged()) ); + connect(mFileThumbnailView,TQT_SIGNAL(executed(TQIconViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) ); + connect(mFileThumbnailView,TQT_SIGNAL(returnPressed(TQIconViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewExecuted()) ); + connect(mFileThumbnailView,TQT_SIGNAL(currentChanged(TQIconViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileThumbnailView,TQT_SIGNAL(selectionChanged()), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileThumbnailView,TQT_SIGNAL(clicked(TQIconViewItem*)), + TQT_TQOBJECT(this),TQT_SLOT(slotViewClicked()) ); + connect(mFileThumbnailView,TQT_SIGNAL(contextMenuRequested(TQIconViewItem*,const TQPoint&)), + TQT_TQOBJECT(this),TQT_SLOT(openContextMenu(TQIconViewItem*,const TQPoint&)) ); + connect(mFileThumbnailView,TQT_SIGNAL(dropped(TQDropEvent*,KFileItem*)), + TQT_TQOBJECT(this),TQT_SLOT(openDropURLMenu(TQDropEvent*, KFileItem*)) ); + connect(mFileThumbnailView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), + this, TQT_SLOT(slotViewDoubleClicked()) ); + connect(mFileThumbnailView, TQT_SIGNAL(selectionChanged()), + this, TQT_SIGNAL(selectionChanged()) ); // Thumbnail details dialog - KAction* thumbnailDetailsDialogAction=new KAction(i18n("Edit Thumbnail Details..."), "configure", 0, mFileThumbnailView, SLOT(showThumbnailDetailsDialog()), actionCollection, "thumbnail_details_dialog"); - connect(mBottomThumbnailMode, SIGNAL(toggled(bool)), - thumbnailDetailsDialogAction, SLOT(setEnabled(bool)) ); + KAction* thumbnailDetailsDialogAction=new KAction(i18n("Edit Thumbnail Details..."), "configure", 0, TQT_TQOBJECT(mFileThumbnailView), TQT_SLOT(showThumbnailDetailsDialog()), actionCollection, "thumbnail_details_dialog"); + connect(mBottomThumbnailMode, TQT_SIGNAL(toggled(bool)), + thumbnailDetailsDialogAction, TQT_SLOT(setEnabled(bool)) ); // Fill toolbar mListMode->plug(d->mToolBar); @@ -438,7 +438,7 @@ FileViewController::FileViewController(QWidget* parent,KActionCollection* action mSizeSlider->setEnabled(startWithThumbnails); if (startWithThumbnails) { - if (mFileThumbnailView->itemTextPos()==QIconView::Right) { + if (mFileThumbnailView->itemTextPos()==TQIconView::Right) { mSideThumbnailMode->setChecked(true); } else { mBottomThumbnailMode->setChecked(true); @@ -485,11 +485,11 @@ void FileViewController::setFocus() { * Do not let double click events propagate if Ctrl or Shift is down, to avoid * toggling fullscreen */ -bool FileViewController::eventFilter(QObject*, QEvent* event) { - if (event->type()!=QEvent::MouseButtonDblClick) return false; +bool FileViewController::eventFilter(TQObject*, TQEvent* event) { + if (event->type()!=TQEvent::MouseButtonDblClick) return false; - QMouseEvent* mouseEvent=static_cast<QMouseEvent*>(event); - if (mouseEvent->state() & Qt::ControlButton || mouseEvent->state() & Qt::ShiftButton) { + TQMouseEvent* mouseEvent=TQT_TQMOUSEEVENT(event); + if (mouseEvent->state() & TQt::ControlButton || mouseEvent->state() & TQt::ShiftButton) { return true; } return false; @@ -521,7 +521,7 @@ void FileViewController::setDirURL(const KURL& url) { mDirLister->clearError(); currentFileView()->setShownFileItem(0L); - mFileNameToSelect=QString::null; + mFileNameToSelect=TQString(); mDirLister->openURL(mDirURL); emit urlChanged(mDirURL); emit directoryChanged(mDirURL); @@ -533,7 +533,7 @@ void FileViewController::setDirURL(const KURL& url) { * Sets the file to select once the dir lister is done. If it's not running, * immediatly selects the file. */ -void FileViewController::setFileNameToSelect(const QString& fileName) { +void FileViewController::setFileNameToSelect(const TQString& fileName) { mFileNameToSelect=fileName; if (mDirLister->isFinished()) { browseToFileNameToSelect(); @@ -543,13 +543,13 @@ void FileViewController::setFileNameToSelect(const QString& fileName) { void FileViewController::prefetch( KFileItem* item ) { prefetchDone(); if( item == NULL ) return; - mPrefetch = ImageLoader::loader( item->url(), this, BUSY_PRELOADING ); - connect( mPrefetch, SIGNAL( imageLoaded( bool )), SLOT( prefetchDone())); + mPrefetch = ImageLoader::loader( item->url(), TQT_TQOBJECT(this), BUSY_PRELOADING ); + connect( mPrefetch, TQT_SIGNAL( imageLoaded( bool )), TQT_SLOT( prefetchDone())); } void FileViewController::prefetchDone() { if( mPrefetch != NULL ) { - mPrefetch->release( this ); + mPrefetch->release( TQT_TQOBJECT(this) ); mPrefetch = NULL; } } @@ -575,13 +575,13 @@ void FileViewController::slotSelectNext() { } void FileViewController::slotSelectPreviousDir() { - mChangeDirStatus = CHANGE_DIR_STATUS_PREV; + mChangeDirtqStatus = CHANGE_DIR_STATUS_PREV; mDirLister->clearError(); mDirLister->openURL(mDirURL.upURL()); } void FileViewController::slotSelectNextDir() { - mChangeDirStatus = CHANGE_DIR_STATUS_NEXT; + mChangeDirtqStatus = CHANGE_DIR_STATUS_NEXT; mDirLister->clearError(); mDirLister->openURL(mDirURL.upURL()); } @@ -611,12 +611,12 @@ void FileViewController::resetNameFilter() { void FileViewController::resetFromFilter() { - d->mFilterBar->mFromDateEdit->setDate(QDate()); + d->mFilterBar->mFromDateEdit->setDate(TQDate()); } void FileViewController::resetToFilter() { - d->mFilterBar->mToDateEdit->setDate(QDate()); + d->mFilterBar->mToDateEdit->setDate(TQDate()); } @@ -642,7 +642,7 @@ void FileViewController::browseToFileNameToSelect() { // There's something to select if (!mFileNameToSelect.isEmpty()) { browseTo(findItemByFileName(mFileNameToSelect)); - mFileNameToSelect=QString::null; + mFileNameToSelect=TQString(); return; } @@ -722,9 +722,9 @@ void FileViewController::updateViewMode() { return; } if (mSideThumbnailMode->isChecked()) { - mFileThumbnailView->setItemTextPos(QIconView::Right); + mFileThumbnailView->setItemTextPos(TQIconView::Right); } else { - mFileThumbnailView->setItemTextPos(QIconView::Bottom); + mFileThumbnailView->setItemTextPos(TQIconView::Bottom); } // Only switch the view if we are going from no thumbs to either side or @@ -747,7 +747,7 @@ void FileViewController::updateViewMode() { void FileViewController::updateThumbnailSize(int size) { size*=SLIDER_RESOLUTION; - d->mSliderTracker->setText(i18n("Thumbnail size: %1x%2").arg(size).arg(size)); + d->mSliderTracker->setText(i18n("Thumbnail size: %1x%2").tqarg(size).tqarg(size)); FileViewConfig::setThumbnailSize(size); mFileThumbnailView->setThumbnailSize(size); Cache::instance()->checkThumbnailSize(size); @@ -760,17 +760,17 @@ void FileViewController::toggleShowDotFiles() { } -void FileViewController::updateSortMenu(QDir::SortSpec _spec) { - int spec=_spec & (QDir::Name | QDir::Time | QDir::Size); +void FileViewController::updateSortMenu(TQDir::SortSpec _spec) { + int spec=_spec & (TQDir::Name | TQDir::Time | TQDir::Size); int item; switch (spec) { - case QDir::Name: + case TQDir::Name: item=0; break; - case QDir::Time: + case TQDir::Time: item=1; break; - case QDir::Size: + case TQDir::Size: item=2; break; default: @@ -782,25 +782,25 @@ void FileViewController::updateSortMenu(QDir::SortSpec _spec) { void FileViewController::setSorting() { - QDir::SortSpec spec; + TQDir::SortSpec spec; switch (d->mSortAction->currentItem()) { case 0: // Name - spec=QDir::Name; + spec=TQDir::Name; break; case 1: // Date - spec=QDir::Time; + spec=TQDir::Time; break; case 2: // Size - spec=QDir::Size; + spec=TQDir::Size; break; default: return; } if (d->mRevertSortAction->isChecked()) { - spec=QDir::SortSpec(spec | QDir::Reversed); + spec=TQDir::SortSpec(spec | TQDir::Reversed); } - currentFileView()->setSorting(QDir::SortSpec(spec | QDir::DirsFirst)); + currentFileView()->setSorting(TQDir::SortSpec(spec | TQDir::DirsFirst)); emit sortingChanged(); } @@ -810,12 +810,12 @@ void FileViewController::setSorting() { // Context menu // //----------------------------------------------------------------------- -void FileViewController::openContextMenu(KListView*,QListViewItem* item,const QPoint& pos) { +void FileViewController::openContextMenu(KListView*,TQListViewItem* item,const TQPoint& pos) { emit requestContextMenu(pos, item!=0); } -void FileViewController::openContextMenu(QIconViewItem* item,const QPoint& pos) { +void FileViewController::openContextMenu(TQIconViewItem* item,const TQPoint& pos) { emit requestContextMenu(pos, item!=0); } @@ -825,7 +825,7 @@ void FileViewController::openContextMenu(QIconViewItem* item,const QPoint& pos) // Drop URL menu // //----------------------------------------------------------------------- -void FileViewController::openDropURLMenu(QDropEvent* event, KFileItem* item) { +void FileViewController::openDropURLMenu(TQDropEvent* event, KFileItem* item) { KURL dest; if (item) { @@ -884,7 +884,7 @@ KURL::List FileViewController::selectedImageURLs() const { // Properties // //----------------------------------------------------------------------- -QString FileViewController::fileName() const { +TQString FileViewController::fileName() const { KFileItem* item=currentFileView()->currentFileItem(); if (!item) return ""; return item->text(); @@ -1064,7 +1064,7 @@ void FileViewController::refreshItems(const KURL::List& urls) { it != urls.end(); ++it ) { KURL dir = *it; - dir.setFileName( QString::null ); + dir.setFileName( TQString() ); if( dir != mDirURL ) continue; // TODO this could be quite slow for many images? KFileItem* item = findItemByFileName( (*it).filename()); @@ -1089,7 +1089,7 @@ void FileViewController::dirListerCompleted() { LOG(""); // Delay the code to be executed when the dir lister has completed its job // to avoid crash in KDirLister (see bug #57991) - QTimer::singleShot(0,this,SLOT(delayedDirListerCompleted())); + TQTimer::singleShot(0,TQT_TQOBJECT(this),TQT_SLOT(delayedDirListerCompleted())); } @@ -1102,12 +1102,12 @@ void FileViewController::delayedDirListerCompleted() { mFileThumbnailView->sort(mFileThumbnailView->sortDirection()); } - if (mChangeDirStatus != CHANGE_DIR_STATUS_NONE) { + if (mChangeDirtqStatus != CHANGE_DIR_STATUS_NONE) { KFileItem *item; - QString fileName = mDirURL.filename(); + TQString fileName = mDirURL.filename(); for (item=currentFileView()->firstFileItem(); item; item=currentFileView()->nextItem(item) ) { if (item->name() == fileName) { - if (mChangeDirStatus == CHANGE_DIR_STATUS_NEXT) { + if (mChangeDirtqStatus == CHANGE_DIR_STATUS_NEXT) { do { item=currentFileView()->nextItem(item); } while (item && !Archive::fileItemIsDirOrArchive(item)); @@ -1119,7 +1119,7 @@ void FileViewController::delayedDirListerCompleted() { break; }; } - mChangeDirStatus = CHANGE_DIR_STATUS_NONE; + mChangeDirtqStatus = CHANGE_DIR_STATUS_NONE; if (!item) { mDirLister->openURL(mDirURL); } else { @@ -1161,23 +1161,23 @@ void FileViewController::setFilterMode(int mode) { } -void FileViewController::setFilterName(const QString& name) { +void FileViewController::setFilterName(const TQString& name) { d->mFilterBar->mNameEdit->setText(name); } -void FileViewController::setFilterFromDate(const QDate& date) { +void FileViewController::setFilterFromDate(const TQDate& date) { d->mFilterBar->mFromDateEdit->setDate(date); } -void FileViewController::setFilterToDate(const QDate& date) { +void FileViewController::setFilterToDate(const TQDate& date) { d->mFilterBar->mToDateEdit->setDate(date); } void FileViewController::applyFilter() { - QStringList mimeTypes; + TQStringList mimeTypes; FilterMode filterMode = static_cast<FilterMode>( d->mFilterComboBox->currentItem() ); if (FileViewConfig::showDirs()) { @@ -1195,15 +1195,15 @@ void FileViewController::applyFilter() { } if (d->mShowFilterBarCheckBox->isChecked()) { - QString txt=d->mFilterBar->mNameEdit->text(); - QDate from=d->mFilterBar->mFromDateEdit->date(); - QDate to=d->mFilterBar->mToDateEdit->date(); + TQString txt=d->mFilterBar->mNameEdit->text(); + TQDate from=d->mFilterBar->mFromDateEdit->date(); + TQDate to=d->mFilterBar->mToDateEdit->date(); mDirLister->setNameFilter(txt); mDirLister->setDateFilter(from, to); } else { - mDirLister->setNameFilter(QString::null); - mDirLister->setDateFilter(QDate(), QDate()); + mDirLister->setNameFilter(TQString()); + mDirLister->setDateFilter(TQDate(), TQDate()); } mDirLister->setShowingDotFiles(mShowDotFiles->isChecked()); @@ -1305,7 +1305,7 @@ KFileItem* FileViewController::findNextImage() const { return item; } -KFileItem* FileViewController::findItemByFileName(const QString& fileName) const { +KFileItem* FileViewController::findItemByFileName(const TQString& fileName) const { KFileItem *item; if (fileName.isEmpty()) return 0L; for (item=currentFileView()->firstFileItem(); |