interfaces

koChart.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2000-2002 Kalle Dalheimer <kalle@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  * Boston, MA 02110-1301, USA.
00017 */
00018 
00019 #ifndef __koffice_kchart_h__
00020 #define __koffice_kchart_h__
00021 
00022 #include <qvariant.h>
00023 
00024 #include <KoDocument.h>
00025 #include <KDChartTable.h>
00026 
00027 #include <koffice_export.h>
00028 
00029 namespace KoChart
00030 {
00031     class Part;
00032 
00033     // KoChart::Value is either:
00034     //  - a double (interpreted as a value)
00035     //  - a QString (interpreted as a label)
00036     //  - a QDateTime (interpreted as a date/time value)
00037     //  - Invalid (interpreted as empty)
00038     typedef QVariant         Value;
00039     //typedef KDChartTableData Data;
00040 
00041     class KOCHARTINTERFACE_EXPORT WizardExtension : public QObject
00042     {
00043         Q_OBJECT
00044     public:
00045         WizardExtension( Part *part, const char *name = 0 );
00046         virtual ~WizardExtension();
00047 
00048         Part *part() const { return m_part; }
00049 
00050         virtual bool show( QString &area ) = 0;
00051         // XXX add more?
00052 
00053     private:
00054         Part *m_part;
00055         class WizardExtensionPrivate;
00056         WizardExtensionPrivate *d;
00057     };
00058 
00059     class KOCHARTINTERFACE_EXPORT Part : public KoDocument
00060     {
00061         Q_OBJECT
00062     public:
00063         Part( QWidget *parentWidget, const char *widgetName,
00064               QObject *parent, const char *name,
00065               bool singleViewMode = false );
00066 
00067         virtual ~Part();
00068 
00069 #if 0
00070     // The old interface.
00071         virtual void setData( const Data &d ) = 0;
00072 #else
00073     // The new interface.
00074     virtual void resizeData( int rows, int columns ) = 0 ;
00075     virtual void setCellData( int row, int column, const QVariant &) = 0;
00076     virtual void analyzeHeaders( ) = 0;
00077 #endif
00078         virtual void setCanChangeValue(bool b )=0;
00079 
00080         virtual WizardExtension *wizardExtension();
00081     private:
00082         class PartPrivate;
00083         PartPrivate *d;
00084     };
00085 }
00086 
00087 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys