• 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
  • 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 <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_SPEAKERSMODEL_H
12 #define MARBLE_SPEAKERSMODEL_H
13 
14 #include "marble_export.h"
15 
16 #include <QAbstractListModel>
17 #include <QFileInfo>
18 
19 namespace Marble
20 {
21 
22 class SpeakersModelPrivate;
23 
24 class MARBLE_EXPORT SpeakersModel : public QAbstractListModel
25 {
26  Q_OBJECT
27 
28  Q_PROPERTY(int count READ count NOTIFY countChanged)
29 
30 public:
31  enum SpeakersModelRoles {
32  Name = Qt::UserRole + 1,
33  Path,
34  IsLocal,
35  IsRemote
36  };
37 
39  explicit SpeakersModel( QObject *parent = 0 );
40 
42  ~SpeakersModel();
43 
45  int rowCount ( const QModelIndex &parent = QModelIndex() ) const;
46 
48  QVariant data ( const QModelIndex &index, int role = Qt::DisplayRole ) const;
49 
51  QHash<int, QByteArray> roleNames() const;
52 
54  int count();
55 
56 public Q_SLOTS:
57  int indexOf( const QString &name );
58 
59  QString path( int index );
60 
61  void install( int index );
62 
63  bool isLocal( int index ) const;
64 
65  bool isRemote( int index ) const;
66 
67 Q_SIGNALS:
68  void countChanged();
69 
70  void installationProgressed( int newstuffindex, qreal progress );
71 
72  void installationFinished( int index );
73 
74 private:
75  SpeakersModelPrivate* const d;
76  friend class SpeakersModelPrivate;
77 
78  Q_PRIVATE_SLOT( d, void fillModel() )
79 
80  Q_PRIVATE_SLOT( d, void handleInstallationProgress( int row, qreal progress ) )
81 
82  Q_PRIVATE_SLOT( d, void handleInstallation( int row ) )
83 };
84 
85 }
86 
87 #endif // MARBLE_SPEAKERSMODEL_H
Marble::SpeakersModel::Path
Definition: SpeakersModel.h:33
Marble::SpeakersModel
Definition: SpeakersModel.h:24
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::SpeakersModel::IsLocal
Definition: SpeakersModel.h:34
Marble::SpeakersModel::SpeakersModelRoles
SpeakersModelRoles
Definition: SpeakersModel.h:31
marble_export.h
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