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/history_module | |
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/history_module')
8 files changed, 153 insertions, 153 deletions
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; |