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

filelight

  • sources
  • kde-4.12
  • kdeutils
  • filelight
  • src
  • part
  • radialMap
widget.h
Go to the documentation of this file.
1 /***********************************************************************
2 * Copyright 2003-2004 Max Howell <max.howell@methylblue.com>
3 * Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License or (at your option) version 3 or any later version
9 * accepted by the membership of KDE e.V. (or its successor approved
10 * by the membership of KDE e.V.), which shall act as a proxy
11 * defined in Section 14 of version 3 of the license.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 
22 #ifndef WIDGET_H
23 #define WIDGET_H
24 
25 #include <KJob>
26 #include <KUrl>
27 
28 #include <QtGui/QDragEnterEvent>
29 #include <QtGui/QDropEvent>
30 #include <QtGui/QMouseEvent>
31 #include <QtGui/QPaintEvent>
32 #include <QtGui/QResizeEvent>
33 #include <QtGui/QWidget>
34 #include <QtCore/QTimer>
35 
36 #include "map.h"
37 
38 template <class T> class Chain;
39 class Folder;
40 class File;
41 namespace KIO {
42 class Job;
43 }
44 class KUrl;
45 
46 namespace RadialMap
47 {
48 class Segment;
49 
50 class Widget : public QWidget
51 {
52  Q_OBJECT
53 
54 public:
55  explicit Widget(QWidget* = 0, bool = false);
56  virtual ~Widget();
57  QString path() const;
58  KUrl url(File const * const = 0) const;
59 
60  bool isValid() const {
61  return m_tree != 0;
62  }
63 
64  bool isSummary() const {
65  return m_isSummary;
66  }
67 
68  friend class Label; //FIXME badness
69 
70 public slots:
71  void zoomIn();
72  void zoomOut();
73  void create(const Folder*);
74  void invalidate();
75  void refresh(int);
76 
77 private slots:
78  void resizeTimeout();
79  void sendFakeMouseEvent();
80  void deleteJobFinished(KJob*);
81  void createFromCache(const Folder*);
82 
83 signals:
84  void activated(const KUrl&);
85  void invalidated(const KUrl&);
86  void created(const Folder*);
87  void mouseHover(const QString&);
88  void giveMeTreeFor(const KUrl&);
89 
90 protected:
91  virtual void changeEvent(QEvent*);
92  virtual void dragEnterEvent(QDragEnterEvent*);
93  virtual void dropEvent(QDropEvent*);
94  virtual void mouseMoveEvent(QMouseEvent*);
95  virtual void mousePressEvent(QMouseEvent*);
96  virtual void paintEvent(QPaintEvent*);
97  virtual void resizeEvent(QResizeEvent*);
98  virtual void enterEvent(QEvent*);
99 
100 protected:
101  const Segment *segmentAt(QPoint&) const; //FIXME const reference for a library others can use
102  const Segment *rootSegment() const {
103  return m_rootSegment;
104  }
105  const Segment *focusSegment() const {
106  return m_focus;
107  }
108 
109 private:
110  void paintExplodedLabels(QPainter&) const;
111 
112  const Folder *m_tree;
113  const Segment *m_focus;
114  QPoint m_offset;
115  QTimer m_timer;
116  Map m_map;
117  Segment *m_rootSegment;
118  const bool m_isSummary;
119  const Segment *m_toBeDeleted;
120 };
121 }
122 
123 #endif
RadialMap::Widget::changeEvent
virtual void changeEvent(QEvent *)
Definition: widgetEvents.cpp:322
RadialMap::Widget::Widget
Widget(QWidget *=0, bool=false)
Definition: widget.cpp:39
RadialMap::Widget::created
void created(const Folder *)
RadialMap::Widget::refresh
void refresh(int)
Definition: widget.cpp:155
RadialMap::Widget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *)
Definition: widgetEvents.cpp:193
RadialMap::Widget::invalidate
void invalidate()
Definition: widget.cpp:75
RadialMap::Widget::zoomOut
void zoomOut()
Definition: widget.cpp:199
QWidget
RadialMap::Widget::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *)
Definition: widgetEvents.cpp:136
RadialMap::Widget
Definition: widget.h:50
RadialMap::Widget::enterEvent
virtual void enterEvent(QEvent *)
Definition: widgetEvents.cpp:184
RadialMap::Widget::~Widget
virtual ~Widget()
Definition: widget.cpp:56
RadialMap::Widget::dragEnterEvent
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: widgetEvents.cpp:316
RadialMap::Widget::resizeEvent
virtual void resizeEvent(QResizeEvent *)
Definition: widgetEvents.cpp:54
RadialMap::Widget::path
QString path() const
Definition: widget.cpp:63
RadialMap::Map
Definition: map.h:36
RadialMap::Widget::mouseHover
void mouseHover(const QString &)
Folder
Definition: fileTree.h:271
RadialMap::Widget::segmentAt
const Segment * segmentAt(QPoint &) const
Definition: widgetEvents.cpp:90
RadialMap::Widget::focusSegment
const Segment * focusSegment() const
Definition: widget.h:105
RadialMap::Widget::isValid
bool isValid() const
Definition: widget.h:60
RadialMap::Widget::isSummary
bool isSummary() const
Definition: widget.h:64
RadialMap::Widget::invalidated
void invalidated(const KUrl &)
RadialMap::Widget::create
void create(const Folder *)
Definition: widget.cpp:103
RadialMap::Widget::rootSegment
const Segment * rootSegment() const
Definition: widget.h:102
RadialMap::Widget::paintEvent
virtual void paintEvent(QPaintEvent *)
Definition: widgetEvents.cpp:65
RadialMap::Widget::giveMeTreeFor
void giveMeTreeFor(const KUrl &)
RadialMap::Widget::activated
void activated(const KUrl &)
Chain
Definition: fileTree.h:40
RadialMap::Widget::Label
friend class Label
Definition: widget.h:68
map.h
RadialMap::Widget::url
KUrl url(File const *const =0) const
Definition: widget.cpp:69
RadialMap::Widget::dropEvent
virtual void dropEvent(QDropEvent *)
Definition: widgetEvents.cpp:309
RadialMap::Widget::zoomIn
void zoomIn()
Definition: widget.cpp:186
RadialMap::Segment
Definition: radialMap.h:31
File
Definition: fileTree.h:225
Filelight::m_map
http QObject const QList< QVariant > m_map(0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:08:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

filelight

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

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