summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/cornucopia/olistview.h
authormickeyl <mickeyl>2003-03-02 17:35:53 (UTC)
committer mickeyl <mickeyl>2003-03-02 17:35:53 (UTC)
commitb3b0d6ec136e550029b9cae7fb714d47071ea5b4 (patch) (unidiff)
tree9cc1fb741bb548c90915487572c49a1ae48e33eb /noncore/net/wellenreiter/cornucopia/olistview.h
parentd0e64d0c7961de1c3ecb886ae76c6701f268d767 (diff)
downloadopie-b3b0d6ec136e550029b9cae7fb714d47071ea5b4.zip
opie-b3b0d6ec136e550029b9cae7fb714d47071ea5b4.tar.gz
opie-b3b0d6ec136e550029b9cae7fb714d47071ea5b4.tar.bz2
add child item factory to allow subclasses adding custom data items
Diffstat (limited to 'noncore/net/wellenreiter/cornucopia/olistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/cornucopia/olistview.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.h b/noncore/net/wellenreiter/cornucopia/olistview.h
index 9df5500..8911e22 100644
--- a/noncore/net/wellenreiter/cornucopia/olistview.h
+++ b/noncore/net/wellenreiter/cornucopia/olistview.h
@@ -33,17 +33,17 @@
33#ifndef OLISTVIEW_H 33#ifndef OLISTVIEW_H
34#define OLISTVIEW_H 34#define OLISTVIEW_H
35 35
36#include <qcolor.h> 36#include <qcolor.h>
37#include <qlistview.h> 37#include <qlistview.h>
38#include <qpen.h> 38#include <qpen.h>
39#include <qdatastream.h> 39#include <qdatastream.h>
40 40
41class OListViewFactory; 41class OListViewItem;
42 42
43/** 43/**
44 * A @ref QListView variant featuring visual and functional enhancements 44 * A @ref QListView variant featuring visual and functional enhancements
45 * like an alternate background for odd rows, an autostretch mode 45 * like an alternate background for odd rows, an autostretch mode
46 * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. 46 * for the width of the widget ( >= Qt 3 only ) and persistence capabilities.
47 * 47 *
48 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 48 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
49 * @short OListView list/tree widget. 49 * @short OListView list/tree widget.
@@ -110,46 +110,40 @@ class OListViewFactory;
110 */ 110 */
111 const QColor& alternateBackground() const; 111 const QColor& alternateBackground() const;
112 112
113 /** 113 /**
114 * @return the column separator pen 114 * @return the column separator pen
115 */ 115 */
116 const QPen& columnSeparator() const; 116 const QPen& columnSeparator() const;
117 117
118 /**
119 * create a list view item as child of this object
120 * @return the new object
121 */
122 virtual OListViewItem* childFactory();
123
118 #ifndef QT_NO_DATASTREAM 124 #ifndef QT_NO_DATASTREAM
119 /** 125 /**
120 * serialize this object to a @ref QDataStream 126 * serialize this object to a @ref QDataStream
121 * @param s the stream used to serialize this object. 127 * @param s the stream used to serialize this object.
122 */ 128 */
123 virtual void serializeTo( QDataStream& s ) const; 129 virtual void serializeTo( QDataStream& s ) const;
124 130
125 /** 131 /**
126 * serialize this object from a @ref QDataStream 132 * serialize this object from a @ref QDataStream
127 * @param s the stream used to serialize this object. 133 * @param s the stream used to serialize this object.
128 */ 134 */
129 virtual void serializeFrom( QDataStream& s ); 135 virtual void serializeFrom( QDataStream& s );
130 #endif 136 #endif
131 137
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
141 private: 138 private:
142 QColor m_alternateBackground; 139 QColor m_alternateBackground;
143 bool m_fullWidth; 140 bool m_fullWidth;
144 QPen m_columnSeparator; 141 QPen m_columnSeparator;
145 #ifndef QT_NO_XML
146 //OListViewFactory* m_Factory;
147 #endif
148}; 142};
149 143
150#ifndef QT_NO_DATASTREAM 144#ifndef QT_NO_DATASTREAM
151/** 145/**
152 * \relates QListView 146 * \relates QListView
153 * Writes a listview to the stream and returns a reference to the stream. 147 * Writes a listview to the stream and returns a reference to the stream.
154 */ 148 */
155QDataStream& operator<<( QDataStream& s, const OListView& lv ); 149QDataStream& operator<<( QDataStream& s, const OListView& lv );
@@ -196,16 +190,22 @@ class OListViewItem: public QListViewItem
196 190
197 virtual ~OListViewItem(); 191 virtual ~OListViewItem();
198 192
199 const QColor& backgroundColor(); 193 const QColor& backgroundColor();
200 bool isAlternate(); 194 bool isAlternate();
201 void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); 195 void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment );
202 void init(); 196 void init();
203 197
198 /**
199 * create a list view item as child of this object
200 * @return the new object
201 */
202 virtual OListViewItem* childFactory();
203
204 #ifndef QT_NO_DATASTREAM 204 #ifndef QT_NO_DATASTREAM
205 /** 205 /**
206 * serialize this object to or from a @ref QDataStream 206 * serialize this object to or from a @ref QDataStream
207 * @param s the stream used to serialize this object. 207 * @param s the stream used to serialize this object.
208 */ 208 */
209 virtual void serializeTo( QDataStream& s ) const; 209 virtual void serializeTo( QDataStream& s ) const;
210 210
211 /** 211 /**