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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • progress
ProgressFloatItem.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef PROGRESS_FLOAT_ITEM_H
12 #define PROGRESS_FLOAT_ITEM_H
13 
14 #include "AbstractFloatItem.h"
15 
16 #include <QMutex>
17 #include <QObject>
18 #include <QTimer>
19 
20 namespace Marble
21 {
22 
27 class ProgressFloatItem : public AbstractFloatItem
28 {
29  Q_OBJECT
30  Q_PLUGIN_METADATA( IID "org.kde.edu.marble.ProgressFloatItem" )
31 
32  Q_INTERFACES( Marble::RenderPluginInterface )
33 
34  MARBLE_PLUGIN( ProgressFloatItem )
35 
36  public:
37  ProgressFloatItem();
38  explicit ProgressFloatItem( const MarbleModel *marbleModel );
39  ~ProgressFloatItem ();
40 
41  QStringList backendTypes() const;
42 
43  QString name() const;
44 
45  QString guiString() const;
46 
47  QString nameId() const;
48 
49  QString version() const;
50 
51  QString description() const;
52 
53  QString copyrightYears() const;
54 
55  QList<PluginAuthor> pluginAuthors() const;
56 
57  QIcon icon () const;
58 
59  void initialize ();
60 
61  bool isInitialized () const;
62 
63  QPainterPath backgroundShape() const;
64 
65  void paintContent( QPainter *painter );
66 
67  bool eventFilter(QObject *object, QEvent *e);
68 
69 private Q_SLOTS:
70  void removeProgressItem();
71 
72  void handleProgress( int active, int queued );
73 
74  void hideProgress();
75 
76  void show();
77 
78  void scheduleRepaint();
79 
80  private:
81  Q_DISABLE_COPY( ProgressFloatItem )
82 
83  bool active() const;
84 
85  void setActive( bool active );
86 
87  bool m_isInitialized;
88 
89  int m_totalJobs;
90 
91  int m_completedJobs;
92 
93  qreal m_completed;
94 
95  QTimer m_progressHideTimer;
96 
97  QTimer m_progressShowTimer;
98 
99  QMutex m_jobMutex;
100 
101  bool m_active;
102 
103  QIcon m_icon;
104 
105  int m_fontSize;
106 
107  QTimer m_repaintTimer;
108 };
109 
110 }
111 
112 #endif
113 
Marble::ProgressFloatItem::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: ProgressFloatItem.cpp:96
QPainter
Marble::RenderPluginInterface
The class that specifies the Marble layer interface of a plugin.
Definition: RenderPluginInterface.h:30
Marble::ProgressFloatItem
A float item that shows a pie-chart progress indicator when downloads are active. ...
Definition: ProgressFloatItem.h:27
Marble::ProgressFloatItem::backgroundShape
QPainterPath backgroundShape() const
Returns the shape of the background.
Definition: ProgressFloatItem.cpp:158
Marble::ProgressFloatItem::description
QString description() const
Returns a user description of the plugin.
Definition: ProgressFloatItem.cpp:111
AbstractFloatItem.h
Marble::ProgressFloatItem::copyrightYears
QString copyrightYears() const
Definition: ProgressFloatItem.cpp:116
Marble::ProgressFloatItem::~ProgressFloatItem
~ProgressFloatItem()
Definition: ProgressFloatItem.cpp:81
QObject
Marble::ProgressFloatItem::eventFilter
bool eventFilter(QObject *object, QEvent *e)
Definition: ProgressFloatItem.cpp:211
Marble::ProgressFloatItem::backendTypes
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: ProgressFloatItem.cpp:86
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:48
Marble::ProgressFloatItem::initialize
void initialize()
Definition: ProgressFloatItem.cpp:133
Marble::ProgressFloatItem::ProgressFloatItem
ProgressFloatItem()
Definition: ProgressFloatItem.cpp:30
Marble::ProgressFloatItem::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: ProgressFloatItem.cpp:128
Marble::ProgressFloatItem::version
QString version() const
Definition: ProgressFloatItem.cpp:106
Marble::ProgressFloatItem::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: ProgressFloatItem.cpp:101
Marble::ProgressFloatItem::paintContent
void paintContent(QPainter *painter)
Here the items paint their content.
Definition: ProgressFloatItem.cpp:173
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
Marble::ProgressFloatItem::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: ProgressFloatItem.cpp:121
Marble::ProgressFloatItem::name
QString name() const
Returns the user-visible name of the plugin.
Definition: ProgressFloatItem.cpp:91
Marble::RenderPlugin::marbleModel
const MarbleModel * marbleModel() const
Access to the MarbleModel.
Definition: RenderPlugin.cpp:81
Marble::ProgressFloatItem::isInitialized
bool isInitialized() const
Definition: ProgressFloatItem.cpp:153
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:337
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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