Developer documentation | Axl-2.5.1

axlAbstractData.h
Go to the documentation of this file.
1 /* axlAbstractData.h ---
2  *
3  * Author: Bernard Mourrain
4  * Copyright (C) 2011 - Bernard Mourrain, Inria.
5  * Created: Tue Nov 11 16:58:59 2011 (+0100)
6  * Version: $Id$
7  * Last-Updated: Mon Dec 6 15:32:45 2010 (+0100)
8  * By: Meriadeg Perrinel
9  * Update #: 22
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLABSTRACTDATA_H
21 #define AXLABSTRACTDATA_H
22 
23 #include "axlCoreExport.h"
24 
25 #include <dtkCoreSupport/dtkAbstractData.h>
26 
27 #include <QtCore>
28 
29 class axlAbstractDataPrivate;
30 class axlAbstractField;
31 class axlMesh;
32 
33 class AXLCORE_EXPORT axlAbstractData : public dtkAbstractData
34 {
35  Q_OBJECT
36  Q_PROPERTY(QColor color READ color WRITE setColor )
37  Q_PROPERTY(double opacity READ opacity WRITE setOpacity )
38  Q_PROPERTY(double size READ size WRITE setSize )
39  Q_PROPERTY(QString shader READ shader WRITE setShader )
40 
41 public:
42  axlAbstractData(axlAbstractData* parent = NULL);
43  axlAbstractData(const axlAbstractData &data);
44  virtual ~axlAbstractData(void);
45 
46 signals:
47  void modifiedGeometry(void);
48  void modifiedStructure(void);
49  void modifiedField(void);
50  void modifiedProperty(void);
51 
52 public slots:
53  void touchGeometry(void);
54  void touchProperty(void);
55  void touchStructure(void);
56  virtual void touchField(void);
57 
58 public:
59  const QColor& color(void) const;
60  const double& opacity(void) const;
61  const double& size(void) const;
62  const QString& shader(void) const;
63  const bool &editable(void);
64  const bool& updateView(void);
65 
66  void setColor(double r, double g, double b);
67 
68 public slots:
69  void setColor(const QColor& color);
70  void setOpacity(const double& opacity);
71  void setSize(const double& size);
72  void setShader(const QString& shader);
73  void setEditable(bool edit);
74 
75 public:
76  void addField(axlAbstractField *field);
77  bool updateFieldList(QString nameField);
78  QString changeFieldName(QString fieldName);
79  axlMesh *mesh(void);
80  void setMesh(axlMesh* mesh);
81  virtual QVariantList convertDataToQVariant(void) const;
82  virtual int convertQVariantToData(const QVariantList &data);
83  void setUpdateView(bool updateView);
84 
85 public:
86  QList<axlAbstractField *> fields(void);
87 
88 private:
89  axlAbstractDataPrivate *d;
90 };
91 
93 #endif
Q_DECLARE_METATYPE(axlAbstractData)
Class axlAbstractField defines an API for arrays of numeric data.
#define AXLCORE_EXPORT
Class axlAbstractData defines an API for all type of axel data.
Class axlMesh defines a piecewise-linear 3D object.
Definition: axlMesh.h:41