author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/cellitem.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
-rw-r--r-- | korganizer/cellitem.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h new file mode 100644 index 0000000..72773d0 --- a/dev/null +++ b/korganizer/cellitem.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | This file is part of KOrganizer. | ||
3 | |||
4 | Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | |||
20 | As a special exception, permission is given to link this program | ||
21 | with any edition of Qt, and distribute the resulting executable, | ||
22 | without including the source code for Qt in the source distribution. | ||
23 | */ | ||
24 | #ifndef KORG_CELLITEM_H | ||
25 | #define KORG_CELLITEM_H | ||
26 | |||
27 | #include <qstring.h> | ||
28 | #include <qptrlist.h> | ||
29 | |||
30 | namespace KOrg { | ||
31 | |||
32 | class CellItem | ||
33 | { | ||
34 | public: | ||
35 | CellItem() | ||
36 | : mSubCells( 0 ), mSubCell( -1 ) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | void setSubCells( int v ) { mSubCells = v; } | ||
41 | int subCells() const { return mSubCells; } | ||
42 | |||
43 | void setSubCell( int v ) { mSubCell = v; } | ||
44 | int subCell() const { return mSubCell; } | ||
45 | |||
46 | virtual bool overlaps( CellItem *other ) const = 0; | ||
47 | |||
48 | virtual QString label() const; | ||
49 | |||
50 | /** | ||
51 | Place item \arg placeItem into stripe containing items \arg cells in a | ||
52 | way that items don't overlap. | ||
53 | |||
54 | \return Placed items | ||
55 | */ | ||
56 | static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells, | ||
57 | CellItem *placeItem ); | ||
58 | |||
59 | private: | ||
60 | int mSubCells; | ||
61 | int mSubCell; | ||
62 | }; | ||
63 | |||
64 | } | ||
65 | |||
66 | #endif | ||