diff options
author | Slávek Banko <[email protected]> | 2013-06-29 16:33:55 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-04 03:57:45 +0200 |
commit | f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db (patch) | |
tree | 0414ba9f0823b98d2a159c11513ddcda84b932cc /src/documentlistview.cpp | |
parent | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (diff) | |
download | kbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.tar.gz kbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.zip |
Initial TDE conversion
Diffstat (limited to 'src/documentlistview.cpp')
-rw-r--r-- | src/documentlistview.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/documentlistview.cpp b/src/documentlistview.cpp index 7478252..ca68162 100644 --- a/src/documentlistview.cpp +++ b/src/documentlistview.cpp @@ -33,16 +33,16 @@ #include <ntqtextstream.h> #include <ntqtimer.h> -#include <kapplication.h> -#include <kio/netaccess.h> -#include <ktempfile.h> -#include <klocale.h> +#include <tdeapplication.h> +#include <tdeio/netaccess.h> +#include <tdetempfile.h> +#include <tdelocale.h> #include <kurl.h> #include <kurldrag.h> -#include <kactionclasses.h> -#include <kaction.h> -#include <kpopupmenu.h> -#include <kmessagebox.h> +#include <tdeactionclasses.h> +#include <tdeaction.h> +#include <tdepopupmenu.h> +#include <tdemessagebox.h> #include <kprogress.h> #include <kiconloader.h> @@ -70,7 +70,7 @@ namespace KBibTeX { DocumentListView::DocumentListView( KBibTeX::DocumentWidget *docWidget, bool isReadOnly, TQWidget *parent, const char *name ) - : KListView( parent, name ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_contextMenu( NULL ), m_headerMenu( NULL ), m_isReadOnly( isReadOnly ), m_newElementCounter( 1 ) + : TDEListView( parent, name ), m_docWidget( docWidget ), m_bibtexFile( NULL ), m_contextMenu( NULL ), m_headerMenu( NULL ), m_isReadOnly( isReadOnly ), m_newElementCounter( 1 ) { setAllColumnsShowFocus( true ); setShowSortIndicator( true ); @@ -85,7 +85,7 @@ namespace KBibTeX setDropVisualizer( TRUE ); connect( header(), SIGNAL( clicked( int ) ), this, SLOT( setSortingColumn( int ) ) ); - connect( this, SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, SLOT( showBibtexListContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ), this, SLOT( showBibtexListContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ) ); connect( this, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( slotDoubleClick( TQListViewItem* ) ) ); connect( this, SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ), this, SLOT( slotDropped( TQDropEvent*, TQListViewItem* ) ) ); } @@ -97,7 +97,7 @@ namespace KBibTeX void DocumentListView::setFactory( KXMLGUIFactory *factory, KXMLGUIClient *client ) { - m_contextMenu = static_cast<KPopupMenu*>( factory -> container( "popup_bibtexlist", client ) ); + m_contextMenu = static_cast<TDEPopupMenu*>( factory -> container( "popup_bibtexlist", client ) ); } bool DocumentListView::setBibTeXFile( BibTeX::File *bibtexFile ) @@ -237,15 +237,15 @@ namespace KBibTeX if ( settings->editing_UseSpecialFont ) setFont( settings->editing_SpecialFont ); else - setFont( KGlobalSettings::generalFont() ); - header() ->setFont( KGlobalSettings::generalFont() ); + setFont( TDEGlobalSettings::generalFont() ); + header() ->setFont( TDEGlobalSettings::generalFont() ); restoreColumnIndex(); restoreColumnWidths(); restoreSortingColumn(); } - void DocumentListView::setViewShowColumnsMenu( KActionMenu *actionMenu ) + void DocumentListView::setViewShowColumnsMenu( TDEActionMenu *actionMenu ) { if ( m_headerMenu == NULL ) { @@ -446,7 +446,7 @@ namespace KBibTeX return FALSE; // build popup menu - KPopupMenu * popup = new KPopupMenu( this, "pastePopup" ); + TDEPopupMenu * popup = new TDEPopupMenu( this, "pastePopup" ); popup->insertTitle( i18n( "Paste text as..." ) ); for ( int i = ( int ) BibTeX::EntryField::ftAuthor; i <= ( int ) BibTeX::EntryField::ftYear; i++ ) { @@ -454,7 +454,7 @@ namespace KBibTeX popup->insertItem( Settings::fieldTypeToI18NString( ft ), i ); } popup->insertSeparator(); - TQIconSet cancelPixmap = KGlobal::iconLoader() ->loadIconSet( "cancel", KIcon::Small ); + TQIconSet cancelPixmap = TDEGlobal::iconLoader() ->loadIconSet( "cancel", TDEIcon::Small ); int cancelId = popup->insertItem( cancelPixmap, i18n( "Cancel" ) ); // show popup menu @@ -563,7 +563,7 @@ namespace KBibTeX } } - void DocumentListView::showBibtexListContextMenu( KListView *, TQListViewItem *, const TQPoint & p ) + void DocumentListView::showBibtexListContextMenu( TDEListView *, TQListViewItem *, const TQPoint & p ) { if ( m_contextMenu != NULL ) { @@ -665,22 +665,22 @@ namespace KBibTeX { TQString url = urlList.at( 0 ); TQString tmpFile; - if ( ! KIO::NetAccess::download( url, tmpFile, 0 ) ) + if ( ! TDEIO::NetAccess::download( url, tmpFile, 0 ) ) { - KMessageBox::error( this, KIO::NetAccess::lastErrorString() ); + KMessageBox::error( this, TDEIO::NetAccess::lastErrorString() ); return ; } TQFile f( tmpFile ); if ( ! f.open( IO_ReadOnly ) ) { KMessageBox::error( this, f.errorString() ); - KIO::NetAccess::removeTempFile( tmpFile ); + TDEIO::NetAccess::removeTempFile( tmpFile ); return ; } TQByteArray ba = f.readAll(); text = TQString( ba ); f.close(); - KIO::NetAccess::removeTempFile( tmpFile ); + TDEIO::NetAccess::removeTempFile( tmpFile ); } else if ( !TQTextDrag::decode( event, text ) ) return; @@ -710,7 +710,7 @@ namespace KBibTeX } } - return KListView::eventFilter( watched, e ); + return TDEListView::eventFilter( watched, e ); } void DocumentListView::keyPressEvent( TQKeyEvent *e ) @@ -724,7 +724,7 @@ namespace KBibTeX emit executed( item ); } else - KListView::keyPressEvent( e ); + TDEListView::keyPressEvent( e ); } void DocumentListView::showColumn( int col, int colWidth ) |