diff options
Diffstat (limited to 'parts/tools')
-rw-r--r-- | parts/tools/CMakeLists.txt | 8 | ||||
-rw-r--r-- | parts/tools/Makefile.am | 14 | ||||
-rw-r--r-- | parts/tools/addtooldlg.ui | 4 | ||||
-rw-r--r-- | parts/tools/addtooldlg.ui.h | 2 | ||||
-rw-r--r-- | parts/tools/kapplicationtree.cpp | 40 | ||||
-rw-r--r-- | parts/tools/kapplicationtree.h | 20 | ||||
-rw-r--r-- | parts/tools/tdevpart_tools.rc (renamed from parts/tools/kdevpart_tools.rc) | 0 | ||||
-rw-r--r-- | parts/tools/tdevtools.desktop (renamed from parts/tools/kdevtools.desktop) | 2 | ||||
-rw-r--r-- | parts/tools/tools_part.cpp | 26 | ||||
-rw-r--r-- | parts/tools/tools_part.h | 12 | ||||
-rw-r--r-- | parts/tools/toolsconfig.cpp | 4 | ||||
-rw-r--r-- | parts/tools/toolsconfig.h | 4 |
12 files changed, 68 insertions, 68 deletions
diff --git a/parts/tools/CMakeLists.txt b/parts/tools/CMakeLists.txt index 7bd64c81..aaa0d462 100644 --- a/parts/tools/CMakeLists.txt +++ b/parts/tools/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES kdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES kdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtools ) +install( FILES tdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES tdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtools ) -##### libkdevtools (module) ##################### +##### libtdevtools (module) ##################### -tde_add_kpart( libkdevtools AUTOMOC +tde_add_kpart( libtdevtools AUTOMOC SOURCES tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui diff --git a/parts/tools/Makefile.am b/parts/tools/Makefile.am index a61da964..da4d9d0b 100644 --- a/parts/tools/Makefile.am +++ b/parts/tools/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libkdevtools.la -libkdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libkdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libtdevtools.la +libtdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libtdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libkdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui +libtdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = kdevtools.desktop +service_DATA = tdevtools.desktop -rc_DATA = kdevpart_tools.rc -rcdir = $(kde_datadir)/kdevtools +rc_DATA = tdevpart_tools.rc +rcdir = $(kde_datadir)/tdevtools diff --git a/parts/tools/addtooldlg.ui b/parts/tools/addtooldlg.ui index a1a6157e..09fd5424 100644 --- a/parts/tools/addtooldlg.ui +++ b/parts/tools/addtooldlg.ui @@ -159,7 +159,7 @@ executed.</p></string> <string>The path and name of the application to execute</string> </property> </widget> - <widget class="KDevApplicationTree" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TDevApplicationTree" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tree</cstring> </property> @@ -179,7 +179,7 @@ executed.</p></string> </widget> <customwidgets> <customwidget> - <class>KDevApplicationTree</class> + <class>TDevApplicationTree</class> <header location="local">kapplicationtree.h</header> <sizehint> <width>-1</width> diff --git a/parts/tools/addtooldlg.ui.h b/parts/tools/addtooldlg.ui.h index fea69766..cabb91e7 100644 --- a/parts/tools/addtooldlg.ui.h +++ b/parts/tools/addtooldlg.ui.h @@ -23,7 +23,7 @@ TQString AddToolDialog::getApp() void AddToolDialog::treeSelectionChanged( TQListViewItem * lvi ) { - KDevAppTreeListItem* item = dynamic_cast<KDevAppTreeListItem*> ( lvi ); + TDevAppTreeListItem* item = dynamic_cast<TDevAppTreeListItem*> ( lvi ); if ( !item || item->isDirectory() ) return; execEdit->setURL( item->executable() ); diff --git a/parts/tools/kapplicationtree.cpp b/parts/tools/kapplicationtree.cpp index 8c13a4ea..18e31265 100644 --- a/parts/tools/kapplicationtree.cpp +++ b/parts/tools/kapplicationtree.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE libraries - Nicked from KDElibs since KDevApplicationTree is not a public class.. + Nicked from KDElibs since TDevApplicationTree is not a public class.. Copyright (C) 1997 Torben Weis <weis@stud.uni-frankfurt.de> Copyright (C) 1999 Dirk A. Mueller <dmuell@gmx.net> @@ -65,7 +65,7 @@ template class TQPtrList<TQString>; // ---------------------------------------------------------------------- -KDevAppTreeListItem::KDevAppTreeListItem( TDEListView* parent, const TQString & name, +TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -75,7 +75,7 @@ KDevAppTreeListItem::KDevAppTreeListItem( TDEListView* parent, const TQString & // ---------------------------------------------------------------------- -KDevAppTreeListItem::KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, +TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -85,7 +85,7 @@ KDevAppTreeListItem::KDevAppTreeListItem( TQListViewItem* parent, const TQString // ---------------------------------------------------------------------- -void KDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) +void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) { setPixmap(0, pixmap); parsed = parse; @@ -101,7 +101,7 @@ void KDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, con // ---------------------------------------------------------------------- // Ensure that dirs are sorted in front of files and case is ignored -TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const +TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const { if (directory) return TQString::fromLatin1(" ") + text(column).upper(); @@ -109,29 +109,29 @@ TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const return text(column).upper(); } -void KDevAppTreeListItem::activate() +void TDevAppTreeListItem::activate() { if ( directory ) setOpen(!isOpen()); } -void KDevAppTreeListItem::setOpen( bool o ) +void TDevAppTreeListItem::setOpen( bool o ) { if( o && !parsed ) { // fill the children before opening - ((KDevApplicationTree *) parent())->addDesktopGroup( path, this ); + ((TDevApplicationTree *) parent())->addDesktopGroup( path, this ); parsed = true; } TQListViewItem::setOpen( o ); } -bool KDevAppTreeListItem::isDirectory() +bool TDevAppTreeListItem::isDirectory() { return directory; } // ---------------------------------------------------------------------- -KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name ) +TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) : TDEListView( parent, name ), currentitem(0) { addColumn( i18n("Known Applications") ); @@ -145,7 +145,7 @@ KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name ) // ---------------------------------------------------------------------- -bool KDevApplicationTree::isDirSel() +bool TDevApplicationTree::isDirSel() { if (!currentitem) return false; // if currentitem isn't set return currentitem->isDirectory(); @@ -153,12 +153,12 @@ bool KDevApplicationTree::isDirSel() // ---------------------------------------------------------------------- -void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem *item) +void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem *item) { KServiceGroup::Ptr root = KServiceGroup::group(relPath); KServiceGroup::List list = root->entries(); - KDevAppTreeListItem * newItem; + TDevAppTreeListItem * newItem; for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -200,10 +200,10 @@ void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem TQPixmap pixmap = SmallIcon( icon ); if (item) - newItem = new KDevAppTreeListItem( item, text, pixmap, false, isDir, + newItem = new TDevAppTreeListItem( item, text, pixmap, false, isDir, relPath, exec, dEntry ); else - newItem = new KDevAppTreeListItem( this, text, pixmap, false, isDir, + newItem = new TDevAppTreeListItem( this, text, pixmap, false, isDir, relPath, exec, dEntry ); if (isDir) newItem->setExpandable( true ); @@ -213,13 +213,13 @@ void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem // ---------------------------------------------------------------------- -void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i) +void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; + TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; currentitem = item; @@ -230,13 +230,13 @@ void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i) // ---------------------------------------------------------------------- -void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i) +void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; + TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; currentitem = item; @@ -246,7 +246,7 @@ void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i) // ---------------------------------------------------------------------- -void KDevApplicationTree::resizeEvent( TQResizeEvent * e) +void TDevApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)); TDEListView::resizeEvent(e); diff --git a/parts/tools/kapplicationtree.h b/parts/tools/kapplicationtree.h index 0ba2cc9f..b45bbeac 100644 --- a/parts/tools/kapplicationtree.h +++ b/parts/tools/kapplicationtree.h @@ -16,8 +16,8 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __KDevApplicationTree_h__ -#define __KDevApplicationTree_h__ +#ifndef __TDevApplicationTree_h__ +#define __TDevApplicationTree_h__ #include <kurl.h> #include <tdelistview.h> @@ -36,7 +36,7 @@ class TQStringList; /** * @internal */ -class KDevAppTreeListItem : public TQListViewItem +class TDevAppTreeListItem : public TQListViewItem { bool parsed; bool directory; @@ -50,9 +50,9 @@ protected: void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry); public: - KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, + TDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); - KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, + TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); bool isDirectory(); @@ -63,7 +63,7 @@ protected: virtual void activate(); virtual void setOpen( bool o ); - friend class KDevApplicationTree; + friend class TDevApplicationTree; }; /* ------------------------------------------------------------------------- */ @@ -71,23 +71,23 @@ protected: /** * @internal */ -class KDevApplicationTree : public TDEListView +class TDevApplicationTree : public TDEListView { Q_OBJECT public: - KDevApplicationTree( TQWidget *parent, const char* name = 0 ); + TDevApplicationTree( TQWidget *parent, const char* name = 0 ); /** * Add a group of .desktop/.kdelnk entries */ - void addDesktopGroup( TQString relPath, KDevAppTreeListItem *item = 0 ); + void addDesktopGroup( TQString relPath, TDevAppTreeListItem *item = 0 ); bool isDirSel(); protected: void resizeEvent( TQResizeEvent *_ev ); - KDevAppTreeListItem* currentitem; + TDevAppTreeListItem* currentitem; public slots: void slotItemHighlighted(TQListViewItem* i); diff --git a/parts/tools/kdevpart_tools.rc b/parts/tools/tdevpart_tools.rc index ab8a6a98..ab8a6a98 100644 --- a/parts/tools/kdevpart_tools.rc +++ b/parts/tools/tdevpart_tools.rc diff --git a/parts/tools/kdevtools.desktop b/parts/tools/tdevtools.desktop index 225b4b5f..3b7e8272 100644 --- a/parts/tools/kdevtools.desktop +++ b/parts/tools/tdevtools.desktop @@ -76,7 +76,7 @@ GenericName[zh_CN]=工具菜单附加 GenericName[zh_TW]=新增工具選單 Icon=configure ServiceTypes=TDevelop/Plugin -X-TDE-Library=libkdevtools +X-TDE-Library=libtdevtools X-TDevelop-Version=5 X-TDevelop-Scope=Global X-TDevelop-Properties=AdditionalTools diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp index 8734eadc..c6e4a242 100644 --- a/parts/tools/tools_part.cpp +++ b/parts/tools/tools_part.cpp @@ -19,14 +19,14 @@ #include <kprocess.h> #include <tdetexteditor/document.h> -#include "kdevcore.h" -#include "kdevproject.h" -#include "kdevpartcontroller.h" -#include "kdevappfrontend.h" -#include "kdevplugininfo.h" +#include "tdevcore.h" +#include "tdevproject.h" +#include "tdevpartcontroller.h" +#include "tdevappfrontend.h" +#include "tdevplugininfo.h" #include "urlutil.h" #include "configwidgetproxy.h" -#include "kdeveditorutil.h" +#include "tdeveditorutil.h" #include "toolsconfig.h" #include "toolsconfigwidget.h" @@ -34,17 +34,17 @@ #define TOOLSSETTINGS 1 #define EXTRATOOLSSETTINGS 2 -static const KDevPluginInfo data("kdevtools"); -K_EXPORT_COMPONENT_FACTORY( libkdevtools, ToolsFactory( data ) ) +static const TDevPluginInfo data("tdevtools"); +K_EXPORT_COMPONENT_FACTORY( libtdevtools, ToolsFactory( data ) ) TQMap<int, TQString> externalToolMenuEntries; ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &) - : KDevPlugin( &data, parent, name ? name : "ToolsPart") + : TDevPlugin( &data, parent, name ? name : "ToolsPart") { setInstance(ToolsFactory::instance()); - setXMLFile("kdevpart_tools.rc"); + setXMLFile("tdevpart_tools.rc"); m_configProxy = new ConfigWidgetProxy( core() ); m_configProxy->createGlobalConfigPage( i18n("Tools Menu"), TOOLSSETTINGS, info()->icon() ); @@ -128,11 +128,11 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (project()) projectDirectory = project()->projectDirectory(); - TQString selection = KDevEditorUtil::currentSelection( doc ); + TQString selection = TDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() ) selection = KShellProcess::quote( selection ); - TQString word = KDevEditorUtil::currentWord( doc ); + TQString word = TDevEditorUtil::currentWord( doc ); // This should really be checked before inserting into the popup if (cmdline.contains("%D") && projectDirectory.isNull()) @@ -153,7 +153,7 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (captured) { - if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("TDevelop/AppFrontend")) + if (TDevAppFrontend *appFrontend = extension<TDevAppFrontend>("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), cmdline, false); } else diff --git a/parts/tools/tools_part.h b/parts/tools/tools_part.h index 20af2ea8..4eeaf0e1 100644 --- a/parts/tools/tools_part.h +++ b/parts/tools/tools_part.h @@ -3,13 +3,13 @@ */ -#ifndef __KDEVPART_TOOLS_H__ -#define __KDEVPART_TOOLS_H__ +#ifndef __TDEVPART_TOOLS_H__ +#define __TDEVPART_TOOLS_H__ #include <tqguardedptr.h> -#include <kdevplugin.h> -#include <kdevgenericfactory.h> +#include <tdevplugin.h> +#include <tdevgenericfactory.h> class TQPopupMenu; @@ -20,7 +20,7 @@ class ConfigWidgetProxy; class ToolsWidget; -class ToolsPart : public KDevPlugin +class ToolsPart : public TDevPlugin { Q_OBJECT @@ -51,6 +51,6 @@ private: ConfigWidgetProxy * m_configProxy; }; -typedef KDevGenericFactory<ToolsPart> ToolsFactory; +typedef TDevGenericFactory<ToolsPart> ToolsFactory; #endif diff --git a/parts/tools/toolsconfig.cpp b/parts/tools/toolsconfig.cpp index f21713e9..8d689f40 100644 --- a/parts/tools/toolsconfig.cpp +++ b/parts/tools/toolsconfig.cpp @@ -35,7 +35,7 @@ void ToolsConfig::showEvent(TQShowEvent *e) TQHBoxLayout *hbox = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout *vbox = new TQVBoxLayout(hbox); - _tree = new KDevApplicationTree(this); + _tree = new TDevApplicationTree(this); _tree->header()->hide(); TQLabel *l = new TQLabel(_tree, i18n("&Applications:"), this); l->show(); @@ -121,7 +121,7 @@ void ToolsConfig::add(const TQString &desktopFile) void ToolsConfig::toList() { - KDevAppTreeListItem *item = dynamic_cast<KDevAppTreeListItem*>(_tree->selectedItem()); + TDevAppTreeListItem *item = dynamic_cast<TDevAppTreeListItem*>(_tree->selectedItem()); if (item && !item->desktopEntryPath().isEmpty()) add(item->desktopEntryPath()); checkButtons(); diff --git a/parts/tools/toolsconfig.h b/parts/tools/toolsconfig.h index 074d5900..23081676 100644 --- a/parts/tools/toolsconfig.h +++ b/parts/tools/toolsconfig.h @@ -9,7 +9,7 @@ class TQListBox; class TQPushButton; -class KDevApplicationTree; +class TDevApplicationTree; class Entry { @@ -60,7 +60,7 @@ private slots: private: - KDevApplicationTree *_tree; + TDevApplicationTree *_tree; TQListBox *_list; TQPushButton *_toList, *_toTree; |