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

qsdata.h

00001 /***************************************************************************
00002                                    qdata.h
00003                              -------------------
00004     version              :
00005     begin                :
00006 
00007     copyright            : (C) 2000 by Kamil Dobkowski
00008     email                : kamildobk@poczta.onet.pl
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 
00021 #ifndef QSDATA_H
00022 #define QSDATA_H
00023 
00024 #ifdef HAVE_CONFIG_H
00025 #include <config.h>
00026 #endif
00027 
00028 #include"qsgattr.h"
00029 #include"qsmatrix.h"
00030 #include"qsserializable.h"
00031 #include<qobject.h>
00032 #include<qstring.h>
00033 #include<math.h>
00034 
00035 //-------------------------------------------------------------------------------------------------------------//
00036 
00052 class QSData : public QObject, public QSSerializable
00053  {
00054   Q_OBJECT
00055 
00056   public:
00060        enum ColumnType {
00061         ColumnUnknown = 0,
00062         ColumnX,
00063         ColumnY,
00064         ColumnZ,
00065         ColumnV,
00066         ColumnDX,
00067         ColumnDY,
00068         ColumnSize,
00069         ColumnWidth,
00070         ColumnLineStyle,
00071         ColumnFillStyle,
00072         ColumnPointStyle,
00073         ColumnPointFill,
00074         ColumnArrowStyle,
00075         ColumnFontFamily,
00076         ColumnFontSize,
00077         ColumnFontBold,
00078         ColumnFontItalic,
00079         ColumnRed,
00080         ColumnGreen,
00081         ColumnBlue,
00082         ColumnAlpha,
00083         ColumnByte,
00084         ColumnInt,
00085         ColumnBool,
00086         ColumnString
00087         };
00091       QSData( QObject *parent=NULL, QSData *parentObject=NULL, const char *name=0 );
00095       virtual ~QSData();
00099       virtual void setObjectName( const char *name );
00103       const char *objectName() const { return name(); }
00107       virtual bool setMatrix( int channel, QSMatrix *m );
00111       virtual QSMatrix *matrix( int channel ) const;
00116       virtual QSMatrix *takeMatrix( int channel, QSMatrix *newMatrix = NULL );
00120       virtual void deleteMatrix( int channel );
00124       virtual int channelCount() const;
00133       virtual void dataChanging( int channel = -1 );
00142       virtual void dataChanged( int channel = -1 );
00146     virtual QSData *parentObject() const { return m_parent_object; }
00150       virtual int childCount() const { return 0; }
00154       virtual QSData *child( int index ) const { return NULL; }
00158       virtual int childIndex( QSData *child ) const;
00162       virtual QString channelVariable( int channel ) const { return QString::null; }
00167       virtual ColumnType columnType( int channel, int column ) const { return ColumnUnknown; }
00171     virtual void loadStateFromStream( QDataStream& stream, QSObjectFactory *factory );
00175     virtual void saveStateToStream( QDataStream& stream, QSObjectFactory *factory );
00176 
00177    signals: 
00181     void sigNameChanged( const char *name );
00185     void sigNameChanged( QSData *thisOrChildObject, const char *name );
00189       void sigDataChanged( QSData *thisOrChildObject, int channel );
00193       void sigChildAdded( QSData *newChild );
00197       void sigChildRemoved( QSData *removedChild );
00201       void sigChildOrder();
00205     void sigChildListChanged();
00209       void sigDeleted( QSData *thisObject );
00210 
00211    protected:
00216       virtual void dataChanging( QSData *object, int channel = -1 );
00221       virtual void dataChanged( QSData *object, int channel = -1 );
00225        virtual void nameChanged( QSData *object, const char *newName );
00226     
00227       QSData *m_parent_object;
00228  };
00229 
00230 #endif
00231 
00232 

Generated on Mon Mar 18 19:16:32 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002