• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KFile

kurlnavigatormenu.cpp

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2009 by Rahman Duran <rahman.duran@gmail.com>             
00003                                                                           
00004    This library is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU Library General Public License as published
00006    by the Free Software Foundation; either version 2 of the License or      
00007    ( at your option ) version 3 or, at the discretion of KDE e.V.           
00008    ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of 
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.                 
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to     
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,     
00018    Boston, MA 02110-1301, USA.  
00019 */
00020 
00021 
00022 #include "kurlnavigatormenu_p.h"
00023 
00024 #include <QtGui/QKeyEvent>
00025 
00026 
00027 KUrlNavigatorMenu::KUrlNavigatorMenu(QWidget* parent) :
00028     KMenu(parent)
00029 {
00030     setAcceptDrops(true);
00031 }
00032 
00033 KUrlNavigatorMenu::~KUrlNavigatorMenu()
00034 {
00035 }
00036 
00037 void KUrlNavigatorMenu::dragEnterEvent(QDragEnterEvent* event)
00038 {
00039     if (event->mimeData()->hasUrls()) {
00040         event->acceptProposedAction();        
00041     }   
00042 }
00043 
00044 void KUrlNavigatorMenu::dragMoveEvent(QDragMoveEvent* event)
00045 {      
00046       QMouseEvent mouseEvent(QMouseEvent(QEvent::MouseMove, event->pos(), 
00047           Qt::LeftButton, event->mouseButtons(), event->keyboardModifiers()));
00048       mouseMoveEvent(&mouseEvent);
00049 }
00050 
00051 void KUrlNavigatorMenu::dropEvent(QDropEvent* event)
00052 {
00053     QAction* action = actionAt(event->pos());
00054     if (action != 0) {
00055         emit urlsDropped(action, event);
00056     }
00057 }
00058 
00059 #include "kurlnavigatormenu_p.moc"

KFile

Skip menu "KFile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal