diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 14:59:02 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 14:59:02 -0600 |
commit | 5920e96087707ba892650898521dac63152274f9 (patch) | |
tree | f8c9eba82d742338798e31b9edb7d90aa9c55ce9 /src/gvcore | |
parent | 50ccc22eb9b1f32c842956f0207baaf7da8f0f6f (diff) | |
download | gwenview-5920e96087707ba892650898521dac63152274f9.tar.gz gwenview-5920e96087707ba892650898521dac63152274f9.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/gvcore')
-rw-r--r-- | src/gvcore/deletedialogbase.ui | 2 | ||||
-rw-r--r-- | src/gvcore/externaltoolaction.cpp | 2 | ||||
-rw-r--r-- | src/gvcore/externaltoolaction.h | 4 | ||||
-rw-r--r-- | src/gvcore/externaltooldialog.cpp | 12 | ||||
-rw-r--r-- | src/gvcore/externaltooldialogbase.ui | 4 | ||||
-rw-r--r-- | src/gvcore/externaltoolmanager.h | 2 | ||||
-rw-r--r-- | src/gvcore/filedetailview.cpp | 22 | ||||
-rw-r--r-- | src/gvcore/filedetailview.h | 8 | ||||
-rw-r--r-- | src/gvcore/filedetailviewitem.cpp | 2 | ||||
-rw-r--r-- | src/gvcore/filedetailviewitem.h | 8 | ||||
-rw-r--r-- | src/gvcore/fileviewcontroller.cpp | 46 | ||||
-rw-r--r-- | src/gvcore/fileviewcontroller.h | 60 | ||||
-rw-r--r-- | src/gvcore/fullscreenbar.cpp | 6 | ||||
-rw-r--r-- | src/gvcore/fullscreenbar.h | 2 | ||||
-rw-r--r-- | src/gvcore/imageview.cpp | 66 | ||||
-rw-r--r-- | src/gvcore/imageview.h | 12 | ||||
-rw-r--r-- | src/gvcore/imageviewcontroller.cpp | 36 | ||||
-rw-r--r-- | src/gvcore/imageviewcontroller.h | 10 |
18 files changed, 152 insertions, 152 deletions
diff --git a/src/gvcore/deletedialogbase.ui b/src/gvcore/deletedialogbase.ui index 7a8ffd4..1574b01 100644 --- a/src/gvcore/deletedialogbase.ui +++ b/src/gvcore/deletedialogbase.ui @@ -62,7 +62,7 @@ </widget> </hbox> </widget> - <widget class="KListBox"> + <widget class="TDEListBox"> <property name="name"> <cstring>ddFileList</cstring> </property> diff --git a/src/gvcore/externaltoolaction.cpp b/src/gvcore/externaltoolaction.cpp index 6acc03a..b325840 100644 --- a/src/gvcore/externaltoolaction.cpp +++ b/src/gvcore/externaltoolaction.cpp @@ -33,7 +33,7 @@ namespace Gwenview { ExternalToolAction::ExternalToolAction( TQObject* parent, const KService* service, const KURL::List& urls) -: KAction(parent) +: TDEAction(parent) , mService(service) , mURLs(urls) { diff --git a/src/gvcore/externaltoolaction.h b/src/gvcore/externaltoolaction.h index 9e5e1ff..711f0c0 100644 --- a/src/gvcore/externaltoolaction.h +++ b/src/gvcore/externaltoolaction.h @@ -29,10 +29,10 @@ class KService; namespace Gwenview { /** - * A specialized version of KAction, which is aware of the tool to run as well + * A specialized version of TDEAction, which is aware of the tool to run as well * as the urls to call it with. */ -class ExternalToolAction : public KAction { +class ExternalToolAction : public TDEAction { Q_OBJECT public: diff --git a/src/gvcore/externaltooldialog.cpp b/src/gvcore/externaltooldialog.cpp index dd5d053..33c4aff 100644 --- a/src/gvcore/externaltooldialog.cpp +++ b/src/gvcore/externaltooldialog.cpp @@ -49,10 +49,10 @@ namespace Gwenview { enum { ID_ALL_IMAGES=0, ID_ALL_FILES, ID_CUSTOM }; -class ToolListViewItem : public KListViewItem { +class ToolListViewItem : public TDEListViewItem { public: - ToolListViewItem(KListView* parent, const TQString& label) - : KListViewItem(parent, label), mDesktopFile(0L) {} + ToolListViewItem(TDEListView* parent, const TQString& label) + : TDEListViewItem(parent, label), mDesktopFile(0L) {} void setDesktopFile(KDesktopFile* df) { mDesktopFile=df; @@ -285,7 +285,7 @@ ExternalToolDialog::ExternalToolDialog(TQWidget* parent) connect( d->mContent->mMoreTools, TQT_SIGNAL(leftClickedURL(const TQString&)), this, TQT_SLOT(openURL(const TQString&)) ); - KListView* view=d->mContent->mToolListView; + TDEListView* view=d->mContent->mToolListView; if (view->firstChild()) { view->setSelected(view->firstChild(), true); } @@ -321,7 +321,7 @@ void ExternalToolDialog::slotSelectionChanged(TQListViewItem* item) { void ExternalToolDialog::addTool() { - KListView* view=d->mContent->mToolListView; + TDEListView* view=d->mContent->mToolListView; TQString name=i18n("<Unnamed tool>"); ToolListViewItem* item=new ToolListViewItem(view, name); view->setSelected(item, true); @@ -329,7 +329,7 @@ void ExternalToolDialog::addTool() { void ExternalToolDialog::deleteTool() { - KListView* view=d->mContent->mToolListView; + TDEListView* view=d->mContent->mToolListView; ToolListViewItem* item=static_cast<ToolListViewItem*>(view->selectedItem()); if (!item) return; diff --git a/src/gvcore/externaltooldialogbase.ui b/src/gvcore/externaltooldialogbase.ui index e35f222..ee43330 100644 --- a/src/gvcore/externaltooldialogbase.ui +++ b/src/gvcore/externaltooldialogbase.ui @@ -72,7 +72,7 @@ <string>&Add</string> </property> </widget> - <widget class="KListView" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TDEListView" row="0" column="0" rowspan="1" colspan="2"> <column> <property name="text"> <string>Name</string> @@ -311,7 +311,7 @@ You can use keywords in the Command field: </size> </property> </spacer> - <widget class="KListView" row="2" column="1" rowspan="2" colspan="1"> + <widget class="TDEListView" row="2" column="1" rowspan="2" colspan="1"> <column> <property name="text"> <string>Mime Type</string> diff --git a/src/gvcore/externaltoolmanager.h b/src/gvcore/externaltoolmanager.h index 00fe169..4668757 100644 --- a/src/gvcore/externaltoolmanager.h +++ b/src/gvcore/externaltoolmanager.h @@ -31,7 +31,7 @@ Copyright 2000-2004 Aurélien Gâteau // Local #include "libgwenview_export.h" -class KActionMenu; +class TDEActionMenu; class KURL; namespace Gwenview { diff --git a/src/gvcore/filedetailview.cpp b/src/gvcore/filedetailview.cpp index 1328100..6d2dbb1 100644 --- a/src/gvcore/filedetailview.cpp +++ b/src/gvcore/filedetailview.cpp @@ -74,7 +74,7 @@ static TQPixmap createShownItemPixmap(int size, const TQColor& color) { FileDetailView::FileDetailView(TQWidget *parent, const char *name) - : KListView(parent, name), FileViewBase() + : TDEListView(parent, name), FileViewBase() { mSortingCol = COL_NAME; mBlockSortingSignal = false; @@ -140,14 +140,14 @@ void FileDetailView::setSelected( const KFileItem *info, bool enable ) { if (!info) return; FileDetailViewItem *item = viewItem(info); - if (item) KListView::setSelected(item, enable); + if (item) TDEListView::setSelected(item, enable); } void FileDetailView::setCurrentItem( const KFileItem *item ) { if (!item) return; FileDetailViewItem *listItem = viewItem(item); - if (listItem) KListView::setCurrentItem(listItem); + if (listItem) TDEListView::setCurrentItem(listItem); } KFileItem * FileDetailView::currentFileItem() const @@ -160,17 +160,17 @@ KFileItem * FileDetailView::currentFileItem() const void FileDetailView::clearSelection() { - KListView::clearSelection(); + TDEListView::clearSelection(); } void FileDetailView::selectAll() { - KListView::selectAll( true ); + TDEListView::selectAll( true ); } void FileDetailView::invertSelection() { - KListView::invertSelection(); + TDEListView::invertSelection(); } void FileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos ) @@ -187,7 +187,7 @@ void FileDetailView::clearView() { mResolver->m_lstPendingMimeIconItems.clear(); mShownFileItem=0L; - KListView::clear(); + TDEListView::clear(); } void FileDetailView::insertItem( KFileItem *i ) @@ -349,8 +349,8 @@ void FileDetailView::slotSortingChanged( int col ) if (thumbItem) setSortingKey(thumbItem,item); } - KListView::setSorting( mSortingCol, !reversed ); - KListView::sort(); + TDEListView::setSorting( mSortingCol, !reversed ); + TDEListView::sort(); if (!mBlockSortingSignal) sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) ); } @@ -390,7 +390,7 @@ void FileDetailView::ensureItemVisible( const KFileItem *i ) FileDetailViewItem *item = viewItem(i); - if ( item ) KListView::ensureItemVisible( item ); + if ( item ) TDEListView::ensureItemVisible( item ); } // we're in multiselection mode @@ -434,7 +434,7 @@ KFileItem * FileDetailView::prevItem( const KFileItem *fileItem ) const void FileDetailView::keyPressEvent( TQKeyEvent *e ) { - KListView::keyPressEvent( e ); + TDEListView::keyPressEvent( e ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { if ( e->state() & ControlButton ) diff --git a/src/gvcore/filedetailview.h b/src/gvcore/filedetailview.h index 7b77b26..64569bf 100644 --- a/src/gvcore/filedetailview.h +++ b/src/gvcore/filedetailview.h @@ -41,7 +41,7 @@ namespace Gwenview { class FileDetailViewItem; -class FileDetailView : public KListView, public FileViewBase +class FileDetailView : public TDEListView, public FileViewBase { Q_OBJECT @@ -111,9 +111,9 @@ private: bool mBlockSortingSignal; KMimeTypeResolver<FileDetailViewItem,FileDetailView>* mResolver; - virtual void insertItem(TQListViewItem* i) { KListView::insertItem(i); } - virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); } - virtual void setSelected(TQListViewItem* i, bool b) { KListView::setSelected(i, b); } + virtual void insertItem(TQListViewItem* i) { TDEListView::insertItem(i); } + virtual void setSorting(int i, bool b) { TDEListView::setSorting(i, b); } + virtual void setSelected(TQListViewItem* i, bool b) { TDEListView::setSelected(i, b); } FileDetailViewItem* viewItem( const KFileItem* item ) const { if (item) return (FileDetailViewItem*)item->extraData(this); diff --git a/src/gvcore/filedetailviewitem.cpp b/src/gvcore/filedetailviewitem.cpp index e841459..8342d77 100644 --- a/src/gvcore/filedetailviewitem.cpp +++ b/src/gvcore/filedetailviewitem.cpp @@ -48,7 +48,7 @@ void FileDetailViewItem::init() const TQPixmap* FileDetailViewItem::pixmap(int column) const { - const TQPixmap* normalPix = KListViewItem::pixmap(column); + const TQPixmap* normalPix = TDEListViewItem::pixmap(column); if (column!=0) { return normalPix; } diff --git a/src/gvcore/filedetailviewitem.h b/src/gvcore/filedetailviewitem.h index d374ae0..1c04e24 100644 --- a/src/gvcore/filedetailviewitem.h +++ b/src/gvcore/filedetailviewitem.h @@ -36,25 +36,25 @@ namespace Gwenview { #define COL_OWNER 4 #define COL_GROUP 5 -class FileDetailViewItem : public KListViewItem +class FileDetailViewItem : public TDEListViewItem { public: FileDetailViewItem( TQListView* parent, const TQString &text, const TQPixmap &icon, KFileItem* fi ) - : KListViewItem( parent, text ), inf( fi ) { + : TDEListViewItem( parent, text ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } FileDetailViewItem( TQListView* parent, KFileItem* fi ) - : KListViewItem( parent ), inf( fi ) { + : TDEListViewItem( parent ), inf( fi ) { init(); } FileDetailViewItem( TQListView* parent, const TQString &text, const TQPixmap &icon, KFileItem* fi, TQListViewItem* after) - : KListViewItem( parent, after ), inf( fi ) { + : TDEListViewItem( parent, after ), inf( fi ) { setPixmap( 0, icon ); setText( 0, text ); } diff --git a/src/gvcore/fileviewcontroller.cpp b/src/gvcore/fileviewcontroller.cpp index bf49201..4c0aa22 100644 --- a/src/gvcore/fileviewcontroller.cpp +++ b/src/gvcore/fileviewcontroller.cpp @@ -179,10 +179,10 @@ public: } FileViewController* that; FilterBar* mFilterBar; - KToolBar* mToolBar; + TDEToolBar* mToolBar; TQWidgetStack* mStack; - KSelectAction* mSortAction; - KToggleAction* mRevertSortAction; + TDESelectAction* mSortAction; + TDEToggleAction* mRevertSortAction; TipTracker* mSliderTracker; TQHBox* mFilterHBox; @@ -252,7 +252,7 @@ public: // FileViewController // //----------------------------------------------------------------------- -FileViewController::FileViewController(TQWidget* parent,KActionCollection* actionCollection) +FileViewController::FileViewController(TQWidget* parent,TDEActionCollection* actionCollection) : TQWidget(parent) , mMode(FILE_LIST) , mPrefetch( NULL ) @@ -263,7 +263,7 @@ FileViewController::FileViewController(TQWidget* parent,KActionCollection* actio d=new Private; d->that=this; setMinimumWidth(1); - d->mToolBar=new KToolBar(this, "", true); + d->mToolBar=new TDEToolBar(this, "", true); d->initFilterBar(); d->initFilterCombo(); d->mStack=new TQWidgetStack(this); @@ -274,38 +274,38 @@ FileViewController::FileViewController(TQWidget* parent,KActionCollection* actio layout->addWidget(d->mStack); // Actions - mSelectFirst=new KAction(i18n("&First"), + mSelectFirst=new TDEAction(i18n("&First"), TQApplication::reverseLayout() ? "2rightarrow":"2leftarrow", Key_Home, TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirst()), actionCollection, "first"); - mSelectLast=new KAction(i18n("&Last"), + mSelectLast=new TDEAction(i18n("&Last"), TQApplication::reverseLayout() ? "2leftarrow":"2rightarrow", Key_End, TQT_TQOBJECT(this),TQT_SLOT(slotSelectLast()), actionCollection, "last"); - mSelectPrevious=new KAction(i18n("&Previous"), + mSelectPrevious=new TDEAction(i18n("&Previous"), TQApplication::reverseLayout() ? "1rightarrow":"1leftarrow", Key_BackSpace, TQT_TQOBJECT(this),TQT_SLOT(slotSelectPrevious()), actionCollection, "previous"); - mSelectNext=new KAction(i18n("&Next"), + mSelectNext=new TDEAction(i18n("&Next"), TQApplication::reverseLayout() ? "1leftarrow":"1rightarrow", Key_Space, TQT_TQOBJECT(this),TQT_SLOT(slotSelectNext()), actionCollection, "next"); - mSelectPreviousDir=new KAction(i18n("&Previous Folder"), + mSelectPreviousDir=new TDEAction(i18n("&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"), + mSelectNextDir=new TDEAction(i18n("&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, + mSelectFirstSubDir=new TDEAction(i18n("&First Sub Folder"), "down", ALT + Key_Down, TQT_TQOBJECT(this),TQT_SLOT(slotSelectFirstSubDir()), actionCollection, "first_sub_folder"); - mListMode=new KRadioAction(i18n("Details"),"view_detailed",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"list_mode"); + mListMode=new TDERadioAction(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,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"side_thumbnail_mode"); + mSideThumbnailMode=new TDERadioAction(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,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode"); + mBottomThumbnailMode=new TDERadioAction(i18n("Thumbnails with Info on Bottom"),"view_icon",0,TQT_TQOBJECT(this),TQT_SLOT(updateViewMode()),actionCollection,"bottom_thumbnail_mode"); mBottomThumbnailMode->setExclusiveGroup("thumbnails"); // Size slider @@ -318,19 +318,19 @@ FileViewController::FileViewController(TQWidget* parent,KActionCollection* actio 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"); + TDEAction* 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,TQT_TQOBJECT(this),TQT_SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files"); + mShowDotFiles=new TDEToggleAction(i18n("Show &Hidden Files"),CTRL + Key_H,TQT_TQOBJECT(this),TQT_SLOT(toggleShowDotFiles()),actionCollection,"show_dot_files"); - d->mSortAction=new KSelectAction(i18n("Sort"), 0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "view_sort"); + d->mSortAction=new TDESelectAction(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, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "descending"); + d->mRevertSortAction=new TDEToggleAction(i18n("Descending"),0, TQT_TQOBJECT(this), TQT_SLOT(setSorting()), actionCollection, "descending"); TQPopupMenu* sortMenu=d->mSortAction->popupMenu(); Q_ASSERT(sortMenu); sortMenu->insertSeparator(); @@ -379,8 +379,8 @@ FileViewController::FileViewController(TQWidget* parent,KActionCollection* actio 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(contextMenu(TDEListView*, TQListViewItem*, const TQPoint&)), + TQT_TQOBJECT(this),TQT_SLOT(openContextMenu(TDEListView*, 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)), @@ -415,7 +415,7 @@ FileViewController::FileViewController(TQWidget* parent,KActionCollection* actio this, TQT_SIGNAL(selectionChanged()) ); // Thumbnail details dialog - KAction* thumbnailDetailsDialogAction=new KAction(i18n("Edit Thumbnail Details..."), "configure", 0, TQT_TQOBJECT(mFileThumbnailView), TQT_SLOT(showThumbnailDetailsDialog()), actionCollection, "thumbnail_details_dialog"); + TDEAction* thumbnailDetailsDialogAction=new TDEAction(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)) ); @@ -810,7 +810,7 @@ void FileViewController::setSorting() { // Context menu // //----------------------------------------------------------------------- -void FileViewController::openContextMenu(KListView*,TQListViewItem* item,const TQPoint& pos) { +void FileViewController::openContextMenu(TDEListView*,TQListViewItem* item,const TQPoint& pos) { emit requestContextMenu(pos, item!=0); } diff --git a/src/gvcore/fileviewcontroller.h b/src/gvcore/fileviewcontroller.h index f1ae23a..df59110 100644 --- a/src/gvcore/fileviewcontroller.h +++ b/src/gvcore/fileviewcontroller.h @@ -37,13 +37,13 @@ class TQIconViewItem; class TQListViewItem; class TQPopupMenu; -class KAccel; -class KAction; -class KActionCollection; +class TDEAccel; +class TDEAction; +class TDEActionCollection; class TDEConfig; -class KListView; -class KRadioAction; -class KToggleAction; +class TDEListView; +class TDERadioAction; +class TDEToggleAction; namespace Gwenview { class FileViewBase; @@ -62,7 +62,7 @@ public: enum Mode { FILE_LIST, THUMBNAIL}; enum FilterMode { ALL, IMAGES_ONLY, VIDEOS_ONLY }; - FileViewController(TQWidget* parent,KActionCollection*); + FileViewController(TQWidget* parent,TDEActionCollection*); ~FileViewController(); // Properties @@ -79,17 +79,17 @@ public: FileViewBase* currentFileView() const; FileThumbnailView* fileThumbnailView() const { return mFileThumbnailView; } - KAction* selectFirst() const { return mSelectFirst; } - KAction* selectLast() const { return mSelectLast; } - KAction* selectPrevious() const { return mSelectPrevious; } - KAction* selectNext() const { return mSelectNext; } - KAction* selectPreviousDir() const { return mSelectPreviousDir; } - KAction* selectNextDir() const { return mSelectNextDir; } - KAction* selectFirstSubDir() const { return mSelectFirstSubDir; } - KRadioAction* listMode() const { return mListMode; } - KRadioAction* sideThumbnailMode() const { return mSideThumbnailMode; } - KRadioAction* bottomThumbnailMode() const { return mBottomThumbnailMode; } - KToggleAction* showDotFiles() const { return mShowDotFiles; } + TDEAction* selectFirst() const { return mSelectFirst; } + TDEAction* selectLast() const { return mSelectLast; } + TDEAction* selectPrevious() const { return mSelectPrevious; } + TDEAction* selectNext() const { return mSelectNext; } + TDEAction* selectPreviousDir() const { return mSelectPreviousDir; } + TDEAction* selectNextDir() const { return mSelectNextDir; } + TDEAction* selectFirstSubDir() const { return mSelectFirstSubDir; } + TDERadioAction* listMode() const { return mListMode; } + TDERadioAction* sideThumbnailMode() const { return mSideThumbnailMode; } + TDERadioAction* bottomThumbnailMode() const { return mBottomThumbnailMode; } + TDEToggleAction* showDotFiles() const { return mShowDotFiles; } KURL::List selectedURLs() const; KURL::List selectedImageURLs() const; @@ -163,7 +163,7 @@ private slots: // These two methods forward the context menu requests from either view to // openContextMenu(const TQPoint&); - void openContextMenu(KListView*, TQListViewItem*, const TQPoint&); + void openContextMenu(TDEListView*, TQListViewItem*, const TQPoint&); void openContextMenu(TQIconViewItem*,const TQPoint&); // Get called by the thumbnail mode actions @@ -204,21 +204,21 @@ private: ImageLoader* mPrefetch; // Our actions - KAction* mSelectFirst; - KAction* mSelectLast; - KAction* mSelectPrevious; - KAction* mSelectNext; - KAction* mSelectPreviousDir; - KAction* mSelectNextDir; - KAction* mSelectFirstSubDir; + TDEAction* mSelectFirst; + TDEAction* mSelectLast; + TDEAction* mSelectPrevious; + TDEAction* mSelectNext; + TDEAction* mSelectPreviousDir; + TDEAction* mSelectNextDir; + TDEAction* mSelectFirstSubDir; - KRadioAction* mListMode; - KRadioAction* mSideThumbnailMode; - KRadioAction* mBottomThumbnailMode; + TDERadioAction* mListMode; + TDERadioAction* mSideThumbnailMode; + TDERadioAction* mBottomThumbnailMode; TQSlider* mSizeSlider; - KToggleAction* mShowDotFiles; + TDEToggleAction* mShowDotFiles; // Temp data used by the dir lister bool mThumbnailsNeedUpdate; diff --git a/src/gvcore/fullscreenbar.cpp b/src/gvcore/fullscreenbar.cpp index 7500493..29f84ac 100644 --- a/src/gvcore/fullscreenbar.cpp +++ b/src/gvcore/fullscreenbar.cpp @@ -76,7 +76,7 @@ struct FullScreenBar::Private { FullScreenBar::FullScreenBar(TQWidget* parent) -: KToolBar(parent, "FullScreenBar") { +: TDEToolBar(parent, "FullScreenBar") { d=new Private; d->mState=OUT; d->mFirstShow=true; @@ -103,7 +103,7 @@ FullScreenBar::~FullScreenBar() { void FullScreenBar::resizeEvent(TQResizeEvent* event) { - KToolBar::resizeEvent(event); + TDEToolBar::resizeEvent(event); // Create a mask TQPainter painter; @@ -118,7 +118,7 @@ void FullScreenBar::resizeEvent(TQResizeEvent* event) { void FullScreenBar::showEvent(TQShowEvent* event) { - KToolBar::showEvent(event); + TDEToolBar::showEvent(event); // Make sure the bar position corresponds to the OUT state if (!d->mFirstShow) return; d->mFirstShow=false; diff --git a/src/gvcore/fullscreenbar.h b/src/gvcore/fullscreenbar.h index 469286b..41a6049 100644 --- a/src/gvcore/fullscreenbar.h +++ b/src/gvcore/fullscreenbar.h @@ -30,7 +30,7 @@ class TQShowEvent; class TQString; namespace Gwenview { -class FullScreenBar : public KToolBar { +class FullScreenBar : public TDEToolBar { Q_OBJECT public: diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp index e61ef8c..47438fd 100644 --- a/src/gvcore/imageview.cpp +++ b/src/gvcore/imageview.cpp @@ -160,24 +160,24 @@ struct ImageView::Private { // Our actions TQComboBox* mZoomCombo; - // We do not use KSelectAction because it's not possible to set the combo text + // We do not use TDESelectAction because it's not possible to set the combo text KWidgetAction* mZoomComboAction; - KToggleAction* mZoomToFit; - KToggleAction* mZoomToWidth; - KToggleAction* mZoomToHeight; - TQValueVector<KToggleAction*> mZoomComboActions; - KAction* mZoomIn; - KAction* mZoomOut; - KAction* mResetZoom; - KToggleAction* mLockZoom; - KAction* mAdjustBCG; - KAction* mIncreaseGamma; - KAction* mDecreaseGamma; - KAction* mIncreaseBrightness; - KAction* mDecreaseBrightness; - KAction* mIncreaseContrast; - KAction* mDecreaseContrast; - KActionCollection* mActionCollection; + TDEToggleAction* mZoomToFit; + TDEToggleAction* mZoomToWidth; + TDEToggleAction* mZoomToHeight; + TQValueVector<TDEToggleAction*> mZoomComboActions; + TDEAction* mZoomIn; + TDEAction* mZoomOut; + TDEAction* mResetZoom; + TDEToggleAction* mLockZoom; + TDEAction* mAdjustBCG; + TDEAction* mIncreaseGamma; + TDEAction* mDecreaseGamma; + TDEAction* mIncreaseBrightness; + TDEAction* mDecreaseBrightness; + TDEAction* mIncreaseContrast; + TDEAction* mDecreaseContrast; + TDEActionCollection* mActionCollection; BCGDialog* mBCGDialog; // Fullscreen stuff @@ -246,7 +246,7 @@ struct ImageView::Private { void initZoomCombo() { mZoomCombo->clear(); - for (TQValueVector<KToggleAction*>::iterator it=mZoomComboActions.begin(); + for (TQValueVector<TDEToggleAction*>::iterator it=mZoomComboActions.begin(); it!=mZoomComboActions.end(); ++it) { @@ -291,7 +291,7 @@ public: -ImageView::ImageView(TQWidget* parent,Document* document, KActionCollection* actionCollection) +ImageView::ImageView(TQWidget* parent,Document* document, TDEActionCollection* actionCollection) : TQScrollView(parent,0L,WResizeNoErase|WRepaintNoErase|WPaintClever) { d=new Private; @@ -325,13 +325,13 @@ ImageView::ImageView(TQWidget* parent,Document* document, KActionCollection* act d->mTools[d->mToolID]->updateCursor(); // Create actions - d->mZoomToFit=new KToggleAction(i18n("Fit to &Window"),"viewmagfit",0,d->mActionCollection,"view_zoom_to_fit"); + d->mZoomToFit=new TDEToggleAction(i18n("Fit to &Window"),"viewmagfit",0,d->mActionCollection,"view_zoom_to_fit"); connect(d->mZoomToFit,TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setZoomToFit(bool)) ); - d->mZoomToWidth=new KToggleAction(i18n("Fit to &Width"),0,0,d->mActionCollection,"view_zoom_to_width"); + d->mZoomToWidth=new TDEToggleAction(i18n("Fit to &Width"),0,0,d->mActionCollection,"view_zoom_to_width"); connect(d->mZoomToWidth,TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setZoomToWidth(bool)) ); - d->mZoomToHeight=new KToggleAction(i18n("Fit to &Height"),0,0,d->mActionCollection,"view_zoom_to_height"); + d->mZoomToHeight=new TDEToggleAction(i18n("Fit to &Height"),0,0,d->mActionCollection,"view_zoom_to_height"); connect(d->mZoomToHeight,TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setZoomToHeight(bool)) ); @@ -342,7 +342,7 @@ ImageView::ImageView(TQWidget* parent,Document* document, KActionCollection* act d->mResetZoom=KStdAction::actualSize(TQT_TQOBJECT(this),TQT_SLOT(slotResetZoom()),d->mActionCollection); d->mResetZoom->setIcon("viewmag1"); - d->mLockZoom=new KToggleAction(i18n("&Lock Zoom"),"lock",0,d->mActionCollection,"view_zoom_lock"); + d->mLockZoom=new TDEToggleAction(i18n("&Lock Zoom"),"lock",0,d->mActionCollection,"view_zoom_lock"); d->mLockZoom->setChecked(ImageViewConfig::lockZoom()); connect(d->mLockZoom,TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(setLockZoom(bool)) ); @@ -363,19 +363,19 @@ ImageView::ImageView(TQWidget* parent,Document* document, KActionCollection* act } d->initZoomCombo(); - d->mAdjustBCG=new KAction(i18n("Adjust Brightness/Contrast/Gamma"), "colorize", 0, + d->mAdjustBCG=new TDEAction(i18n("Adjust Brightness/Contrast/Gamma"), "colorize", 0, TQT_TQOBJECT(this), TQT_SLOT(showBCGDialog()), d->mActionCollection, "adjust_bcg"); - d->mIncreaseGamma=new KAction(i18n("Increase Gamma"),0,CTRL+Key_G, + d->mIncreaseGamma=new TDEAction(i18n("Increase Gamma"),0,CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(increaseGamma()),d->mActionCollection,"increase_gamma"); - d->mDecreaseGamma=new KAction(i18n("Decrease Gamma"),0,SHIFT+CTRL+Key_G, + d->mDecreaseGamma=new TDEAction(i18n("Decrease Gamma"),0,SHIFT+CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(decreaseGamma()),d->mActionCollection,"decrease_gamma"); - d->mIncreaseBrightness=new KAction(i18n("Increase Brightness" ),0,CTRL+Key_B, + d->mIncreaseBrightness=new TDEAction(i18n("Increase Brightness" ),0,CTRL+Key_B, TQT_TQOBJECT(this), TQT_SLOT(increaseBrightness()),d->mActionCollection,"increase_brightness"); - d->mDecreaseBrightness=new KAction(i18n("Decrease Brightness" ),0,SHIFT+CTRL+Key_B, + d->mDecreaseBrightness=new TDEAction(i18n("Decrease Brightness" ),0,SHIFT+CTRL+Key_B, TQT_TQOBJECT(this), TQT_SLOT(decreaseBrightness()),d->mActionCollection,"decrease_brightness"); - d->mIncreaseContrast=new KAction(i18n("Increase Contrast" ),0,CTRL+Key_C, + d->mIncreaseContrast=new TDEAction(i18n("Increase Contrast" ),0,CTRL+Key_C, TQT_TQOBJECT(this), TQT_SLOT(increaseContrast()),d->mActionCollection,"increase_contrast"); - d->mDecreaseContrast=new KAction(i18n("Decrease Contrast" ),0,SHIFT+CTRL+Key_C, + d->mDecreaseContrast=new TDEAction(i18n("Decrease Contrast" ),0,SHIFT+CTRL+Key_C, TQT_TQOBJECT(this), TQT_SLOT(decreaseContrast()),d->mActionCollection,"decrease_contrast"); // Connect to some interesting signals @@ -477,12 +477,12 @@ TQPoint ImageView::offset() const { bool ImageView::canZoom(bool in) const { - KAction* zoomAction=in ? d->mZoomIn : d->mZoomOut; + TDEAction* zoomAction=in ? d->mZoomIn : d->mZoomOut; return zoomAction->isEnabled(); } -KToggleAction* ImageView::zoomToFit() const { +TDEToggleAction* ImageView::zoomToFit() const { return d->mZoomToFit; } @@ -522,7 +522,7 @@ void ImageView::updateZoom(ZoomMode zoomMode, double value, int centerX, int cen ZoomMode oldZoomMode = d->mZoomMode; double oldZoom=d->mZoom; d->mZoomMode=zoomMode; - KAction* checkedZoomAction=0; + TDEAction* checkedZoomAction=0; viewport()->setUpdatesEnabled(false); diff --git a/src/gvcore/imageview.h b/src/gvcore/imageview.h index 0d9f116..4c1566a 100644 --- a/src/gvcore/imageview.h +++ b/src/gvcore/imageview.h @@ -39,10 +39,10 @@ class TQMouseEvent; class TQPainter; class TQTimer; class TQWheelEvent; -class KAction; -class KActionCollection; -class KToggleAction; -typedef TQValueList<KAction *> KActionPtrList; +class TDEAction; +class TDEActionCollection; +class TDEToggleAction; +typedef TQValueList<TDEAction *> TDEActionPtrList; namespace Gwenview { class Document; @@ -67,7 +67,7 @@ public: enum ZoomMode { ZOOM_FIT, ZOOM_FIT_WIDTH, ZOOM_FIT_HEIGHT, ZOOM_FREE }; typedef TQMap<ToolID,ToolBase*> Tools; - ImageView(TQWidget* parent,Document*,KActionCollection*); + ImageView(TQWidget* parent,Document*,TDEActionCollection*); ~ImageView(); // Properties @@ -148,7 +148,7 @@ private: // Used by the zoom tool TQPoint offset() const; bool canZoom(bool in) const; - KToggleAction* zoomToFit() const; + TDEToggleAction* zoomToFit() const; private slots: void slotLoaded(); diff --git a/src/gvcore/imageviewcontroller.cpp b/src/gvcore/imageviewcontroller.cpp index 17f592d..63b48a4 100644 --- a/src/gvcore/imageviewcontroller.cpp +++ b/src/gvcore/imageviewcontroller.cpp @@ -88,15 +88,15 @@ struct ImageViewController::Private { ImageViewController* mImageViewController; Document* mDocument; - KActionCollection* mActionCollection; + TDEActionCollection* mActionCollection; TQWidget* mContainer; - KToolBar* mToolBar; + TDEToolBar* mToolBar; KXMLGUIFactory* mFactory; XMLGUIBuilder* mBuilder; TQWidgetStack* mStack; ImageView* mImageView; - KActionPtrList mImageViewActions; + TDEActionPtrList mImageViewActions; // Hide cursor stuff TQTimer* mAutoHideTimer; @@ -107,7 +107,7 @@ struct ImageViewController::Private { // Fullscreen stuff bool mFullScreen; FullScreenBar* mFullScreenBar; - KActionPtrList mFullScreenCommonActions; + TDEActionPtrList mFullScreenCommonActions; void setXMLGUIClient(KXMLGUIClient* client) { @@ -121,11 +121,11 @@ struct ImageViewController::Private { } // Unplug image view actions, if plugged - KActionPtrList::Iterator + TDEActionPtrList::Iterator it=mImageViewActions.begin(), end=mImageViewActions.end(); for (; it!=end; ++it) { - KAction* action=*it; + TDEAction* action=*it; if (action->isPlugged(mToolBar)) { action->unplug(mToolBar); } @@ -183,7 +183,7 @@ struct ImageViewController::Private { void showImageView(void) { LOG(""); if (mStack->visibleWidget()==mImageView) { - KAction* action=mImageViewActions.first(); + TDEAction* action=mImageViewActions.first(); if (action && !action->isPlugged(mToolBar)) { // In the ctor, we set the imageview as the visible widget but // we did not fill the toolbar because mImageViewActions was @@ -203,11 +203,11 @@ struct ImageViewController::Private { } void plugImageViewActions() { - KActionPtrList::Iterator + TDEActionPtrList::Iterator it=mImageViewActions.begin(), end=mImageViewActions.end(); for (; it!=end; ++it) { - KAction* action=*it; + TDEAction* action=*it; action->plug(mToolBar); } } @@ -246,7 +246,7 @@ struct ImageViewController::Private { Q_ASSERT(!mFullScreenBar); mFullScreenBar=new FullScreenBar(mContainer); - KActionPtrList::ConstIterator + TDEActionPtrList::ConstIterator it=mFullScreenCommonActions.begin(), end=mFullScreenCommonActions.end(); @@ -264,7 +264,7 @@ struct ImageViewController::Private { //------------------------------------------------------------------------ -ImageViewController::ImageViewController(TQWidget* parent, Document* document, KActionCollection* actionCollection) +ImageViewController::ImageViewController(TQWidget* parent, Document* document, TDEActionCollection* actionCollection) : TQObject(parent) { d=new Private; d->mImageViewController=this; @@ -276,7 +276,7 @@ ImageViewController::ImageViewController(TQWidget* parent, Document* document, K d->mContainer=new TQWidget(parent); d->mContainer->setMinimumWidth(1); // Make sure we can resize the toolbar smaller than its minimum size TQVBoxLayout* layout=new TQVBoxLayout(d->mContainer); - d->mToolBar=new KToolBar(d->mContainer, "", true); + d->mToolBar=new TDEToolBar(d->mContainer, "", true); layout->add(d->mToolBar); d->mStack=new TQWidgetStack(d->mContainer); @@ -362,8 +362,8 @@ void ImageViewController::setFullScreen(bool fullScreen) { } -void ImageViewController::setNormalCommonActions(const KActionPtrList& actions) { - KActionPtrList::ConstIterator +void ImageViewController::setNormalCommonActions(const TDEActionPtrList& actions) { + TDEActionPtrList::ConstIterator it=actions.begin(), end=actions.end(); @@ -374,12 +374,12 @@ void ImageViewController::setNormalCommonActions(const KActionPtrList& actions) } -void ImageViewController::setFullScreenCommonActions(const KActionPtrList& actions) { +void ImageViewController::setFullScreenCommonActions(const TDEActionPtrList& actions) { d->mFullScreenCommonActions=actions; } -void ImageViewController::setImageViewActions(const KActionPtrList& actions) { +void ImageViewController::setImageViewActions(const TDEActionPtrList& actions) { d->mImageViewActions=actions; } @@ -453,8 +453,8 @@ bool ImageViewController::eventFilter(TQObject* object, TQEvent* event) { /** * Little helper to plug an action if it exists */ -inline void plugAction(TQPopupMenu* menu, KActionCollection* actionCollection, const char* actionName) { - KAction* action=actionCollection->action(actionName); +inline void plugAction(TQPopupMenu* menu, TDEActionCollection* actionCollection, const char* actionName) { + TDEAction* action=actionCollection->action(actionName); if (action) action->plug(menu); } diff --git a/src/gvcore/imageviewcontroller.h b/src/gvcore/imageviewcontroller.h index b1ac245..614df4f 100644 --- a/src/gvcore/imageviewcontroller.h +++ b/src/gvcore/imageviewcontroller.h @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class TQPoint; class TQWidget; -class KToolBar; +class TDEToolBar; namespace Gwenview { @@ -46,16 +46,16 @@ class LIBGWENVIEW_EXPORT ImageViewController : public TQObject { Q_OBJECT public: - ImageViewController(TQWidget* parent, Document*, KActionCollection*); + ImageViewController(TQWidget* parent, Document*, TDEActionCollection*); ~ImageViewController(); TQWidget* widget() const; - void setImageViewActions(const KActionPtrList&); + void setImageViewActions(const TDEActionPtrList&); void setFullScreen(bool); - void setNormalCommonActions(const KActionPtrList&); - void setFullScreenCommonActions(const KActionPtrList&); + void setNormalCommonActions(const TDEActionPtrList&); + void setFullScreenCommonActions(const TDEActionPtrList&); void setFocus(); protected: |