diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /konqueror/sidebar/trees | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konqueror/sidebar/trees')
25 files changed, 578 insertions, 578 deletions
diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_item.cpp b/konqueror/sidebar/trees/bookmark_module/bookmark_item.cpp index c0fae56cc..0bfe4ea67 100644 --- a/konqueror/sidebar/trees/bookmark_module/bookmark_item.cpp +++ b/konqueror/sidebar/trees/bookmark_module/bookmark_item.cpp @@ -33,7 +33,7 @@ KonqSidebarBookmarkItem::KonqSidebarBookmarkItem( KonqSidebarTreeItem *parentIte setPixmap( 0, SmallIcon(bk.icon()) ); } -QDragObject * KonqSidebarBookmarkItem::dragObject( QWidget * parent, bool ) +TQDragObject * KonqSidebarBookmarkItem::dragObject( TQWidget * parent, bool ) { KBookmarkDrag * drag = KBookmarkDrag::newDrag( m_bk, parent ); // TODO honour bool move ? @@ -60,7 +60,7 @@ KURL KonqSidebarBookmarkItem::externalURL() const return m_bk.isGroup() ? KURL() : m_bk.url(); } -QString KonqSidebarBookmarkItem::toolTipText() const +TQString KonqSidebarBookmarkItem::toolTipText() const { return m_bk.url().prettyURL(); } @@ -70,9 +70,9 @@ void KonqSidebarBookmarkItem::itemSelected() tree()->enableActions( false, false, false, false, false, false ); } -QString KonqSidebarBookmarkItem::key( int /*column*/, bool /*ascending*/ ) const +TQString KonqSidebarBookmarkItem::key( int /*column*/, bool /*ascending*/ ) const { - return QString::number(m_key).rightJustify( 5, '0' ); + return TQString::number(m_key).rightJustify( 5, '0' ); } KBookmark &KonqSidebarBookmarkItem::bookmark() diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_item.h b/konqueror/sidebar/trees/bookmark_module/bookmark_item.h index 5ffe953e8..0cffd52ea 100644 --- a/konqueror/sidebar/trees/bookmark_module/bookmark_item.h +++ b/konqueror/sidebar/trees/bookmark_module/bookmark_item.h @@ -34,7 +34,7 @@ public: virtual ~KonqSidebarBookmarkItem() {} // Create a drag object from this item. - virtual QDragObject * dragObject( QWidget * parent, bool move = false ); + virtual TQDragObject * dragObject( TQWidget * parent, bool move = false ); virtual void middleButtonClicked(); virtual void rightButtonPressed(); @@ -45,12 +45,12 @@ public: virtual KURL externalURL() const; // overwrite this if you want a tooltip shown on your item - virtual QString toolTipText() const; + virtual TQString toolTipText() const; // Called when this item is selected virtual void itemSelected(); - virtual QString key( int column, bool /*ascending*/ ) const; + virtual TQString key( int column, bool /*ascending*/ ) const; virtual KBookmark &bookmark(); diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp index a931ac526..81b32923f 100644 --- a/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp +++ b/konqueror/sidebar/trees/bookmark_module/bookmark_module.cpp @@ -16,9 +16,9 @@ Boston, MA 02110-1301, USA. */ -#include <qclipboard.h> -#include <qcursor.h> -#include <qpopupmenu.h> +#include <tqclipboard.h> +#include <tqcursor.h> +#include <tqpopupmenu.h> #include <kaction.h> #include <kactioncollection.h> @@ -37,47 +37,47 @@ #include <kdebug.h> KonqSidebarBookmarkModule::KonqSidebarBookmarkModule( KonqSidebarTree * parentTree ) - : QObject( 0L ), KonqSidebarTreeModule( parentTree ), + : TQObject( 0L ), KonqSidebarTreeModule( parentTree ), m_topLevelItem( 0L ), m_ignoreOpenChange(true) { // formats handled by KBookmarkDrag: - QStringList formats; + TQStringList formats; formats << "text/uri-list" << "application/x-xbel" << "text/plain"; tree()->setDropFormats(formats); - connect(tree(), SIGNAL(moved(QListViewItem*,QListViewItem*,QListViewItem*)), - this, SLOT(slotMoved(QListViewItem*,QListViewItem*,QListViewItem*))); - connect(tree(), SIGNAL(dropped(KListView*,QDropEvent*,QListViewItem*,QListViewItem*)), - this, SLOT(slotDropped(KListView*,QDropEvent*,QListViewItem*,QListViewItem*))); + connect(tree(), TQT_SIGNAL(moved(TQListViewItem*,TQListViewItem*,TQListViewItem*)), + this, TQT_SLOT(slotMoved(TQListViewItem*,TQListViewItem*,TQListViewItem*))); + connect(tree(), TQT_SIGNAL(dropped(KListView*,TQDropEvent*,TQListViewItem*,TQListViewItem*)), + this, TQT_SLOT(slotDropped(KListView*,TQDropEvent*,TQListViewItem*,TQListViewItem*))); - connect(tree(), SIGNAL(expanded(QListViewItem*)), - this, SLOT(slotOpenChange(QListViewItem*))); - connect(tree(), SIGNAL(collapsed(QListViewItem*)), - this, SLOT(slotOpenChange(QListViewItem*))); + connect(tree(), TQT_SIGNAL(expanded(TQListViewItem*)), + this, TQT_SLOT(slotOpenChange(TQListViewItem*))); + connect(tree(), TQT_SIGNAL(collapsed(TQListViewItem*)), + this, TQT_SLOT(slotOpenChange(TQListViewItem*))); m_collection = new KActionCollection( this, "bookmark actions" ); (void) new KAction( i18n("&Create New Folder"), "folder_new", 0, this, - SLOT( slotCreateFolder() ), m_collection, "create_folder"); + TQT_SLOT( slotCreateFolder() ), m_collection, "create_folder"); (void) new KAction( i18n("Delete Folder"), "editdelete", 0, this, - SLOT( slotDelete() ), m_collection, "delete_folder"); + TQT_SLOT( slotDelete() ), m_collection, "delete_folder"); (void) new KAction( i18n("Delete Bookmark"), "editdelete", 0, this, - SLOT( slotDelete() ), m_collection, "delete_bookmark"); + TQT_SLOT( slotDelete() ), m_collection, "delete_bookmark"); (void) new KAction( i18n("Properties"), "edit", 0, this, - SLOT( slotProperties() ), m_collection, "item_properties"); + TQT_SLOT( slotProperties() ), m_collection, "item_properties"); (void) new KAction( i18n("Open in New Window"), "window_new", 0, this, - SLOT( slotOpenNewWindow() ), m_collection, "open_window"); + TQT_SLOT( slotOpenNewWindow() ), m_collection, "open_window"); (void) new KAction( i18n("Open in New Tab"), "tab_new", 0, this, - SLOT( slotOpenTab() ), m_collection, "open_tab"); + TQT_SLOT( slotOpenTab() ), m_collection, "open_tab"); (void) new KAction( i18n("Open Folder in Tabs"), "tab_new", 0, this, - SLOT( slotOpenTab() ), m_collection, "folder_open_tabs"); + TQT_SLOT( slotOpenTab() ), m_collection, "folder_open_tabs"); (void) new KAction( i18n("Copy Link Address"), "editcopy", 0, this, - SLOT( slotCopyLocation() ), m_collection, "copy_location"); + TQT_SLOT( slotCopyLocation() ), m_collection, "copy_location"); - KStdAction::editBookmarks( KonqBookmarkManager::self(), SLOT( slotEditBookmarks() ), + KStdAction::editBookmarks( KonqBookmarkManager::self(), TQT_SLOT( slotEditBookmarks() ), m_collection, "edit_bookmarks" ); - connect( KonqBookmarkManager::self(), SIGNAL(changed(const QString &, const QString &) ), - SLOT( slotBookmarksChanged(const QString &) ) ); + connect( KonqBookmarkManager::self(), TQT_SIGNAL(changed(const TQString &, const TQString &) ), + TQT_SLOT( slotBookmarksChanged(const TQString &) ) ); } KonqSidebarBookmarkModule::~KonqSidebarBookmarkModule() @@ -94,9 +94,9 @@ void KonqSidebarBookmarkModule::addTopLevelItem( KonqSidebarTreeTopLevelItem * i m_ignoreOpenChange = false; } -bool KonqSidebarBookmarkModule::handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const QPoint& ) +bool KonqSidebarBookmarkModule::handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const TQPoint& ) { - QPopupMenu *menu = new QPopupMenu; + TQPopupMenu *menu = new QPopupMenu; if (tree()->tabSupport()) { m_collection->action("folder_open_tabs")->plug(menu); @@ -107,7 +107,7 @@ bool KonqSidebarBookmarkModule::handleTopLevelContextMenu( KonqSidebarTreeTopLev menu->insertSeparator(); m_collection->action("edit_bookmarks")->plug(menu); - menu->exec( QCursor::pos() ); + menu->exec( TQCursor::pos() ); delete menu; return true; @@ -120,7 +120,7 @@ void KonqSidebarBookmarkModule::showPopupMenu() return; bool tabSupported = tree()->tabSupport(); - QPopupMenu *menu = new QPopupMenu; + TQPopupMenu *menu = new QPopupMenu; if (bi->bookmark().isGroup()) { if (tabSupported) { @@ -141,11 +141,11 @@ void KonqSidebarBookmarkModule::showPopupMenu() menu->insertSeparator(); m_collection->action("item_properties")->plug(menu); - menu->exec( QCursor::pos() ); + menu->exec( TQCursor::pos() ); delete menu; } -void KonqSidebarBookmarkModule::slotMoved(QListViewItem *i, QListViewItem*, QListViewItem *after) +void KonqSidebarBookmarkModule::slotMoved(TQListViewItem *i, TQListViewItem*, TQListViewItem *after) { KonqSidebarBookmarkItem *item = dynamic_cast<KonqSidebarBookmarkItem*>( i ); if (!item) @@ -159,7 +159,7 @@ void KonqSidebarBookmarkModule::slotMoved(QListViewItem *i, QListViewItem*, QLis KBookmarkGroup oldParentGroup = bookmark.parentGroup(); KBookmarkGroup parentGroup; - // try to get the parent group (assume that the QListViewItem has been reparented by KListView)... + // try to get the parent group (assume that the TQListViewItem has been reparented by KListView)... // if anything goes wrong, use the root. if (item->parent()) { bool error = false; @@ -191,20 +191,20 @@ void KonqSidebarBookmarkModule::slotMoved(QListViewItem *i, QListViewItem*, QLis // inform others about the changed groups. quite expensive, so do // our best to update them in only one emitChanged call. - QString oldAddress = oldParentGroup.address(); - QString newAddress = parentGroup.address(); + TQString oldAddress = oldParentGroup.address(); + TQString newAddress = parentGroup.address(); if (oldAddress == newAddress) { KonqBookmarkManager::self()->emitChanged( parentGroup ); } else { int i = 0; while (true) { - QChar c1 = oldAddress[i]; - QChar c2 = newAddress[i]; - if (c1 == QChar::null) { + TQChar c1 = oldAddress[i]; + TQChar c2 = newAddress[i]; + if (c1 == TQChar::null) { // oldParentGroup is probably parent of parentGroup. KonqBookmarkManager::self()->emitChanged( oldParentGroup ); break; - } else if (c2 == QChar::null) { + } else if (c2 == TQChar::null) { // parentGroup is probably parent of oldParentGroup. KonqBookmarkManager::self()->emitChanged( parentGroup ); break; @@ -223,7 +223,7 @@ void KonqSidebarBookmarkModule::slotMoved(QListViewItem *i, QListViewItem*, QLis } } -void KonqSidebarBookmarkModule::slotDropped(KListView *, QDropEvent *e, QListViewItem *parent, QListViewItem *after) +void KonqSidebarBookmarkModule::slotDropped(KListView *, TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) { if (!KBookmarkDrag::canDecode(e)) return; @@ -257,10 +257,10 @@ void KonqSidebarBookmarkModule::slotDropped(KListView *, QDropEvent *e, QListVie parentGroup = KonqBookmarkManager::self()->root(); } - QValueList<KBookmark> bookmarks = KBookmarkDrag::decode(e); + TQValueList<KBookmark> bookmarks = KBookmarkDrag::decode(e); // copy - QValueList<KBookmark>::iterator it = bookmarks.begin(); + TQValueList<KBookmark>::iterator it = bookmarks.begin(); for (;it != bookmarks.end(); ++it) { // insert new item. parentGroup.moveItem(*it, afterBookmark); @@ -320,21 +320,21 @@ void KonqSidebarBookmarkModule::slotDelete() KonqBookmarkManager::self()->emitChanged( parentBookmark ); } -void makeTextNodeMod(KBookmark bk, const QString &m_nodename, const QString &m_newText) { - QDomNode subnode = bk.internalElement().namedItem(m_nodename); +void makeTextNodeMod(KBookmark bk, const TQString &m_nodename, const TQString &m_newText) { + TQDomNode subnode = bk.internalElement().namedItem(m_nodename); if (subnode.isNull()) { subnode = bk.internalElement().ownerDocument().createElement(m_nodename); bk.internalElement().appendChild(subnode); } if (subnode.firstChild().isNull()) { - QDomText domtext = subnode.ownerDocument().createTextNode(""); + TQDomText domtext = subnode.ownerDocument().createTextNode(""); subnode.appendChild(domtext); } - QDomText domtext = subnode.firstChild().toText(); + TQDomText domtext = subnode.firstChild().toText(); - QString m_oldText = domtext.data(); + TQString m_oldText = domtext.data(); domtext.setData(m_newText); } @@ -348,7 +348,7 @@ void KonqSidebarBookmarkModule::slotProperties(KonqSidebarBookmarkItem *bi) KBookmark bookmark = bi->bookmark(); - QString folder = bookmark.isGroup() ? QString::null : bookmark.url().pathOrURL(); + TQString folder = bookmark.isGroup() ? TQString::null : bookmark.url().pathOrURL(); BookmarkEditDialog dlg( bookmark.fullText(), folder, 0, 0, i18n("Bookmark Properties") ); if ( dlg.exec() != KDialogBase::Accepted ) @@ -394,11 +394,11 @@ void KonqSidebarBookmarkModule::slotOpenTab() bookmark = group.first(); while (!bookmark.isNull()) { if (!bookmark.isGroup() && !bookmark.isSeparator()) - ref.call( "newTab(QString)", bookmark.url().url() ); + ref.call( "newTab(TQString)", bookmark.url().url() ); bookmark = group.next(bookmark); } } else { - ref.call( "newTab(QString)", bookmark.url().url() ); + ref.call( "newTab(TQString)", bookmark.url().url() ); } } @@ -419,7 +419,7 @@ void KonqSidebarBookmarkModule::slotCopyLocation() } } -void KonqSidebarBookmarkModule::slotOpenChange(QListViewItem* i) +void KonqSidebarBookmarkModule::slotOpenChange(TQListViewItem* i) { if (m_ignoreOpenChange) return; @@ -438,7 +438,7 @@ void KonqSidebarBookmarkModule::slotOpenChange(QListViewItem* i) m_folderOpenState[bookmark.address()] = open; } -void KonqSidebarBookmarkModule::slotBookmarksChanged( const QString & groupAddress ) +void KonqSidebarBookmarkModule::slotBookmarksChanged( const TQString & groupAddress ) { m_ignoreOpenChange = true; @@ -450,9 +450,9 @@ void KonqSidebarBookmarkModule::slotBookmarksChanged( const QString & groupAddre if (!group.isNull() && item) { // Delete all children of item - QListViewItem * child = item->firstChild(); + TQListViewItem * child = item->firstChild(); while( child ) { - QListViewItem * next = child->nextSibling(); + TQListViewItem * next = child->nextSibling(); delete child; child = next; } @@ -483,7 +483,7 @@ void KonqSidebarBookmarkModule::fillGroup( KonqSidebarTreeItem * parentItem, KBo KBookmarkGroup grp = bk.toGroup(); fillGroup( item, grp ); - QString address(grp.address()); + TQString address(grp.address()); if (m_folderOpenState.contains(address)) item->setOpen(m_folderOpenState[address]); else @@ -497,12 +497,12 @@ void KonqSidebarBookmarkModule::fillGroup( KonqSidebarTreeItem * parentItem, KBo } // Borrowed from KEditBookmarks -KonqSidebarBookmarkItem * KonqSidebarBookmarkModule::findByAddress( const QString & address ) const +KonqSidebarBookmarkItem * KonqSidebarBookmarkModule::findByAddress( const TQString & address ) const { - QListViewItem * item = m_topLevelItem; + TQListViewItem * item = m_topLevelItem; // The address is something like /5/10/2 - QStringList addresses = QStringList::split('/',address); - for ( QStringList::Iterator it = addresses.begin() ; it != addresses.end() ; ++it ) + TQStringList addresses = TQStringList::split('/',address); + for ( TQStringList::Iterator it = addresses.begin() ; it != addresses.end() ; ++it ) { uint number = (*it).toUInt(); item = item->firstChild(); @@ -514,8 +514,8 @@ KonqSidebarBookmarkItem * KonqSidebarBookmarkModule::findByAddress( const QStrin } // Borrowed&modified from KBookmarkMenu... -BookmarkEditDialog::BookmarkEditDialog(const QString& title, const QString& url, - QWidget * parent, const char * name, const QString& caption ) +BookmarkEditDialog::BookmarkEditDialog(const TQString& title, const TQString& url, + TQWidget * parent, const char * name, const TQString& caption ) : KDialogBase(parent, name, true, caption, (Ok|Cancel), Ok, false, KGuiItem()), @@ -523,20 +523,20 @@ BookmarkEditDialog::BookmarkEditDialog(const QString& title, const QString& url, { setButtonOK( i18n( "&Update" ) ); - QWidget *main = new QWidget( this ); + TQWidget *main = new TQWidget( this ); setMainWidget( main ); bool folder = url.isNull(); - QGridLayout *grid = new QGridLayout( main, 2, folder?1:2, spacingHint() ); + TQGridLayout *grid = new TQGridLayout( main, 2, folder?1:2, spacingHint() ); - QLabel *nameLabel = new QLabel(i18n("Name:"), main, "title label"); + TQLabel *nameLabel = new TQLabel(i18n("Name:"), main, "title label"); grid->addWidget(nameLabel, 0, 0); m_title = new KLineEdit(main, "title edit"); m_title->setText(title); nameLabel->setBuddy(m_title); grid->addWidget(m_title, 0, 1); if(!folder) { - QLabel *locationLabel = new QLabel(i18n("Location:"), main, "location label"); + TQLabel *locationLabel = new TQLabel(i18n("Location:"), main, "location label"); grid->addWidget(locationLabel, 1, 0); m_location = new KLineEdit(main, "location edit"); m_location->setText(url); @@ -556,20 +556,20 @@ void BookmarkEditDialog::slotCancel() reject(); } -QString BookmarkEditDialog::finalUrl() const +TQString BookmarkEditDialog::finalUrl() const { if (m_location!=0) return m_location->text(); else - return QString::null; + return TQString::null; } -QString BookmarkEditDialog::finalTitle() const +TQString BookmarkEditDialog::finalTitle() const { if (m_title!=0) return m_title->text(); else - return QString::null; + return TQString::null; } extern "C" diff --git a/konqueror/sidebar/trees/bookmark_module/bookmark_module.h b/konqueror/sidebar/trees/bookmark_module/bookmark_module.h index b38cdb540..738bd7566 100644 --- a/konqueror/sidebar/trees/bookmark_module/bookmark_module.h +++ b/konqueror/sidebar/trees/bookmark_module/bookmark_module.h @@ -19,8 +19,8 @@ #ifndef bookmark_module_h #define bookmark_module_h -#include <qmap.h> -#include <qobject.h> +#include <tqmap.h> +#include <tqobject.h> #include <konq_sidebartreemodule.h> #include <kbookmark.h> #include <kdialogbase.h> @@ -32,7 +32,7 @@ class KLineEdit; /** * This module displays bookmarks in the tree */ -class KonqSidebarBookmarkModule : public QObject, public KonqSidebarTreeModule +class KonqSidebarBookmarkModule : public TQObject, public KonqSidebarTreeModule { Q_OBJECT public: @@ -41,15 +41,15 @@ public: // Handle this new toplevel item [can only be called once currently] virtual void addTopLevelItem( KonqSidebarTreeTopLevelItem * item ); - virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const QPoint& ); + virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const TQPoint& ); void showPopupMenu(); protected slots: - void slotBookmarksChanged( const QString & ); - void slotMoved(QListViewItem*,QListViewItem*,QListViewItem*); - void slotDropped(KListView*,QDropEvent*,QListViewItem*,QListViewItem*); + void slotBookmarksChanged( const TQString & ); + void slotMoved(TQListViewItem*,TQListViewItem*,TQListViewItem*); + void slotDropped(KListView*,TQDropEvent*,TQListViewItem*,TQListViewItem*); void slotCreateFolder(); void slotDelete(); void slotProperties(KonqSidebarBookmarkItem *bi = 0); @@ -60,10 +60,10 @@ protected slots: protected: void fillListView(); void fillGroup( KonqSidebarTreeItem * parentItem, KBookmarkGroup group ); - KonqSidebarBookmarkItem * findByAddress( const QString & address ) const; + KonqSidebarBookmarkItem * findByAddress( const TQString & address ) const; private slots: - void slotOpenChange(QListViewItem*); + void slotOpenChange(TQListViewItem*); private: KonqSidebarTreeTopLevelItem * m_topLevelItem; @@ -72,7 +72,7 @@ private: KActionCollection *m_collection; bool m_ignoreOpenChange; - QMap<QString, bool> m_folderOpenState; + TQMap<TQString, bool> m_folderOpenState; }; class BookmarkEditDialog : public KDialogBase @@ -80,12 +80,12 @@ class BookmarkEditDialog : public KDialogBase Q_OBJECT public: - BookmarkEditDialog( const QString& title, const QString& url, - QWidget * = 0, const char * = 0, - const QString& caption = i18n( "Add Bookmark" ) ); + BookmarkEditDialog( const TQString& title, const TQString& url, + TQWidget * = 0, const char * = 0, + const TQString& caption = i18n( "Add Bookmark" ) ); - QString finalUrl() const; - QString finalTitle() const; + TQString finalUrl() const; + TQString finalTitle() const; protected slots: void slotOk(); diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 7f7ee8849..811867b14 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp @@ -25,13 +25,13 @@ #include <kdebug.h> #include <kglobalsettings.h> #include <kuserprofile.h> -#include <qapplication.h> -#include <qclipboard.h> +#include <tqapplication.h> +#include <tqclipboard.h> #include <kio/paste.h> -#include <qfile.h> -#include <qpainter.h> +#include <tqfile.h> +#include <tqpainter.h> #include <kiconloader.h> -#include <qcursor.h> +#include <tqcursor.h> #define MYMODULE static_cast<KonqSidebarDirTreeModule*>(module()) @@ -64,7 +64,7 @@ void KonqSidebarDirTreeItem::reset() KURL url = m_fileItem->url(); if ( url.isLocalFile() ) { - QCString path( QFile::encodeName(url.path())); + TQCString path( TQFile::encodeName(url.path())); struct stat buff; if ( ::stat( path.data(), &buff ) != -1 ) { @@ -108,15 +108,15 @@ bool KonqSidebarDirTreeItem::hasStandardIcon() return m_fileItem->iconName() == "folder"; } -void KonqSidebarDirTreeItem::paintCell( QPainter *_painter, const QColorGroup & _cg, int _column, int _width, int _alignment ) +void KonqSidebarDirTreeItem::paintCell( TQPainter *_painter, const TQColorGroup & _cg, int _column, int _width, int _alignment ) { if (m_fileItem->isLink()) { - QFont f( _painter->font() ); + TQFont f( _painter->font() ); f.setItalic( TRUE ); _painter->setFont( f ); } - QListViewItem::paintCell( _painter, _cg, _column, _width, _alignment ); + TQListViewItem::paintCell( _painter, _cg, _column, _width, _alignment ); } KURL KonqSidebarDirTreeItem::externalURL() const @@ -124,27 +124,27 @@ KURL KonqSidebarDirTreeItem::externalURL() const return m_fileItem->url(); } -QString KonqSidebarDirTreeItem::externalMimeType() const +TQString KonqSidebarDirTreeItem::externalMimeType() const { if (m_fileItem->isMimeTypeKnown()) return m_fileItem->mimetype(); else - return QString::null; + return TQString::null; } -bool KonqSidebarDirTreeItem::acceptsDrops( const QStrList & formats ) +bool KonqSidebarDirTreeItem::acceptsDrops( const TQStrList & formats ) { if ( formats.contains("text/uri-list") ) return m_fileItem->acceptsDrops(); return false; } -void KonqSidebarDirTreeItem::drop( QDropEvent * ev ) +void KonqSidebarDirTreeItem::drop( TQDropEvent * ev ) { KonqOperations::doDrop( m_fileItem, externalURL(), ev, tree() ); } -QDragObject * KonqSidebarDirTreeItem::dragObject( QWidget * parent, bool move ) +TQDragObject * KonqSidebarDirTreeItem::dragObject( TQWidget * parent, bool move ) { KURL::List lst; lst.append( m_fileItem->url() ); @@ -162,7 +162,7 @@ void KonqSidebarDirTreeItem::itemSelected() if ( m_fileItem->url().directory(false) == KGlobalSettings::trashPath() ) bInTrash = true; - QMimeSource *data = QApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); bool paste = ( data->encodedData( data->format() ).size() != 0 ); tree()->enableActions( true, true, paste, true && !bInTrash, true, true ); @@ -190,14 +190,14 @@ void KonqSidebarDirTreeItem::rightButtonPressed() { KFileItemList lstItems; lstItems.append( m_fileItem ); - emit tree()->popupMenu( QCursor::pos(), lstItems ); + emit tree()->popupMenu( TQCursor::pos(), lstItems ); } void KonqSidebarDirTreeItem::paste() { // move or not move ? bool move = false; - QMimeSource *data = QApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); if ( data->provides( "application/x-kde-cutselection" ) ) { move = KonqDrag::decodeIsCutSelection( data ); kdDebug(1201) << "move (from clipboard data) = " << move << endl; @@ -229,7 +229,7 @@ void KonqSidebarDirTreeItem::delOperation( int method ) KonqOperations::del(tree(), method, lst); } -QString KonqSidebarDirTreeItem::toolTipText() const +TQString KonqSidebarDirTreeItem::toolTipText() const { return m_fileItem->url().pathOrURL(); } @@ -239,7 +239,7 @@ void KonqSidebarDirTreeItem::rename() tree()->rename( this, 0 ); } -void KonqSidebarDirTreeItem::rename( const QString & name ) +void KonqSidebarDirTreeItem::rename( const TQString & name ) { KonqOperations::rename( tree(), m_fileItem->url(), name ); } diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.h b/konqueror/sidebar/trees/dirtree_module/dirtree_item.h index fe98595e6..f8025d230 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.h +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.h @@ -21,7 +21,7 @@ #include "konq_sidebartreeitem.h" #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> class QDropEvent; class KFileItem; @@ -36,11 +36,11 @@ public: virtual void setOpen( bool open ); - virtual void paintCell( QPainter *_painter, const QColorGroup & _cg, int _column, int _width, int _alignment ); + virtual void paintCell( TQPainter *_painter, const TQColorGroup & _cg, int _column, int _width, int _alignment ); - virtual bool acceptsDrops( const QStrList & formats ); - virtual void drop( QDropEvent * ev ); - virtual QDragObject * dragObject( QWidget * parent, bool move = false ); + virtual bool acceptsDrops( const TQStrList & formats ); + virtual void drop( TQDropEvent * ev ); + virtual TQDragObject * dragObject( TQWidget * parent, bool move = false ); virtual void middleButtonClicked(); virtual void rightButtonPressed(); @@ -50,12 +50,12 @@ public: virtual void del(); virtual void shred(); virtual void rename(); // start a rename operation - void rename( const QString & name ); // do the actual renaming + void rename( const TQString & name ); // do the actual renaming // The URL to open when this link is clicked virtual KURL externalURL() const; - virtual QString externalMimeType() const; - virtual QString toolTipText() const; + virtual TQString externalMimeType() const; + virtual TQString toolTipText() const; virtual void itemSelected(); @@ -63,7 +63,7 @@ public: bool hasStandardIcon(); - QString id; + TQString id; private: void delOperation( int method ); diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp index 725927362..ac26b1285 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp @@ -53,8 +53,8 @@ KonqSidebarDirTreeModule::~KonqSidebarDirTreeModule() // KDirLister may still emit canceled while being deleted. if (m_dirLister) { - disconnect( m_dirLister, SIGNAL( canceled( const KURL & ) ), - this, SLOT( slotListingStopped( const KURL & ) ) ); + disconnect( m_dirLister, TQT_SIGNAL( canceled( const KURL & ) ), + this, TQT_SLOT( slotListingStopped( const KURL & ) ) ); delete m_dirLister; } } @@ -87,12 +87,12 @@ void KonqSidebarDirTreeModule::addTopLevelItem( KonqSidebarTreeTopLevelItem * it { targetURL = cfg.readURL(); // some services might want to make their URL configurable in kcontrol - QString configured = cfg.readEntry("X-KDE-ConfiguredURL"); + TQString configured = cfg.readEntry("X-KDE-ConfiguredURL"); if (!configured.isEmpty()) { - QStringList list = QStringList::split(':', configured); + TQStringList list = TQStringList::split(':', configured); KConfig config(list[0]); if (list[1] != "noGroup") config.setGroup(list[1]); - QString conf_url = config.readEntry(list[2]); + TQString conf_url = config.readEntry(list[2]); if (!conf_url.isEmpty()) { targetURL = conf_url; } @@ -101,7 +101,7 @@ void KonqSidebarDirTreeModule::addTopLevelItem( KonqSidebarTreeTopLevelItem * it else if ( cfg.hasDeviceType() ) { // Determine the mountpoint - QString mp = cfg.readEntry("MountPoint"); + TQString mp = cfg.readEntry("MountPoint"); if ( mp.isEmpty() ) return; @@ -133,7 +133,7 @@ void KonqSidebarDirTreeModule::openTopLevelItem( KonqSidebarTreeTopLevelItem * i void KonqSidebarDirTreeModule::addSubDir( KonqSidebarTreeItem *item ) { - QString id = item->externalURL().url(-1); + TQString id = item->externalURL().url(-1); kdDebug(1201) << this << " KonqSidebarDirTreeModule::addSubDir " << id << endl; m_dictSubDirs.insert(id, item ); @@ -144,9 +144,9 @@ void KonqSidebarDirTreeModule::addSubDir( KonqSidebarTreeItem *item ) // Remove <key, item> from dict, taking into account that there maybe // other items with the same key. -static void remove(QDict<KonqSidebarTreeItem> &dict, const QString &key, KonqSidebarTreeItem *item) +static void remove(TQDict<KonqSidebarTreeItem> &dict, const TQString &key, KonqSidebarTreeItem *item) { - QPtrList<KonqSidebarTreeItem> *otherItems = 0; + TQPtrList<KonqSidebarTreeItem> *otherItems = 0; while(true) { KonqSidebarTreeItem *takeItem = dict.take(key); if (!takeItem || (takeItem == item)) @@ -164,7 +164,7 @@ static void remove(QDict<KonqSidebarTreeItem> &dict, const QString &key, KonqSid } // Not the item we are looking for if (!otherItems) - otherItems = new QPtrList<KonqSidebarTreeItem>(); + otherItems = new TQPtrList<KonqSidebarTreeItem>(); otherItems->prepend(takeItem); } @@ -173,7 +173,7 @@ static void remove(QDict<KonqSidebarTreeItem> &dict, const QString &key, KonqSid // Looks up key in dict and returns it in item, if there are multiple items // with the same key, additional items are returned in itemList which should // be deleted by the caller. -static void lookupItems(QDict<KonqSidebarTreeItem> &dict, const QString &key, KonqSidebarTreeItem *&item, QPtrList<KonqSidebarTreeItem> *&itemList) +static void lookupItems(TQDict<KonqSidebarTreeItem> &dict, const TQString &key, KonqSidebarTreeItem *&item, TQPtrList<KonqSidebarTreeItem> *&itemList) { itemList = 0; item = dict.take(key); @@ -196,7 +196,7 @@ static void lookupItems(QDict<KonqSidebarTreeItem> &dict, const QString &key, Ko return; } if (!itemList) - itemList = new QPtrList<KonqSidebarTreeItem>(); + itemList = new TQPtrList<KonqSidebarTreeItem>(); itemList->prepend(takeItem); } @@ -204,9 +204,9 @@ static void lookupItems(QDict<KonqSidebarTreeItem> &dict, const QString &key, Ko // Remove <key, item> from dict, taking into account that there maybe // other items with the same key. -static void remove(QPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTreeItem *item) +static void remove(TQPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTreeItem *item) { - QPtrList<KonqSidebarTreeItem> *otherItems = 0; + TQPtrList<KonqSidebarTreeItem> *otherItems = 0; while(true) { KonqSidebarTreeItem *takeItem = dict.take(key); if (!takeItem || (takeItem == item)) @@ -224,7 +224,7 @@ static void remove(QPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTr } // Not the item we are looking for if (!otherItems) - otherItems = new QPtrList<KonqSidebarTreeItem>(); + otherItems = new TQPtrList<KonqSidebarTreeItem>(); otherItems->prepend(takeItem); } @@ -233,7 +233,7 @@ static void remove(QPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTr // Looks up key in dict and returns it in item, if there are multiple items // with the same key, additional items are returned in itemList which should // be deleted by the caller. -static void lookupItems(QPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTreeItem *&item, QPtrList<KonqSidebarTreeItem> *&itemList) +static void lookupItems(TQPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSidebarTreeItem *&item, TQPtrList<KonqSidebarTreeItem> *&itemList) { itemList = 0; item = dict.take(key); @@ -256,7 +256,7 @@ static void lookupItems(QPtrDict<KonqSidebarTreeItem> &dict, void *key, KonqSide return; } if (!itemList) - itemList = new QPtrList<KonqSidebarTreeItem>(); + itemList = new TQPtrList<KonqSidebarTreeItem>(); itemList->prepend(takeItem); } @@ -280,7 +280,7 @@ void KonqSidebarDirTreeModule::removeSubDir( KonqSidebarTreeItem *item, bool chi if ( !childrenOnly ) { - QString id = item->externalURL().url(-1); + TQString id = item->externalURL().url(-1); remove(m_dictSubDirs, id, item); while (!(item->alias.isEmpty())) { @@ -303,22 +303,22 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item ) { m_dirLister = new KDirLister( true ); //m_dirLister->setDirOnlyMode( true ); -// QStringList mimetypes; -// mimetypes<<QString("inode/directory"); +// TQStringList mimetypes; +// mimetypes<<TQString("inode/directory"); // m_dirLister->setMimeFilter(mimetypes); - connect( m_dirLister, SIGNAL( newItems( const KFileItemList & ) ), - this, SLOT( slotNewItems( const KFileItemList & ) ) ); - connect( m_dirLister, SIGNAL( refreshItems( const KFileItemList & ) ), - this, SLOT( slotRefreshItems( const KFileItemList & ) ) ); - connect( m_dirLister, SIGNAL( deleteItem( KFileItem * ) ), - this, SLOT( slotDeleteItem( KFileItem * ) ) ); - connect( m_dirLister, SIGNAL( completed( const KURL & ) ), - this, SLOT( slotListingStopped( const KURL & ) ) ); - connect( m_dirLister, SIGNAL( canceled( const KURL & ) ), - this, SLOT( slotListingStopped( const KURL & ) ) ); - connect( m_dirLister, SIGNAL( redirection( const KURL &, const KURL & ) ), - this, SLOT( slotRedirection( const KURL &, const KURL & ) ) ); + connect( m_dirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ), + this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) ); + connect( m_dirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ), + this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) ); + connect( m_dirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), + this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) ); + connect( m_dirLister, TQT_SIGNAL( completed( const KURL & ) ), + this, TQT_SLOT( slotListingStopped( const KURL & ) ) ); + connect( m_dirLister, TQT_SIGNAL( canceled( const KURL & ) ), + this, TQT_SLOT( slotListingStopped( const KURL & ) ) ); + connect( m_dirLister, TQT_SIGNAL( redirection( const KURL &, const KURL & ) ), + this, TQT_SLOT( slotRedirection( const KURL &, const KURL & ) ) ); } @@ -326,7 +326,7 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item ) static_cast<KonqSidebarDirTreeItem *>(item)->hasStandardIcon() ) { int size = KGlobal::iconLoader()->currentSize( KIcon::Small ); - QPixmap pix = DesktopIcon( "folder_open", size ); + TQPixmap pix = DesktopIcon( "folder_open", size ); m_pTree->startAnimation( item, "kde", 6, &pix ); } else @@ -338,10 +338,10 @@ void KonqSidebarDirTreeModule::openSubFolder( KonqSidebarTreeItem *item ) void KonqSidebarDirTreeModule::listDirectory( KonqSidebarTreeItem *item ) { // This causes a reparsing, but gets rid of the trailing slash - QString strUrl = item->externalURL().url(-1); + TQString strUrl = item->externalURL().url(-1); KURL url( strUrl ); - QPtrList<KonqSidebarTreeItem> *itemList; + TQPtrList<KonqSidebarTreeItem> *itemList; KonqSidebarTreeItem * openItem; lookupItems(m_dictSubDirs, strUrl, openItem, itemList); @@ -407,13 +407,13 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries ) dir.setFileName( "" ); kdDebug(1201) << this << " KonqSidebarDirTreeModule::slotNewItems dir=" << dir.url(-1) << endl; - QPtrList<KonqSidebarTreeItem> *parentItemList; + TQPtrList<KonqSidebarTreeItem> *parentItemList; KonqSidebarTreeItem * parentItem; lookupItems(m_dictSubDirs, dir.url(-1), parentItem, parentItemList); if ( !parentItem ) // hack for dnssd://domain/type/service listed in dnssd:/type/ dir { - dir.setHost( QString::null ); + dir.setHost( TQString::null ); lookupItems( m_dictSubDirs, dir.url(-1), parentItem, parentItemList ); } @@ -428,7 +428,7 @@ void KonqSidebarDirTreeModule::slotNewItems( const KFileItemList& entries ) do { kdDebug()<<"Parent Item URL:"<<parentItem->externalURL()<<endl; - QPtrListIterator<KFileItem> kit ( entries ); + TQPtrListIterator<KFileItem> kit ( entries ); for( ; kit.current(); ++kit ) { KFileItem * fileItem = *kit; @@ -458,13 +458,13 @@ void KonqSidebarDirTreeModule::slotRefreshItems( const KFileItemList &entries ) { int size = KGlobal::iconLoader()->currentSize( KIcon::Small ); - QPtrListIterator<KFileItem> kit ( entries ); + TQPtrListIterator<KFileItem> kit ( entries ); kdDebug(1201) << "KonqSidebarDirTreeModule::slotRefreshItems " << entries.count() << " entries. First: " << kit.current()->url().url() << endl; for( ; kit.current(); ++kit ) { KFileItem *fileItem = kit.current(); - QPtrList<KonqSidebarTreeItem> *itemList; + TQPtrList<KonqSidebarTreeItem> *itemList; KonqSidebarTreeItem * item; lookupItems(m_ptrdictSubDirs, fileItem, item, itemList); @@ -517,7 +517,7 @@ void KonqSidebarDirTreeModule::slotDeleteItem( KFileItem *fileItem ) kdDebug(1201) << "KonqSidebarDirTreeModule::slotDeleteItem( " << fileItem->url().url(-1) << " )" << endl; // All items are in m_ptrdictSubDirs, so look it up fast - QPtrList<KonqSidebarTreeItem> *itemList; + TQPtrList<KonqSidebarTreeItem> *itemList; KonqSidebarTreeItem * item; lookupItems(m_ptrdictSubDirs, fileItem, item, itemList); while(item) @@ -534,10 +534,10 @@ void KonqSidebarDirTreeModule::slotRedirection( const KURL & oldUrl, const KURL { kdDebug(1201) << "******************************KonqSidebarDirTreeModule::slotRedirection(" << newUrl.prettyURL() << ")" << endl; - QString oldUrlStr = oldUrl.url(-1); - QString newUrlStr = newUrl.url(-1); + TQString oldUrlStr = oldUrl.url(-1); + TQString newUrlStr = newUrl.url(-1); - QPtrList<KonqSidebarTreeItem> *itemList; + TQPtrList<KonqSidebarTreeItem> *itemList; KonqSidebarTreeItem * item; lookupItems(m_dictSubDirs, oldUrlStr, item, itemList); @@ -565,7 +565,7 @@ void KonqSidebarDirTreeModule::slotListingStopped( const KURL & url ) { kdDebug(1201) << "KonqSidebarDirTree::slotListingStopped " << url.url(-1) << endl; - QPtrList<KonqSidebarTreeItem> *itemList; + TQPtrList<KonqSidebarTreeItem> *itemList; KonqSidebarTreeItem * item; lookupItems(m_dictSubDirs, url.url(-1), item, itemList); diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_module.h b/konqueror/sidebar/trees/dirtree_module/dirtree_module.h index dc46d3b9e..af915aa46 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_module.h +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_module.h @@ -21,9 +21,9 @@ #include <konq_sidebartreemodule.h> #include <kfileitem.h> -#include <qpixmap.h> -#include <qdict.h> -#include <qptrdict.h> +#include <tqpixmap.h> +#include <tqdict.h> +#include <tqptrdict.h> class KDirLister; class KonqSidebarTree; @@ -31,7 +31,7 @@ class KonqSidebarTreeItem; class KonqSidebarDirTreeItem; class KonqPropsView; -class KonqSidebarDirTreeModule : public QObject, public KonqSidebarTreeModule +class KonqSidebarDirTreeModule : public TQObject, public KonqSidebarTreeModule { Q_OBJECT public: @@ -64,10 +64,10 @@ private: // URL -> item // Each KonqSidebarDirTreeItem is indexed on item->id() and // all item->alias'es - QDict<KonqSidebarTreeItem> m_dictSubDirs; + TQDict<KonqSidebarTreeItem> m_dictSubDirs; // KFileItem -> item - QPtrDict<KonqSidebarTreeItem> m_ptrdictSubDirs; + TQPtrDict<KonqSidebarTreeItem> m_ptrdictSubDirs; KDirLister * m_dirLister; diff --git a/konqueror/sidebar/trees/history_module/history_item.cpp b/konqueror/sidebar/trees/history_module/history_item.cpp index bfda3152c..981be03bb 100644 --- a/konqueror/sidebar/trees/history_module/history_item.cpp +++ b/konqueror/sidebar/trees/history_module/history_item.cpp @@ -19,7 +19,7 @@ #include <kbookmarkdrag.h> #include <kprotocolinfo.h> #include <konq_faviconmgr.h> -#include <qpainter.h> +#include <tqpainter.h> #include <assert.h> @@ -53,12 +53,12 @@ void KonqSidebarHistoryItem::update( const KonqHistoryEntry *entry ) if (!entry) return; - QString title( entry->title ); + TQString title( entry->title ); if ( !title.stripWhiteSpace().isEmpty() && title != entry->url.url() ) setText( 0, title ); else { - QString path( entry->url.path() ); + TQString path( entry->url.path() ); if ( path.isEmpty() ) path += '/'; setText( 0, path ); @@ -66,10 +66,10 @@ void KonqSidebarHistoryItem::update( const KonqHistoryEntry *entry ) KonqSidebarHistoryGroupItem *group = MYGROUP; assert(group); - QString path = entry->url.path(); + TQString path = entry->url.path(); if ( group->hasFavIcon() && (path.isNull() || path == "/") ) { - const QPixmap *pm = group->pixmap(0); + const TQPixmap *pm = group->pixmap(0); if (pm) setPixmap( 0, *pm ); } @@ -91,9 +91,9 @@ void KonqSidebarHistoryItem::rightButtonPressed() MYMODULE->showPopupMenu(); } -QDragObject * KonqSidebarHistoryItem::dragObject( QWidget * parent, bool /*move*/ ) +TQDragObject * KonqSidebarHistoryItem::dragObject( TQWidget * parent, bool /*move*/ ) { - QString icon = KonqFavIconMgr::iconForURL( m_entry->url.url() ); + TQString icon = KonqFavIconMgr::iconForURL( m_entry->url.url() ); KBookmark bookmark = KBookmark::standaloneBookmark( m_entry->title, m_entry->url, icon ); KBookmarkDrag *drag = KBookmarkDrag::newDrag( bookmark, parent ); @@ -101,35 +101,35 @@ QDragObject * KonqSidebarHistoryItem::dragObject( QWidget * parent, bool /*move* } // new items go on top -QString KonqSidebarHistoryItem::key( int column, bool ascending ) const +TQString KonqSidebarHistoryItem::key( int column, bool ascending ) const { if ( MYMODULE->sortsByName() ) return KonqSidebarTreeItem::key( column, ascending ); - QString tmp; + TQString tmp; tmp.sprintf( "%08x", m_entry->lastVisited.secsTo(MYMODULE->currentTime())); return tmp; } -QString KonqSidebarHistoryItem::toolTipText() const +TQString KonqSidebarHistoryItem::toolTipText() const { if ( s_settings->m_detailedTips ) { // this weird ordering of %4, %1, %2, %3 is due to the reason, that some // urls seem to contain %N, which would get substituted in the next // .arg() calls. So to fix this, we first substitute the last items // and then put in the url. - QString tip = i18n("<qt><center><b>%4</b></center><hr>Last visited: %1<br>First visited: %2<br>Number of times visited: %3</qt>"); + TQString tip = i18n("<qt><center><b>%4</b></center><hr>Last visited: %1<br>First visited: %2<br>Number of times visited: %3</qt>"); return tip.arg( KGlobal::locale()->formatDateTime( m_entry->lastVisited ) ).arg( KGlobal::locale()->formatDateTime( m_entry->firstVisited ) ).arg( m_entry->numberOfTimesVisited ).arg( m_entry->url.url() ); } return m_entry->url.url(); } -void KonqSidebarHistoryItem::paintCell( QPainter *p, const QColorGroup & cg, +void KonqSidebarHistoryItem::paintCell( TQPainter *p, const TQColorGroup & cg, int column, int width, int alignment ) { - QDateTime dt; - QDateTime current = QDateTime::currentDateTime(); + TQDateTime dt; + TQDateTime current = TQDateTime::currentDateTime(); if ( s_settings->m_metricYoungerThan == KonqSidebarHistorySettings::DAYS ) dt = current.addDays( - s_settings->m_valueYoungerThan ); @@ -164,7 +164,7 @@ KonqSidebarHistoryGroupItem::KonqSidebarHistoryGroupItem( const KURL& url, { } -void KonqSidebarHistoryGroupItem::setFavIcon( const QPixmap& pix ) +void KonqSidebarHistoryGroupItem::setFavIcon( const TQPixmap& pix ) { setPixmap( 0, pix ); m_hasFavIcon = true; @@ -187,7 +187,7 @@ void KonqSidebarHistoryGroupItem::remove() KonqSidebarHistoryItem * KonqSidebarHistoryGroupItem::findChild(const KonqHistoryEntry *entry) const { - QListViewItem *child = firstChild(); + TQListViewItem *child = firstChild(); KonqSidebarHistoryItem *item = 0L; while ( child ) { @@ -220,12 +220,12 @@ void KonqSidebarHistoryGroupItem::setOpen( bool open ) } // new items go on top -QString KonqSidebarHistoryGroupItem::key( int column, bool ascending ) const +TQString KonqSidebarHistoryGroupItem::key( int column, bool ascending ) const { if ( !m_lastVisited.isValid() || MYMODULE->sortsByName() ) return KonqSidebarTreeItem::key( column, ascending ); - QString tmp; + TQString tmp; tmp.sprintf( "%08x", m_lastVisited.secsTo( MYMODULE->currentTime() )); return tmp; } @@ -236,10 +236,10 @@ void KonqSidebarHistoryGroupItem::itemUpdated( KonqSidebarHistoryItem *item ) m_lastVisited = item->lastVisited(); } -QDragObject * KonqSidebarHistoryGroupItem::dragObject( QWidget *parent, bool /*move*/) +TQDragObject * KonqSidebarHistoryGroupItem::dragObject( TQWidget *parent, bool /*move*/) { - QString icon = KonqFavIconMgr::iconForURL( m_url.url() ); - KBookmark bookmark = KBookmark::standaloneBookmark( QString::null, m_url, + TQString icon = KonqFavIconMgr::iconForURL( m_url.url() ); + KBookmark bookmark = KBookmark::standaloneBookmark( TQString::null, m_url, icon ); KBookmarkDrag *drag = KBookmarkDrag::newDrag( bookmark, parent ); return drag; diff --git a/konqueror/sidebar/trees/history_module/history_item.h b/konqueror/sidebar/trees/history_module/history_item.h index a7c77a677..fb7786e60 100644 --- a/konqueror/sidebar/trees/history_module/history_item.h +++ b/konqueror/sidebar/trees/history_module/history_item.h @@ -43,23 +43,23 @@ public: // The URL to open when this link is clicked virtual KURL externalURL() const { return m_entry->url; } const KURL& url() const { return m_entry->url; } // a faster one - virtual QString toolTipText() const; + virtual TQString toolTipText() const; - QString host() const { return m_entry->url.host(); } - QString path() const { return m_entry->url.path(); } + TQString host() const { return m_entry->url.host(); } + TQString path() const { return m_entry->url.path(); } - const QDateTime& lastVisited() const { return m_entry->lastVisited; } + const TQDateTime& lastVisited() const { return m_entry->lastVisited; } void update( const KonqHistoryEntry *entry ); const KonqHistoryEntry *entry() const { return m_entry; } - virtual QDragObject * dragObject( QWidget * parent, bool move = false ); + virtual TQDragObject * dragObject( TQWidget * parent, bool move = false ); - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; static void setSettings( KonqSidebarHistorySettings *s ) { s_settings = s; } - virtual void paintCell( QPainter *, const QColorGroup & cg, int column, + virtual void paintCell( TQPainter *, const TQColorGroup & cg, int column, int width, int alignment ); private: @@ -85,25 +85,25 @@ public: virtual void setOpen( bool open ); - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; void itemUpdated( KonqSidebarHistoryItem *item ); bool hasFavIcon() const { return m_hasFavIcon; } - void setFavIcon( const QPixmap& pix ); + void setFavIcon( const TQPixmap& pix ); - virtual QDragObject * dragObject( QWidget *, bool ); + virtual TQDragObject * dragObject( TQWidget *, bool ); virtual void itemSelected(); // we don't support the following of KonqSidebarTreeItem - bool acceptsDrops( const QStrList& ) { return false; } - virtual void drop( QDropEvent * ) {} + bool acceptsDrops( const TQStrList& ) { return false; } + virtual void drop( TQDropEvent * ) {} virtual KURL externalURL() const { return KURL(); } private: bool m_hasFavIcon; const KURL m_url; - QDateTime m_lastVisited; + TQDateTime m_lastVisited; }; diff --git a/konqueror/sidebar/trees/history_module/history_module.cpp b/konqueror/sidebar/trees/history_module/history_module.cpp index 832abd74e..2f80c26c0 100644 --- a/konqueror/sidebar/trees/history_module/history_module.cpp +++ b/konqueror/sidebar/trees/history_module/history_module.cpp @@ -17,8 +17,8 @@ Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qpopupmenu.h> +#include <tqapplication.h> +#include <tqpopupmenu.h> #include <kapplication.h> #include <kaction.h> @@ -39,7 +39,7 @@ static KStaticDeleter<KonqSidebarHistorySettings> sd; KonqSidebarHistorySettings * KonqSidebarHistoryModule::s_settings = 0L; KonqSidebarHistoryModule::KonqSidebarHistoryModule( KonqSidebarTree * parentTree, const char *name ) - : QObject( 0L, name ), KonqSidebarTreeModule( parentTree ), + : TQObject( 0L, name ), KonqSidebarTreeModule( parentTree ), m_dict( 349 ), m_topLevelItem( 0L ), m_dlg( 0L ), @@ -51,10 +51,10 @@ KonqSidebarHistoryModule::KonqSidebarHistoryModule( KonqSidebarTree * parentTree s_settings->readSettings( true ); } - connect( s_settings, SIGNAL( settingsChanged() ), SLOT( slotSettingsChanged() )); + connect( s_settings, TQT_SIGNAL( settingsChanged() ), TQT_SLOT( slotSettingsChanged() )); m_dict.setAutoDelete( true ); - m_currentTime = QDateTime::currentDateTime(); + m_currentTime = TQDateTime::currentDateTime(); KConfig *kc = KGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); @@ -63,35 +63,35 @@ KonqSidebarHistoryModule::KonqSidebarHistoryModule( KonqSidebarTree * parentTree KonqHistoryManager *manager = KonqHistoryManager::kself(); - connect( manager, SIGNAL( loadingFinished() ), SLOT( slotCreateItems() )); - connect( manager, SIGNAL( cleared() ), SLOT( clear() )); + connect( manager, TQT_SIGNAL( loadingFinished() ), TQT_SLOT( slotCreateItems() )); + connect( manager, TQT_SIGNAL( cleared() ), TQT_SLOT( clear() )); - connect( manager, SIGNAL( entryAdded( const KonqHistoryEntry * ) ), - SLOT( slotEntryAdded( const KonqHistoryEntry * ) )); - connect( manager, SIGNAL( entryRemoved( const KonqHistoryEntry *) ), - SLOT( slotEntryRemoved( const KonqHistoryEntry *) )); + connect( manager, TQT_SIGNAL( entryAdded( const KonqHistoryEntry * ) ), + TQT_SLOT( slotEntryAdded( const KonqHistoryEntry * ) )); + connect( manager, TQT_SIGNAL( entryRemoved( const KonqHistoryEntry *) ), + TQT_SLOT( slotEntryRemoved( const KonqHistoryEntry *) )); - connect( parentTree, SIGNAL( expanded( QListViewItem * )), - SLOT( slotItemExpanded( QListViewItem * ))); + connect( parentTree, TQT_SIGNAL( expanded( TQListViewItem * )), + TQT_SLOT( slotItemExpanded( TQListViewItem * ))); m_collection = new KActionCollection( this, "history actions" ); (void) new KAction( i18n("New &Window"), "window_new", 0, this, - SLOT( slotNewWindow() ), m_collection, "open_new"); + TQT_SLOT( slotNewWindow() ), m_collection, "open_new"); (void) new KAction( i18n("&Remove Entry"), "editdelete", 0, this, - SLOT( slotRemoveEntry() ), m_collection, "remove"); + TQT_SLOT( slotRemoveEntry() ), m_collection, "remove"); (void) new KAction( i18n("C&lear History"), "history_clear", 0, this, - SLOT( slotClearHistory() ), m_collection, "clear"); + TQT_SLOT( slotClearHistory() ), m_collection, "clear"); (void) new KAction( i18n("&Preferences..."), "configure", 0, this, - SLOT( slotPreferences()), m_collection, "preferences"); + TQT_SLOT( slotPreferences()), m_collection, "preferences"); KRadioAction *sort; sort = new KRadioAction( i18n("By &Name"), 0, this, - SLOT( slotSortByName() ), m_collection, "byName"); + TQT_SLOT( slotSortByName() ), m_collection, "byName"); sort->setExclusiveGroup("SortGroup"); sort->setChecked( m_sortsByName ); sort = new KRadioAction( i18n("By &Date"), 0, this, - SLOT( slotSortByDate() ), m_collection, "byDate"); + TQT_SLOT( slotSortByDate() ), m_collection, "byDate"); sort->setExclusiveGroup("SortGroup"); sort->setChecked( !m_sortsByName ); @@ -104,7 +104,7 @@ KonqSidebarHistoryModule::KonqSidebarHistoryModule( KonqSidebarTree * parentTree KonqSidebarHistoryModule::~KonqSidebarHistoryModule() { HistoryItemIterator it( m_dict ); - QStringList openGroups; + TQStringList openGroups; while ( it.current() ) { if ( it.current()->isOpen() ) openGroups.append( it.currentKey() ); @@ -125,14 +125,14 @@ void KonqSidebarHistoryModule::slotSettingsChanged() void KonqSidebarHistoryModule::slotCreateItems() { - QApplication::setOverrideCursor( KCursor::waitCursor() ); + TQApplication::setOverrideCursor( KCursor::waitCursor() ); clear(); KonqSidebarHistoryItem *item; KonqHistoryEntry *entry; KonqHistoryList entries( KonqHistoryManager::kself()->entries() ); KonqHistoryIterator it( entries ); - m_currentTime = QDateTime::currentDateTime(); + m_currentTime = TQDateTime::currentDateTime(); // the group item and the item of the serverroot '/' get a fav-icon // if available. All others get the protocol icon. @@ -145,8 +145,8 @@ void KonqSidebarHistoryModule::slotCreateItems() KConfig *kc = KGlobal::config(); KConfigGroupSaver cs( kc, "HistorySettings" ); - QStringList openGroups = kc->readListEntry("OpenGroups"); - QStringList::Iterator it2 = openGroups.begin(); + TQStringList openGroups = kc->readListEntry("OpenGroups"); + TQStringList::Iterator it2 = openGroups.begin(); KonqSidebarHistoryGroupItem *group; while ( it2 != openGroups.end() ) { group = m_dict.find( *it2 ); @@ -156,7 +156,7 @@ void KonqSidebarHistoryModule::slotCreateItems() ++it2; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_initialized = true; } @@ -171,7 +171,7 @@ void KonqSidebarHistoryModule::slotEntryAdded( const KonqHistoryEntry *entry ) if ( !m_initialized ) return; - m_currentTime = QDateTime::currentDateTime(); + m_currentTime = TQDateTime::currentDateTime(); KonqSidebarHistoryGroupItem *group = getGroupItem( entry->url ); KonqSidebarHistoryItem *item = group->findChild( entry ); if ( !item ) @@ -179,7 +179,7 @@ void KonqSidebarHistoryModule::slotEntryAdded( const KonqHistoryEntry *entry ) else item->update( entry ); - // QListView scrolls when calling sort(), so we have to hack around that + // TQListView scrolls when calling sort(), so we have to hack around that // (we don't want no scrolling every time an entry is added) KonqSidebarTree *t = tree(); t->lockScrolling( true ); @@ -194,7 +194,7 @@ void KonqSidebarHistoryModule::slotEntryRemoved( const KonqHistoryEntry *entry ) if ( !m_initialized ) return; - QString groupKey = groupForURL( entry->url ); + TQString groupKey = groupForURL( entry->url ); KonqSidebarHistoryGroupItem *group = m_dict.find( groupKey ); if ( !group ) return; @@ -211,7 +211,7 @@ void KonqSidebarHistoryModule::addTopLevelItem( KonqSidebarTreeTopLevelItem * it } bool KonqSidebarHistoryModule::handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, - const QPoint& pos ) + const TQPoint& pos ) { showPopupMenu( ModuleContextMenu, pos ); return true; @@ -219,16 +219,16 @@ bool KonqSidebarHistoryModule::handleTopLevelContextMenu( KonqSidebarTreeTopLeve void KonqSidebarHistoryModule::showPopupMenu() { - showPopupMenu( EntryContextMenu | ModuleContextMenu, QCursor::pos() ); + showPopupMenu( EntryContextMenu | ModuleContextMenu, TQCursor::pos() ); } -void KonqSidebarHistoryModule::showPopupMenu( int which, const QPoint& pos ) +void KonqSidebarHistoryModule::showPopupMenu( int which, const TQPoint& pos ) { - QPopupMenu *sortMenu = new QPopupMenu; + TQPopupMenu *sortMenu = new QPopupMenu; m_collection->action("byName")->plug( sortMenu ); m_collection->action("byDate")->plug( sortMenu ); - QPopupMenu *menu = new QPopupMenu; + TQPopupMenu *menu = new QPopupMenu; if ( which & EntryContextMenu ) { @@ -252,7 +252,7 @@ void KonqSidebarHistoryModule::slotNewWindow() { kdDebug(1201)<<"void KonqSidebarHistoryModule::slotNewWindow()"<<endl; - QListViewItem *item = tree()->selectedItem(); + TQListViewItem *item = tree()->selectedItem(); KonqSidebarHistoryItem *hi = dynamic_cast<KonqSidebarHistoryItem*>( item ); if ( hi ) { @@ -263,7 +263,7 @@ void KonqSidebarHistoryModule::slotNewWindow() void KonqSidebarHistoryModule::slotRemoveEntry() { - QListViewItem *item = tree()->selectedItem(); + TQListViewItem *item = tree()->selectedItem(); KonqSidebarHistoryItem *hi = dynamic_cast<KonqSidebarHistoryItem*>( item ); if ( hi ) // remove a single entry KonqHistoryManager::kself()->emitRemoveFromHistory( hi->externalURL()); @@ -303,7 +303,7 @@ void KonqSidebarHistoryModule::sortingChanged() kc->sync(); } -void KonqSidebarHistoryModule::slotItemExpanded( QListViewItem *item ) +void KonqSidebarHistoryModule::slotItemExpanded( TQListViewItem *item ) { if ( item == m_topLevelItem && !m_initialized ) slotCreateItems(); @@ -323,12 +323,12 @@ void KonqSidebarHistoryModule::groupOpened( KonqSidebarHistoryGroupItem *item, b KonqSidebarHistoryGroupItem * KonqSidebarHistoryModule::getGroupItem( const KURL& url ) { - const QString& groupKey = groupForURL( url ); + const TQString& groupKey = groupForURL( url ); KonqSidebarHistoryGroupItem *group = m_dict.find( groupKey ); if ( !group ) { group = new KonqSidebarHistoryGroupItem( url, m_topLevelItem ); - QString icon = KonqFavIconMgr::iconForURL( url.url() ); + TQString icon = KonqFavIconMgr::iconForURL( url.url() ); if ( icon.isEmpty() ) group->setPixmap( 0, m_folderClosed ); else diff --git a/konqueror/sidebar/trees/history_module/history_module.h b/konqueror/sidebar/trees/history_module/history_module.h index 30295fc3f..752ff57fd 100644 --- a/konqueror/sidebar/trees/history_module/history_module.h +++ b/konqueror/sidebar/trees/history_module/history_module.h @@ -19,10 +19,10 @@ #ifndef HISTORY_MODULE_H #define HISTORY_MODULE_H -#include <qdatetime.h> -#include <qobject.h> -#include <qdict.h> -#include <qpixmap.h> +#include <tqdatetime.h> +#include <tqobject.h> +#include <tqdict.h> +#include <tqpixmap.h> #include <kglobal.h> #include <klocale.h> @@ -36,7 +36,7 @@ class KonqSidebarHistorySettings; class KonqSidebarTree; class KonqSidebarTreeItem; -class KonqSidebarHistoryModule : public QObject, public KonqSidebarTreeModule +class KonqSidebarHistoryModule : public TQObject, public KonqSidebarTreeModule { Q_OBJECT @@ -50,18 +50,18 @@ public: virtual ~KonqSidebarHistoryModule(); virtual void addTopLevelItem( KonqSidebarTreeTopLevelItem * item ); - virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *item, const QPoint& pos ); + virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *item, const TQPoint& pos ); - void showPopupMenu( int which, const QPoint& pos ); + void showPopupMenu( int which, const TQPoint& pos ); // called by the items void showPopupMenu(); void groupOpened( KonqSidebarHistoryGroupItem *item, bool open ); - const QDateTime& currentTime() const { return m_currentTime; } + const TQDateTime& currentTime() const { return m_currentTime; } bool sortsByName() const { return m_sortsByName; } - static QString groupForURL( const KURL& url ) { - static const QString& misc = KGlobal::staticQString(i18n("Miscellaneous")); + static TQString groupForURL( const KURL& url ) { + static const TQString& misc = KGlobal::staticQString(i18n("Miscellaneous")); return url.host().isEmpty() ? misc : url.host(); } @@ -78,7 +78,7 @@ private slots: void slotPreferences(); void slotSettingsChanged(); - void slotItemExpanded( QListViewItem * ); + void slotItemExpanded( TQListViewItem * ); void slotSortByName(); void slotSortByDate(); @@ -89,19 +89,19 @@ private: KonqSidebarHistoryGroupItem *getGroupItem( const KURL& url ); void sortingChanged(); - typedef QDictIterator<KonqSidebarHistoryGroupItem> HistoryItemIterator; - QDict<KonqSidebarHistoryGroupItem> m_dict; + typedef TQDictIterator<KonqSidebarHistoryGroupItem> HistoryItemIterator; + TQDict<KonqSidebarHistoryGroupItem> m_dict; KonqSidebarTreeTopLevelItem * m_topLevelItem; KActionCollection *m_collection; KDialogBase *m_dlg; - QPixmap m_folderClosed; - QPixmap m_folderOpen; + TQPixmap m_folderClosed; + TQPixmap m_folderOpen; bool m_initialized; bool m_sortsByName; - QDateTime m_currentTime; // used for sorting the items by date + TQDateTime m_currentTime; // used for sorting the items by date static KonqSidebarHistorySettings *s_settings; }; diff --git a/konqueror/sidebar/trees/history_module/history_settings.cpp b/konqueror/sidebar/trees/history_module/history_settings.cpp index ed8bc7756..6871415a0 100644 --- a/konqueror/sidebar/trees/history_module/history_settings.cpp +++ b/konqueror/sidebar/trees/history_module/history_settings.cpp @@ -6,22 +6,22 @@ #include "history_settings.h" -KonqSidebarHistorySettings::KonqSidebarHistorySettings( QObject *parent, const char *name ) - : QObject( parent, name ), +KonqSidebarHistorySettings::KonqSidebarHistorySettings( TQObject *parent, const char *name ) + : TQObject( parent, name ), DCOPObject( "KonqSidebarHistorySettings" ) { m_fontOlderThan.setItalic( true ); // default } KonqSidebarHistorySettings::KonqSidebarHistorySettings() - : QObject(), + : TQObject(), DCOPObject( "KonqSidebarHistorySettings" ) { m_fontOlderThan.setItalic( true ); // default } KonqSidebarHistorySettings::KonqSidebarHistorySettings( const KonqSidebarHistorySettings& s ) - : QObject(), + : TQObject(), DCOPObject( "KonqSidebarHistorySettings" ) { m_valueYoungerThan = s.m_valueYoungerThan; @@ -43,7 +43,7 @@ KonqSidebarHistorySettings::~KonqSidebarHistorySettings() void KonqSidebarHistorySettings::readSettings(bool global) { KConfig *config; - QString oldgroup; + TQString oldgroup; if (global) { config = KGlobal::config(); @@ -56,9 +56,9 @@ void KonqSidebarHistorySettings::readSettings(bool global) m_valueYoungerThan = config->readNumEntry("Value youngerThan", 1 ); m_valueOlderThan = config->readNumEntry("Value olderThan", 2 ); - QString minutes = QString::fromLatin1("minutes"); - QString days = QString::fromLatin1("days"); - QString metric = config->readEntry("Metric youngerThan", days ); + TQString minutes = TQString::fromLatin1("minutes"); + TQString days = TQString::fromLatin1("days"); + TQString metric = config->readEntry("Metric youngerThan", days ); m_metricYoungerThan = (metric == days) ? DAYS : MINUTES; metric = config->readEntry("Metric olderThan", days ); m_metricOlderThan = (metric == days) ? DAYS : MINUTES; @@ -83,8 +83,8 @@ void KonqSidebarHistorySettings::applySettings() config->writeEntry("Value youngerThan", m_valueYoungerThan ); config->writeEntry("Value olderThan", m_valueOlderThan ); - QString minutes = QString::fromLatin1("minutes"); - QString days = QString::fromLatin1("days"); + TQString minutes = TQString::fromLatin1("minutes"); + TQString days = TQString::fromLatin1("days"); config->writeEntry("Metric youngerThan", m_metricYoungerThan == DAYS ? days : minutes ); config->writeEntry("Metric olderThan", m_metricOlderThan == DAYS ? @@ -99,7 +99,7 @@ void KonqSidebarHistorySettings::applySettings() // notify konqueror instances about the new configuration kapp->dcopClient()->send( "konqueror*", "KonqSidebarHistorySettings", - "notifySettingsChanged()", QByteArray() ); + "notifySettingsChanged()", TQByteArray() ); } void KonqSidebarHistorySettings::notifySettingsChanged() diff --git a/konqueror/sidebar/trees/history_module/history_settings.h b/konqueror/sidebar/trees/history_module/history_settings.h index 21bcd01db..7b7d75006 100644 --- a/konqueror/sidebar/trees/history_module/history_settings.h +++ b/konqueror/sidebar/trees/history_module/history_settings.h @@ -20,12 +20,12 @@ #ifndef HISTORY_SETTINGS_H #define HISTORY_SETTINGS_H -#include <qfont.h> -#include <qobject.h> +#include <tqfont.h> +#include <tqobject.h> #include <dcopobject.h> -class KonqSidebarHistorySettings : public QObject, public DCOPObject +class KonqSidebarHistorySettings : public TQObject, public DCOPObject { K_DCOP Q_OBJECT @@ -33,7 +33,7 @@ class KonqSidebarHistorySettings : public QObject, public DCOPObject public: enum { MINUTES, DAYS }; - KonqSidebarHistorySettings( QObject *parent, const char *name ); + KonqSidebarHistorySettings( TQObject *parent, const char *name ); virtual ~KonqSidebarHistorySettings(); void readSettings(bool global); @@ -47,8 +47,8 @@ public: bool m_detailedTips; - QFont m_fontYoungerThan; - QFont m_fontOlderThan; + TQFont m_fontYoungerThan; + TQFont m_fontOlderThan; signals: void settingsChanged(); diff --git a/konqueror/sidebar/trees/history_module/kcmhistory.cpp b/konqueror/sidebar/trees/history_module/kcmhistory.cpp index e4b31b232..ccedf65d9 100644 --- a/konqueror/sidebar/trees/history_module/kcmhistory.cpp +++ b/konqueror/sidebar/trees/history_module/kcmhistory.cpp @@ -20,11 +20,11 @@ * along with this program; if not, write to the Free Software */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include <dcopclient.h> #include <dcopref.h> @@ -45,10 +45,10 @@ #include "kcmhistory.h" #include "history_settings.h" -typedef KGenericFactory<HistorySidebarConfig, QWidget > KCMHistoryFactory; +typedef KGenericFactory<HistorySidebarConfig, TQWidget > KCMHistoryFactory; K_EXPORT_COMPONENT_FACTORY (kcm_history, KCMHistoryFactory("kcmhistory") ) -HistorySidebarConfig::HistorySidebarConfig( QWidget *parent, const char* name, const QStringList & ) +HistorySidebarConfig::HistorySidebarConfig( TQWidget *parent, const char* name, const TQStringList & ) : KCModule (KCMHistoryFactory::instance(), parent, name) { KGlobal::locale()->insertCatalogue("konqueror"); @@ -56,7 +56,7 @@ HistorySidebarConfig::HistorySidebarConfig( QWidget *parent, const char* name, c m_settings = new KonqSidebarHistorySettings( 0, "history settings" ); m_settings->readSettings( false ); - QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); dialog = new KonqSidebarHistoryDlg(this); dialog->spinEntries->setRange( 0, INT_MAX, 1, false ); @@ -75,33 +75,33 @@ HistorySidebarConfig::HistorySidebarConfig( QWidget *parent, const char* name, c dialog->comboOlder->insertItem( i18n("Days"), KonqSidebarHistorySettings::DAYS ); - connect( dialog->cbExpire, SIGNAL( toggled( bool )), - dialog->spinExpire, SLOT( setEnabled( bool ))); - connect( dialog->spinExpire, SIGNAL( valueChanged( int )), - this, SLOT( slotExpireChanged( int ))); - - connect( dialog->spinNewer, SIGNAL( valueChanged( int )), - SLOT( slotNewerChanged( int ))); - connect( dialog->spinOlder, SIGNAL( valueChanged( int )), - SLOT( slotOlderChanged( int ))); - - connect( dialog->btnFontNewer, SIGNAL( clicked() ), - SLOT( slotGetFontNewer() )); - connect( dialog->btnFontOlder, SIGNAL( clicked() ), - SLOT( slotGetFontOlder() )); - connect( dialog->btnClearHistory, SIGNAL( clicked() ), - SLOT( slotClearHistory() )); - - connect( dialog->cbDetailedTips, SIGNAL( toggled( bool )), - SLOT( configChanged() )); - connect( dialog->cbExpire, SIGNAL( toggled( bool )), - SLOT( configChanged() )); - connect( dialog->spinEntries, SIGNAL( valueChanged( int )), - SLOT( configChanged() )); - connect( dialog->comboNewer, SIGNAL( activated( int )), - SLOT( configChanged() )); - connect( dialog->comboOlder, SIGNAL( activated( int )), - SLOT( configChanged() )); + connect( dialog->cbExpire, TQT_SIGNAL( toggled( bool )), + dialog->spinExpire, TQT_SLOT( setEnabled( bool ))); + connect( dialog->spinExpire, TQT_SIGNAL( valueChanged( int )), + this, TQT_SLOT( slotExpireChanged( int ))); + + connect( dialog->spinNewer, TQT_SIGNAL( valueChanged( int )), + TQT_SLOT( slotNewerChanged( int ))); + connect( dialog->spinOlder, TQT_SIGNAL( valueChanged( int )), + TQT_SLOT( slotOlderChanged( int ))); + + connect( dialog->btnFontNewer, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotGetFontNewer() )); + connect( dialog->btnFontOlder, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotGetFontOlder() )); + connect( dialog->btnClearHistory, TQT_SIGNAL( clicked() ), + TQT_SLOT( slotClearHistory() )); + + connect( dialog->cbDetailedTips, TQT_SIGNAL( toggled( bool )), + TQT_SLOT( configChanged() )); + connect( dialog->cbExpire, TQT_SIGNAL( toggled( bool )), + TQT_SLOT( configChanged() )); + connect( dialog->spinEntries, TQT_SIGNAL( valueChanged( int )), + TQT_SLOT( configChanged() )); + connect( dialog->comboNewer, TQT_SIGNAL( activated( int )), + TQT_SLOT( configChanged() )); + connect( dialog->comboOlder, TQT_SIGNAL( activated( int )), + TQT_SLOT( configChanged() )); dialog->show(); topLayout->add(dialog); @@ -152,17 +152,17 @@ void HistorySidebarConfig::save() config.writeEntry( "Maximum of History entries", count ); config.writeEntry( "Maximum age of History entries", age ); - QByteArray dataAge; - QDataStream streamAge( dataAge, IO_WriteOnly ); + TQByteArray dataAge; + TQDataStream streamAge( dataAge, IO_WriteOnly ); streamAge << age << "foo"; kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", - "notifyMaxAge(Q_UINT32, QCString)", dataAge ); + "notifyMaxAge(Q_UINT32, TQCString)", dataAge ); - QByteArray dataCount; - QDataStream streamCount( dataCount, IO_WriteOnly ); + TQByteArray dataCount; + TQDataStream streamCount( dataCount, IO_WriteOnly ); streamCount << count << "foo"; kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", - "notifyMaxCount(Q_UINT32, QCString)", dataCount ); + "notifyMaxCount(Q_UINT32, TQCString)", dataCount ); m_settings->m_valueYoungerThan = dialog->spinNewer->value(); m_settings->m_valueOlderThan = dialog->spinOlder->value(); @@ -194,14 +194,14 @@ void HistorySidebarConfig::defaults() dialog->cbDetailedTips->setChecked( true ); - m_fontNewer = QFont(); + m_fontNewer = TQFont(); m_fontNewer.setItalic( true ); - m_fontOlder = QFont(); + m_fontOlder = TQFont(); emit changed(true); } -QString HistorySidebarConfig::quickHelp() const +TQString HistorySidebarConfig::quickHelp() const { return i18n("<h1>History Sidebar</h1>" " You can configure the history sidebar here."); diff --git a/konqueror/sidebar/trees/history_module/kcmhistory.h b/konqueror/sidebar/trees/history_module/kcmhistory.h index 5eaaf3a64..0e354af65 100644 --- a/konqueror/sidebar/trees/history_module/kcmhistory.h +++ b/konqueror/sidebar/trees/history_module/kcmhistory.h @@ -32,13 +32,13 @@ class HistorySidebarConfig : public KCModule Q_OBJECT public: - HistorySidebarConfig( QWidget *parent=0, const char* name=0, const QStringList &list=QStringList() ); + HistorySidebarConfig( TQWidget *parent=0, const char* name=0, const TQStringList &list=TQStringList() ); void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void configChanged(); @@ -53,8 +53,8 @@ private slots: void slotClearHistory(); private: - QFont m_fontNewer; - QFont m_fontOlder; + TQFont m_fontNewer; + TQFont m_fontOlder; KonqSidebarHistoryDlg* dialog; KonqSidebarHistorySettings *m_settings; diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp index e30e21ac9..8117d5223 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.cpp +++ b/konqueror/sidebar/trees/konq_sidebartree.cpp @@ -20,12 +20,12 @@ #include "konq_sidebartreemodule.h" -#include <qclipboard.h> -#include <qcursor.h> -#include <qdir.h> -#include <qheader.h> -#include <qpopupmenu.h> -#include <qtimer.h> +#include <tqclipboard.h> +#include <tqcursor.h> +#include <tqdir.h> +#include <tqheader.h> +#include <tqpopupmenu.h> +#include <tqtimer.h> #include <dcopclient.h> #include <dcopref.h> @@ -53,18 +53,18 @@ static const int autoOpenTimeout = 750; -getModule KonqSidebarTree::getPluginFactory(QString name) +getModule KonqSidebarTree::getPluginFactory(TQString name) { if (!pluginFactories.contains(name)) { KLibLoader *loader = KLibLoader::self(); - QString libName = pluginInfo[name]; - KLibrary *lib = loader->library(QFile::encodeName(libName)); + TQString libName = pluginInfo[name]; + KLibrary *lib = loader->library(TQFile::encodeName(libName)); if (lib) { // get the create_ function - QString factory = "create_" + libName; - void *create = lib->symbol(QFile::encodeName(factory)); + TQString factory = "create_" + libName; + void *create = lib->symbol(TQFile::encodeName(factory)); if (create) { getModule func = (getModule)create; @@ -88,15 +88,15 @@ void KonqSidebarTree::loadModuleFactories() pluginFactories.clear(); pluginInfo.clear(); KStandardDirs *dirs=KGlobal::dirs(); - QStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); + TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); - for (QStringList::ConstIterator it=list.begin();it!=list.end();++it) + for (TQStringList::ConstIterator it=list.begin();it!=list.end();++it) { KSimpleConfig ksc(*it); ksc.setGroup("Desktop Entry"); - QString name = ksc.readEntry("X-KDE-TreeModule"); - QString libName = ksc.readEntry("X-KDE-TreeModule-Lib"); + TQString name = ksc.readEntry("X-KDE-TreeModule"); + TQString libName = ksc.readEntry("X-KDE-TreeModule-Lib"); if ((name.isEmpty()) || (libName.isEmpty())) {kdWarning()<<"Bad Configuration file for a dirtree module "<<*it<<endl; continue;} @@ -110,11 +110,11 @@ class KonqSidebarTree_Internal { public: DropAcceptType m_dropMode; - QStringList m_dropFormats; + TQStringList m_dropFormats; }; -KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, QWidget *parentWidget, int virt, const QString& path ) +KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, TQWidget *parentWidget, int virt, const TQString& path ) : KListView( parentWidget ), m_currentTopLevelItem( 0 ), m_toolTip( this ), @@ -130,46 +130,46 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, QWidget *parentWidge viewport()->setAcceptDrops( true ); m_lstModules.setAutoDelete( true ); - setSelectionMode( QListView::Single ); + setSelectionMode( TQListView::Single ); setDragEnabled(true); m_part = parent; - m_animationTimer = new QTimer( this ); - connect( m_animationTimer, SIGNAL( timeout() ), - this, SLOT( slotAnimation() ) ); + m_animationTimer = new TQTimer( this ); + connect( m_animationTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotAnimation() ) ); m_currentBeforeDropItem = 0; m_dropItem = 0; m_bOpeningFirstChild=false; - addColumn( QString::null ); + addColumn( TQString::null ); header()->hide(); setTreeStepSize(15); - m_autoOpenTimer = new QTimer( this ); - connect( m_autoOpenTimer, SIGNAL( timeout() ), - this, SLOT( slotAutoOpenFolder() ) ); + m_autoOpenTimer = new TQTimer( this ); + connect( m_autoOpenTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotAutoOpenFolder() ) ); - connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), - this, SLOT( slotDoubleClicked( QListViewItem * ) ) ); - connect( this, SIGNAL( mouseButtonPressed(int, QListViewItem*, const QPoint&, int)), - this, SLOT( slotMouseButtonPressed(int, QListViewItem*, const QPoint&, int)) ); - connect( this, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ), - this, SLOT( slotMouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ) ); - connect( this, SIGNAL( returnPressed( QListViewItem * ) ), - this, SLOT( slotDoubleClicked( QListViewItem * ) ) ); - connect( this, SIGNAL( selectionChanged() ), - this, SLOT( slotSelectionChanged() ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT( slotMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)) ); + connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ), + this, TQT_SLOT( slotMouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotSelectionChanged() ) ); - connect( this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)), - this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int))); + connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)), + this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int))); /* assert( m_part->getInterfaces()->getInstance()->dirs ); - QString dirtreeDir = m_part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); */ + TQString dirtreeDir = m_part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); */ // assert( KGlobal::dirs() ); -// QString dirtreeDir = part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); +// TQString dirtreeDir = part->getInterfaces()->getInstance()->dirs()->saveLocation( "data", "konqueror/dirtree/" ); if (virt==VIRT_Folder) { @@ -190,7 +190,7 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, QWidget *parentWidge m_bOpeningFirstChild = false; } - setFrameStyle( QFrame::ToolBarPanel | QFrame::Raised ); + setFrameStyle( TQFrame::ToolBarPanel | TQFrame::Raised ); } KonqSidebarTree::~KonqSidebarTree() @@ -210,7 +210,7 @@ void KonqSidebarTree::itemDestructed( KonqSidebarTreeItem *item ) } } -void KonqSidebarTree::setDropFormats(const QStringList &formats) +void KonqSidebarTree::setDropFormats(const TQStringList &formats) { d->m_dropFormats = formats; } @@ -244,7 +244,7 @@ void KonqSidebarTree::followURL( const KURL &url ) } kdDebug(1201) << "KonqDirTree::followURL: " << url.url() << endl; - QPtrListIterator<KonqSidebarTreeTopLevelItem> topItem ( m_topLevelItems ); + TQPtrListIterator<KonqSidebarTreeTopLevelItem> topItem ( m_topLevelItems ); for (; topItem.current(); ++topItem ) { if ( topItem.current()->externalURL().isParentOf( url ) ) @@ -256,7 +256,7 @@ void KonqSidebarTree::followURL( const KURL &url ) kdDebug(1201) << "KonqDirTree::followURL: Not found" << endl; } -void KonqSidebarTree::contentsDragEnterEvent( QDragEnterEvent *ev ) +void KonqSidebarTree::contentsDragEnterEvent( TQDragEnterEvent *ev ) { m_dropItem = 0; m_currentBeforeDropItem = selectedItem(); @@ -267,9 +267,9 @@ void KonqSidebarTree::contentsDragEnterEvent( QDragEnterEvent *ev ) m_lstDropFormats.append( ev->format( i ) ); } -void KonqSidebarTree::contentsDragMoveEvent( QDragMoveEvent *e ) +void KonqSidebarTree::contentsDragMoveEvent( TQDragMoveEvent *e ) { - QListViewItem *item = itemAt( contentsToViewport( e->pos() ) ); + TQListViewItem *item = itemAt( contentsToViewport( e->pos() ) ); // Accept drops on the background, if URLs if ( !item && m_lstDropFormats.contains("text/uri-list") ) @@ -308,7 +308,7 @@ void KonqSidebarTree::contentsDragMoveEvent( QDragMoveEvent *e ) } } -void KonqSidebarTree::contentsDragLeaveEvent( QDragLeaveEvent *ev ) +void KonqSidebarTree::contentsDragLeaveEvent( TQDragLeaveEvent *ev ) { // Restore the current item to what it was before the dragging (#17070) if ( m_currentBeforeDropItem ) @@ -324,7 +324,7 @@ void KonqSidebarTree::contentsDragLeaveEvent( QDragLeaveEvent *ev ) } } -void KonqSidebarTree::contentsDropEvent( QDropEvent *ev ) +void KonqSidebarTree::contentsDropEvent( TQDropEvent *ev ) { if (d->m_dropMode == SidebarTreeMode) { m_autoOpenTimer->stop(); @@ -352,23 +352,23 @@ void KonqSidebarTree::contentsDropEvent( QDropEvent *ev ) } } -static QString findUniqueFilename(const QString &path, QString filename) +static TQString findUniqueFilename(const TQString &path, TQString filename) { if (filename.endsWith(".desktop")) filename.truncate(filename.length()-8); - QString name = filename; + TQString name = filename; int n = 2; - while(QFile::exists(path + filename + ".desktop")) + while(TQFile::exists(path + filename + ".desktop")) { - filename = QString("%2_%1").arg(n++).arg(name); + filename = TQString("%2_%1").arg(n++).arg(name); } return path+filename+".desktop"; } void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KURL & url) { - QString path; + TQString path; if (item) path = item->path(); else @@ -378,23 +378,23 @@ void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KURL & url if (url.isLocalFile() && url.fileName().endsWith(".desktop")) { - QString filename = findUniqueFilename(path, url.fileName()); + TQString filename = findUniqueFilename(path, url.fileName()); destUrl.setPath(filename); KIO::NetAccess::copy(url, destUrl, this); } else { - QString name = url.host(); + TQString name = url.host(); if (name.isEmpty()) name = url.fileName(); - QString filename = findUniqueFilename(path, name); + TQString filename = findUniqueFilename(path, name); destUrl.setPath(filename); KDesktopFile cfg(filename); cfg.writeEntry("Encoding", "UTF-8"); cfg.writeEntry("Type","Link"); cfg.writeEntry("URL", url.url()); - QString icon = "folder"; + TQString icon = "folder"; if (!url.isLocalFile()) icon = KMimeType::favIconForURL(url); if (icon.isEmpty()) @@ -413,7 +413,7 @@ void KonqSidebarTree::addURL(KonqSidebarTreeTopLevelItem* item, const KURL & url item->setOpen(true); } -bool KonqSidebarTree::acceptDrag(QDropEvent* e) const +bool KonqSidebarTree::acceptDrag(TQDropEvent* e) const { // for KListViewMode... for( int i = 0; e->format( i ); i++ ) @@ -422,31 +422,31 @@ bool KonqSidebarTree::acceptDrag(QDropEvent* e) const return false; } -QDragObject* KonqSidebarTree::dragObject() +TQDragObject* KonqSidebarTree::dragObject() { KonqSidebarTreeItem* item = static_cast<KonqSidebarTreeItem *>( selectedItem() ); if ( !item ) return 0; - QDragObject* drag = item->dragObject( viewport(), false ); + TQDragObject* drag = item->dragObject( viewport(), false ); if ( !drag ) return 0; - const QPixmap *pix = item->pixmap(0); + const TQPixmap *pix = item->pixmap(0); if ( pix && drag->pixmap().isNull() ) drag->setPixmap( *pix ); return drag; } -void KonqSidebarTree::leaveEvent( QEvent *e ) +void KonqSidebarTree::leaveEvent( TQEvent *e ) { KListView::leaveEvent( e ); -// emitStatusBarText( QString::null ); +// emitStatusBarText( TQString::null ); } -void KonqSidebarTree::slotDoubleClicked( QListViewItem *item ) +void KonqSidebarTree::slotDoubleClicked( TQListViewItem *item ) { //kdDebug(1201) << "KonqSidebarTree::slotDoubleClicked " << item << endl; if ( !item ) @@ -459,7 +459,7 @@ void KonqSidebarTree::slotDoubleClicked( QListViewItem *item ) item->setOpen( !item->isOpen() ); } -void KonqSidebarTree::slotExecuted( QListViewItem *item ) +void KonqSidebarTree::slotExecuted( TQListViewItem *item ) { kdDebug(1201) << "KonqSidebarTree::slotExecuted " << item << endl; if ( !item ) @@ -479,7 +479,7 @@ void KonqSidebarTree::slotExecuted( QListViewItem *item ) openURLRequest( externalURL, args ); } -void KonqSidebarTree::slotMouseButtonPressed( int _button, QListViewItem* _item, const QPoint&, int col ) +void KonqSidebarTree::slotMouseButtonPressed( int _button, TQListViewItem* _item, const TQPoint&, int col ) { KonqSidebarTreeItem * item = static_cast<KonqSidebarTreeItem*>( _item ); if (_button == RightButton) @@ -492,7 +492,7 @@ void KonqSidebarTree::slotMouseButtonPressed( int _button, QListViewItem* _item, } } -void KonqSidebarTree::slotMouseButtonClicked(int _button, QListViewItem* _item, const QPoint&, int col) +void KonqSidebarTree::slotMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col) { KonqSidebarTreeItem * item = static_cast<KonqSidebarTreeItem*>(_item); if(_item && col < 2) @@ -554,7 +554,7 @@ void KonqSidebarTree::FilesAdded( const KURL & dir ) kdDebug(1201) << "KonqSidebarTree::FilesAdded " << dir.url() << endl; if ( m_dirtreeDir.dir.isParentOf( dir ) ) // We use a timer in case of DCOP re-entrance.. - QTimer::singleShot( 0, this, SLOT( rescanConfiguration() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( rescanConfiguration() ) ); } void KonqSidebarTree::FilesRemoved( const KURL::List & urls ) @@ -565,7 +565,7 @@ void KonqSidebarTree::FilesRemoved( const KURL::List & urls ) //kdDebug(1201) << "KonqSidebarTree::FilesRemoved " << (*it).prettyURL() << endl; if ( m_dirtreeDir.dir.isParentOf( *it ) ) { - QTimer::singleShot( 0, this, SLOT( rescanConfiguration() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( rescanConfiguration() ) ); kdDebug(1201) << "KonqSidebarTree::FilesRemoved done" << endl; return; } @@ -579,17 +579,17 @@ void KonqSidebarTree::FilesChanged( const KURL::List & urls ) FilesRemoved( urls ); } -void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path, bool isRoot ) +void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const TQString &path, bool isRoot ) { - QDir dir( path ); + TQDir dir( path ); if ( !dir.isReadable() ) return; kdDebug(1201) << "scanDir " << path << endl; - QStringList entries = dir.entryList( QDir::Files ); - QStringList dirEntries = dir.entryList( QDir::Dirs | QDir::NoSymLinks ); + TQStringList entries = dir.entryList( TQDir::Files ); + TQStringList dirEntries = dir.entryList( TQDir::Dirs | TQDir::NoSymLinks ); dirEntries.remove( "." ); dirEntries.remove( ".." ); @@ -606,7 +606,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path, // Version 5 includes the audiocd browser // Version 6 includes the printmanager and lan browser const int currentVersion = 6; - QString key = QString::fromLatin1("X-KDE-DirTreeVersionNumber"); + TQString key = TQString::fromLatin1("X-KDE-DirTreeVersionNumber"); KSimpleConfig versionCfg( path + "/.directory" ); int versionNumber = versionCfg.readNumEntry( key, 1 ); kdDebug(1201) << "KonqSidebarTree::scanDir found version " << versionNumber << endl; @@ -620,64 +620,64 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path, if (copyConfig) { // We will copy over the configuration for the dirtree, from the global directory - QStringList dirtree_dirs = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/"); + TQStringList dirtree_dirs = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/"); -// QString dirtree_dir = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global +// TQString dirtree_dir = KGlobal::dirs()->findDirs("data","konqsidebartng/virtual_folders/"+m_dirtreeDir.relDir+"/").last(); // most global // kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir=" << dirtree_dir << endl; /* // debug code - QStringList blah = m_part->getInterfaces->getInstance()->dirs()->dirs()->findDirs( "data", "konqueror/dirtree" ); - QStringList::ConstIterator eIt = blah.begin(); - QStringList::ConstIterator eEnd = blah.end(); + TQStringList blah = m_part->getInterfaces->getInstance()->dirs()->dirs()->findDirs( "data", "konqueror/dirtree" ); + TQStringList::ConstIterator eIt = blah.begin(); + TQStringList::ConstIterator eEnd = blah.end(); for (; eIt != eEnd; ++eIt ) kdDebug(1201) << "KonqSidebarTree::scanDir findDirs got me " << *eIt << endl; // end debug code */ - for (QStringList::const_iterator ddit=dirtree_dirs.begin();ddit!=dirtree_dirs.end();++ddit) { - QString dirtree_dir=*ddit; + for (TQStringList::const_iterator ddit=dirtree_dirs.begin();ddit!=dirtree_dirs.end();++ddit) { + TQString dirtree_dir=*ddit; if (dirtree_dir==path) continue; // if ( !dirtree_dir.isEmpty() && dirtree_dir != path ) { - QDir globalDir( dirtree_dir ); + TQDir globalDir( dirtree_dir ); Q_ASSERT( globalDir.isReadable() ); // Only copy the entries that don't exist yet in the local dir - QStringList globalDirEntries = globalDir.entryList(); - QStringList::ConstIterator eIt = globalDirEntries.begin(); - QStringList::ConstIterator eEnd = globalDirEntries.end(); + TQStringList globalDirEntries = globalDir.entryList(); + TQStringList::ConstIterator eIt = globalDirEntries.begin(); + TQStringList::ConstIterator eEnd = globalDirEntries.end(); for (; eIt != eEnd; ++eIt ) { //kdDebug(1201) << "KonqSidebarTree::scanDir dirtree_dir contains " << *eIt << endl; if ( *eIt != "." && *eIt != ".." && !entries.contains( *eIt ) && !dirEntries.contains( *eIt ) ) { // we don't have that one yet -> copy it. - QString cp("cp -R -- "); + TQString cp("cp -R -- "); cp += KProcess::quote(dirtree_dir + *eIt); cp += " "; cp += KProcess::quote(path); kdDebug(1201) << "KonqSidebarTree::scanDir executing " << cp << endl; - ::system( QFile::encodeName(cp) ); + ::system( TQFile::encodeName(cp) ); } } } } - // hack to make QDir refresh the lists + // hack to make TQDir refresh the lists dir.setPath(path); - entries = dir.entryList( QDir::Files ); - dirEntries = dir.entryList( QDir::Dirs ); + entries = dir.entryList( TQDir::Files ); + dirEntries = dir.entryList( TQDir::Dirs ); dirEntries.remove( "." ); dirEntries.remove( ".." ); } } - QStringList::ConstIterator eIt = entries.begin(); - QStringList::ConstIterator eEnd = entries.end(); + TQStringList::ConstIterator eIt = entries.begin(); + TQStringList::ConstIterator eEnd = entries.end(); for (; eIt != eEnd; ++eIt ) { - QString filePath = QString( *eIt ).prepend( path ); + TQString filePath = TQString( *eIt ).prepend( path ); KURL u; u.setPath( filePath ); if ( KMimeType::findByURL( u, 0, true )->name() == "application/x-desktop" ) @@ -689,7 +689,7 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path, for (; eIt != eEnd; eIt++ ) { - QString newPath = QString( path ).append( *eIt ).append( '/' ); + TQString newPath = TQString( path ).append( *eIt ).append( '/' ); if ( newPath == KGlobalSettings::autostartPath() ) continue; @@ -698,18 +698,18 @@ void KonqSidebarTree::scanDir( KonqSidebarTreeItem *parent, const QString &path, } } -void KonqSidebarTree::loadTopLevelGroup( KonqSidebarTreeItem *parent, const QString &path ) +void KonqSidebarTree::loadTopLevelGroup( KonqSidebarTreeItem *parent, const TQString &path ) { - QDir dir( path ); - QString name = dir.dirName(); - QString icon = "folder"; + TQDir dir( path ); + TQString name = dir.dirName(); + TQString icon = "folder"; bool open = false; kdDebug(1201) << "Scanning " << path << endl; - QString dotDirectoryFile = QString( path ).append( "/.directory" ); + TQString dotDirectoryFile = TQString( path ).append( "/.directory" ); - if ( QFile::exists( dotDirectoryFile ) ) + if ( TQFile::exists( dotDirectoryFile ) ) { kdDebug(1201) << "Reading the .directory" << endl; KSimpleConfig cfg( dotDirectoryFile, true ); @@ -745,15 +745,15 @@ void KonqSidebarTree::loadTopLevelGroup( KonqSidebarTreeItem *parent, const QStr item->setExpandable( false ); } -void KonqSidebarTree::loadTopLevelItem( KonqSidebarTreeItem *parent, const QString &filename ) +void KonqSidebarTree::loadTopLevelItem( KonqSidebarTreeItem *parent, const TQString &filename ) { KDesktopFile cfg( filename, true ); cfg.setDollarExpansion(true); - QFileInfo inf( filename ); + TQFileInfo inf( filename ); - QString path = filename; - QString name = KIO::decodeFileName( inf.fileName() ); + TQString path = filename; + TQString name = KIO::decodeFileName( inf.fileName() ); if ( name.length() > 8 && name.right( 8 ) == ".desktop" ) name.truncate( name.length() - 8 ); if ( name.length() > 7 && name.right( 7 ) == ".kdelnk" ) @@ -764,8 +764,8 @@ void KonqSidebarTree::loadTopLevelItem( KonqSidebarTreeItem *parent, const QStr // Here's where we need to create the right module... // ### TODO: make this KTrader/KLibrary based. - QString moduleName = cfg.readEntry( "X-KDE-TreeModule" ); - QString showHidden=cfg.readEntry("X-KDE-TreeModule-ShowHidden"); + TQString moduleName = cfg.readEntry( "X-KDE-TreeModule" ); + TQString showHidden=cfg.readEntry("X-KDE-TreeModule-ShowHidden"); if (moduleName.isEmpty()) moduleName="Directory"; kdDebug(1201) << "##### Loading module: " << moduleName << " file: " << filename << endl; @@ -806,7 +806,7 @@ void KonqSidebarTree::slotAnimation() for (; it != end; ++it ) { uint & iconNumber = it.data().iconNumber; - QString icon = QString::fromLatin1( it.data().iconBaseName ).append( QString::number( iconNumber ) ); + TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); it.key()->setPixmap( 0, SmallIcon( icon)); iconNumber++; @@ -816,9 +816,9 @@ void KonqSidebarTree::slotAnimation() } -void KonqSidebarTree::startAnimation( KonqSidebarTreeItem * item, const char * iconBaseName, uint iconCount, const QPixmap * originalPixmap ) +void KonqSidebarTree::startAnimation( KonqSidebarTreeItem * item, const char * iconBaseName, uint iconCount, const TQPixmap * originalPixmap ) { - const QPixmap *pix = originalPixmap ? originalPixmap : item->pixmap(0); + const TQPixmap *pix = originalPixmap ? originalPixmap : item->pixmap(0); if (pix) { m_mapCurrentOpeningFolders.insert( item, AnimationInfo( iconBaseName, iconCount, *pix ) ); @@ -851,7 +851,7 @@ void KonqSidebarTree::setContentsPos( int x, int y ) KListView::setContentsPos( x, y ); } -void KonqSidebarTree::slotItemRenamed(QListViewItem* item, const QString &name, int col) +void KonqSidebarTree::slotItemRenamed(TQListViewItem* item, const TQString &name, int col) { Q_ASSERT(col==0); if (col != 0) return; @@ -881,7 +881,7 @@ bool KonqSidebarTree::tabSupport() QCStringList funcs; reply.get(funcs, "QCStringList"); for (QCStringList::ConstIterator it = funcs.begin(); it != funcs.end(); ++it) { - if ((*it) == "void newTab(QString url)") { + if ((*it) == "void newTab(TQString url)") { return true; break; } @@ -901,24 +901,24 @@ void KonqSidebarTree::showToplevelContextMenu() { m_collection = new KActionCollection( this, "bookmark actions" ); (void) new KAction( i18n("&Create New Folder..."), "folder_new", 0, this, - SLOT( slotCreateFolder() ), m_collection, "create_folder"); + TQT_SLOT( slotCreateFolder() ), m_collection, "create_folder"); (void) new KAction( i18n("Delete Folder"), "editdelete", 0, this, - SLOT( slotDelete() ), m_collection, "delete_folder"); + TQT_SLOT( slotDelete() ), m_collection, "delete_folder"); (void) new KAction( i18n("Rename"), 0, this, - SLOT( slotRename() ), m_collection, "rename"); + TQT_SLOT( slotRename() ), m_collection, "rename"); (void) new KAction( i18n("Delete Link"), "editdelete", 0, this, - SLOT( slotDelete() ), m_collection, "delete_link"); + TQT_SLOT( slotDelete() ), m_collection, "delete_link"); (void) new KAction( i18n("Properties"), "edit", 0, this, - SLOT( slotProperties() ), m_collection, "item_properties"); + TQT_SLOT( slotProperties() ), m_collection, "item_properties"); (void) new KAction( i18n("Open in New Window"), "window_new", 0, this, - SLOT( slotOpenNewWindow() ), m_collection, "open_window"); + TQT_SLOT( slotOpenNewWindow() ), m_collection, "open_window"); (void) new KAction( i18n("Open in New Tab"), "tab_new", 0, this, - SLOT( slotOpenTab() ), m_collection, "open_tab"); + TQT_SLOT( slotOpenTab() ), m_collection, "open_tab"); (void) new KAction( i18n("Copy Link Address"), "editcopy", 0, this, - SLOT( slotCopyLocation() ), m_collection, "copy_location"); + TQT_SLOT( slotCopyLocation() ), m_collection, "copy_location"); } - QPopupMenu *menu = new QPopupMenu; + TQPopupMenu *menu = new QPopupMenu; if (item) { if (item->isTopLevelGroup()) { @@ -943,7 +943,7 @@ void KonqSidebarTree::showToplevelContextMenu() m_currentTopLevelItem = item; - menu->exec( QCursor::pos() ); + menu->exec( TQCursor::pos() ); delete menu; m_currentTopLevelItem = 0; @@ -951,8 +951,8 @@ void KonqSidebarTree::showToplevelContextMenu() void KonqSidebarTree::slotCreateFolder() { - QString path; - QString name = i18n("New Folder"); + TQString path; + TQString name = i18n("New Folder"); while(true) { @@ -971,7 +971,7 @@ void KonqSidebarTree::slotCreateFolder() path = path + name; - if (!QFile::exists(path)) + if (!TQFile::exists(path)) break; name = name + "-2"; @@ -1017,7 +1017,7 @@ void KonqSidebarTree::slotOpenTab() { if (!m_currentTopLevelItem) return; DCOPRef ref(kapp->dcopClient()->appId(), topLevelWidget()->name()); - ref.call( "newTab(QString)", m_currentTopLevelItem->externalURL().url() ); + ref.call( "newTab(TQString)", m_currentTopLevelItem->externalURL().url() ); } void KonqSidebarTree::slotCopyLocation() @@ -1032,11 +1032,11 @@ void KonqSidebarTree::slotCopyLocation() /////////////////////////////////////////////////////////////////// -void KonqSidebarTreeToolTip::maybeTip( const QPoint &point ) +void KonqSidebarTreeToolTip::maybeTip( const TQPoint &point ) { - QListViewItem *item = m_view->itemAt( point ); + TQListViewItem *item = m_view->itemAt( point ); if ( item ) { - QString text = static_cast<KonqSidebarTreeItem*>( item )->toolTipText(); + TQString text = static_cast<KonqSidebarTreeItem*>( item )->toolTipText(); if ( !text.isEmpty() ) tip ( m_view->itemRect( item ), text ); } diff --git a/konqueror/sidebar/trees/konq_sidebartree.h b/konqueror/sidebar/trees/konq_sidebartree.h index cc2035466..b536355ba 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.h +++ b/konqueror/sidebar/trees/konq_sidebartree.h @@ -24,10 +24,10 @@ #include "konq_sidebartreetoplevelitem.h" #include "konqsidebar_tree.h" #include <kdirnotify.h> -#include <qmap.h> -#include <qpoint.h> -#include <qstrlist.h> -#include <qtooltip.h> +#include <tqmap.h> +#include <tqpoint.h> +#include <tqstrlist.h> +#include <tqtooltip.h> class KonqSidebarTreeModule; class KonqSidebarTreeItem; @@ -46,20 +46,20 @@ typedef struct DirTreeConfigData_ { KURL dir; int type; - QString relDir; + TQString relDir; } DirTreeConfigData; class KonqSidebarTreeToolTip : public QToolTip { public: - KonqSidebarTreeToolTip( QListView *view ) : QToolTip( view->viewport() ), m_view( view ) {} + KonqSidebarTreeToolTip( TQListView *view ) : TQToolTip( view->viewport() ), m_view( view ) {} protected: - virtual void maybeTip( const QPoint & ); + virtual void maybeTip( const TQPoint & ); private: - QListView *m_view; + TQListView *m_view; }; typedef enum { @@ -77,7 +77,7 @@ class KonqSidebarTree : public KListView, public KDirNotify { Q_OBJECT public: - KonqSidebarTree( KonqSidebar_Tree *parent, QWidget *parentWidget, int virt, const QString& path ); + KonqSidebarTree( KonqSidebar_Tree *parent, TQWidget *parentWidget, int virt, const TQString& path ); virtual ~KonqSidebarTree(); void followURL( const KURL &url ); @@ -87,7 +87,7 @@ public: */ KonqSidebarTreeItem * currentItem() const; - void startAnimation( KonqSidebarTreeItem * item, const char * iconBaseName = "kde", uint iconCount = 6, const QPixmap * originalPixmap = 0L ); + void startAnimation( KonqSidebarTreeItem * item, const char * iconBaseName = "kde", uint iconCount = 6, const TQPixmap * originalPixmap = 0L ); void stopAnimation( KonqSidebarTreeItem * item ); // Reimplemented from KDirNotify @@ -106,7 +106,7 @@ public: void itemDestructed( KonqSidebarTreeItem *item ); - void setDropFormats( const QStringList &formats ); // used in KListView mode + void setDropFormats( const TQStringList &formats ); // used in KListView mode // Show context menu for toplevel items void showToplevelContextMenu(); @@ -121,21 +121,21 @@ public slots: virtual void setContentsPos( int x, int y ); protected: - virtual void contentsDragEnterEvent( QDragEnterEvent *e ); - virtual void contentsDragMoveEvent( QDragMoveEvent *e ); - virtual void contentsDragLeaveEvent( QDragLeaveEvent *e ); - virtual void contentsDropEvent( QDropEvent *ev ); - virtual bool acceptDrag(QDropEvent* e) const; // used in KListView mode + virtual void contentsDragEnterEvent( TQDragEnterEvent *e ); + virtual void contentsDragMoveEvent( TQDragMoveEvent *e ); + virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e ); + virtual void contentsDropEvent( TQDropEvent *ev ); + virtual bool acceptDrag(TQDropEvent* e) const; // used in KListView mode - virtual void leaveEvent( QEvent * ); + virtual void leaveEvent( TQEvent * ); - virtual QDragObject* dragObject(); + virtual TQDragObject* dragObject(); private slots: - void slotDoubleClicked( QListViewItem *item ); - void slotExecuted( QListViewItem *item ); - void slotMouseButtonPressed(int _button, QListViewItem* _item, const QPoint&, int col); - void slotMouseButtonClicked(int _button, QListViewItem* _item, const QPoint&, int col); + void slotDoubleClicked( TQListViewItem *item ); + void slotExecuted( TQListViewItem *item ); + void slotMouseButtonPressed(int _button, TQListViewItem* _item, const TQPoint&, int col); + void slotMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col); void slotSelectionChanged(); void slotAnimation(); @@ -144,7 +144,7 @@ private slots: void rescanConfiguration(); - void slotItemRenamed(QListViewItem*, const QString &, int); + void slotItemRenamed(TQListViewItem*, const TQString &, int); void slotCreateFolder(); void slotDelete(); @@ -156,41 +156,41 @@ private slots: private: void clearTree(); - void scanDir( KonqSidebarTreeItem *parent, const QString &path, bool isRoot = false ); - void loadTopLevelGroup( KonqSidebarTreeItem *parent, const QString &path ); - void loadTopLevelItem( KonqSidebarTreeItem *parent, const QString &filename ); + void scanDir( KonqSidebarTreeItem *parent, const TQString &path, bool isRoot = false ); + void loadTopLevelGroup( KonqSidebarTreeItem *parent, const TQString &path ); + void loadTopLevelItem( KonqSidebarTreeItem *parent, const TQString &filename ); void loadModuleFactories(); private: - QPtrList<KonqSidebarTreeTopLevelItem> m_topLevelItems; + TQPtrList<KonqSidebarTreeTopLevelItem> m_topLevelItems; KonqSidebarTreeTopLevelItem *m_currentTopLevelItem; - QPtrList<KonqSidebarTreeModule> m_lstModules; + TQPtrList<KonqSidebarTreeModule> m_lstModules; KonqSidebarPlugin *m_part; struct AnimationInfo { - AnimationInfo( const char * _iconBaseName, uint _iconCount, const QPixmap & _originalPixmap ) + AnimationInfo( const char * _iconBaseName, uint _iconCount, const TQPixmap & _originalPixmap ) : iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {} AnimationInfo() : iconCount(0) {} - QCString iconBaseName; + TQCString iconBaseName; uint iconCount; uint iconNumber; - QPixmap originalPixmap; + TQPixmap originalPixmap; }; - typedef QMap<KonqSidebarTreeItem *, AnimationInfo> MapCurrentOpeningFolders; + typedef TQMap<KonqSidebarTreeItem *, AnimationInfo> MapCurrentOpeningFolders; MapCurrentOpeningFolders m_mapCurrentOpeningFolders; - QTimer *m_animationTimer; + TQTimer *m_animationTimer; - QListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened - QListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag) - QStrList m_lstDropFormats; + TQListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened + TQListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag) + TQStrList m_lstDropFormats; - QTimer *m_autoOpenTimer; + TQTimer *m_autoOpenTimer; // The base URL for our configuration directory //KURL m_dirtreeDir; @@ -199,10 +199,10 @@ private: KonqSidebarTreeToolTip m_toolTip; bool m_scrollingLocked; - getModule getPluginFactory(QString name); + getModule getPluginFactory(TQString name); - QMap<QString, QString> pluginInfo; - QMap<QString, getModule> pluginFactories; + TQMap<TQString, TQString> pluginInfo; + TQMap<TQString, getModule> pluginFactories; bool m_bOpeningFirstChild; KActionCollection *m_collection; @@ -216,9 +216,9 @@ signals: #define signals protected void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); - void popupMenu( const QPoint &global, const KURL &url, - const QString &mimeType, mode_t mode = (mode_t)-1 ); - void popupMenu( const QPoint &global, const KFileItemList &items ); + void popupMenu( const TQPoint &global, const KURL &url, + const TQString &mimeType, mode_t mode = (mode_t)-1 ); + void popupMenu( const TQPoint &global, const KFileItemList &items ); void enableAction( const char * name, bool enabled ); }; diff --git a/konqueror/sidebar/trees/konq_sidebartreeitem.cpp b/konqueror/sidebar/trees/konq_sidebartreeitem.cpp index daa0ae777..cc3f83950 100644 --- a/konqueror/sidebar/trees/konq_sidebartreeitem.cpp +++ b/konqueror/sidebar/trees/konq_sidebartreeitem.cpp @@ -22,13 +22,13 @@ //#include "konq_sidebartreepart.h" KonqSidebarTreeItem::KonqSidebarTreeItem( KonqSidebarTreeItem *parentItem, KonqSidebarTreeTopLevelItem *topLevelItem ) - : QListViewItem( parentItem ) + : TQListViewItem( parentItem ) { initItem( topLevelItem ); } KonqSidebarTreeItem::KonqSidebarTreeItem( KonqSidebarTree *parent, KonqSidebarTreeTopLevelItem *topLevelItem ) - : QListViewItem( parent ) + : TQListViewItem( parent ) { initItem( topLevelItem ); } diff --git a/konqueror/sidebar/trees/konq_sidebartreeitem.h b/konqueror/sidebar/trees/konq_sidebartreeitem.h index ef6f73931..0cb7a7d12 100644 --- a/konqueror/sidebar/trees/konq_sidebartreeitem.h +++ b/konqueror/sidebar/trees/konq_sidebartreeitem.h @@ -20,8 +20,8 @@ #ifndef konq_treeitem_h #define konq_treeitem_h -#include <qlistview.h> -#include <qstringlist.h> +#include <tqlistview.h> +#include <tqstringlist.h> #include <kurl.h> class QPainter; @@ -48,14 +48,14 @@ public: virtual ~KonqSidebarTreeItem(); // Whether the item accepts a drop consisting in those @p formats - virtual bool acceptsDrops( const QStrList & ) { return false; } + virtual bool acceptsDrops( const TQStrList & ) { return false; } // Handle a drop on this item. If you didn't want it, you shouln't // have return true in acceptsDrops :) - virtual void drop( QDropEvent * ) {} + virtual void drop( TQDropEvent * ) {} // Create a drag object from this item. - virtual QDragObject * dragObject( QWidget * parent, bool move = false ) = 0; + virtual TQDragObject * dragObject( TQWidget * parent, bool move = false ) = 0; virtual void middleButtonClicked(); virtual void rightButtonPressed() = 0; @@ -65,17 +65,17 @@ public: virtual void del() {} virtual void shred() {} virtual void rename() {} - virtual void rename( const QString& ) {} + virtual void rename( const TQString& ) {} // The URL to open when this link is clicked virtual KURL externalURL() const = 0; // The mimetype to use when this link is clicked - // If unknown, return QString::null, konq will determine the mimetype itself - virtual QString externalMimeType() const { return QString::null; } + // If unknown, return TQString::null, konq will determine the mimetype itself + virtual TQString externalMimeType() const { return TQString::null; } // overwrite this if you want a tooltip shown on your item - virtual QString toolTipText() const { return QString::null; } + virtual TQString toolTipText() const { return TQString::null; } // Called when this item is selected // Reimplement, and call tree()->part()->extension()->enableActions(...) @@ -100,10 +100,10 @@ public: // returns the tree inside which this item is KonqSidebarTree *tree() const; - virtual QString key( int column, bool ) const { return text( column ).lower(); } + virtual TQString key( int column, bool ) const { return text( column ).lower(); } // List of alternative names (URLs) this entry is known under - QStringList alias; + TQStringList alias; protected: // Create an item at the toplevel - only for toplevel items -> protected KonqSidebarTreeItem( KonqSidebarTree *parent, KonqSidebarTreeTopLevelItem *topLevelItem ); diff --git a/konqueror/sidebar/trees/konq_sidebartreemodule.h b/konqueror/sidebar/trees/konq_sidebartreemodule.h index 9f9863311..80d3ea062 100644 --- a/konqueror/sidebar/trees/konq_sidebartreemodule.h +++ b/konqueror/sidebar/trees/konq_sidebartreemodule.h @@ -19,7 +19,7 @@ #ifndef konq_treemodule_h #define konq_treemodule_h -#include <qobject.h> +#include <tqobject.h> #include "konq_sidebartree.h" class QDragObject; class KonqSidebarTreeItem; @@ -53,7 +53,7 @@ public: bool showHidden() { return m_showHidden;} virtual void setShowHidden(bool showhidden) {m_showHidden=showhidden;} - virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const QPoint& ) { return false; } + virtual bool handleTopLevelContextMenu( KonqSidebarTreeTopLevelItem *, const TQPoint& ) { return false; } protected: KonqSidebarTree * m_pTree; diff --git a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp index d71959c1e..4ce6fe445 100644 --- a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp +++ b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.cpp @@ -25,14 +25,14 @@ #include <kprotocolinfo.h> #include <kurldrag.h> #include <kmimetype.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qcursor.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqcursor.h> #include <konq_drag.h> void KonqSidebarTreeTopLevelItem::init() { - QString desktopFile = m_path; + TQString desktopFile = m_path; if ( isTopLevelGroup() ) desktopFile += "/.directory"; KSimpleConfig cfg( desktopFile, true ); @@ -50,18 +50,18 @@ void KonqSidebarTreeTopLevelItem::setOpen( bool open ) void KonqSidebarTreeTopLevelItem::itemSelected() { kdDebug() << "KonqSidebarTreeTopLevelItem::itemSelected" << endl; - QMimeSource *data = QApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); bool paste = m_bTopLevelGroup && data->provides("text/uri-list"); tree()->enableActions( true, true, paste, true, true, true /*rename*/ ); } -bool KonqSidebarTreeTopLevelItem::acceptsDrops( const QStrList & formats ) +bool KonqSidebarTreeTopLevelItem::acceptsDrops( const TQStrList & formats ) { return formats.contains("text/uri-list") && ( m_bTopLevelGroup || !externalURL().isEmpty() ); } -void KonqSidebarTreeTopLevelItem::drop( QDropEvent * ev ) +void KonqSidebarTreeTopLevelItem::drop( TQDropEvent * ev ) { if ( m_bTopLevelGroup ) { @@ -85,7 +85,7 @@ void KonqSidebarTreeTopLevelItem::drop( QDropEvent * ev ) } } -QDragObject * KonqSidebarTreeTopLevelItem::dragObject( QWidget * parent, bool move ) +TQDragObject * KonqSidebarTreeTopLevelItem::dragObject( TQWidget * parent, bool move ) { // 100% duplicated from KonqDirTreeItem::dragObject :( KURL::List lst; @@ -95,10 +95,10 @@ QDragObject * KonqSidebarTreeTopLevelItem::dragObject( QWidget * parent, bool mo KonqDrag * drag = KonqDrag::newDrag( lst, false, parent ); - const QPixmap * pix = pixmap(0); + const TQPixmap * pix = pixmap(0); if (pix) { - QPoint hotspot( pix->width() / 2, pix->height() / 2 ); + TQPoint hotspot( pix->width() / 2, pix->height() / 2 ); drag->setPixmap( *pix, hotspot ); } drag->setMoveSelection( move ); @@ -121,7 +121,7 @@ void KonqSidebarTreeTopLevelItem::rightButtonPressed() // i.e. the filename instead of the Name field). There's the Rename item for that. // Only missing thing is changing the URL of a link. Hmm... - if ( !module() || !module()->handleTopLevelContextMenu( this, QCursor::pos() ) ) + if ( !module() || !module()->handleTopLevelContextMenu( this, TQCursor::pos() ) ) { tree()->showToplevelContextMenu(); } @@ -157,7 +157,7 @@ void KonqSidebarTreeTopLevelItem::paste() { // move or not move ? bool move = false; - QMimeSource *data = QApplication::clipboard()->data(); + TQMimeSource *data = TQApplication::clipboard()->data(); if ( data->provides( "application/x-kde-cutselection" ) ) { move = KonqDrag::decodeIsCutSelection( data ); kdDebug(1201) << "move (from clipboard data) = " << move << endl; @@ -177,7 +177,7 @@ void KonqSidebarTreeTopLevelItem::rename() tree()->rename( this, 0 ); } -void KonqSidebarTreeTopLevelItem::rename( const QString & name ) +void KonqSidebarTreeTopLevelItem::rename( const TQString & name ) { KURL url; url.setPath( m_path ); @@ -186,7 +186,7 @@ void KonqSidebarTreeTopLevelItem::rename( const QString & name ) // of the .directory or desktop file //KonqOperations::rename( tree(), url, name ); - QString desktopFile = m_path; + TQString desktopFile = m_path; if ( isTopLevelGroup() ) desktopFile += "/.directory"; KSimpleConfig cfg( desktopFile ); @@ -201,7 +201,7 @@ void KonqSidebarTreeTopLevelItem::rename( const QString & name ) allDirNotify.FilesChanged( lst ); } -QString KonqSidebarTreeTopLevelItem::toolTipText() const +TQString KonqSidebarTreeTopLevelItem::toolTipText() const { return m_comment; } diff --git a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.h b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.h index fc67e274e..6e20e7e03 100644 --- a/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.h +++ b/konqueror/sidebar/trees/konq_sidebartreetoplevelitem.h @@ -38,7 +38,7 @@ public: * @param module the module handling this toplevel item * @param path the path to the desktop file that was the reason for creating this item */ - KonqSidebarTreeTopLevelItem( KonqSidebarTree *parent, KonqSidebarTreeModule * module, const QString & path ) + KonqSidebarTreeTopLevelItem( KonqSidebarTree *parent, KonqSidebarTreeModule * module, const TQString & path ) : KonqSidebarTreeItem(parent, 0L), m_module(module), m_path(path), m_bTopLevelGroup(false) { init(); } /** @@ -46,14 +46,14 @@ public: * @param module the module handling this toplevel item * @param path the path to the desktop file that was the reason for creating this item */ - KonqSidebarTreeTopLevelItem( KonqSidebarTreeItem *parentItem, KonqSidebarTreeModule * module, const QString & path ) + KonqSidebarTreeTopLevelItem( KonqSidebarTreeItem *parentItem, KonqSidebarTreeModule * module, const TQString & path ) : KonqSidebarTreeItem( parentItem, 0L), m_module(module), m_path(path), m_bTopLevelGroup(false) { init(); } void init(); - virtual bool acceptsDrops( const QStrList & formats ); - virtual void drop( QDropEvent * ev ); - virtual QDragObject * dragObject( QWidget * parent, bool move = false ); + virtual bool acceptsDrops( const TQStrList & formats ); + virtual void drop( TQDropEvent * ev ); + virtual TQDragObject * dragObject( TQWidget * parent, bool move = false ); virtual void middleButtonClicked(); virtual void rightButtonPressed(); @@ -62,7 +62,7 @@ public: virtual void del(); virtual void shred(); virtual void rename(); // start a rename operation - virtual void rename( const QString & name ); // do the actual renaming + virtual void rename( const TQString & name ); // do the actual renaming virtual void setOpen( bool open ); @@ -71,7 +71,7 @@ public: virtual KURL externalURL() const { return m_externalURL; } - virtual QString toolTipText() const; + virtual TQString toolTipText() const; virtual void itemSelected(); @@ -87,13 +87,13 @@ public: KonqSidebarTreeModule *module() const { return m_module; } // The path to the desktop file responsible for this toplevel item - QString path() const { return m_path; } + TQString path() const { return m_path; } protected: void delOperation( int method ); KonqSidebarTreeModule *m_module; - QString m_path; - QString m_comment; + TQString m_path; + TQString m_comment; KURL m_externalURL; bool m_bTopLevelGroup; }; diff --git a/konqueror/sidebar/trees/konqsidebar_tree.cpp b/konqueror/sidebar/trees/konqsidebar_tree.cpp index 9b53f195d..219063026 100644 --- a/konqueror/sidebar/trees/konqsidebar_tree.cpp +++ b/konqueror/sidebar/trees/konqsidebar_tree.cpp @@ -8,12 +8,12 @@ #include <kiconloader.h> #include <klistviewsearchline.h> -#include <qclipboard.h> -#include <qdragobject.h> -#include <qtoolbutton.h> -#include <qvbox.h> +#include <tqclipboard.h> +#include <tqdragobject.h> +#include <tqtoolbutton.h> +#include <tqvbox.h> -KonqSidebar_Tree::KonqSidebar_Tree(KInstance *instance,QObject *parent,QWidget *widgetParent, QString &desktopName_, const char* name): +KonqSidebar_Tree::KonqSidebar_Tree(KInstance *instance,TQObject *parent,TQWidget *widgetParent, TQString &desktopName_, const char* name): KonqSidebarPlugin(instance,parent,widgetParent,desktopName_,name) { KSimpleConfig ksc(desktopName_); @@ -21,48 +21,48 @@ KonqSidebar_Tree::KonqSidebar_Tree(KInstance *instance,QObject *parent,QWidget * int virt= ( (ksc.readEntry("X-KDE-TreeModule","")=="Virtual") ?VIRT_Folder:VIRT_Link); if (virt==1) desktopName_=ksc.readEntry("X-KDE-RelURL",""); - widget = new QVBox(widgetParent); + widget = new TQVBox(widgetParent); if (ksc.readBoolEntry("X-KDE-SearchableTreeModule",false)) { - QHBox* searchline = new QHBox(widget); + TQHBox* searchline = new TQHBox(widget); searchline->setSpacing(KDialog::spacingHint()); tree=new KonqSidebarTree(this,widget,virt,desktopName_); - QToolButton *clearSearch = new QToolButton(searchline); + TQToolButton *clearSearch = new TQToolButton(searchline); clearSearch->setTextLabel(i18n("Clear Search"), true); - clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); - QLabel* slbl = new QLabel(i18n("Se&arch:"), searchline); + clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); + TQLabel* slbl = new TQLabel(i18n("Se&arch:"), searchline); KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchline,tree); slbl->setBuddy(listViewSearch); - connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear())); + connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); } else tree=new KonqSidebarTree(this,widget,virt,desktopName_); - connect(tree, SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &)), - this,SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &))); + connect(tree, TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &)), + this,TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs &))); - connect(tree,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), - this,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &))); + connect(tree,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), + this,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &))); - connect(tree,SIGNAL(popupMenu( const QPoint &, const KURL &, const QString &, mode_t )), - this,SIGNAL(popupMenu( const QPoint &, const KURL &, const QString &, mode_t ))); + connect(tree,TQT_SIGNAL(popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t )), + this,TQT_SIGNAL(popupMenu( const TQPoint &, const KURL &, const TQString &, mode_t ))); - connect(tree,SIGNAL(popupMenu( const QPoint &, const KFileItemList & )), - this,SIGNAL(popupMenu( const QPoint &, const KFileItemList & ))); + connect(tree,TQT_SIGNAL(popupMenu( const TQPoint &, const KFileItemList & )), + this,TQT_SIGNAL(popupMenu( const TQPoint &, const KFileItemList & ))); - connect(tree,SIGNAL(enableAction( const char *, bool )), - this,SIGNAL(enableAction( const char *, bool))); + connect(tree,TQT_SIGNAL(enableAction( const char *, bool )), + this,TQT_SIGNAL(enableAction( const char *, bool))); } KonqSidebar_Tree::~KonqSidebar_Tree(){;} -void* KonqSidebar_Tree::provides(const QString &) {return 0;} +void* KonqSidebar_Tree::provides(const TQString &) {return 0;} -//void KonqSidebar_Tree::emitStatusBarText (const QString &) {;} +//void KonqSidebar_Tree::emitStatusBarText (const TQString &) {;} -QWidget *KonqSidebar_Tree::getWidget(){return widget;} +TQWidget *KonqSidebar_Tree::getWidget(){return widget;} void KonqSidebar_Tree::handleURL(const KURL &url) { @@ -73,16 +73,16 @@ void KonqSidebar_Tree::handleURL(const KURL &url) void KonqSidebar_Tree::cut() { - QDragObject * drag = static_cast<KonqSidebarTreeItem*>(tree->selectedItem())->dragObject( 0L, true ); + TQDragObject * drag = static_cast<KonqSidebarTreeItem*>(tree->selectedItem())->dragObject( 0L, true ); if (drag) - QApplication::clipboard()->setData( drag ); + TQApplication::clipboard()->setData( drag ); } void KonqSidebar_Tree::copy() { - QDragObject * drag = static_cast<KonqSidebarTreeItem*>(tree->selectedItem())->dragObject( 0L ); + TQDragObject * drag = static_cast<KonqSidebarTreeItem*>(tree->selectedItem())->dragObject( 0L ); if (drag) - QApplication::clipboard()->setData( drag ); + TQApplication::clipboard()->setData( drag ); } void KonqSidebar_Tree::paste() @@ -123,7 +123,7 @@ void KonqSidebar_Tree::rename() extern "C" { - KDE_EXPORT void* create_konqsidebar_tree(KInstance *inst,QObject *par,QWidget *widp,QString &desktopname,const char *name) + KDE_EXPORT void* create_konqsidebar_tree(KInstance *inst,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name) { return new KonqSidebar_Tree(inst,par,widp,desktopname,name); } @@ -131,19 +131,19 @@ extern "C" extern "C" { - KDE_EXPORT bool add_konqsidebar_tree(QString* fn, QString*, QMap<QString,QString> *map) + KDE_EXPORT bool add_konqsidebar_tree(TQString* fn, TQString*, TQMap<TQString,TQString> *map) { KStandardDirs *dirs=KGlobal::dirs(); - QStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); - QStringList names; - for (QStringList::ConstIterator it=list.begin();it!=list.end();++it) + TQStringList list=dirs->findAllResources("data","konqsidebartng/dirtree/*.desktop",false,true); + TQStringList names; + for (TQStringList::ConstIterator it=list.begin();it!=list.end();++it) { KSimpleConfig sc(*it); sc.setGroup("Desktop Entry"); names<<sc.readEntry("Name"); } - QString item = KInputDialog::getItem( i18n( "Select Type" ), + TQString item = KInputDialog::getItem( i18n( "Select Type" ), i18n( "Select type:" ), names ); if (!item.isEmpty()) { diff --git a/konqueror/sidebar/trees/konqsidebar_tree.h b/konqueror/sidebar/trees/konqsidebar_tree.h index 968a59585..9b95897ff 100644 --- a/konqueror/sidebar/trees/konqsidebar_tree.h +++ b/konqueror/sidebar/trees/konqsidebar_tree.h @@ -1,16 +1,16 @@ #ifndef _konq_sidebar_test_h_ #define _konq_sidebar_test_h_ #include <konqsidebarplugin.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kparts/part.h> #include <kparts/factory.h> #include <kparts/browserextension.h> #include <kdialogbase.h> -#include <qcombobox.h> -#include <qstringlist.h> +#include <tqcombobox.h> +#include <tqstringlist.h> #include <klocale.h> -#include <qlineedit.h> +#include <tqlineedit.h> class KonqSidebarTree; class QVBox; @@ -18,13 +18,13 @@ class KonqSidebar_Tree: public KonqSidebarPlugin { Q_OBJECT public: - KonqSidebar_Tree(KInstance *instance,QObject *parent,QWidget *widgetParent, QString &desktopName_, const char* name=0); + KonqSidebar_Tree(KInstance *instance,TQObject *parent,TQWidget *widgetParent, TQString &desktopName_, const char* name=0); ~KonqSidebar_Tree(); - virtual void *provides(const QString &); -// void emitStatusBarText (const QString &); - virtual QWidget *getWidget(); + virtual void *provides(const TQString &); +// void emitStatusBarText (const TQString &); + virtual TQWidget *getWidget(); protected: - class QVBox *widget; + class TQVBox *widget; class KonqSidebarTree *tree; virtual void handleURL(const KURL &url); protected slots: @@ -38,9 +38,9 @@ class KonqSidebar_Tree: public KonqSidebarPlugin signals: void openURLRequest( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); void createNewWindow( const KURL &url, const KParts::URLArgs &args = KParts::URLArgs() ); - void popupMenu( const QPoint &global, const KURL &url, - const QString &mimeType, mode_t mode = (mode_t)-1 ); - void popupMenu( const QPoint &global, const KFileItemList &items ); + void popupMenu( const TQPoint &global, const KURL &url, + const TQString &mimeType, mode_t mode = (mode_t)-1 ); + void popupMenu( const TQPoint &global, const KFileItemList &items ); void enableAction( const char * name, bool enabled ); }; |