filters
sheet.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SWINDER_SHEET_H
00021 #define SWINDER_SHEET_H
00022
00023 #include "ustring.h"
00024 #include "format.h"
00025
00026 namespace Swinder
00027 {
00028
00029 class Workbook;
00030 class Cell;
00031 class Column;
00032 class Row;
00033
00034 class Sheet
00035 {
00036 public:
00037
00038 Sheet( Workbook* workbook );
00039
00040 virtual ~Sheet();
00041
00042
00043 Workbook* workbook();
00044
00045
00046
00047
00048 void clear();
00049
00050 void setName( const UString& name );
00051
00052 UString name() const;
00053
00054
00055
00056
00057
00058 Cell* cell( unsigned column, unsigned row, bool autoCreate = true );
00059
00060 Column* column( unsigned index, bool autoCreate = true );
00061
00062 Row* row( unsigned index, bool autoCreate = true );
00063
00064 bool visible() const;
00065 void setVisible( bool v );
00066
00067 bool protect() const;
00068 void setProtect( bool p );
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092 UString leftHeader() const;
00093 void setLeftHeader( const UString& h );
00094 UString centerHeader() const;
00095 void setCenterHeader( const UString& h );
00096 UString rightHeader() const;
00097 void setRightHeader( const UString& h );
00098
00099 UString leftFooter() const;
00100 void setLeftFooter( const UString& f );
00101 UString centerFooter() const;
00102 void setCenterFooter( const UString& f );
00103 UString rightFooter() const;
00104 void setRightFooter( const UString& f );
00105
00106
00107 double leftMargin() const;
00108 void setLeftMargin( double m );
00109
00110
00111 double rightMargin() const;
00112 void setRightMargin( double m );
00113
00114
00115 double topMargin() const;
00116 void setTopMargin( double m );
00117
00118
00119 double bottomMargin() const;
00120 void setBottomMargin( double m );
00121
00122 unsigned maxRow() const;
00123 unsigned maxColumn() const;
00124
00125 private:
00126
00127 Sheet( const Sheet& );
00128 Sheet& operator=( const Sheet& );
00129
00130 class Private;
00131 Private *d;
00132 };
00133
00134 class Column
00135 {
00136 public:
00137
00138 Column( Sheet* sheet, unsigned index );
00139
00140 virtual ~Column();
00141
00142 Sheet* sheet() const;
00143
00144 unsigned index() const;
00145
00146
00147 double width() const;
00148
00149
00150 void setWidth( double w );
00151
00152 const Format& format() const;
00153
00154 void setFormat( const Format& f );
00155
00156 void setFormatIndex( int index );
00157
00158 int formatIndex() const;
00159
00160 bool visible() const;
00161
00162 void setVisible( bool v );
00163
00164 private:
00165
00166 Column( const Column& );
00167 Column& operator=( const Column& );
00168
00169 class Private;
00170 Private *d;
00171 };
00172
00173 class Row
00174 {
00175 public:
00176
00177 Row( Sheet* sheet, unsigned index );
00178
00179 virtual ~Row();
00180
00181 Sheet* sheet() const;
00182
00183 unsigned index() const;
00184
00185
00186 double height() const;
00187
00188
00189 void setHeight( double w );
00190
00191 const Format& format() const;
00192
00193 void setFormat( const Format& f );
00194
00195 void setFormatIndex( int index );
00196
00197 int formatIndex() const;
00198
00199 bool visible() const;
00200
00201 void setVisible( bool v );
00202
00203 private:
00204
00205 Row( const Row& );
00206 Row& operator=( const Row& );
00207
00208 class Private;
00209 Private *d;
00210 };
00211
00212
00213 }
00214
00215 #endif // SWINDER_SHEET_H
00216
|