Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

QSGraphicalData Class Reference

Data object which holds a set of graphics attributes such as fonts, fills, line styles etc. More...

#include <qsgraphicaldata.h>

Inheritance diagram for QSGraphicalData:

Inheritance graph
[legend]
List of all members.

Signals

void sigTitleChanged (const QString &newTitle)

Public Methods

 QSGraphicalData (QObject *parent=0, QSGraphicalData *parentObject=0, const char *name=0)
virtual ~QSGraphicalData ()
void setTitle (const QString &title)
QString title () const
virtual bool setMatrix (int channel, QSMatrix *m)
virtual QSMatrixmatrix (int channel) const
virtual void deleteMatrix (int channel)
virtual QSMatrixtakeMatrix (int channel, QSMatrix *newMatrix)
int channelCount () const
double value (int row, int col, int channel)
int matrixRows (int channel) const
int matrixCols (int channel) const
bool isChannel (int channel) const
void setFont (int e, const QSGFont &font)
void setFill (int e, const QSGFill &fill)
void setLine (int e, const QSGLine &line)
void setPoint (int e, const QSGPoint &point)
QSGFont font (int e) const
QSGFill fill (int e) const
QSGLine line (int e) const
QSGPoint point (int e) const
int fontCount () const
int fillCount () const
int lineCount () const
int pointCount () const
virtual void loadStateFromStream (QDataStream &stream, QSObjectFactory *factory)
virtual void saveStateToStream (QDataStream &stream, QSObjectFactory *factory)

Protected Methods

void initChannelTable (int channels_num)
void initAttributeTables (int fonts_num, int fills_num, int lines_num, int points_num)
virtual void parametersChanging ()
virtual void parametersChanged ()
double _log (double value, double logBase=10.0)

Static Protected Methods

QSGFont fontFromData (QSMatrix *source, int row, int start_col, const QSGFont &default_value)
QSGFill fillFromData (QSMatrix *source, int row, int start_col, const QSGFill &default_value)
QSGLine lineFromData (QSMatrix *source, int row, int start_col, const QSGLine &default_value)
QSGPoint pointFromData (QSMatrix *source, int row, int start_col, const QSGPoint &default_value)
QSGArrow arrowFromData (QSMatrix *source, int row, int start_col, const QSGArrow &default_value)
QSGColor colorFromData (QSMatrix *source, int row, int start_col, const QSGColor &default_value)
ColumnType fontColumnFormat (int column)
ColumnType fillColumnFormat (int column)
ColumnType lineColumnFormat (int column)
ColumnType pointColumnFormat (int column)
ColumnType arrowColumnFormat (int column)
ColumnType colorColumnFormat (int column)

Protected Attributes

QSGraphicalData::settings_t m_settings
QSMatrix ** m_channels
int m_channels_count
QString m_title_str
QSGraphicalData * m_parent_base_object

Detailed Description

Data object which holds a set of graphics attributes such as fonts, fills, line styles etc.

See new functions : setFill(), setFont(), setLine(), setPoint(). Contains also implementation of the QSData interface.

Author:
Kamil Dobkowski


Constructor & Destructor Documentation

QSGraphicalData::QSGraphicalData QObject *    parent = 0,
QSGraphicalData *    parentObject = 0,
const char *    name = 0
 

Constructor

virtual QSGraphicalData::~QSGraphicalData   [virtual]
 

Destructor.


Member Function Documentation

double QSGraphicalData::_log double    value,
double    logBase = 10.0
[inline, protected]
 

Calculates a logarithm of value 'value'. Fix it to remember log10(logBase);

ColumnType QSGraphicalData::arrowColumnFormat int    column [static, protected]
 

Standard column types for arrow. See arrowFromData().

QSGArrow QSGraphicalData::arrowFromData QSMatrix   source,
int    row,
int    start_col,
const QSGArrow   default_value
[static, protected]
 

Reads an arrow style from matrix. Row format is [ style, size ]

int QSGraphicalData::channelCount   const [inline, virtual]
 

Returns the total number of channels.

Reimplemented from QSData.

ColumnType QSGraphicalData::colorColumnFormat int    column [static, protected]
 

Standard column types for font. See colorFromData().

QSGColor QSGraphicalData::colorFromData QSMatrix   source,
int    row,
int    start_col,
const QSGColor   default_value
[static, protected]
 

Reads a color from matrix. Row format is [ red, green, blue, alpha ]

virtual void QSGraphicalData::deleteMatrix int    channel [virtual]
 

Deletes the choosen matrix.

Reimplemented from QSData.

QSGFill QSGraphicalData::fill int    e const [inline]
 

Returns a fill style of the given element

ColumnType QSGraphicalData::fillColumnFormat int    column [static, protected]
 

Standard column types for font. See fillFromData().

int QSGraphicalData::fillCount   const [inline]
 

Returns the total number of fill elements.

QSGFill QSGraphicalData::fillFromData QSMatrix   source,
int    row,
int    start_col,
const QSGFill   default_value
[static, protected]
 

Reads fill style from matrix. Row format is [ style, red, green, blue, alpha ]

QSGFont QSGraphicalData::font int    e const [inline]
 

