Diffstat (limited to 'noncore/net/wellenreiter/cornucopia/olistview.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/cornucopia/olistview.h | 81 |
1 files changed, 75 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.h b/noncore/net/wellenreiter/cornucopia/olistview.h index 4b9e4b0..9df5500 100644 --- a/noncore/net/wellenreiter/cornucopia/olistview.h +++ b/noncore/net/wellenreiter/cornucopia/olistview.h | |||
@@ -35,10 +35,13 @@ | |||
35 | 35 | ||
36 | #include <qlistview.h> | ||
37 | #include <qcolor.h> | 36 | #include <qcolor.h> |
37 | #include <qlistview.h> | ||
38 | #include <qpen.h> | 38 | #include <qpen.h> |
39 | #include <qdatastream.h> | ||
40 | |||
41 | class OListViewFactory; | ||
39 | 42 | ||
40 | /** | 43 | /** |
41 | * A @ref QListView variant featuring visual enhancements | 44 | * A @ref QListView variant featuring visual and functional enhancements |
42 | * like an alternate background for odd rows and an autostretch | 45 | * like an alternate background for odd rows, an autostretch mode |
43 | * mode for the width of the widget. | 46 | * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. |
44 | * | 47 | * |
@@ -114,2 +117,25 @@ | |||
114 | 117 | ||
118 | #ifndef QT_NO_DATASTREAM | ||
119 | /** | ||
120 | * serialize this object to a @ref QDataStream | ||
121 | * @param s the stream used to serialize this object. | ||
122 | */ | ||
123 | virtual void serializeTo( QDataStream& s ) const; | ||
124 | |||
125 | /** | ||
126 | * serialize this object from a @ref QDataStream | ||
127 | * @param s the stream used to serialize this object. | ||
128 | */ | ||
129 | virtual void serializeFrom( QDataStream& s ); | ||
130 | #endif | ||
131 | |||
132 | /** | ||
133 | * returns a factory for OListView classes | ||
134 | * creates one on the fly if it doesn't exist | ||
135 | * @return the XML Factory | ||
136 | */ | ||
137 | #ifndef QT_NO_XML | ||
138 | //OListViewFactory* Factory(); | ||
139 | #endif | ||
140 | |||
115 | private: | 141 | private: |
@@ -118,5 +144,20 @@ | |||
118 | QPen m_columnSeparator; | 144 | QPen m_columnSeparator; |
119 | 145 | #ifndef QT_NO_XML | |
146 | //OListViewFactory* m_Factory; | ||
147 | #endif | ||
120 | }; | 148 | }; |
121 | 149 | ||
150 | #ifndef QT_NO_DATASTREAM | ||
151 | /** | ||
152 | * \relates QListView | ||
153 | * Writes a listview to the stream and returns a reference to the stream. | ||
154 | */ | ||
155 | QDataStream& operator<<( QDataStream& s, const OListView& lv ); | ||
156 | /** | ||
157 | * \relates QListView | ||
158 | * Reads a listview from the stream and returns a reference to the stream. | ||
159 | */ | ||
160 | QDataStream& operator>>( QDataStream& s, OListView& lv ); | ||
161 | #endif // QT_NO_DATASTREAM | ||
162 | |||
122 | //****************************** OListViewItem ****************************************************************** | 163 | //****************************** OListViewItem ****************************************************************** |
@@ -162,2 +203,16 @@ class OListViewItem: public QListViewItem | |||
162 | 203 | ||
204 | #ifndef QT_NO_DATASTREAM | ||
205 | /** | ||
206 | * serialize this object to or from a @ref QDataStream | ||
207 | * @param s the stream used to serialize this object. | ||
208 | */ | ||
209 | virtual void serializeTo( QDataStream& s ) const; | ||
210 | |||
211 | /** | ||
212 | * serialize this object to or from a @ref QDataStream | ||
213 | * @param s the stream used to serialize this object. | ||
214 | */ | ||
215 | virtual void serializeFrom( QDataStream& s ); | ||
216 | #endif | ||
217 | |||
163 | private: | 218 | private: |
@@ -167,2 +222,16 @@ class OListViewItem: public QListViewItem | |||
167 | 222 | ||
168 | #endif | 223 | #ifndef QT_NO_DATASTREAM |
224 | /** | ||
225 | * \relates QListViewItem | ||
226 | * Writes a listview item and all subitems recursively to the stream | ||
227 | * and returns a reference to the stream. | ||
228 | */ | ||
229 | QDataStream& operator<<( QDataStream &s, const OListViewItem& lvi ); | ||
230 | /** | ||
231 | * \relates QListViewItem | ||
232 | * Reads a listview item from the stream and returns a reference to the stream. | ||
233 | */ | ||
234 | QDataStream& operator>>( QDataStream &s, OListViewItem& lvi ); | ||
235 | #endif // QT_NO_DATASTREAM | ||
236 | |||
237 | #endif // OLISTVIEW_H | ||