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

Analitza

  • sources
  • kde-4.12
  • kdeedu
  • analitza
  • analitzaplot
plotsmodel.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2007-2009 by Aleix Pol <aleixpol@kde.org> *
3  * Copyright (C) 2010-2012 by Percy Camilo T. Aucahuasi <percy.camilo.ta@gmail.com> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License *
7  * as published by the Free Software Foundation; either version 2 *
8  * of the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the Free Software *
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
18  *************************************************************************************/
19 
20 #ifndef PLOTSMODEL_H
21 #define PLOTSMODEL_H
22 
23 #include <QAbstractListModel>
24 
25 #include "analitzaplot/analitzaplotexport.h"
26 
27 namespace Analitza
28 {
29 class PlotItem;
30 
42 class ANALITZAPLOT_EXPORT PlotsModel : public QAbstractListModel
43 {
44 Q_OBJECT
45 friend class PlotItem;
46 public:
47  enum Roles {
48  DimensionRole = Qt::UserRole+1,
49  PlotRole
50  };
51 
52  PlotsModel(QObject * parent = 0);
53  virtual ~PlotsModel();
54 
55  virtual Qt::ItemFlags flags(const QModelIndex & index) const;
56  virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
57  virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
58  virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); // only title and check=visible
59  virtual int rowCount(const QModelIndex & parent = QModelIndex()) const;
60  virtual int columnCount(const QModelIndex& parent) const;
61  virtual bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
62 
63  void addPlot(PlotItem *it);
64  void updatePlot(int row, PlotItem* it);
65 
67  QString freeId() const;
68 
69  QModelIndex indexForName(const QString& name);
70  Q_SCRIPTABLE void clear();
71 
72  void setResolution(int res);
73 
74 protected:
75  void emitChanged(PlotItem* it);
76 
77 private:
78  QList<PlotItem*> m_items;
79  int m_resolution;
80  int m_namingCount;
81 };
82 
83 }
84 
85 #endif // PLOTSMODEL_H
analitzaplotexport.h
Analitza::PlotItem
Represents a visual item.
Definition: plotitem.h:45
QAbstractListModel
Analitza::PlotsModel
Collection of many instances of PlotItem.
Definition: plotsmodel.h:42
Analitza::PlotsModel::Roles
Roles
Definition: plotsmodel.h:47
ANALITZAPLOT_EXPORT
#define ANALITZAPLOT_EXPORT
Definition: analitzaplotexport.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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