kspread

krs_cell.h

00001 /*
00002  *  Copyright (c) 2005 Cyrille Berger <cberger@cberger.net>
00003  *  Copyright (c) 2006 Isaac Clerencia <isaac@warp.es>
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU Library General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KROSS_KSPREADCOREKRSCELL_H
00021 #define KROSS_KSPREADCOREKRSCELL_H
00022 
00023 #include <kspread_sheet.h>
00024 #include <kspread_cell.h>
00025 #include <kspread_value.h>
00026 
00027 #include <api/class.h>
00028 
00029 #include <qstring.h>
00030 #include <qcolor.h>
00031 
00032 namespace Kross { namespace KSpreadCore {
00033 
00050 class Cell : public Kross::Api::Class<Cell>
00051 {
00052     public:
00053         Cell(KSpread::Cell* cell, KSpread::Sheet* sheet, uint col, uint row);
00054         virtual ~Cell();
00055         virtual const QString getClassName() const;
00056     private:
00057 
00061         QVariant value() const;
00065         bool setValue(const QVariant& value);
00066 
00070         int column() const;
00074         int row() const;
00075 
00079         Cell* previousCell() const;
00083         Cell* nextCell() const;
00087         void setPreviousCell(Cell* c);
00091         void setNextCell(Cell* c);
00092 
00097         const QString name() const;
00102         const QString fullName() const;
00103 
00107         const QString comment() const;
00111         void setComment(const QString& c);
00112 
00113 #if 0
00114         bool isFormula() const;
00115         Formula *formula () const;
00116 #endif
00117 
00121         const QString getFormatString() const;
00125         void setFormatString(const QString& format);
00126 
00132         const QString text() const;
00137         bool setText(const QString& text);
00138 
00142         const QString textColor();
00147         void setTextColor(const QString& textcolor);
00148 
00152         const QString backgroundColor();
00157         void setBackgroundColor(const QString& backgroundcolor);
00158 
00159     private:
00160         KSpread::Cell* m_cell;
00161         KSpread::Sheet* m_sheet;
00162         uint m_col, m_row;
00163     
00164         QVariant toVariant(const KSpread::Value& value) const;
00165 };
00166 }
00167 }
00168 
00169 
00170 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys