• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • ui
droptarget.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright (C) 2002 Patrick Charbonnier <pch@freeshell.org>
4  Based On Caitoo v.0.7.3 (c) 1998 - 2000, Matej Koss
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 */
11 
12 #ifndef DROPTARGET_H
13 #define DROPTARGET_H
14 
15 #include <QWidget>
16 #include <QDragEnterEvent>
17 #include <QMouseEvent>
18 #include <QDropEvent>
19 #include <QCloseEvent>
20 
21 #include "core/transfer.h"
22 
23 class QAction;
24 class QTimer;
25 class KMenu;
26 
27 class MainWindow;
28 class DropTargetModelObserver;
29 class DropTargetGroupObserver;
30 class DropTargetTransferObserver;
31 
32 class DropTarget : public QWidget
33 {
34 Q_OBJECT
35 
36 public:
37  DropTarget(MainWindow * parent);
38  ~DropTarget();
39 
40  void playAnimationShow();
41  void playAnimationHide();
42  void playAnimationSync();
43  void setDropTargetVisible( bool shown, bool internal = true );
44 
45 protected:
46  // drag and drop
47  void dragEnterEvent(QDragEnterEvent *);
48  void dropEvent(QDropEvent *);
49 
50  // handle quit events as hide events
51  void closeEvent( QCloseEvent * );
52 
53  void mousePressEvent(QMouseEvent * e);
54  void mouseReleaseEvent(QMouseEvent * e);
55  void mouseDoubleClickEvent(QMouseEvent * e);
56  void mouseMoveEvent(QMouseEvent * e);
57  void enterEvent(QEvent * event);
58  void leaveEvent(QEvent * event);
59 
60  // paint the drop target
61  void paintEvent(QPaintEvent*);
62 
63 private slots:
64  void toggleSticky();
65  void toggleMinimizeRestore();
66  void slotStartStopToggled( bool );
67  void slotAnimateShow();
68  void slotAnimateHide();
69  void slotAnimateSync();
70  void slotToolTipUpdate();
71  void slotToolTipTimer();
72  void slotClose();
73 
74 private:
75  KMenu * popupMenu;
76  MainWindow * parentWidget;
77  QTimer * animTimer;
78  QTimer * popupTimer;
79  QPixmap cachedPixmap;
80 
81  QAction * pop_sticky;
82  QAction * pop_show;
83 
84  QPoint position;
85 
86  QString tooltipText;
87 
88  int dx;
89  int dy;
90  bool isdragging;
91  bool showInformation;
92 
93  float ani_y, ani_vy;
94 };
95 
96 #endif // _DROPTARGET_H
DropTarget::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *e)
Definition: droptarget.cpp:308
DropTarget::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e)
Definition: droptarget.cpp:297
DropTarget::enterEvent
void enterEvent(QEvent *event)
Definition: droptarget.cpp:318
QWidget
DropTarget::paintEvent
void paintEvent(QPaintEvent *)
Definition: droptarget.cpp:330
DropTarget::DropTarget
DropTarget(MainWindow *parent)
Definition: droptarget.cpp:43
DropTarget::dropEvent
void dropEvent(QDropEvent *)
Definition: droptarget.cpp:215
DropTarget::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *e)
Definition: droptarget.cpp:302
DropTarget::setDropTargetVisible
void setDropTargetVisible(bool shown, bool internal=true)
Definition: droptarget.cpp:128
DropTarget::~DropTarget
~DropTarget()
Definition: droptarget.cpp:118
DropTarget::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *)
widget events
Definition: droptarget.cpp:208
DropTarget
Definition: droptarget.h:32
DropTarget::playAnimationSync
void playAnimationSync()
Definition: droptarget.cpp:186
DropTarget::leaveEvent
void leaveEvent(QEvent *event)
Definition: droptarget.cpp:324
DropTarget::closeEvent
void closeEvent(QCloseEvent *)
Definition: droptarget.cpp:254
DropTarget::playAnimationShow
void playAnimationShow()
Definition: droptarget.cpp:157
transfer.h
DropTarget::mousePressEvent
void mousePressEvent(QMouseEvent *e)
Definition: droptarget.cpp:265
DropTarget::playAnimationHide
void playAnimationHide()
Definition: droptarget.cpp:173
MainWindow
The main window of KGet.
Definition: mainwindow.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal