summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/kfiledndiconview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/autotools/kfiledndiconview.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/autotools/kfiledndiconview.cpp')
-rw-r--r--buildtools/autotools/kfiledndiconview.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/buildtools/autotools/kfiledndiconview.cpp b/buildtools/autotools/kfiledndiconview.cpp
index 47bb32a9..1a491c62 100644
--- a/buildtools/autotools/kfiledndiconview.cpp
+++ b/buildtools/autotools/kfiledndiconview.cpp
@@ -17,8 +17,8 @@
//////////////////////////////////////////////////////
// Qt specific includes
-#include <qptrlist.h>
-#include <qapplication.h>
+#include <tqptrlist.h>
+#include <tqapplication.h>
//////////////////////////////////////////////////////
// KDE specific includes
#include <kfileitem.h>
@@ -33,7 +33,7 @@
static int autoOpenTime = 750;
#endif
//-----------------------------------------------
-KFileDnDIconView::KFileDnDIconView( QWidget *parent, const char *name )
+KFileDnDIconView::KFileDnDIconView( TQWidget *parent, const char *name )
: KFileIconView(parent,name), m_autoOpenTimer( this ),
m_autoOpenTime( autoOpenTime ), m_useAutoOpenTimer( true ),
m_dropItem(0), m_dndEnabled( true )
@@ -46,14 +46,14 @@ KFileDnDIconView::KFileDnDIconView( QWidget *parent, const char *name )
KFileDnDIconView::~KFileDnDIconView(){
}
//-----------------------------------------------
-void KFileDnDIconView::readConfig( KConfig* config, const QString& group ) {
+void KFileDnDIconView::readConfig( KConfig* config, const TQString& group ) {
KConfigGroupSaver cs( config, group );
bool dnd = config->readBoolEntry("EnableDND", true );
setDnDEnabled( dnd );
KFileIconView::readConfig( config, group );
}
//-----------------------------------------------
-void KFileDnDIconView::writeConfig( KConfig* config, const QString& group ) {
+void KFileDnDIconView::writeConfig( KConfig* config, const TQString& group ) {
KConfigGroupSaver cs( config, group );
config->writeEntry("EnableDND", m_dndEnabled );
KFileIconView::writeConfig( config, group );
@@ -78,26 +78,26 @@ void KFileDnDIconView::slotOpenFolder(){
}
}
//-----------------------------------------------
-void KFileDnDIconView::contentsDragEnterEvent( QDragEnterEvent *e ) {
+void KFileDnDIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) {
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->accept( false ); // No
return;
}
e->acceptAction(); // Yes
- QIconViewItem *i = findItem( contentsToViewport( e->pos() ) );
+ TQIconViewItem *i = findItem( contentsToViewport( e->pos() ) );
if ( i && m_useAutoOpenTimer) { // are we over an item ?
m_dropItem = i; // set new m_dropItem
m_autoOpenTimer.start( m_autoOpenTime ); // restart timer
}
}
//-----------------------------------------------
-void KFileDnDIconView::contentsDragMoveEvent( QDragMoveEvent *e ) {
+void KFileDnDIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) {
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->accept( false ); // No
return;
}
e->acceptAction(); // Yes
- QIconViewItem *i = findItem( contentsToViewport( e->pos() ) );
+ TQIconViewItem *i = findItem( contentsToViewport( e->pos() ) );
if( ! m_useAutoOpenTimer )
return;
if ( i ) { // are we over an item ?
@@ -111,14 +111,14 @@ void KFileDnDIconView::contentsDragMoveEvent( QDragMoveEvent *e ) {
m_autoOpenTimer.stop(); // stop timer
}
//-----------------------------------------------
-void KFileDnDIconView::contentsDragLeaveEvent( QDragLeaveEvent* ) {
+void KFileDnDIconView::contentsDragLeaveEvent( TQDragLeaveEvent* ) {
if( m_useAutoOpenTimer ) {
m_autoOpenTimer.stop();
m_dropItem = 0L;
}
}
//-----------------------------------------------
-void KFileDnDIconView::contentsDropEvent( QDropEvent* e ) {
+void KFileDnDIconView::contentsDropEvent( TQDropEvent* e ) {
if( m_useAutoOpenTimer ) {
m_autoOpenTimer.stop();
m_dropItem = 0L;
@@ -140,22 +140,22 @@ void KFileDnDIconView::startDrag(){
dragObject()->dragCopy(); // start the drag
}
//-----------------------------------------------
-QDragObject* KFileDnDIconView::dragObject() {
+TQDragObject* KFileDnDIconView::dragObject() {
// create a list of the URL:s that we want to drag
KURL::List urls;
KFileItemListIterator it( * KFileView::selectedItems() );
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", iconSize() );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( iconSize() );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = KURLDrag::newDrag( urls, widget() );
+ TQDragObject* myDragObject = KURLDrag::newDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -168,9 +168,9 @@ void KFileDnDIconView::setAutoOpenTime( const int& time ){
void KFileDnDIconView::useAutoOpenTimer( bool use ){
m_useAutoOpenTimer = use;
if ( use )
- connect( &m_autoOpenTimer, SIGNAL( timeout() ),this, SLOT( slotOpenFolder() ) );
+ connect( &m_autoOpenTimer, TQT_SIGNAL( timeout() ),this, TQT_SLOT( slotOpenFolder() ) );
else {
- disconnect( &m_autoOpenTimer, SIGNAL( timeout() ),this, SLOT( slotOpenFolder() ) );
+ disconnect( &m_autoOpenTimer, TQT_SIGNAL( timeout() ),this, TQT_SLOT( slotOpenFolder() ) );
m_dropItem = 0L;
m_autoOpenTimer.stop();
}
@@ -182,11 +182,11 @@ void KFileDnDIconView::setDnDEnabled( bool useDnD ){
viewport()->setAcceptDrops( useDnD );
}
//-----------------------------------------------
-bool KFileDnDIconView::acceptDrag(QDropEvent* e ) const {
+bool KFileDnDIconView::acceptDrag(TQDropEvent* e ) const {
return KURLDrag::canDecode( e ) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
//-----------------------------------------------
#ifndef NO_INCLUDE_MOCFILES