kspread Library API Documentation

stylecluster.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005 The KSpread Team
00003                               www.koffice.org/kspread
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    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 library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef KSPREADSTYLECLUSTER_H
00022 #define KSPREADSTYLECLUSTER_H
00023 
00024 #include <qobject.h>
00025 #include <qvaluestack.h>
00026 
00027 #include <koffice_export.h>
00028 
00029 class KSpreadStyle;
00030 class KSpreadSheet;
00031 class KSpreadRange;
00032 
00033 namespace KSpread {
00034 
00035 class StyleClusterQuad;
00036 class StyleClusterTester;
00037 
00038 // class StyleManipulator;
00039 
00075 class KSPREAD_EXPORT StyleCluster : public QObject
00076 {
00077   Q_OBJECT
00078 
00079   protected:
00080     StyleClusterQuad* m_topQuad;
00081     KSpreadSheet* m_sheet;
00082     //To be written
00083     //friend class StyleManipulator;
00084     friend class StyleClusterTester;
00093     void simplify( QValueStack<StyleClusterQuad**> &path );
00094 
00098     StyleClusterQuad* lookupNode(int x, int y);
00099     
00104     void stepDownOne(StyleClusterQuad ** &current_node,
00105                      int x, int & x_offset, 
00106                      int y, int & y_offset, 
00107                      int & quad_size);
00108   public:
00109     StyleCluster(KSpreadSheet* sheet);
00110 
00111     ~StyleCluster();
00112 
00127     void setStyle( int x, int y, KSpreadStyle * style);
00128 
00134     void setStyle( const KSpreadRange & range, KSpreadStyle * style);
00135 
00147     const KSpreadStyle& lookup(int x, int y);
00148 
00149 };
00150 
00151 }
00152 
00153 #endif
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:43:38 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003