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 // don't export this private class
00034 class CellPrivate;
00035 
00036 class Cell
00037 {
00038 public:
00039 
00040   Cell( Sheet* sheet, unsigned column, unsigned row );
00041   
00042   virtual ~Cell();
00043   
00044   Sheet* sheet();
00045   
00046   unsigned column() const;
00047   
00048   unsigned row() const;
00049   
00050   UString name() const;
00051   
00052   static UString name( unsigned column, unsigned row );
00053   
00054   UString columnLabel() const;
00055   
00056   static UString columnLabel( unsigned column );
00057   
00058   const Value& value() const;
00059   
00060   void setValue( const Value& value );
00061   
00062   const UString& formula() const;
00063   
00064   void setFormula( const UString& formula );
00065   
00066   Format format() const;
00067   
00068   void setFormat( const Format& format );
00069   
00070   void setFormatIndex( int index );
00071   
00072   int formatIndex() const;
00073   
00074   unsigned columnSpan() const;
00075   
00076   void setColumnSpan( unsigned span );
00077   
00078   unsigned rowSpan() const;
00079   
00080   void setRowSpan( unsigned span );  
00081   
00082 private:
00083   // no copy or assign
00084   Cell( const Cell& );
00085   Cell& operator=( const Cell& );
00086   
00087   CellPrivate *d;
00088 };
00089 
00090 } // namespace Swinder
00091 
00092 
00093 #endif // SWINDER_CELL_H
00094 
KDE Home | KDE Accessibility Home | Description of Access Keys