File indexing completed on 2024-04-28 16:21:20
0001 /* This file is part of the KDE project 0002 Copyright (C) 2000 Torben Weis <weis@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef CLUSTER_H 0021 #define CLUSTER_H 0022 0023 #include "Value.h" 0024 0025 #define CALLIGRA_SHEETS_CLUSTER_LEVEL1 256 0026 #define CALLIGRA_SHEETS_CLUSTER_LEVEL2 256 0027 #define CALLIGRA_SHEETS_CLUSTER_MAX (256*256) 0028 0029 class QPoint; 0030 0031 namespace Calligra 0032 { 0033 namespace Sheets 0034 { 0035 class Cell; 0036 class ColumnFormat; 0037 class RowFormat; 0038 0039 /** 0040 * \ingroup Storage 0041 * A pointer map to all column formats. Should probably be converted to something like RowFormatStorage. 0042 * \see Cluster 0043 */ 0044 class ColumnCluster 0045 { 0046 public: 0047 ColumnCluster(); 0048 ~ColumnCluster(); 0049 0050 const ColumnFormat* lookup(int col) const; 0051 ColumnFormat* lookup(int col); 0052 0053 void clear(); 0054 0055 void insertElement(ColumnFormat*, int col); 0056 void removeElement(int col); 0057 0058 bool insertColumn(int col); 0059 bool removeColumn(int col); 0060 0061 void setAutoDelete(bool); 0062 bool autoDelete() const; 0063 0064 ColumnFormat* first() const { 0065 return m_first; 0066 } 0067 ColumnFormat* next(int col) const; 0068 0069 void operator=(const ColumnCluster& other); 0070 0071 private: 0072 ColumnCluster(const ColumnCluster& other); 0073 0074 private: 0075 ColumnFormat*** m_cluster; 0076 ColumnFormat* m_first; 0077 bool m_autoDelete; 0078 }; 0079 0080 } // namespace Sheets 0081 } // namespace Calligra 0082 0083 #endif