-rw-r--r-- | libopie2/opieui/opieui.pro | 20 | ||||
-rw-r--r-- | libopie2/opieui/oversatileview.h | 2 |
2 files changed, 16 insertions, 6 deletions
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index aa85955..1b6ecdf 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro | |||
@@ -1,48 +1,58 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = ocompletionbox.h \ | 4 | HEADERS = ocompletionbox.h \ |
5 | ocombobox.h \ | 5 | ocombobox.h \ |
6 | oeditlistbox.h \ | 6 | oeditlistbox.h \ |
7 | olineedit.h \ | 7 | olineedit.h \ |
8 | olistview.h \ | 8 | olistview.h \ |
9 | oimageeffect.h \ | 9 | oimageeffect.h \ |
10 | opixmapeffect.h \ | 10 | opixmapeffect.h \ |
11 | opopupmenu.h \ | 11 | opopupmenu.h \ |
12 | opixmapprovider.h \ | 12 | opixmapprovider.h \ |
13 | oselector.h \ | 13 | oselector.h \ |
14 | oversatileview.h \ | 14 | oversatileview.h \ |
15 | oversatileviewitem.h \ | 15 | oversatileviewitem.h \ |
16 | #ojanuswidget.h \ | 16 | #ojanuswidget.h \ |
17 | odialog.h \ | 17 | odialog.h \ |
18 | oseparator.h \ | 18 | oseparator.h |
19 | otaskbarapplet.h | 19 | # otaskbarapplet.h |
20 | 20 | ||
21 | SOURCES = ocompletionbox.cpp \ | 21 | SOURCES = ocompletionbox.cpp \ |
22 | ocombobox.cpp \ | 22 | ocombobox.cpp \ |
23 | oeditlistbox.cpp \ | 23 | oeditlistbox.cpp \ |
24 | olineedit.cpp \ | 24 | olineedit.cpp \ |
25 | olistview.cpp \ | 25 | olistview.cpp \ |
26 | oimageeffect.cpp \ | 26 | oimageeffect.cpp \ |
27 | opixmapeffect.cpp \ | 27 | opixmapeffect.cpp \ |
28 | opopupmenu.cpp \ | 28 | opopupmenu.cpp \ |
29 | opixmapprovider.cpp \ | 29 | opixmapprovider.cpp \ |
30 | oselector.cpp \ | 30 | oselector.cpp \ |
31 | oversatileview.cpp \ | 31 | oversatileview.cpp \ |
32 | oversatileviewitem.cpp \ | 32 | oversatileviewitem.cpp \ |
33 | #ojanuswidget.cpp \ | 33 | #ojanuswidget.cpp \ |
34 | odialog.cpp \ | 34 | odialog.cpp \ |
35 | oseparator.cpp \ | 35 | oseparator.cpp #\ |
36 | otaskbarapplet.cpp | 36 | # otaskbarapplet.cpp |
37 | 37 | ||
38 | INTERFACES = | 38 | INTERFACES = |
39 | TARGET = opieui2 | 39 | TARGET = opieui2 |
40 | VERSION = 1.8.1 | 40 | VERSION = 1.8.1 |
41 | INCLUDEPATH += $(OPIEDIR)/include | 41 | INCLUDEPATH += $(OPIEDIR)/include |
42 | DEPENDPATH += $(OPIEDIR)/include | 42 | DEPENDPATH += $(OPIEDIR)/include |
43 | LIBS += -lopiecore2 | 43 | LIBS += -lopiecore2 |
44 | MOC_DIR = moc | 44 | MOC_DIR = moc |
45 | OBJECTS_DIR = obj | 45 | OBJECTS_DIR = obj |
46 | 46 | ||
47 | include ( $(OPIEDIR)/include.pro ) | 47 | |
48 | !contains( platform, x11 ) { | ||
49 | include ( $(OPIEDIR)/include.pro ) | ||
50 | HEADERS += otaskbarapplet.h | ||
51 | SOURCES += otaskbarapplet.cpp | ||
52 | } | ||
53 | |||
54 | contains( platform, x11 ) { | ||
55 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | ||
56 | message( Warning: NO otaskbarapplet ATM ) | ||
57 | } | ||
48 | 58 | ||
diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 1df8154..8af21dc 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h | |||
@@ -1,394 +1,394 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | =. (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OVERSATILEVIEW_H | 31 | #ifndef OVERSATILEVIEW_H |
32 | #define OVERSATILEVIEW_H | 32 | #define OVERSATILEVIEW_H |
33 | 33 | ||
34 | /* QT */ | 34 | /* QT */ |
35 | 35 | ||
36 | #include <qwidgetstack.h> | 36 | #include <qwidgetstack.h> |
37 | #include <qiconview.h> | 37 | #include <qiconview.h> |
38 | 38 | ||
39 | /* OPIE */ | 39 | /* OPIE */ |
40 | 40 | ||
41 | #include <qpe/qpeapplication.h> | 41 | #include <opie2/oapplication.h> |
42 | 42 | ||
43 | /* FORWARDS */ | 43 | /* FORWARDS */ |
44 | 44 | ||
45 | class QHeader; | 45 | class QHeader; |
46 | class QIconSet; | 46 | class QIconSet; |
47 | class QIconViewItem; | 47 | class QIconViewItem; |
48 | class OListView; | 48 | class OListView; |
49 | class QListViewItem; | 49 | class QListViewItem; |
50 | class QPopupMenu; | 50 | class QPopupMenu; |
51 | class QString; | 51 | class QString; |
52 | 52 | ||
53 | #ifndef QT_NO_DRAGANDDROP | 53 | #ifndef QT_NO_DRAGANDDROP |
54 | class QIconDragItem; | 54 | class QIconDragItem; |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | class OVersatileView : public QWidgetStack | 57 | class OVersatileView : public QWidgetStack |
58 | { | 58 | { |
59 | Q_OBJECT | 59 | Q_OBJECT |
60 | 60 | ||
61 | friend class OVersatileViewItem; | 61 | friend class OVersatileViewItem; |
62 | 62 | ||
63 | //==============================================================================================// | 63 | //==============================================================================================// |
64 | // OVersatileView High Level API | 64 | // OVersatileView High Level API |
65 | //==============================================================================================// | 65 | //==============================================================================================// |
66 | 66 | ||
67 | public: | 67 | public: |
68 | OVersatileView( QWidget* parent = 0, const char* name = 0, int mode = 0 ); | 68 | OVersatileView( QWidget* parent = 0, const char* name = 0, int mode = 0 ); |
69 | ~OVersatileView(); | 69 | ~OVersatileView(); |
70 | 70 | ||
71 | QPopupMenu* contextMenu() const; | 71 | QPopupMenu* contextMenu() const; |
72 | 72 | ||
73 | void setSynchronization( bool sync ); | 73 | void setSynchronization( bool sync ); |
74 | bool synchronization(); | 74 | bool synchronization(); |
75 | 75 | ||
76 | enum ViewMode { Tree = 0, Icons }; | 76 | enum ViewMode { Tree = 0, Icons }; |
77 | int viewMode(); | 77 | int viewMode(); |
78 | 78 | ||
79 | QIconView* iconView() const; | 79 | QIconView* iconView() const; |
80 | OListView* listView() const; | 80 | OListView* listView() const; |
81 | 81 | ||
82 | enum WarningPolicy { None = 0, Warn, WarnReturn }; | 82 | enum WarningPolicy { None = 0, Warn, WarnReturn }; |
83 | 83 | ||
84 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode | 84 | void setWarningPolicy( int ) const; // warn, if calling a method which doesn't apply to the current viewmode |
85 | bool warningPolicy() const; | 85 | bool warningPolicy() const; |
86 | 86 | ||
87 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); | 87 | void setDefaultPixmaps( int mode, QPixmap& leaf, QPixmap& opened, QPixmap& closed ); |
88 | 88 | ||
89 | public slots: | 89 | public slots: |
90 | void setViewMode( int mode ); | 90 | void setViewMode( int mode ); |
91 | void setIconViewMode(); | 91 | void setIconViewMode(); |
92 | void setTreeViewMode(); | 92 | void setTreeViewMode(); |
93 | 93 | ||
94 | protected: | 94 | protected: |
95 | virtual bool isValidViewMode( int mode ) const; | 95 | virtual bool isValidViewMode( int mode ) const; |
96 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); | 96 | virtual void popupContextMenu( OVersatileViewItem* item, const QPoint& pos, int col = 0 ); |
97 | 97 | ||
98 | private: | 98 | private: |
99 | int _viewmode; | 99 | int _viewmode; |
100 | bool _synchronization; | 100 | bool _synchronization; |
101 | mutable int _warningpolicy; | 101 | mutable int _warningpolicy; |
102 | 102 | ||
103 | OListView* _listview; | 103 | OListView* _listview; |
104 | QIconView* _iconview; | 104 | QIconView* _iconview; |
105 | 105 | ||
106 | QPixmap _treeleaf; | 106 | QPixmap _treeleaf; |
107 | QPixmap _treeopened; | 107 | QPixmap _treeopened; |
108 | QPixmap _treeclosed; | 108 | QPixmap _treeclosed; |
109 | 109 | ||
110 | QPixmap _iconleaf; | 110 | QPixmap _iconleaf; |
111 | QPixmap _iconopened; | 111 | QPixmap _iconopened; |
112 | QPixmap _iconclosed; | 112 | QPixmap _iconclosed; |
113 | 113 | ||
114 | QPopupMenu* _contextmenu; | 114 | QPopupMenu* _contextmenu; |
115 | 115 | ||
116 | int _iconstyle; | 116 | int _iconstyle; |
117 | int _treestyle; | 117 | int _treestyle; |
118 | 118 | ||
119 | private slots: | 119 | private slots: |
120 | 120 | ||
121 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); | 121 | void contextMenuRequested( QListViewItem*, const QPoint&, int ); |
122 | void contextMenuRequested( QIconViewItem*, const QPoint& ); | 122 | void contextMenuRequested( QIconViewItem*, const QPoint& ); |
123 | 123 | ||
124 | // type converting signal forwarders | 124 | // type converting signal forwarders |
125 | 125 | ||
126 | void selectionChanged( QListViewItem * ); | 126 | void selectionChanged( QListViewItem * ); |
127 | void currentChanged( QListViewItem * ); | 127 | void currentChanged( QListViewItem * ); |
128 | void clicked( QListViewItem * ); | 128 | void clicked( QListViewItem * ); |
129 | void pressed( QListViewItem * ); | 129 | void pressed( QListViewItem * ); |
130 | void doubleClicked( QListViewItem * ); | 130 | void doubleClicked( QListViewItem * ); |
131 | void returnPressed( QListViewItem * ); | 131 | void returnPressed( QListViewItem * ); |
132 | void onItem( QListViewItem * ); | 132 | void onItem( QListViewItem * ); |
133 | 133 | ||
134 | void selectionChanged( QIconViewItem * ); | 134 | void selectionChanged( QIconViewItem * ); |
135 | void currentChanged( QIconViewItem * ); | 135 | void currentChanged( QIconViewItem * ); |
136 | void clicked( QIconViewItem * ); | 136 | void clicked( QIconViewItem * ); |
137 | void pressed( QIconViewItem * ); | 137 | void pressed( QIconViewItem * ); |
138 | void doubleClicked( QIconViewItem * ); | 138 | void doubleClicked( QIconViewItem * ); |
139 | void returnPressed( QIconViewItem * ); | 139 | void returnPressed( QIconViewItem * ); |
140 | void onItem( QIconViewItem * ); | 140 | void onItem( QIconViewItem * ); |
141 | 141 | ||
142 | void expanded( QListViewItem * item ); // QListView | 142 | void expanded( QListViewItem * item ); // QListView |
143 | void collapsed( QListViewItem * item ); // QListView | 143 | void collapsed( QListViewItem * item ); // QListView |
144 | 144 | ||
145 | signals: | 145 | signals: |
146 | 146 | ||
147 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); | 147 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); |
148 | 148 | ||
149 | /*#ifndef QT_NO_DRAGANDDROP | 149 | /*#ifndef QT_NO_DRAGANDDROP |
150 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 150 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
151 | #endif | 151 | #endif |
152 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 152 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView |
153 | void itemRenamed( OVersatileViewItem *item ); // QIconView | 153 | void itemRenamed( OVersatileViewItem *item ); // QIconView |
154 | */ | 154 | */ |
155 | 155 | ||
156 | //==============================================================================================// | 156 | //==============================================================================================// |
157 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView | 157 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView |
158 | //==============================================================================================// | 158 | //==============================================================================================// |
159 | 159 | ||
160 | public: | 160 | public: |
161 | 161 | ||
162 | /* | 162 | /* |
163 | enum Arrangement { // QIconView | 163 | enum Arrangement { // QIconView |
164 | LeftToRight = 0, | 164 | LeftToRight = 0, |
165 | TopToBottom | 165 | TopToBottom |
166 | }; | 166 | }; |
167 | enum ResizeMode { // QIconView | 167 | enum ResizeMode { // QIconView |
168 | Fixed = 0, | 168 | Fixed = 0, |
169 | Adjust | 169 | Adjust |
170 | }; | 170 | }; |
171 | enum ItemTextPos { // QIconView | 171 | enum ItemTextPos { // QIconView |
172 | Bottom = 0, | 172 | Bottom = 0, |
173 | Right | 173 | Right |
174 | }; | 174 | }; |
175 | */ | 175 | */ |
176 | 176 | ||
177 | // | 177 | // |
178 | // only in QListView | 178 | // only in QListView |
179 | // | 179 | // |
180 | 180 | ||
181 | int treeStepSize() const; // QListView | 181 | int treeStepSize() const; // QListView |
182 | virtual void setTreeStepSize( int ); // QListView | 182 | virtual void setTreeStepSize( int ); // QListView |
183 | 183 | ||
184 | QHeader * header() const; // QListView | 184 | QHeader * header() const; // QListView |
185 | 185 | ||
186 | virtual int addColumn( const QString &label, int size = -1); // QListView | 186 | virtual int addColumn( const QString &label, int size = -1); // QListView |
187 | virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView | 187 | virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView |
188 | void removeColumn( int index ); // #### make virtual in next major release! // QListView | 188 | void removeColumn( int index ); // #### make virtual in next major release! // QListView |
189 | virtual void setColumnText( int column, const QString &label ); // QListView | 189 | virtual void setColumnText( int column, const QString &label ); // QListView |
190 | virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView | 190 | virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView |
191 | QString columnText( int column ) const; // QListView | 191 | QString columnText( int column ) const; // QListView |
192 | virtual void setColumnWidth( int column, int width ); // QListView | 192 | virtual void setColumnWidth( int column, int width ); // QListView |
193 | int columnWidth( int column ) const; // QListView | 193 | int columnWidth( int column ) const; // QListView |
194 | enum WidthMode { Manual, Maximum }; // QListView | 194 | enum WidthMode { Manual, Maximum }; // QListView |
195 | virtual void setColumnWidthMode( int column, WidthMode ); // QListView | 195 | virtual void setColumnWidthMode( int column, WidthMode ); // QListView |
196 | WidthMode columnWidthMode( int column ) const; // QListView | 196 | WidthMode columnWidthMode( int column ) const; // QListView |
197 | int columns() const; // QListView | 197 | int columns() const; // QListView |
198 | 198 | ||
199 | virtual void setColumnAlignment( int, int ); // QListView | 199 | virtual void setColumnAlignment( int, int ); // QListView |
200 | int columnAlignment( int ) const; // QListView | 200 | int columnAlignment( int ) const; // QListView |
201 | 201 | ||
202 | OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView | 202 | OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView |
203 | QRect itemRect( const OVersatileViewItem * ) const; // QListView | 203 | QRect itemRect( const OVersatileViewItem * ) const; // QListView |
204 | int itemPos( const OVersatileViewItem * ); // QListView | 204 | int itemPos( const OVersatileViewItem * ); // QListView |
205 | 205 | ||
206 | bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug* | 206 | bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug* |
207 | 207 | ||
208 | virtual void setMultiSelection( bool enable ); // QListView | 208 | virtual void setMultiSelection( bool enable ); // QListView |
209 | bool isMultiSelection() const; // QListView | 209 | bool isMultiSelection() const; // QListView |
210 | 210 | ||
211 | OVersatileViewItem * selectedItem() const; // QListView | 211 | OVersatileViewItem * selectedItem() const; // QListView |
212 | virtual void setOpen( OVersatileViewItem *, bool ); // QListView | 212 | virtual void setOpen( OVersatileViewItem *, bool ); // QListView |
213 | bool isOpen( const OVersatileViewItem * ) const; // QListView | 213 | bool isOpen( const OVersatileViewItem * ) const; // QListView |
214 | 214 | ||
215 | OVersatileViewItem * firstChild() const; // QListView | 215 | OVersatileViewItem * firstChild() const; // QListView |
216 | int childCount() const; // QListView | 216 | int childCount() const; // QListView |
217 | 217 | ||
218 | virtual void setAllColumnsShowFocus( bool ); // QListView | 218 | virtual void setAllColumnsShowFocus( bool ); // QListView |
219 | bool allColumnsShowFocus() const; // QListView | 219 | bool allColumnsShowFocus() const; // QListView |
220 | 220 | ||
221 | virtual void setItemMargin( int ); // QListView | 221 | virtual void setItemMargin( int ); // QListView |
222 | int itemMargin() const; // QListView | 222 | int itemMargin() const; // QListView |
223 | 223 | ||
224 | virtual void setRootIsDecorated( bool ); // QListView | 224 | virtual void setRootIsDecorated( bool ); // QListView |
225 | bool rootIsDecorated() const; // QListView | 225 | bool rootIsDecorated() const; // QListView |
226 | 226 | ||
227 | void setShowSortIndicator( bool show ); // QListView | 227 | void setShowSortIndicator( bool show ); // QListView |
228 | bool showSortIndicator() const; // QListView | 228 | bool showSortIndicator() const; // QListView |
229 | 229 | ||
230 | int index( const OVersatileViewItem *item ) const; // QIconView | 230 | int index( const OVersatileViewItem *item ) const; // QIconView |
231 | 231 | ||
232 | public slots: | 232 | public slots: |
233 | void triggerUpdate(); // QListView | 233 | void triggerUpdate(); // QListView |
234 | 234 | ||
235 | signals: | 235 | signals: |
236 | void expanded( OVersatileViewItem *item ); // QListView | 236 | void expanded( OVersatileViewItem *item ); // QListView |
237 | void collapsed( OVersatileViewItem *item ); // QListView | 237 | void collapsed( OVersatileViewItem *item ); // QListView |
238 | 238 | ||
239 | // | 239 | // |
240 | // only in QIconView | 240 | // only in QIconView |
241 | // | 241 | // |
242 | 242 | ||
243 | public: | 243 | public: |
244 | uint count() const; // QIconView | 244 | uint count() const; // QIconView |
245 | 245 | ||
246 | OVersatileViewItem *firstItem() const; // QIconView | 246 | OVersatileViewItem *firstItem() const; // QIconView |
247 | OVersatileViewItem *lastItem() const; // QIconView | 247 | OVersatileViewItem *lastItem() const; // QIconView |
248 | 248 | ||
249 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView | 249 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView |
250 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView | 250 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView |
251 | 251 | ||
252 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView | 252 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView |
253 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView | 253 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView |
254 | 254 | ||
255 | virtual void setGridX( int rx ); // QIconView | 255 | virtual void setGridX( int rx ); // QIconView |
256 | virtual void setGridY( int ry ); // QIconView | 256 | virtual void setGridY( int ry ); // QIconView |
257 | int gridX() const; // QIconView | 257 | int gridX() const; // QIconView |
258 | int gridY() const; // QIconView | 258 | int gridY() const; // QIconView |
259 | virtual void setSpacing( int sp ); // QIconView | 259 | virtual void setSpacing( int sp ); // QIconView |
260 | int spacing() const; // QIconView | 260 | int spacing() const; // QIconView |
261 | virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView | 261 | virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView |
262 | QIconView::ItemTextPos itemTextPos() const; // QIconView | 262 | QIconView::ItemTextPos itemTextPos() const; // QIconView |
263 | virtual void setItemTextBackground( const QBrush &b ); // QIconView | 263 | virtual void setItemTextBackground( const QBrush &b ); // QIconView |
264 | QBrush itemTextBackground() const; // QIconView | 264 | QBrush itemTextBackground() const; // QIconView |
265 | virtual void setArrangement( QIconView::Arrangement am ); // QIconView | 265 | virtual void setArrangement( QIconView::Arrangement am ); // QIconView |
266 | QIconView::Arrangement arrangement() const; // QIconView | 266 | QIconView::Arrangement arrangement() const; // QIconView |
267 | virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView | 267 | virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView |
268 | QIconView::ResizeMode resizeMode() const; // QIconView | 268 | QIconView::ResizeMode resizeMode() const; // QIconView |
269 | virtual void setMaxItemWidth( int w ); // QIconView | 269 | virtual void setMaxItemWidth( int w ); // QIconView |
270 | int maxItemWidth() const; // QIconView | 270 | int maxItemWidth() const; // QIconView |
271 | virtual void setMaxItemTextLength( int w ); // QIconView | 271 | virtual void setMaxItemTextLength( int w ); // QIconView |
272 | int maxItemTextLength() const; // QIconView | 272 | int maxItemTextLength() const; // QIconView |
273 | virtual void setAutoArrange( bool b ); // QIconView | 273 | virtual void setAutoArrange( bool b ); // QIconView |
274 | bool autoArrange() const; // QIconView | 274 | bool autoArrange() const; // QIconView |
275 | virtual void setShowToolTips( bool b ); // QIconView | 275 | virtual void setShowToolTips( bool b ); // QIconView |
276 | bool showToolTips() const; // QIconView | 276 | bool showToolTips() const; // QIconView |
277 | 277 | ||
278 | bool sorting() const; // QIconView | 278 | bool sorting() const; // QIconView |
279 | bool sortDirection() const; // QIconView | 279 | bool sortDirection() const; // QIconView |
280 | 280 | ||
281 | virtual void setItemsMovable( bool b ); // QIconView | 281 | virtual void setItemsMovable( bool b ); // QIconView |
282 | bool itemsMovable() const; // QIconView | 282 | bool itemsMovable() const; // QIconView |
283 | virtual void setWordWrapIconText( bool b ); // QIconView | 283 | virtual void setWordWrapIconText( bool b ); // QIconView |
284 | bool wordWrapIconText() const; // QIconView | 284 | bool wordWrapIconText() const; // QIconView |
285 | 285 | ||
286 | public slots: | 286 | public slots: |
287 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView | 287 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView |
288 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView | 288 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView |
289 | virtual void updateContents(); // QIconView | 289 | virtual void updateContents(); // QIconView |
290 | 290 | ||
291 | signals: | 291 | signals: |
292 | /*#ifndef QT_NO_DRAGANDDROP | 292 | /*#ifndef QT_NO_DRAGANDDROP |
293 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 293 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
294 | #endif | 294 | #endif |
295 | */ | 295 | */ |
296 | void moved(); // QIconView | 296 | void moved(); // QIconView |
297 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 297 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView |
298 | void itemRenamed( OVersatileViewItem *item ); // QIconView | 298 | void itemRenamed( OVersatileViewItem *item ); // QIconView |
299 | 299 | ||
300 | //==============================================================================================// | 300 | //==============================================================================================// |
301 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with the same signatures | 301 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with the same signatures |
302 | //==============================================================================================// | 302 | //==============================================================================================// |
303 | 303 | ||
304 | public: | 304 | public: |
305 | enum SelectionMode { | 305 | enum SelectionMode { |
306 | Single = 0, | 306 | Single = 0, |
307 | Multi, | 307 | Multi, |
308 | Extended, | 308 | Extended, |
309 | NoSelection | 309 | NoSelection |
310 | }; | 310 | }; |
311 | 311 | ||
312 | virtual void clear(); | 312 | virtual void clear(); |
313 | 313 | ||
314 | virtual void setFont( const QFont & ); | 314 | virtual void setFont( const QFont & ); |
315 | virtual void setPalette( const QPalette & ); | 315 | virtual void setPalette( const QPalette & ); |
316 | 316 | ||
317 | virtual void takeItem( OVersatileViewItem * ); | 317 | virtual void takeItem( OVersatileViewItem * ); |
318 | 318 | ||
319 | void setSelectionMode( SelectionMode mode ); | 319 | void setSelectionMode( SelectionMode mode ); |
320 | SelectionMode selectionMode() const; | 320 | SelectionMode selectionMode() const; |
321 | 321 | ||
322 | virtual void selectAll( bool select ); | 322 | virtual void selectAll( bool select ); |
323 | virtual void clearSelection(); | 323 | virtual void clearSelection(); |
324 | virtual void invertSelection(); | 324 | virtual void invertSelection(); |
325 | 325 | ||
326 | void ensureItemVisible( const OVersatileViewItem * ); | 326 | void ensureItemVisible( const OVersatileViewItem * ); |
327 | virtual void repaintItem( const OVersatileViewItem * ) const; | 327 | virtual void repaintItem( const OVersatileViewItem * ) const; |
328 | 328 | ||
329 | virtual void setCurrentItem( OVersatileViewItem * ); | 329 | virtual void setCurrentItem( OVersatileViewItem * ); |
330 | OVersatileViewItem * currentItem() const; | 330 | OVersatileViewItem * currentItem() const; |
331 | 331 | ||
332 | // bool eventFilter( QObject * o, QEvent * ); // use QWidgetStack implementation | 332 | // bool eventFilter( QObject * o, QEvent * ); // use QWidgetStack implementation |
333 | 333 | ||
334 | // QSize minimumSizeHint() const; // use QWidgetStack implementation | 334 | // QSize minimumSizeHint() const; // use QWidgetStack implementation |
335 | // QSizePolicy sizePolicy() const; // use QWidgetStack implementation | 335 | // QSizePolicy sizePolicy() const; // use QWidgetStack implementation |
336 | // QSize sizeHint() const; // use QWidgetStack implementation | 336 | // QSize sizeHint() const; // use QWidgetStack implementation |
337 | 337 | ||
338 | signals: | 338 | signals: |
339 | void selectionChanged(); | 339 | void selectionChanged(); |
340 | void selectionChanged( OVersatileViewItem * ); | 340 | void selectionChanged( OVersatileViewItem * ); |
341 | void currentChanged( OVersatileViewItem * ); | 341 | void currentChanged( OVersatileViewItem * ); |
342 | void clicked( OVersatileViewItem * ); | 342 | void clicked( OVersatileViewItem * ); |
343 | void pressed( OVersatileViewItem * ); | 343 | void pressed( OVersatileViewItem * ); |
344 | 344 | ||
345 | void doubleClicked( OVersatileViewItem * ); | 345 | void doubleClicked( OVersatileViewItem * ); |
346 | void returnPressed( OVersatileViewItem * ); | 346 | void returnPressed( OVersatileViewItem * ); |
347 | 347 | ||
348 | void onItem( OVersatileViewItem * ); | 348 | void onItem( OVersatileViewItem * ); |
349 | void onViewport(); | 349 | void onViewport(); |
350 | 350 | ||
351 | //==============================================================================================// | 351 | //==============================================================================================// |
352 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures | 352 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures |
353 | //==============================================================================================// | 353 | //==============================================================================================// |
354 | 354 | ||
355 | /* | 355 | /* |
356 | 356 | ||
357 | public: | 357 | public: |
358 | virtual void insertItem( OVersatileViewItem * ); // QListView | 358 | virtual void insertItem( OVersatileViewItem * ); // QListView |
359 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView | 359 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView |
360 | 360 | ||
361 | virtual void setSelected( OVersatileViewItem *, bool ); // QListView | 361 | virtual void setSelected( OVersatileViewItem *, bool ); // QListView |
362 | virtual void setSelected( OVersatileViewItem *item, bool s, bool cb = FALSE ); // QIconView | 362 | virtual void setSelected( OVersatileViewItem *item, bool s, bool cb = FALSE ); // QIconView |
363 | 363 | ||
364 | virtual void setSorting( int column, bool increasing = TRUE ); // QListView | 364 | virtual void setSorting( int column, bool increasing = TRUE ); // QListView |
365 | void setSorting( bool sort, bool ascending = TRUE ); // QIconView | 365 | void setSorting( bool sort, bool ascending = TRUE ); // QIconView |
366 | 366 | ||
367 | void sort(); // #### make virtual in next major release // QListView | 367 | void sort(); // #### make virtual in next major release // QListView |
368 | virtual void sort( bool ascending = TRUE ); // QIconView | 368 | virtual void sort( bool ascending = TRUE ); // QIconView |
369 | 369 | ||
370 | */ | 370 | */ |
371 | 371 | ||
372 | signals: | 372 | signals: |
373 | void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView | 373 | void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView |
374 | void clicked( OVersatileViewItem *, const QPoint & ); // QIconView | 374 | void clicked( OVersatileViewItem *, const QPoint & ); // QIconView |
375 | 375 | ||
376 | void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView | 376 | void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView |
377 | void pressed( OVersatileViewItem *, const QPoint & ); // QIconView | 377 | void pressed( OVersatileViewItem *, const QPoint & ); // QIconView |
378 | 378 | ||
379 | void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 379 | void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView |
380 | void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView | 380 | void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView |
381 | 381 | ||
382 | void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 382 | void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView |
383 | void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView | 383 | void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView |
384 | 384 | ||
385 | void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView | 385 | void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView |
386 | void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 386 | void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView |
387 | 387 | ||
388 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView | 388 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView |
389 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 389 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView |
390 | 390 | ||
391 | }; | 391 | }; |
392 | 392 | ||
393 | #endif | 393 | #endif |
394 | 394 | ||