KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

koChart.h 2.4KB

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