kspread

kspread_global.h
1#ifndef KSPREAD_GLOBAL_H
2#define KSPREAD_GLOBAL_H
3
4#include <tqdatetime.h>
5
6#include <kdebug.h>
7#include <kiconloader.h>
8
9#include "kspread_factory.h"
10
11/* Definition of maximal supported rows - please check kspread_util (columnName) and kspread_cluster also */
12#define KS_rowMax 0x7FFF
13/* Definition of maximal supported columns - please check kspread_util (columnName) and kspread_cluster also */
14#define KS_colMax 0x7FFF
15
16/* Definition of maximal supported columns/rows, which can be merged */
17#define KS_spanMax 0xFFF
18
19
20namespace KSpread
21{
22
23class ElapsedTime
24{
25 public:
26 enum OutputMode { Default, PrintOnlyTime };
27 ElapsedTime()
28 {
29 m_time.start();
30 }
31
32 ElapsedTime( TQString const & name, OutputMode mode = Default )
33 : m_name( name )
34 {
35 m_time.start();
36 if ( mode != PrintOnlyTime )
37 kdDebug() << "*** (" << name << ")... Starting measuring... " << endl;
38 }
39
40 ~ElapsedTime()
41 {
42 uint milliSec = m_time.elapsed();
43 uint min = (uint) ( milliSec / ( 1000 * 60 ) );
44 milliSec -= ( min * 60 * 1000 );
45 uint sec = (uint) ( milliSec / 1000 );
46 milliSec -= sec * 1000;
47
48 if ( m_name.isNull() )
49 kdDebug() << "*** Elapsed time: " << min << " min, " << sec << " sec, " << milliSec << " msec" << endl;
50 else
51 kdDebug() << "*** (" << m_name << ") Elapsed time " << min << " min, " << sec << " sec, " << milliSec << " msec" << endl;
52 }
53
54 private:
55 TQTime m_time;
56 TQString m_name;
57};
58
63namespace Paste
64{
68 enum Mode
69 {
76 NormalAndTranspose ,
77 TextAndTranspose ,
78 FormatAndTranspose ,
79 NoBorderAndTranspose
80 };
92} // namespace Paste
93
98namespace Restriction
99{
114} // namespace Restriction
115
116namespace Action
117{
118 enum Type
119 {
120 Stop,
121 Warning,
122 Information
123 };
124}
125
126enum Series { Column,Row,Linear,Geometric };
127// necessary due to TQDock* enums (Werner)
128enum MoveTo { Bottom, Left, Top, Right, BottomFirst };
129enum MethodOfCalc { SumOfNumber, Min, Max, Average, Count, NoneCalc, CountA };
130
131enum FormatType {
132 Generic_format=0,
133 Number_format=1, Text_format=5, Money_format=10, Percentage_format=25,
134 Scientific_format=30,
135 ShortDate_format=35, TextDate_format=36, Time_format=50,
136 SecondeTime_format=51,
137 Time_format1=52, Time_format2=53, Time_format3=54, Time_format4=55,
138 Time_format5=56, Time_format6=57, Time_format7=58, Time_format8=59,
139 fraction_half=70,fraction_quarter=71,fraction_eighth=72,fraction_sixteenth=73,
140 fraction_tenth=74,fraction_hundredth=75,fraction_one_digit=76,
141 fraction_two_digits=77,fraction_three_digits=78,
142 date_format1=200,date_format2=201,date_format3=202,date_format4=203,
143 date_format5=204,date_format6=205,date_format7=206,date_format8=207,
144 date_format9=208,date_format10=209,date_format11=210,date_format12=211,
145 date_format13=212,date_format14=213,date_format15=214,date_format16=215,
146 date_format17=216,date_format18=217,date_format19=218,date_format20=219,
147 date_format21=220,date_format22=221,date_format23=222,date_format24=223,
148 date_format25=224,date_format26=225,
149 Custom_format = 300, No_format = 400
150};
151
152enum ModifyType {
153 MT_NONE = 0,
154 MT_MOVE,
155 MT_RESIZE_UP,
156 MT_RESIZE_DN,
157 MT_RESIZE_LF,
158 MT_RESIZE_RT,
159 MT_RESIZE_LU,
160 MT_RESIZE_LD,
161 MT_RESIZE_RU,
162 MT_RESIZE_RD
163};
164
165enum PropValue {
166 STATE_ON = 0,
167 STATE_OFF = 1,
168 STATE_UNDEF = 2
169};
170
171//TODO Implement all objects :)
172enum ToolEditMode {
173 TEM_MOUSE = 0,
174 //INS_RECT = 1,
175 //INS_ELLIPSE = 2,
176 //INS_TEXT = 3,
177 //INS_PIE = 4,
178 INS_OBJECT = 5,
179 //INS_LINE = 6,
180 INS_DIAGRAMM = 7,
181 //INS_TABLE = 8,
182 //INS_FORMULA = 9,
183 //INS_AUTOFORM = 10,
184 //INS_FREEHAND = 11,
185 //INS_POLYLINE = 12,
186 //INS_QUADRICBEZIERCURVE = 13,
187 //INS_CUBICBEZIERCURVE = 14,
188 //INS_POLYGON = 15,
189 INS_PICTURE = 16
190 //INS_CLIPART = 17,
191 //TEM_ROTATE = 18,
192 //TEM_ZOOM = 19,
193 //INS_CLOSED_FREEHAND = 20,
194 //INS_CLOSED_POLYLINE = 21,
195 //INS_CLOSED_QUADRICBEZIERCURVE = 22,
196 //INS_CLOSED_CUBICBEZIERCURVE = 23
197};
198
199
200} // namespace KSpread
201
202#endif
Operation
The current cell value treatment.
@ Sub
Substract.
@ OverWrite
Overwrite.
Mode
The pasted content.
@ Result
Result only, no formula.
@ Format
Format only.
@ Comment
Comment only.
@ Text
Text only.
@ NoBorder
not the borders
@ Normal
Everything.
Type
The type of the restriction.
@ Text
Restrict to texts.
@ Date
Restrict to dates.
@ Number
Restrict to numbers.
@ Integer
Restrict to integers
@ TextLength
Restrict text length.
@ None
No restriction.
@ Time
Restrict to times.
The KSpread namespace.
Definition commands.h:39