• 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
  • lib
  • marble
TreeViewDecoratorModel.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 2014 Levente Kurusa <levex@linux.com>
9 
10 #ifndef TREEVIEWDECORATORMODEL_H
11 #define TREEVIEWDECORATORMODEL_H
12 
13 #include "GeoDataTreeModel.h"
14 
15 #include <QSortFilterProxyModel>
16 #include <QWidget>
17 #include <QVector>
18 
19 namespace Marble
20 {
21 
22 
23 class TreeViewDecoratorModel : public QSortFilterProxyModel
24 {
25  Q_OBJECT
26 
27 public slots:
28  void trackExpandedState( const QModelIndex &index );
29  void trackCollapsedState( const QModelIndex &index );
30 
31 public:
32  explicit TreeViewDecoratorModel( QObject *parent = 0 );
33  QVariant data( const QModelIndex & proxyIndex, int role = Qt::DisplayRole ) const;
34 
35 protected:
36  bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
37 
38 private:
39  QList<QPersistentModelIndex> m_expandedRows;
40 
41 };
42 
43 }
44 
45 #endif // TREEVIEWDECORATORMODEL_H
QSortFilterProxyModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QModelIndex
Marble::TreeViewDecoratorModel::data
QVariant data(const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const
Definition: TreeViewDecoratorModel.cpp:46
Marble::TreeViewDecoratorModel
Definition: TreeViewDecoratorModel.h:23
Marble::TreeViewDecoratorModel::trackCollapsedState
void trackCollapsedState(const QModelIndex &index)
Definition: TreeViewDecoratorModel.cpp:85
QObject
QList< QPersistentModelIndex >
GeoDataTreeModel.h
QSortFilterProxyModel
Marble::TreeViewDecoratorModel::TreeViewDecoratorModel
TreeViewDecoratorModel(QObject *parent=0)
Definition: TreeViewDecoratorModel.cpp:23
Marble::TreeViewDecoratorModel::filterAcceptsRow
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Definition: TreeViewDecoratorModel.cpp:29
QObject::parent
QObject * parent() const
Marble::TreeViewDecoratorModel::trackExpandedState
void trackExpandedState(const QModelIndex &index)
Definition: TreeViewDecoratorModel.cpp:80
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 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