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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • collection
readonlycontainermodel.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2007-2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
4 
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef READONLYCONTAINERMODEL_H
17 #define READONLYCONTAINERMODEL_H
18 
19 #include <QAbstractItemModel>
20 #include <QModelIndex>
21 
22 #include <QObject>
23 
24 #include <keduvocdocument.h>
25 #include <keduvoclesson.h>
26 
33 class ReadonlyContainerModel : public QAbstractItemModel
34 {
35  Q_OBJECT
36 
37 public:
38  explicit ReadonlyContainerModel(KEduVocContainer::EnumContainerType type, QObject *parent = 0);
39 
40  virtual QVariant data(const QModelIndex &index, int role) const;
41  virtual Qt::ItemFlags flags(const QModelIndex &index) const;
42 
43  virtual QModelIndex index(int row, int column,
44  const QModelIndex &parent = QModelIndex()) const;
45 
46  QModelIndex index(KEduVocContainer* container) const;
47 
48  virtual QModelIndex parent(const QModelIndex &index) const;
49  virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
50  virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
51 
52  KEduVocContainer::EnumContainerType containerType();
53 
54 public slots:
57  void setDocument(KEduVocDocument *doc);
58 
59 protected:
60  virtual KEduVocContainer *rootContainer() const = 0;
61  KEduVocContainer::EnumContainerType m_type;
62  KEduVocDocument *m_doc;
63 };
64 
65 
66 #endif
ReadonlyContainerModel
Model for the tree of containers (lessons, word types).
Definition: readonlycontainermodel.h:33
QModelIndex
ReadonlyContainerModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: readonlycontainermodel.cpp:108
ReadonlyContainerModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: readonlycontainermodel.cpp:49
ReadonlyContainerModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: readonlycontainermodel.cpp:127
QObject
ReadonlyContainerModel::m_doc
KEduVocDocument * m_doc
Definition: readonlycontainermodel.h:62
ReadonlyContainerModel::flags
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: readonlycontainermodel.cpp:152
ReadonlyContainerModel::columnCount
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: readonlycontainermodel.cpp:169
ReadonlyContainerModel::setDocument
void setDocument(KEduVocDocument *doc)
Set the new source kvtml file.
Definition: readonlycontainermodel.cpp:43
QAbstractItemModel
ReadonlyContainerModel::rootContainer
virtual KEduVocContainer * rootContainer() const =0
QObject::parent
QObject * parent() const
ReadonlyContainerModel::m_type
KEduVocContainer::EnumContainerType m_type
Definition: readonlycontainermodel.h:61
ReadonlyContainerModel::ReadonlyContainerModel
ReadonlyContainerModel(KEduVocContainer::EnumContainerType type, QObject *parent=0)
Definition: readonlycontainermodel.cpp:36
ReadonlyContainerModel::containerType
KEduVocContainer::EnumContainerType containerType()
Definition: readonlycontainermodel.cpp:179
QVariant
Qt::ItemFlags
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • 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