kspread

damages.h

00001 /* This file is part of the KDE project
00002    Copyright 2004 Ariya Hidayat <ariya@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 as published by the Free Software Foundation; either
00007    version 2 of the License.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KSPREAD_DAMAGES
00021 #define KSPREAD_DAMAGES
00022 
00023 namespace KSpread
00024 {
00025 class Cell;
00026 class Sheet;
00027 
00028 class Damage
00029 {
00030   public:
00031   
00032     typedef enum
00033     {
00034       Nothing = 0,
00035       Document,
00036       Workbook,
00037       Sheet,
00038       Range,
00039       Cell
00040     } Type;
00041 
00042     virtual Type type() const { return Nothing; }
00043 };
00044 
00045 class CellDamage : public Damage
00046 {
00047   public:
00048   
00049     CellDamage( KSpread::Cell* cell );
00050     
00051     virtual ~CellDamage();
00052     
00053     virtual Type type() const { return Damage::Cell; }
00054     
00055     KSpread::Cell* cell();
00056     
00057   private:
00058     class Private;
00059     Private *d;
00060 };
00061 
00062 class SheetDamage : public Damage
00063 {
00064   public:
00065   
00066     enum
00067     {
00068       None = 0,
00069       ContentChanged,
00070       PropertiesChanged,
00071       Hidden,
00072       Shown
00073     };
00074     
00075     SheetDamage( KSpread::Sheet* sheet, int action );
00076     
00077     virtual ~SheetDamage();
00078   
00079     virtual Type type() const { return Damage::Sheet; }
00080     
00081     KSpread::Sheet* sheet() const;
00082     
00083     int action() const;
00084     
00085   private:
00086     class Private;
00087     Private *d;
00088 };
00089 
00090 
00091 } // namespace KSpread
00092 
00093 #endif // KSPREAD_DAMAGES
KDE Home | KDE Accessibility Home | Description of Access Keys