From 189e536f1a74ecc2d9dcf35b9f5b3d54a2d1901e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:10:12 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kpackage/CHANGES | 2 +- kpackage/debAptInterface.cpp | 12 ++++++------ kpackage/debAptInterface.h | 6 +++--- kpackage/findf.cpp | 2 +- kpackage/kpackage.cpp | 34 +++++++++++++++++----------------- kpackage/kpackage.h | 26 +++++++++++++------------- kpackage/kplview.cpp | 14 +++++++------- kpackage/kplview.h | 4 ++-- kpackage/managementWidget.cpp | 8 ++++---- kpackage/managementWidget.h | 16 ++++++++-------- kpackage/packageDisplay.cpp | 20 ++++++++++---------- kpackage/packageDisplay.h | 6 +++--- kpackage/pkgInterface.cpp | 4 ++-- kpackage/pkgInterface.h | 8 ++++---- kpackage/pkgOptions.cpp | 2 +- kpackage/pkgOptions.h | 4 ++-- 16 files changed, 84 insertions(+), 84 deletions(-) (limited to 'kpackage') diff --git a/kpackage/CHANGES b/kpackage/CHANGES index 6385956..fd476ab 100644 --- a/kpackage/CHANGES +++ b/kpackage/CHANGES @@ -122,7 +122,7 @@ Fix dependency checking problem for uninstalling RPM packages kpackage-1.2 ------------ -Use KAccelMenu class to simplify configuring +Use TDEAccelMenu class to simplify configuring accelerators and allow accelerators to be set by typing the key when the menu item is selected. The ' character is needed to precede the keys. (with post KDE1.1 libraries) diff --git a/kpackage/debAptInterface.cpp b/kpackage/debAptInterface.cpp index bf922ea..c35013a 100644 --- a/kpackage/debAptInterface.cpp +++ b/kpackage/debAptInterface.cpp @@ -98,26 +98,26 @@ bool DEBAPT::isType(char *, const TQString &) return false; } -void DEBAPT::makeMenu(KActionCollection* act) +void DEBAPT::makeMenu(TDEActionCollection* act) { - updateM = new KAction( i18n("&Update"), TQString(), + updateM = new TDEAction( i18n("&Update"), TQString(), 0, this, TQT_SLOT(updateS()), act, "debapt_update"); - upgradeM = new KAction( i18n("U&pgrade"), TQString(), + upgradeM = new TDEAction( i18n("U&pgrade"), TQString(), 0, this, TQT_SLOT(upgradeS()), act, "debapt_upgrade"); - fixupM = new KAction( i18n("&Fixup"), TQString(), + fixupM = new TDEAction( i18n("&Fixup"), TQString(), 0, this, TQT_SLOT(fixupS()), act, "debapt_fixup"); - fileM = new KAction( i18n("&Apt-File Update"), TQString(), + fileM = new TDEAction( i18n("&Apt-File Update"), TQString(), 0, this, TQT_SLOT(fileS()), act, "debapt_file"); } -void DEBAPT::setMenu(KActionCollection*, bool enable) +void DEBAPT::setMenu(TDEActionCollection*, bool enable) { updateM->setEnabled(enable); upgradeM->setEnabled(enable); diff --git a/kpackage/debAptInterface.h b/kpackage/debAptInterface.h index b5d89ee..933622b 100644 --- a/kpackage/debAptInterface.h +++ b/kpackage/debAptInterface.h @@ -59,10 +59,10 @@ public: void listRemotePackages(TQPtrList *pki); TQStringList getFileList(packageInfo *p); - KAction *updateM, *upgradeM, *fixupM, *fileM; + TDEAction *updateM, *upgradeM, *fixupM, *fileM; - void makeMenu(KActionCollection* act); - void setMenu(KActionCollection* act, bool enable); + void makeMenu(TDEActionCollection* act); + void setMenu(TDEActionCollection* act, bool enable); TQStringList readApt(); TQStringList readAptS(); diff --git a/kpackage/findf.cpp b/kpackage/findf.cpp index 6a333f8..6712d4b 100644 --- a/kpackage/findf.cpp +++ b/kpackage/findf.cpp @@ -70,7 +70,7 @@ FindF::FindF(TQWidget *parent) TQLabel *valueLabel = new TQLabel(value, i18n("Find:"), frame1); valueLabel->setAlignment( AlignRight ); - tab = new KListView(frame1, "tab"); + tab = new TDEListView(frame1, "tab"); connect(tab, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), this, TQT_SLOT(search( TQListViewItem * ))); tab->addColumn(i18n("Installed"),18); diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp index 310ae0e..37e7944 100644 --- a/kpackage/kpackage.cpp +++ b/kpackage/kpackage.cpp @@ -65,7 +65,7 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// KPKG::KPKG(TDEConfig *_config) - : KMainWindow(0) + : TDEMainWindow(0) { kpackage = new KPACKAGE(_config, this); setCentralWidget(kpackage); @@ -100,16 +100,16 @@ void KPKG::setupMenu() actionCollection()); recent->loadEntries( config ); - pack_find = new KAction( i18n("Find &Package..."), "find", - KStdAccel::shortcut(KStdAccel::Find), TQT_TQOBJECT(kpackage), + pack_find = new TDEAction( i18n("Find &Package..."), "find", + TDEStdAccel::shortcut(TDEStdAccel::Find), TQT_TQOBJECT(kpackage), TQT_SLOT(find()), actionCollection(), "pack_find"); - pack_findf = new KAction( i18n("Find &File..."), "filefind", + pack_findf = new TDEAction( i18n("Find &File..."), "filefind", 0, TQT_TQOBJECT(kpackage), TQT_SLOT(findf()), actionCollection(), "pack_findf"); - kpack_reload = new KAction( i18n("&Reload"), "reload", - KStdAccel::shortcut(KStdAccel::Reload), TQT_TQOBJECT(kpackage), + kpack_reload = new TDEAction( i18n("&Reload"), "reload", + TDEStdAccel::shortcut(TDEStdAccel::Reload), TQT_TQOBJECT(kpackage), TQT_SLOT(reload()), actionCollection(), "kpack_reload"); (void) KStdAction::quit(TQT_TQOBJECT(kpackage), TQT_SLOT(fileQuit()), @@ -121,23 +121,23 @@ void KPKG::setupMenu() pack_next = KStdAction::forward(TQT_TQOBJECT(kpackage->management->treeList), TQT_SLOT(next()), actionCollection(),"pack_next"); - (void) (new KAction( i18n("&Expand Tree"), "ftout", + (void) (new TDEAction( i18n("&Expand Tree"), "ftout", 0, TQT_TQOBJECT(kpackage), TQT_SLOT(expandTree()), actionCollection(), "kpack_expand")); - (void) (new KAction( i18n("&Collapse Tree"), "ftin", + (void) (new TDEAction( i18n("&Collapse Tree"), "ftin", 0, TQT_TQOBJECT(kpackage), TQT_SLOT(collapseTree()), actionCollection(), "kpack_collapse")); - (void) (new KAction( i18n("Clear &Marked"), TQString(), + (void) (new TDEAction( i18n("Clear &Marked"), TQString(), 0, TQT_TQOBJECT(kpackage), TQT_SLOT(clearMarked()), actionCollection(), "kpack_clear")); - (void) (new KAction( i18n("Mark &All"), TQString(), + (void) (new TDEAction( i18n("Mark &All"), TQString(), 0, TQT_TQOBJECT(kpackage), TQT_SLOT(markAll()), actionCollection(), "kpack_markall")); - pack_install = new KAction( i18n("&Install"), TQString(), + pack_install = new TDEAction( i18n("&Install"), TQString(), 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(installSingleClicked()), actionCollection(), "install_single"); @@ -145,7 +145,7 @@ void KPKG::setupMenu() kpackage->management->setInstallAction(pack_install); - pack_uninstall = new KAction( i18n("&Uninstall"), TQString(), + pack_uninstall = new TDEAction( i18n("&Uninstall"), TQString(), 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single"); @@ -153,11 +153,11 @@ void KPKG::setupMenu() kpackage->management->setUninstallAction(pack_uninstall); - (void) (new KAction( i18n("&Install Marked"), TQString(), + (void) (new TDEAction( i18n("&Install Marked"), TQString(), 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(installMultClicked()), actionCollection(), "install_marked")); - (void) (new KAction( i18n("&Uninstall Marked"), TQString(), + (void) (new TDEAction( i18n("&Uninstall Marked"), TQString(), 0, TQT_TQOBJECT(kpackage->management), TQT_SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked")); @@ -170,15 +170,15 @@ void KPKG::setupMenu() KStdAction::keyBindings( guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - (void) (new KAction( i18n("Configure &KPackage..."), "configure", + (void) (new TDEAction( i18n("Configure &KPackage..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(setOptions()), actionCollection(), "kpack_options")); - (void) (new KAction( i18n("Clear Package &Folder Cache"), TQString(), + (void) (new TDEAction( i18n("Clear Package &Folder Cache"), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(clearDCache()), actionCollection(), "clear_dcache")); - (void) (new KAction( i18n("Clear &Package Cache"), TQString(), + (void) (new TDEAction( i18n("Clear &Package Cache"), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(clearPCache()), actionCollection(), "clear_pcache")); diff --git a/kpackage/kpackage.h b/kpackage/kpackage.h index c552b81..216ad22 100644 --- a/kpackage/kpackage.h +++ b/kpackage/kpackage.h @@ -50,10 +50,10 @@ class FindF; class Options; class pkgInterface; class managementWidget; -class KAccel; +class TDEAccel; class TQDropEevnt; -class KRecentFilesAction; -class KAction; +class TDERecentFilesAction; +class TDEAction; class kpRun; #define kpinterfaceN 7 @@ -220,7 +220,7 @@ private: ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class KPKG : public KMainWindow +class KPKG : public TDEMainWindow { Q_OBJECT @@ -277,14 +277,14 @@ private: TQStrList recent_files; - KAction *pack_open; - KAction *pack_find; - KAction *pack_findf; - KAction *kpack_reload; - KAction *pack_prev; - KAction *pack_next; - KAction *pack_install; - KAction *pack_uninstall; + TDEAction *pack_open; + TDEAction *pack_find; + TDEAction *pack_findf; + TDEAction *kpack_reload; + TDEAction *pack_prev; + TDEAction *pack_next; + TDEAction *pack_install; + TDEAction *pack_uninstall; int toolID, selectID; // refrences to toolbar and menu items @@ -292,7 +292,7 @@ private: bool hide_toolbar; // don't display toolbar - KRecentFilesAction *recent; + TDERecentFilesAction *recent; public slots: diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp index b5ca8f1..afd03f0 100644 --- a/kpackage/kplview.cpp +++ b/kpackage/kplview.cpp @@ -44,7 +44,7 @@ #define MPOS 1 KpTreeList::KpTreeList( TQWidget *parent ) : -KListView (parent) +TDEListView (parent) { markPkg = 0; setShowSortIndicator(true); @@ -80,17 +80,17 @@ void KpTreeList::clear() { markPkg = 0; emit cleared(); - KListView::clear(); + TDEListView::clear(); } KpTreeListItem *KpTreeList::firstChild() { - return (KpTreeListItem *)KListView::firstChild(); + return (KpTreeListItem *)TDEListView::firstChild(); } KpTreeListItem *KpTreeList::currentItem() { - return (KpTreeListItem *)KListView::currentItem(); + return (KpTreeListItem *)TDEListView::currentItem(); } void KpTreeList::contentsMousePressEvent ( TQMouseEvent * e ) @@ -136,9 +136,9 @@ void KpTreeList::contentsMousePressEvent ( TQMouseEvent * e ) } setCurrentItem(i); } else - KListView::contentsMousePressEvent (e); + TDEListView::contentsMousePressEvent (e); } else - KListView::contentsMousePressEvent (e); + TDEListView::contentsMousePressEvent (e); } if (markUpdate) @@ -588,7 +588,7 @@ KpTreeListItem::KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, setPixmap(1,info->interface->markUnInst); } -KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo, +KpTreeListItem::KpTreeListItem( TDEListView *parent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1, TQString label2 , TQString label3 , TQString label4 , diff --git a/kpackage/kplview.h b/kpackage/kplview.h index 936f512..239e743 100644 --- a/kpackage/kplview.h +++ b/kpackage/kplview.h @@ -47,7 +47,7 @@ class packageDisplayWidget; //////////////////////////////////////////////////////////////////////// -class KpTreeList: public KListView +class KpTreeList: public TDEListView { Q_OBJECT @@ -164,7 +164,7 @@ public: TQString label7 = 0, TQString label8 = 0); - KpTreeListItem( KListView *parent, packageInfo* pinfo, + KpTreeListItem( TDEListView *parent, packageInfo* pinfo, const TQPixmap& thePixmap, TQString label1 = 0, TQString label2 = 0, TQString label3 = 0, TQString label4 = 0, diff --git a/kpackage/managementWidget.cpp b/kpackage/managementWidget.cpp index b50dcee..958b901 100644 --- a/kpackage/managementWidget.cpp +++ b/kpackage/managementWidget.cpp @@ -53,7 +53,7 @@ extern Opts *opts; KpListViewSearchLine::KpListViewSearchLine(TQWidget *parent, KpTreeList *listView) - :KListViewSearchLine(parent, listView) + :TDEListViewSearchLine(parent, listView) { list = listView; } @@ -65,8 +65,8 @@ KpListViewSearchLine::~KpListViewSearchLine() void KpListViewSearchLine::updateSearch(const TQString &s) { list->expand(); - KListViewSearchLine::updateSearch(s); - KListViewSearchLine::updateSearch(s); // Yes both are needed + TDEListViewSearchLine::updateSearch(s); + TDEListViewSearchLine::updateSearch(s); // Yes both are needed list->sweep(false); } @@ -132,7 +132,7 @@ void managementWidget::setupWidgets() ltab->addTab(t); } // Quick Search Bar - searchToolBar = new KToolBar( leftpanel, "search toolbar"); + searchToolBar = new TDEToolBar( leftpanel, "search toolbar"); TQToolButton *clearSearch = new TQToolButton(searchToolBar); clearSearch->setTextLabel(i18n("Clear Search"), true); diff --git a/kpackage/managementWidget.h b/kpackage/managementWidget.h index 3eeb236..f681fc0 100644 --- a/kpackage/managementWidget.h +++ b/kpackage/managementWidget.h @@ -64,11 +64,11 @@ class packageDisplayWidget; class packageInfo; class TQSplitter; -class KActionCollection; -class KToolBar; +class TDEActionCollection; +class TDEToolBar; class managementWidget; -class KpListViewSearchLine : public KListViewSearchLine +class KpListViewSearchLine : public TDEListViewSearchLine { Q_OBJECT @@ -156,8 +156,8 @@ private: void installMultClicked(); // This is called when the install button has been clicked with multiple packages - void setInstallAction(KAction *a) { install_action = a; } - void setUninstallAction(KAction *a) { uninstall_action = a; } + void setInstallAction(TDEAction *a) { install_action = a; } + void setUninstallAction(TDEAction *a) { uninstall_action = a; } void packageHighlighted(TQListViewItem *); // This is called when a package has been highlighted in the list tree @@ -192,7 +192,7 @@ private: TQSplitter *vPan; // veritcal panner between panels - KToolBar *searchToolBar; + TDEToolBar *searchToolBar; TQPtrList selList; // list for selected packages @@ -219,8 +219,8 @@ public: KpListViewSearchLine *searchLine; // Widget for search treeList - KAction *install_action; - KAction *uninstall_action; + TDEAction *install_action; + TDEAction *uninstall_action; }; #endif diff --git a/kpackage/packageDisplay.cpp b/kpackage/packageDisplay.cpp index 8941327..f416f21 100644 --- a/kpackage/packageDisplay.cpp +++ b/kpackage/packageDisplay.cpp @@ -181,8 +181,8 @@ void packageDisplayWidget::changePackage(packageInfo *p) this, TQT_SLOT( openBinding(TQListViewItem *)) ); disconnect(fileList, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT( openBinding(TQListViewItem *)) ); - disconnect(fileList, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), - fileList, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); + disconnect(fileList, TQT_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), + fileList, TQT_SLOT( openContext(TDEListView *, TQListViewItem *, const TQPoint &)) ); if (package && package != p) { @@ -234,8 +234,8 @@ void packageDisplayWidget::changePackage(packageInfo *p) this, TQT_SLOT( openBinding(TQListViewItem *)) ); connect(fileList, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT( openBinding(TQListViewItem *)) ); - connect(fileList, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), - fileList, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); + connect(fileList, TQT_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), + fileList, TQT_SLOT( openContext(TDEListView *, TQListViewItem *, const TQPoint &)) ); } @@ -363,15 +363,15 @@ void packageDisplayWidget::updateFileList() kpackage->setPercent(100); } - kpFileList::kpFileList(TQWidget* parent, packageDisplayWidget* parent2) : KListView(parent) + kpFileList::kpFileList(TQWidget* parent, packageDisplayWidget* parent2) : TDEListView(parent) { hide(); addColumn("name"); setRootIsDecorated(TRUE); - connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), - this, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); + connect(this, TQT_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), + this, TQT_SLOT( openContext(TDEListView *, TQListViewItem *, const TQPoint &)) ); - FileListMenu = new KPopupMenu(); + FileListMenu = new TDEPopupMenu(); openwith = FileListMenu->insertItem(i18n("&Open With..."),parent2,TQT_SLOT(__openBindingWith())); pkDisplay = parent2; @@ -394,7 +394,7 @@ void packageDisplayWidget::updateFileList() } - void kpFileList::openContext(KListView *, TQListViewItem *, const TQPoint &p) + void kpFileList::openContext(TDEListView *, TQListViewItem *, const TQPoint &p) { FileListMenu->setItemEnabled(openwith, (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? TRUE : FALSE); @@ -404,7 +404,7 @@ void packageDisplayWidget::updateFileList() void kpFileList::clear() { - KListView::clear(); + TDEListView::clear(); } TQString kpFileList::item2Path(TQListViewItem *it) diff --git a/kpackage/packageDisplay.h b/kpackage/packageDisplay.h index efd9949..091e031 100644 --- a/kpackage/packageDisplay.h +++ b/kpackage/packageDisplay.h @@ -54,7 +54,7 @@ class packageInfo; class TQListViewItem; class TQTextEdit; class packageDisplayWidget; -class kpFileList : public KListView +class kpFileList : public TDEListView { Q_OBJECT @@ -68,7 +68,7 @@ public: public slots: - void openContext(KListView *, TQListViewItem *, const TQPoint &); + void openContext(TDEListView *, TQListViewItem *, const TQPoint &); virtual void clear(); @@ -76,7 +76,7 @@ public slots: private: - KPopupMenu *FileListMenu; + TDEPopupMenu *FileListMenu; packageDisplayWidget* pkDisplay; int openwith; diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index 984628d..f5f31dc 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -91,11 +91,11 @@ pkgInterface::~pkgInterface() } ////////////////////////////////////////////////////////////////////////////// -void pkgInterface::makeMenu(KActionCollection *) +void pkgInterface::makeMenu(TDEActionCollection *) { } -void pkgInterface::setMenu(KActionCollection*, bool ) +void pkgInterface::setMenu(TDEActionCollection*, bool ) { } diff --git a/kpackage/pkgInterface.h b/kpackage/pkgInterface.h index 5b39aa0..8b4c779 100644 --- a/kpackage/pkgInterface.h +++ b/kpackage/pkgInterface.h @@ -44,8 +44,8 @@ class pkgOptions; class Locations; class LcacheObj; class cacheObj; -class KAccel; -class KActionCollection; +class TDEAccel; +class TDEActionCollection; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -78,8 +78,8 @@ public: virtual bool isType(char *buf, const TQString &fname) = 0; // looks at start of file to check that package is correct type - virtual void makeMenu(KActionCollection* act); - virtual void setMenu(KActionCollection* act, bool enable); + virtual void makeMenu(TDEActionCollection* act); + virtual void setMenu(TDEActionCollection* act, bool enable); bool ifExe(TQString exe); // Check if this executable exists diff --git a/kpackage/pkgOptions.cpp b/kpackage/pkgOptions.cpp index 4c68366..d7c3fc1 100644 --- a/kpackage/pkgOptions.cpp +++ b/kpackage/pkgOptions.cpp @@ -112,7 +112,7 @@ void pkgOptions::setupWidgets(TQPtrList &pars) { layout = new TQBoxLayout(hlayout,TQBoxLayout::TopToBottom, spacingHint()); - packages = new KListView(this); + packages = new TDEListView(this); layout->addWidget(packages,20); packages->addColumn(i18n("PACKAGES"),200); diff --git a/kpackage/pkgOptions.h b/kpackage/pkgOptions.h index 54ac2c8..1d93708 100644 --- a/kpackage/pkgOptions.h +++ b/kpackage/pkgOptions.h @@ -46,7 +46,7 @@ #include "pkgInterface.h" #include "kpTerm.h" -class KListView; +class TDEListView; class KPushButton; class pkgOptions : public KDialog @@ -70,7 +70,7 @@ public: TQCheckBox *Keep; // keep window - KListView *packages; + TDEListView *packages; int bnumber; // number of option buttons -- cgit v1.2.1