22 #include "arrayitem.h" 23 #include "threeditem.h" 34 Type = UserType + Array3D
104 Array3DItem(
double x0 = 4,
double y0 = 3,
double width = 15,
105 double height = 10,
unsigned colorFrame = 0,
106 unsigned colorGrid = 0,
unsigned colorData = 0,
107 bool logX =
false,
bool logY =
false,
bool logZ =
false,
109 double xMax = 15,
double yMax = 10,
double zMax = 15,
112 double relSize = 1,
int colX = 0,
int colY = 1,
int colZ = 2,
113 int colErr = 0,
bool errorBars =
false,
115 int numDigX = -1,
int numDigY = -1,
int numDigZ = -1,
116 int minTicX = 5,
int minTicY = 2,
int minTicZ = 5,
int expX = 0,
117 int expY = 0,
int expZ = 0,
double xMin = 0,
double yMin = 0,
118 double zMin = 0,
double xTic = 5,
double yTic = 2,
119 double zTic = 5,
double deltaX = 0,
double deltaZ = 0,
120 double phi = 20,
double theta = -20,
double boxX = 7.5,
121 double boxY = 7.5,
double boxZ = 7.5,
double xRef = 7.5,
122 double yRef = 4,
double fx = 1,
double fy = 1,
double fz = 1,
123 int rowStart = 0,
int n = 0,
double smooth = 0,
124 const QUrl& url =
QUrl(),
bool showFrame =
true,
125 bool internal =
false,
bool collapsed =
false,
126 bool visible =
true);
146 Array3DItem(
const KConfigGroup* plo,
const QUrl& urlPlo,
double x0 = 4,
147 double y0 = 3,
double width = 15,
double height = 10,
148 unsigned colorFrame = 0,
unsigned colorGrid = 0,
149 unsigned colorData = 0,
GridMode gridMode = AxesWithLabels,
150 int colX = 0,
int colY = 1,
int colErr = 0,
151 bool errorBars =
false);
155 void calcTable()
const;
157 inline int colErr()
const {
return m_colErr; };
159 inline int colX()
const {
return m_colX; };
161 inline int colY()
const {
return m_colY; };
163 inline int colZ()
const {
return m_colZ; };
165 inline int count()
const {
return m_count; };
170 inline double***
data() {
return &m_data; };
173 {
return m_decimalCharacter; };
177 inline bool internal()
const {
return m_internal; };
179 inline int numCols()
const {
return m_numCols; };
181 inline int numRows()
const {
return m_numRows; };
186 inline int rowStart()
const {
return m_rowStart; };
191 inline void setColErr(
int colErr) { m_colErr = colErr; };
196 inline void setColX(
int colX) { m_colX = colX; };
201 inline void setColY(
int colY) { m_colY = colY; };
206 inline void setColZ(
int colZ) { m_colZ = colZ; };
218 { m_decimalCharacter = decimalCharacter; };
228 inline void setInternal(
bool internal) { m_internal =
internal; };
248 inline void setSmf(
double smooth) { m_smf = smooth; };
255 inline double smf()
const {
return m_smf; };
259 inline const QUrl&
url()
const {
return m_url; };
268 void writePlo(KConfigGroup* plo,
const QUrl& urlPlo,
bool absolute)
const;
271 bool m_internal, m_errorBars;
272 mutable bool errorBarso;
273 int m_colX, m_colY, m_colZ, m_colErr, m_rowStart, m_count, m_numRows,
276 mutable int colXo, colYo, colZo, colErro, rowStarto, counto;
void setRowStart(int rowStart)
Sets start row index.
Definition: array3ditem.h:243
void writePlo(KConfigGroup *plo) const
Writes into plot file.
void setColX(int colX)
Sets x column index.
Definition: array3ditem.h:196
GridMode
Grid mode.
Definition: frameitem.h:37
int count() const
Returns number of data points.
Definition: array3ditem.h:165
void setDecimalCharacter(ArrayItem::DecimalCharacter decimalCharacter)
Sets decimal character.
Definition: array3ditem.h:217
ArrayItem::DecimalCharacter decimalCharacter() const
Returns decimal symbol of floating point numbers.
Definition: array3ditem.h:172
double smf() const
Returns smoothing factor.
Definition: array3ditem.h:255
void setErrorBars(bool errorBars)
Sets error bars mode.
Definition: array3ditem.h:223
Mode3D
3D mode.
Definition: threeditem.h:34
virtual int type() const
Returns specific QGraphicsItem type number.
Definition: array3ditem.h:257
Specific QGraphicsItem type number of FrameItem for function type().
Definition: frameitem.h:46
void setInternal(bool internal)
Sets storage mode.
Definition: array3ditem.h:228
int rowStart() const
Returns start row index.
Definition: array3ditem.h:186
int colZ() const
Returns z column index.
Definition: array3ditem.h:163
DecimalCharacter
Decimal character.
Definition: arrayitem.h:43
int colErr() const
Returns y error column index.
Definition: array3ditem.h:157
void setNumRows(int nRows)
Sets number of rows.
Definition: array3ditem.h:238
int numRows() const
Returns number of rows.
Definition: array3ditem.h:181
bool errorBars() const
Returns true to use error bars.
Definition: array3ditem.h:175
int colY() const
Returns y column index.
Definition: array3ditem.h:161
void update()
Applies changes and forces redrawing.
void setSmf(double smooth)
Sets smoothing factor.
Definition: array3ditem.h:248
int colX() const
Returns x column index.
Definition: array3ditem.h:159
const QUrl & url() const
Returns URL of data file.
Definition: array3ditem.h:259
void setColErr(int colErr)
Sets error column index.
Definition: array3ditem.h:191
void setColZ(int colZ)
Sets z column index.
Definition: array3ditem.h:206
void setUrl(const QUrl &url)
Sets URL.
Definition: array3ditem.h:253
3D arrayitem class.
Definition: array3ditem.h:29
Decimal point.
Definition: arrayitem.h:44
void setNumCols(int nCols)
Sets number of columns.
Definition: array3ditem.h:233
void setCount(int n)
Sets number of data points.
Definition: array3ditem.h:211
3D item class.
Definition: threeditem.h:30
int numCols() const
Returns number of columns.
Definition: array3ditem.h:179
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Paints item.
double *** data()
Returns pointer to internal array.
Definition: array3ditem.h:170
void setColY(int colY)
Sets y column index.
Definition: array3ditem.h:201