From f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 16:33:55 +0200 Subject: Initial TDE conversion --- src/documentlistview.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/documentlistview.cpp') 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 #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -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( factory -> container( "popup_bibtexlist", client ) ); + m_contextMenu = static_cast( 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 ) -- cgit v1.2.3