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

rocs/VisualEditor

  • sources
  • kde-4.14
  • kdeedu
  • rocs
  • VisualEditor
  • Interface
model_GraphProperties.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2008 Tomaz Canabrava <tomaz.canabrava@gmail.com>
4  Copyright 2008 Ugo Sangiori <ugorox@gmail.com>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation; either version 2 of
9  the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef MODEL_GRAPHPROPERTIES_H
21 #define MODEL_GRAPHPROPERTIES_H
22 
23 #include <QObject>
24 #include <QAbstractTableModel>
25 #include <QMetaObject>
26 #include <QModelIndex>
27 #include <QVariant>
28 
29 class GraphPropertiesModel : public QAbstractTableModel
30 {
31  Q_OBJECT
32 public:
35  explicit GraphPropertiesModel(QObject *parent = 0);
36 
40  int rowCount(const QModelIndex &parent = QModelIndex()) const;
41 
45  int columnCount(const QModelIndex & parent = QModelIndex()) const;
46 
51  QVariant data(const QModelIndex &index, int role) const;
52 
58  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
59 
60  Qt::ItemFlags flags(const QModelIndex & index) const;
61 
64  void setDataSource(QObject *dataSource);
65 
66  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
67 
69  void addDynamicProperty(QString name, QVariant value, QObject *obj);
70 
71 private:
72  QObject *_dataSource;
73  const QMetaObject *_metaObject;
74 };
75 
76 #endif
QModelIndex
GraphPropertiesModel::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: model_GraphProperties.cpp:138
QAbstractTableModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
GraphPropertiesModel::GraphPropertiesModel
GraphPropertiesModel(QObject *parent=0)
Definition: model_GraphProperties.cpp:27
QAbstractTableModel
QObject::name
const char * name() const
GraphPropertiesModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: model_GraphProperties.cpp:34
QMetaObject
QObject
GraphPropertiesModel
Definition: model_GraphProperties.h:29
GraphPropertiesModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: model_GraphProperties.cpp:79
QString
GraphPropertiesModel::setDataSource
void setDataSource(QObject *dataSource)
Definition: model_GraphProperties.cpp:95
GraphPropertiesModel::addDynamicProperty
void addDynamicProperty(QString name, QVariant value, QObject *obj)
Add properti to data source and insert a new row,.
Definition: model_GraphProperties.cpp:170
GraphPropertiesModel::data
QVariant data(const QModelIndex &index, int role) const
Definition: model_GraphProperties.cpp:51
GraphPropertiesModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: model_GraphProperties.cpp:126
QObject::parent
QObject * parent() const
GraphPropertiesModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: model_GraphProperties.cpp:45
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:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/VisualEditor

Skip menu "rocs/VisualEditor"
  • Main Page
  • 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