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

qsmatrix.h

00001 /***************************************************************************
00002                                  qsmatrix.h                               
00003                              -------------------                                         
00004     begin                : 01-January-2000
00005     copyright            : (C) 2000 by Kamil Dobkowski                         
00006     email                : kamildobk@poczta.onet.pl                                     
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   * 
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QSMATRIX_H
00019 #define QSMATRIX_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 #include<qstring.h>
00025 #include<qobject.h>
00026 #include"qsserializable.h"
00027 
00028 class QSData;
00029 
00046 class QSMatrix : public QObject, public QSSerializable {
00047     Q_OBJECT
00048     public:
00052      QSMatrix();
00056      virtual ~QSMatrix();
00061     virtual double value( int row, int col ) = 0;
00067     virtual QString string( int row, int col ) { return QString::number(value(row,col),'g',9); }
00071     virtual int rows() const = 0;
00075     virtual int cols() const = 0;
00080         virtual bool resize( int rows, int cols );
00085     virtual bool transpose() { return false; }
00089     void copyRange( int row, int col, QSMatrix *src, int srcStartRow, int srcStartCol, int srcEndRow, int srcEndCol );
00094          virtual void setDataObject( QSData *data, int channel );
00098      QSData *dataObject() const { return m_data_object; }
00102      int channel() const { return m_channel; }
00107          virtual void setValue( int row, int col, double value );
00111      virtual void setString( int row, int col, const QString& string );
00115      virtual bool isReference() const;
00120      virtual bool isEditable() const;
00124      virtual bool isString() const;     
00128      virtual void dataChanging();
00132      virtual void dataChanged();
00136     virtual void loadStateFromStream( QDataStream& stream, QSObjectFactory *factory );
00140     virtual void saveStateToStream( QDataStream& stream, QSObjectFactory *factory );
00141 
00142     protected:  
00143      QSData *m_data_object;
00144      int m_channel;
00145 
00146          QSMatrix( const QSMatrix& );
00147          void operator=(const QSMatrix& );
00148     
00149     };
00150 #endif
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 

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