summaryrefslogtreecommitdiff
path: root/libopie2/opieui/olistview.h
Unidiff
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 );
241 * ONamedListView 241 * ONamedListView
242 *======================================================================================*/ 242 *======================================================================================*/
243 243
244class ONamedListViewItem;
245
244/** 246/**
245 * @brief An OListView variant with named columns. 247 * @brief An OListView variant with named columns.
246 * 248 *
247 * This class provides a higher-level interface to the columns in an OListView. 249 * This class provides a higher-level interface to an OListView.
248 * 250 *
249 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 251 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
250 */ 252 */
@@ -266,6 +268,24 @@ class ONamedListView: public OListView
266 * Add a number of @a columns to the listview. 268 * Add a number of @a columns to the listview.
267 */ 269 */
268 virtual void addColumns( const QStringList& columns ); 270 virtual void addColumns( const QStringList& columns );
271 /**
272 * @returns the column index matching to @a text or -1 if not found.
273 */
274 virtual int findColumn( const QString& text ) const;
275 /**
276 * @returns the first item which has a @a text in column @a column.
277 * Set @a recurse to indicate how much subchild levels to search, e.g.<ul>
278 * <li>set it to 0 to search only among direct childs,
279 * <li>set it to 1 to search direct childs and all 1st order subchilds
280 * <li>set it to -1 for maximum recursion.
281 * </ul>
282 * @sa ONamedListViewItem::find()
283 */
284 virtual ONamedListViewItem* find( ONamedListViewItem* start, int column, const QString& text, int recurse = -1 ) const;
285 virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const;
286
287 virtual ONamedListViewItem* find( ONamedListViewItem* start, const QString& column, const QString& text, int recurse = -1 ) const;
288 virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const;
269}; 289};
270 290
271/*====================================================================================== 291/*======================================================================================
@@ -275,7 +295,7 @@ class ONamedListView: public OListView
275/** 295/**
276 * @brief An OListView variant with named columns. 296 * @brief An OListView variant with named columns.
277 * 297 *
278 * This class provides a higher-level interface to the columns in an OListViewItem. 298 * This class provides a higher-level interface to an OListViewItem.
279 * 299 *
280 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 300 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
281 */ 301 */
@@ -304,6 +324,17 @@ class ONamedListViewItem: public OListViewItem
304 * Sets a number of @a texts for this item. 324 * Sets a number of @a texts for this item.
305 */ 325 */
306 virtual void setText( const QStringList& texts ); 326 virtual void setText( const QStringList& texts );
327 /**
328 * @returns the first child which has a @a text in column @a column.
329 * Set @a recurse to indicate how much subchild levels to search, e.g.<ul>
330 * <li>set it to 0 to search only among direct childs,
331 * <li>set it to 1 to search direct childs and all 1st order subchilds
332 * <li>set it to -1 for maximum recursion.
333 * </ul>
334 * @sa ONamedListView::find()
335 */
336 virtual ONamedListViewItem* find( int column, const QString& text, int recurse = -1 ) const;
337 virtual ONamedListViewItem* find( const QString& column, const QString& text, int recurse = -1 ) const;
307}; 338};
308 339
309 340