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

marble

  • kde-4.x
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • routing
SpeakersModel.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 2012 Dennis Nienhüser <[email protected]>
9 //
10 
11 #ifndef MARBLE_SPEAKERSMODEL_H
12 #define MARBLE_SPEAKERSMODEL_H
13 
14 #include "marble_export.h"
15 
16 #include <QAbstractListModel>
17 
18 namespace Marble
19 {
20 
21 class SpeakersModelPrivate;
22 
23 class MARBLE_EXPORT SpeakersModel : public QAbstractListModel
24 {
25  Q_OBJECT
26 
27  Q_PROPERTY(int count READ count NOTIFY countChanged)
28 
29 public:
30  enum SpeakersModelRoles {
31  Name = Qt::UserRole + 1,
32  Path,
33  IsLocal,
34  IsRemote
35  };
36 
38  explicit SpeakersModel( QObject *parent = nullptr );
39 
41  ~SpeakersModel() override;
42 
44  int rowCount ( const QModelIndex &parent = QModelIndex() ) const override;
45 
47  QVariant data ( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
48 
50  QHash<int, QByteArray> roleNames() const override;
51 
53  int count() const;
54 
55 public Q_SLOTS:
56  int indexOf( const QString &name );
57 
58  QString path( int index );
59 
60  void install( int index );
61 
62  bool isLocal( int index ) const;
63 
64  bool isRemote( int index ) const;
65 
66 Q_SIGNALS:
67  void countChanged();
68 
69  void installationProgressed( int newstuffindex, qreal progress );
70 
71  void installationFinished( int index );
72 
73 private:
74  SpeakersModelPrivate* const d;
75  friend class SpeakersModelPrivate;
76 
77  Q_PRIVATE_SLOT( d, void fillModel() )
78 
79  Q_PRIVATE_SLOT( d, void handleInstallationProgress( int row, qreal progress ) )
80 
81  Q_PRIVATE_SLOT( d, void handleInstallation( int row ) )
82 };
83 
84 }
85 
86 #endif // MARBLE_SPEAKERSMODEL_H
Marble::SpeakersModel::Path
Definition: SpeakersModel.h:32
QModelIndex
Marble::SpeakersModel
Definition: SpeakersModel.h:23
QHash< int, QByteArray >
QObject
Marble::SpeakersModel::IsLocal
Definition: SpeakersModel.h:33
QAbstractListModel
Marble::SpeakersModel::SpeakersModelRoles
SpeakersModelRoles
Definition: SpeakersModel.h:30
QString
Marble::Name
Definition: OsmRelationManagerWidget.h:29
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sat Dec 7 2019 02:41:22 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
  •   KmPlot
  • libkeduvocdocument
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   src
  •   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