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

marble

  • sources
  • kde-4.14
  • 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  explicit ProgressFloatItem( const MarbleModel *marbleModel = 0 );
38  ~ProgressFloatItem ();
39 
40  QStringList backendTypes() const;
41 
42  QString name() const;
43 
44  QString guiString() const;
45 
46  QString nameId() const;
47 
48  QString version() const;
49 
50  QString description() const;
51 
52  QString copyrightYears() const;
53 
54  QList<PluginAuthor> pluginAuthors() const;
55 
56  QIcon icon () const;
57 
58  void initialize ();
59 
60  bool isInitialized () const;
61 
62  QPainterPath backgroundShape() const;
63 
64  void paintContent( QPainter *painter );
65 
66 private Q_SLOTS:
67  void removeProgressItem();
68 
69  void handleProgress( int active, int queued );
70 
71  void hideProgress();
72 
73  void show();
74 
75  void scheduleRepaint();
76 
77  private:
78  Q_DISABLE_COPY( ProgressFloatItem )
79 
80  bool active() const;
81 
82  void setActive( bool active );
83 
84  bool m_isInitialized;
85 
86  int m_totalJobs;
87 
88  int m_completedJobs;
89 
90  qreal m_completed;
91 
92  QTimer m_progressHideTimer;
93 
94  QTimer m_progressShowTimer;
95 
96  QMutex m_jobMutex;
97 
98  bool m_active;
99 
100  QIcon m_icon;
101 
102  int m_fontSize;
103 
104  QTimer m_repaintTimer;
105 };
106 
107 }
108 
109 #endif
110 
Marble::ProgressFloatItem::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: ProgressFloatItem.cpp:91
QMutex
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:153
Marble::ProgressFloatItem::description
QString description() const
Returns a user description of the plugin.
Definition: ProgressFloatItem.cpp:106
AbstractFloatItem.h
Marble::ProgressFloatItem::copyrightYears
QString copyrightYears() const
Definition: ProgressFloatItem.cpp:111
Marble::ProgressFloatItem::~ProgressFloatItem
~ProgressFloatItem()
Definition: ProgressFloatItem.cpp:76
QTimer
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:81
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:45
Marble::ProgressFloatItem::initialize
void initialize()
Definition: ProgressFloatItem.cpp:128
QPainter
Marble::ProgressFloatItem::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: ProgressFloatItem.cpp:123
QString
QList
QStringList
Marble::ProgressFloatItem::ProgressFloatItem
ProgressFloatItem(const MarbleModel *marbleModel=0)
Definition: ProgressFloatItem.cpp:30
Marble::ProgressFloatItem::version
QString version() const
Definition: ProgressFloatItem.cpp:101
Marble::ProgressFloatItem::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: ProgressFloatItem.cpp:96
Marble::ProgressFloatItem::paintContent
void paintContent(QPainter *painter)
Here the items paint their content.
Definition: ProgressFloatItem.cpp:168
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QPainterPath
Marble::ProgressFloatItem::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: ProgressFloatItem.cpp:116
Marble::ProgressFloatItem::name
QString name() const
Returns the user-visible name of the plugin.
Definition: ProgressFloatItem.cpp:86
Marble::RenderPlugin::marbleModel
const MarbleModel * marbleModel() const
Access to the MarbleModel.
Definition: RenderPlugin.cpp:83
Marble::ProgressFloatItem::isInitialized
bool isInitialized() const
Definition: ProgressFloatItem.cpp:148
QIcon
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:340
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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
  • 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