summaryrefslogtreecommitdiff
path: root/libopie2/opieui/olistview.h
authormickeyl <mickeyl>2003-05-01 23:06:29 (UTC)
committer mickeyl <mickeyl>2003-05-01 23:06:29 (UTC)
commit49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6 (patch) (side-by-side diff)
tree503a7fe9fba8e297b15c07398fbf2ee215294f1c /libopie2/opieui/olistview.h
parent8266da96576ad43a768da37000cef4e8eba000ac (diff)
downloadopie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.zip
opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.gz
opie-49dfb55bd22f5027fcbcbc55648efd4bce6c8fd6.tar.bz2
more work on a higher level listview interface
Diffstat (limited to 'libopie2/opieui/olistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/olistview.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/libopie2/opieui/olistview.h b/libopie2/opieui/olistview.h
index 99770bf..1bbdd5b 100644
--- a/libopie2/opieui/olistview.h
+++ b/libopie2/opieui/olistview.h
@@ -241,10 +241,12 @@ QDataStream& operator>>( QDataStream& stream, OListViewItem& item );
* ONamedListView
*======================================================================================*/
+class ONamedListViewItem;
+
/**
* @brief An OListView variant with named columns.
*
- * This class provides a higher-level interface to the columns in an OListView.
+ * This class provides a higher-level interface to an OListView.
*
* @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
*/
@@ -266,6 +268,24 @@ class ONamedListView: public OListView
* Add a number of @a columns to the listview.
*/
virtual void addColumns( const QStringList& columns );
+ /**
+ * @returns the column index matching to @a text or -1 if not found.
+ */
+ virtual int findColumn( const QString& text ) const;
+ /**
+ * @returns the first item which has a @a text in column @a column.
+ * Set @a recurse to indicate how much subchild levels to search, e.g.<ul>
+ * <li>set it to 0 to search only among direct childs,
+ * <li>set it to 1 to search direct childs and all 1st order subchilds
+ * <li>set it to -1 for maximum recursion.
+ * </ul>
+ * @sa ONamedListViewItem::find()
+ */
+ virtual ONamedListViewItem* find( ONamedListViewItem* start, int column, const QString& text, int recurse = -1 ) const;
+ virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const;
+
+ virtual ONamedListViewItem* find( ONamedListViewItem* start, const QString& column, const QString& text, int recurse = -1 ) const;
+ virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const;
};
/*======================================================================================
@@ -275,7 +295,7 @@ class ONamedListView: public OListView
/**
* @brief An OListView variant with named columns.
*
- * This class provides a higher-level interface to the columns in an OListViewItem.
+ * This class provides a higher-level interface to an OListViewItem.
*
* @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
*/
@@ -304,6 +324,17 @@ class ONamedListViewItem: public OListViewItem
* Sets a number of @a texts for this item.
*/
virtual void setText( const QStringList& texts );
+ /**
+ * @returns the first child which has a @a text in column @a column.
+ * Set @a recurse to indicate how much subchild levels to search, e.g.<ul>
+ * <li>set it to 0 to search only among direct childs,
+ * <li>set it to 1 to search direct childs and all 1st order subchilds
+ * <li>set it to -1 for maximum recursion.
+ * </ul>
+ * @sa ONamedListView::find()
+ */
+ virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const;
+ virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const;
};