filters

cell.h

00001 /* Swinder - Portable library for spreadsheet 
00002    Copyright (C) 2003 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, or (at your option) any later version.
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 SWINDER_CELL_H
00021 #define SWINDER_CELL_H
00022 
00023 #include "ustring.h"
00024 #include "format.h"
00025 #include "value.h"
00026 
00027 namespace Swinder
00028 {
00029 
00030 class Workbook;
00031 class Sheet;
00032 
00033 class Cell
00034 {
00035 public:
00036 
00037   Cell( Sheet* sheet, unsigned column, unsigned row );
00038   
00039   virtual ~Cell();
00040   
00041   Sheet* sheet();
00042   
00043   unsigned column() const;
00044   
00045   unsigned row() const;
00046   
00047   UString name() const;
00048   
00049   static UString name( unsigned column, unsigned row );
00050   
00051   UString columnLabel() const;
00052   
00053   static UString columnLabel( unsigned column );
00054   
00055   Value value() const;
00056   
00057   void setValue( const Value& value );
00058   
00059   UString formula() const;
00060   
00061   void setFormula( const UString& formula );
00062   
00063   Format format() const;
00064   
00065   void setFormat( const Format& format );
00066   
00067   unsigned columnSpan() const;
00068   
00069   void setColumnSpan( unsigned span );
00070   
00071   unsigned rowSpan() const;
00072   
00073   void setRowSpan( unsigned span );  
00074   
00075 private:
00076   // no copy or assign
00077   Cell( const Cell& );
00078   Cell& operator=( const Cell& );
00079   
00080   class Private;
00081   Private* d;
00082 
00083 };
00084 
00085 } // namespace Swinder
00086 
00087 
00088 #endif // SWINDER_CELL_H
00089 
KDE Home | KDE Accessibility Home | Description of Access Keys