diff options
Diffstat (limited to 'parts/bookmarks/bookmarks_widget.cpp')
-rw-r--r-- | parts/bookmarks/bookmarks_widget.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/parts/bookmarks/bookmarks_widget.cpp b/parts/bookmarks/bookmarks_widget.cpp index 683c32e1..20ab2cd9 100644 --- a/parts/bookmarks/bookmarks_widget.cpp +++ b/parts/bookmarks/bookmarks_widget.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qdict.h> -#include <qheader.h> -#include <qtooltip.h> -#include <qpair.h> -#include <qstylesheet.h> +#include <tqdict.h> +#include <tqheader.h> +#include <tqtooltip.h> +#include <tqpair.h> +#include <tqstylesheet.h> #include <kparts/part.h> #include <klibloader.h> @@ -59,13 +59,13 @@ static const char* const bookmark_xpm[]={ class BookmarkItem : public QListViewItem { public: - BookmarkItem( QListView * parent, KURL const & url ) - : QListViewItem( parent, url.fileName() ), + BookmarkItem( TQListView * parent, KURL const & url ) + : TQListViewItem( parent, url.fileName() ), _url( url ), _line( -1 ), _isBookmark( false ) {} - BookmarkItem( QListViewItem * parent, KURL const & url, QPair<int,QString> mark ) - : QListViewItem( parent, QString::number( mark.first +1 ).rightJustify( 5 ) ), + BookmarkItem( TQListViewItem * parent, KURL const & url, QPair<int,TQString> mark ) + : TQListViewItem( parent, TQString::number( mark.first +1 ).rightJustify( 5 ) ), _url( url ), _line( mark.first ), _isBookmark( true ) { BookmarksWidget * lv = static_cast<BookmarksWidget*>( listView() ); @@ -97,17 +97,17 @@ public: return _line; } - QString tipText() + TQString tipText() { if ( _isBookmark ) { BookmarksWidget * w = static_cast<BookmarksWidget*> ( listView() ); - QStringList list = w->getContext( _url, _line ); + TQStringList list = w->getContext( _url, _line ); - QString code = "<qt><table><tr><td><pre>"; + TQString code = "<qt><table><tr><td><pre>"; for ( uint i = 0; i < list.count(); i++) { - QString temp = QStyleSheet::escape( list[i] ); + TQString temp = TQStyleSheet::escape( list[i] ); if ( i == (list.count() / 2) ) // count() is always odd { @@ -134,40 +134,40 @@ private: KURL _url; int _line; bool _isBookmark; - QString _code; + TQString _code; }; BookmarksWidget::BookmarksWidget(BookmarksPart *part) - : KListView(0, "bookmarks widget"), QToolTip( viewport() ), + : KListView(0, "bookmarks widget"), TQToolTip( viewport() ), _part( part ) { - addColumn( QString::null ); + addColumn( TQString::null ); header()->hide(); setRootIsDecorated( true ); - setResizeMode( QListView::LastColumn ); + setResizeMode( TQListView::LastColumn ); setAllColumnsShowFocus( true ); // setSortColumn( -1 ); - connect( this, SIGNAL( executed( QListViewItem * ) ), this, SLOT( itemClicked( QListViewItem * ) ) ); - connect( this, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( itemClicked( QListViewItem * ) ) ); - connect( this, SIGNAL( contextMenuRequested ( QListViewItem *, const QPoint & , int ) ), - this, SLOT( popupMenu(QListViewItem *, const QPoint & , int ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ), this, TQT_SLOT( itemClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this, TQT_SLOT( itemClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ), + this, TQT_SLOT( popupMenu(TQListViewItem *, const TQPoint & , int ) ) ); } BookmarksWidget::~BookmarksWidget() {} -void BookmarksWidget::maybeTip(const QPoint &p) +void BookmarksWidget::maybeTip(const TQPoint &p) { // kdDebug(0) << "ToolTip::maybeTip()" << endl; if ( ! _part->config()->toolTip() ) return; BookmarkItem * item = dynamic_cast<BookmarkItem*>( itemAt( p ) ); - QRect r = itemRect( item ); + TQRect r = itemRect( item ); if ( item && r.isValid() ) { @@ -175,13 +175,13 @@ void BookmarksWidget::maybeTip(const QPoint &p) } } -void BookmarksWidget::update( QDict<EditorData> const & map ) +void BookmarksWidget::update( TQDict<EditorData> const & map ) { // kdDebug(0) << "BookmarksWidget::update()" << endl; - QListView::clear(); + TQListView::clear(); - QDictIterator<EditorData> it( map ); + TQDictIterator<EditorData> it( map ); while ( it.current() ) { if ( ! it.current()->marks.isEmpty() ) @@ -209,15 +209,15 @@ void BookmarksWidget::createURL( EditorData * data ) if ( data ) { - QListViewItem * file = new BookmarkItem( this, data->url ); + TQListViewItem * file = new BookmarkItem( this, data->url ); file->setOpen( true ); file->setPixmap( 0, SmallIcon( "document" ) ); - QValueListIterator< QPair<int,QString> > it = data->marks.begin(); + TQValueListIterator< QPair<int,TQString> > it = data->marks.begin(); while ( it != data->marks.end() ) { - QListViewItem * item = new BookmarkItem( file, data->url, *it ); - item->setPixmap( 0, QPixmap((const char**)bookmark_xpm) ); + TQListViewItem * item = new BookmarkItem( file, data->url, *it ); + item->setPixmap( 0, TQPixmap((const char**)bookmark_xpm) ); ++it; } } @@ -227,7 +227,7 @@ bool BookmarksWidget::removeURL( KURL const & url ) { // kdDebug(0) << "BookmarksWidget::removeURL()" << endl; - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while ( item ) { BookmarkItem * bm = static_cast<BookmarkItem*>(item); @@ -255,7 +255,7 @@ void BookmarksWidget::doEmitRemoveBookMark() } } -void BookmarksWidget::popupMenu( QListViewItem * item, const QPoint & p, int ) +void BookmarksWidget::popupMenu( TQListViewItem * item, const TQPoint & p, int ) { // kdDebug(0) << "BookmarksWidget::contextMenuRequested()" << endl; @@ -268,27 +268,27 @@ void BookmarksWidget::popupMenu( QListViewItem * item, const QPoint & p, int ) if ( _selectedItem->isBookmark() ) { popup.insertTitle( _selectedItem->url().fileName() + i18n(", line ") - + QString::number( _selectedItem->line() +1 ) ); + + TQString::number( _selectedItem->line() +1 ) ); - popup.insertItem( i18n("Remove This Bookmark"), this, SLOT( doEmitRemoveBookMark() ) ); + popup.insertItem( i18n("Remove This Bookmark"), this, TQT_SLOT( doEmitRemoveBookMark() ) ); } else { popup.insertTitle( _selectedItem->url().fileName() + i18n( ", All" ) ); - popup.insertItem( i18n("Remove These Bookmarks"), this, SLOT( doEmitRemoveBookMark() ) ); + popup.insertItem( i18n("Remove These Bookmarks"), this, TQT_SLOT( doEmitRemoveBookMark() ) ); } popup.insertSeparator(); - popup.insertItem( i18n( "Collapse All" ), this, SLOT(collapseAll()) ); - popup.insertItem( i18n( "Expand All" ), this, SLOT(expandAll()) ); + popup.insertItem( i18n( "Collapse All" ), this, TQT_SLOT(collapseAll()) ); + popup.insertItem( i18n( "Expand All" ), this, TQT_SLOT(expandAll()) ); popup.exec(p); } } -void BookmarksWidget::itemClicked( QListViewItem * clickedItem ) +void BookmarksWidget::itemClicked( TQListViewItem * clickedItem ) { // kdDebug(0) << "BookmarksWidget::itemClicked()" << endl; @@ -305,14 +305,14 @@ BookmarksConfig * BookmarksWidget::config( ) return _part->config(); } -QStringList BookmarksWidget::getContext( KURL const & url, unsigned int line ) +TQStringList BookmarksWidget::getContext( KURL const & url, unsigned int line ) { return _part->getContext( url, line, config()->context() ); } void BookmarksWidget::collapseAll( ) { - QListViewItem * it = firstChild(); + TQListViewItem * it = firstChild(); while( it ) { it->setOpen( false ); @@ -322,7 +322,7 @@ void BookmarksWidget::collapseAll( ) void BookmarksWidget::expandAll( ) { - QListViewItem * it = firstChild(); + TQListViewItem * it = firstChild(); while( it ) { it->setOpen( true ); |