author | mickeyl <mickeyl> | 2003-03-02 17:35:53 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-02 17:35:53 (UTC) |
commit | b3b0d6ec136e550029b9cae7fb714d47071ea5b4 (patch) (side-by-side diff) | |
tree | 9cc1fb741bb548c90915487572c49a1ae48e33eb /noncore/net/wellenreiter/cornucopia/olistview.h | |
parent | d0e64d0c7961de1c3ecb886ae76c6701f268d767 (diff) | |
download | opie-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) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/cornucopia/olistview.h | 26 |
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 @@ #ifndef OLISTVIEW_H #define OLISTVIEW_H #include <qcolor.h> #include <qlistview.h> #include <qpen.h> #include <qdatastream.h> -class OListViewFactory; +class OListViewItem; /** * A @ref QListView variant featuring visual and functional enhancements * like an alternate background for odd rows, an autostretch mode * for the width of the widget ( >= Qt 3 only ) and persistence capabilities. * * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> * @short OListView list/tree widget. @@ -110,46 +110,40 @@ class OListViewFactory; */ const QColor& alternateBackground() const; /** * @return the column separator pen */ const QPen& columnSeparator() const; + /** + * create a list view item as child of this object + * @return the new object + */ + virtual OListViewItem* childFactory(); + #ifndef QT_NO_DATASTREAM /** * serialize this object to a @ref QDataStream * @param s the stream used to serialize this object. */ virtual void serializeTo( QDataStream& s ) const; /** * serialize this object from a @ref QDataStream * @param s the stream used to serialize this object. */ virtual void serializeFrom( QDataStream& s ); #endif - /** - * returns a factory for OListView classes - * creates one on the fly if it doesn't exist - * @return the XML Factory - */ - #ifndef QT_NO_XML - //OListViewFactory* Factory(); - #endif - private: QColor m_alternateBackground; bool m_fullWidth; QPen m_columnSeparator; - #ifndef QT_NO_XML - //OListViewFactory* m_Factory; - #endif }; #ifndef QT_NO_DATASTREAM /** * \relates QListView * Writes a listview to the stream and returns a reference to the stream. */ QDataStream& operator<<( QDataStream& s, const OListView& lv ); @@ -196,16 +190,22 @@ class OListViewItem: public QListViewItem virtual ~OListViewItem(); const QColor& backgroundColor(); bool isAlternate(); void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); void init(); + /** + * create a list view item as child of this object + * @return the new object + */ + virtual OListViewItem* childFactory(); + #ifndef QT_NO_DATASTREAM /** * serialize this object to or from a @ref QDataStream * @param s the stream used to serialize this object. */ virtual void serializeTo( QDataStream& s ) const; /** |