interfaces

koChart.h
1/* This file is part of the KDE project
2 Copyright (C) 2000-2002 Kalle Dalheimer <kalle@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __koffice_kchart_h__
20#define __koffice_kchart_h__
21
22#include <tqvariant.h>
23
24#include <KoDocument.h>
25#include <KDChartTable.h>
26
27#include <koffice_export.h>
28
29namespace KoChart
30{
31 class Part;
32
33 // KoChart::Value is either:
34 // - a double (interpreted as a value)
35 // - a TQString (interpreted as a label)
36 // - a TQDateTime (interpreted as a date/time value)
37 // - Invalid (interpreted as empty)
38 typedef TQVariant Value;
39 //typedef KDChartTableData Data;
40
41 class KOCHARTINTERFACE_EXPORT WizardExtension : public TQObject
42 {
43 TQ_OBJECT
44
45 public:
46 WizardExtension( Part *part, const char *name = 0 );
47 virtual ~WizardExtension();
48
49 Part *part() const { return m_part; }
50
51 virtual bool show( TQString &area ) = 0;
52 // XXX add more?
53
54 private:
55 Part *m_part;
56 class WizardExtensionPrivate;
57 WizardExtensionPrivate *d;
58 };
59
60 class KOCHARTINTERFACE_EXPORT Part : public KoDocument
61 {
62 TQ_OBJECT
63
64 public:
65 Part( TQWidget *parentWidget, const char *widgetName,
66 TQObject *parent, const char *name,
67 bool singleViewMode = false );
68
69 virtual ~Part();
70
71#if 0
72 // The old interface.
73 virtual void setData( const Data &d ) = 0;
74#else
75 // The new interface.
76 virtual void resizeData( int rows, int columns ) = 0 ;
77 virtual void setCellData( int row, int column, const TQVariant &) = 0;
78 virtual void analyzeHeaders( ) = 0;
79#endif
80 virtual void setCanChangeValue(bool b )=0;
81
82 virtual WizardExtension *wizardExtension();
83 private:
84 class PartPrivate;
85 PartPrivate *d;
86 };
87}
88
89#endif