Returns a font style of the given element

ColumnType QSGraphicalData::fontColumnFormat int    column [static, protected]
 

Standard column types for font. See fontFromData().

int QSGraphicalData::fontCount   const [inline]
 

Returns the total number of font elements.

QSGFont QSGraphicalData::fontFromData QSMatrix   source,
int    row,
int    start_col,
const QSGFont   default_value
[static, protected]
 

Reads font from matrix. Row formst is [ family(text), size, bold, italic, red, green. blue, alpha ) ]

void QSGraphicalData::initAttributeTables int    fonts_num,
int    fills_num,
int    lines_num,
int    points_num
[protected]
 

Allocates memory for fonts, fills, ... tables.

void QSGraphicalData::initChannelTable int    channels_num [protected]
 

Allocates memory for channels

bool QSGraphicalData::isChannel int    channel const
 

Returns 'true' if matrix at the given channel exist.

QSGLine QSGraphicalData::line int    e const [inline]
 

Returns a point style of the given element

ColumnType QSGraphicalData::lineColumnFormat int    column [static, protected]
 

Standard column types for font. See lineFromData().

int QSGraphicalData::lineCount   const [inline]
 

Returns the total number of line elements.

QSGLine QSGraphicalData::lineFromData QSMatrix   source,
int    row,
int    start_col,
const QSGLine   default_value
[static, protected]
 

Reads a line style from matrix. Row format is [ style, width, red, green, blue, alpha ]

virtual void QSGraphicalData::loadStateFromStream QDataStream &    stream,
QSObjectFactory   factory
[virtual]
 

Restores all graphics atributes

Reimplemented from QSData.

Reimplemented in QSAxes.

virtual QSMatrix* QSGraphicalData::matrix int    channel const [virtual]
 

Returns matrix 'channel' if any, or NULL. Notice that you should not operate on it during drawing ( see QSAxes::state ) because this affects internal iterator positions in those matrices.

Reimplemented from QSData.

int QSGraphicalData::matrixCols int    channel const [inline]
 

Returs the width of the choosen matrix or 0 if it is not set.

int QSGraphicalData::matrixRows int    channel const [inline]
 

Returs the height of the choosen matrix or 0 if it is not set.

virtual void QSGraphicalData::parametersChanged   [protected, virtual]
 

This function is called after any parameter change. This function can be reimplemented but unfortunately there is no information, which parameter has changed. It informs derived classes that they should repaint themselves. Default implementation calls parent->parametersChanging();

Reimplemented in QSAxes.

virtual void QSGraphicalData::parametersChanging   [protected, virtual]
 

This function is called before any parameter change. This function can be reimplemented but unfortunately there is no information, which parameter has changed. It informs derived classes to stop the drawing process. Default implementation calls parent->paremerersChanging()

Reimplemented in QSAxes.

QSGPoint QSGraphicalData::point int    e const [inline]
 

Returns a point style of the given element

ColumnType QSGraphicalData::pointColumnFormat int    column [static, protected]
 

Standard column types for point. See pointFromData().

int QSGraphicalData::pointCount   const [inline]
 

Returns the total number of points elements.

QSGPoint QSGraphicalData::pointFromData QSMatrix   source,
int    row,
int    start_col,
const QSGPoint   default_value
[static, protected]
 

Reads a point form matrix. Row format is [ style, fill, size, red, green, blue, alpha ]

virtual void QSGraphicalData::saveStateToStream QDataStream &    stream,
QSObjectFactory   factory
[virtual]
 

Saves all graphics attributes

Reimplemented from QSData.

Reimplemented in QSAxes.

void QSGraphicalData::setFill int    e,
const QSGFill   fill
 

Sets the fill for the 'e' element.

void QSGraphicalData::setFont int    e,
const QSGFont   font
 

Sets the font for the 'e' element.

void QSGraphicalData::setLine int    e,
const QSGLine   line
 

Set a line style for the 'e' element.

virtual bool QSGraphicalData::setMatrix int    channel,
QSMatrix   m
[virtual]
 

Sets a new matrix as the given channel in the plot.

Reimplemented from QSData.

void QSGraphicalData::setPoint int    e,
const QSGPoint   point
 

Set a point style for the 'e' element.

void QSGraphicalData::setTitle const QString &    title
 

Sets a plot title.

void QSGraphicalData::sigTitleChanged const QString &    newTitle [signal]
 

Title has changed.

virtual QSMatrix* QSGraphicalData::takeMatrix int    channel,
QSMatrix   newMatrix
[virtual]
 

Return matrix and sets data to NULL.

Reimplemented from QSData.

QString QSGraphicalData::title   const [inline]
 

Returns title.

double QSGraphicalData::value int    row,
int    col,
int    channel
[inline]
 

Returns value at the position (x, y) from the channel 'channel'. You have to pass correct arguments to this function because it does not perform any channel or range checking.


Member Data Documentation

QSMatrix** QSGraphicalData::m_channels [protected]
 

list of matrices

struct QSGraphicalData::settings_t QSGraphicalData::m_settings [protected]
 

fonts, fills and lines styles


The documentation for this class was generated from the following file:
Generated on Mon Mar 18 19:16:48 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002