author | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-06-07 18:53:14 (UTC) |
commit | 640d964cfdc7467f6cacb513087cd3acda2c04f0 (patch) (unidiff) | |
tree | 9a784686c1795f8b1f81eb344598f3b549d43467 /core/pim/datebook/layoutmanager.h | |
parent | dfb9c76738bb68e235114c5ad43dbd26a59b98ab (diff) | |
download | opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.zip opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.gz opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.bz2 |
Backing out unintentional merge from TT branch.
Diffstat (limited to 'core/pim/datebook/layoutmanager.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/layoutmanager.h | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/core/pim/datebook/layoutmanager.h b/core/pim/datebook/layoutmanager.h deleted file mode 100644 index 128f927..0000000 --- a/core/pim/datebook/layoutmanager.h +++ b/dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include <qvector.h> | ||
22 | #include <qvaluelist.h> | ||
23 | #include <qrect.h> | ||
24 | #include <qdatetime.h> | ||
25 | #include <qpe/event.h> | ||
26 | |||
27 | class LayoutItem | ||
28 | { | ||
29 | public: | ||
30 | LayoutItem( const EffectiveEvent e ); | ||
31 | |||
32 | void setGeometry(const QRect &rect) { r = rect; } | ||
33 | void setGeometry(int x, int y, int w, int h) | ||
34 | { setGeometry(QRect(x,y,w,h)); } | ||
35 | QRect geometry() const { return r; } | ||
36 | |||
37 | EffectiveEvent occurance() const { return eevent; } | ||
38 | Event event() const { return eevent.event(); } | ||
39 | |||
40 | private: | ||
41 | EffectiveEvent eevent; | ||
42 | QRect r; | ||
43 | }; | ||
44 | |||
45 | class LayoutManager | ||
46 | { | ||
47 | public: | ||
48 | LayoutManager(int w, int h); | ||
49 | virtual ~LayoutManager(); | ||
50 | |||
51 | void setSize(int w, int h); | ||
52 | void setMaximumColumnWidth(int x) { maxWidth = x; }; | ||
53 | int maximumColumnWidth() const { return maxWidth; }; | ||
54 | void setOccurances(QValueList<EffectiveEvent> &events); | ||
55 | virtual void addOccurance(EffectiveEvent &event); | ||
56 | |||
57 | void clear() { mItems.clear(); } | ||
58 | |||
59 | QVector<LayoutItem> items() const { return mItems; } | ||
60 | QSize size() const { return QSize(width, height); } | ||
61 | int count() const { return mItems.count(); } | ||
62 | |||
63 | virtual void layoutItems(bool resetMaxWidth = FALSE); | ||
64 | |||
65 | virtual int timeToHeight(const QTime &) const; | ||
66 | virtual QTime heightToTime(int) const; | ||
67 | |||
68 | protected: | ||
69 | void initializeGeometry(LayoutItem *); | ||
70 | LayoutItem *intersects(LayoutItem *, QRect) const; | ||
71 | void addItem(LayoutItem *); | ||
72 | |||
73 | private: | ||
74 | QVector<LayoutItem> mItems; | ||
75 | int width; | ||
76 | int height; | ||
77 | int maxWidth; | ||
78 | }; | ||