Main | License | Installation | FAQ | Screenshots | Contact | Links | Sf.net | Freshmeat.net | KDE-Apps.org
Requirements | Design | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

CategoryListItem Class Reference

#include <categoryListItem.hpp>


Public Types

typedef
QCheckListItem::Type 
Type

Public Member Functions

 CategoryListItem (QListView *parent, const QString &text)
virtual int compare (QListViewItem *i, int col, bool ascending) const


Detailed Description

Item for displaying a single category.
Date:
Wed Mar 09 2005
Author:
Jan Wedekind (wedesoft@users.sourceforge.net)

Definition at line 25 of file categoryListItem.hpp.


Member Typedef Documentation

typedef QCheckListItem::Type CategoryListItem::Type

Definition at line 29 of file categoryListItem.hpp.


Constructor & Destructor Documentation

CategoryListItem::CategoryListItem ( QListView *  parent,
const QString &  text 
)

Definition at line 22 of file categoryListItem.cpp.

00022                                                                           :
00023   QCheckListItem( parent, text, CheckBox )
00024 {
00025 }


Member Function Documentation

int CategoryListItem::compare ( QListViewItem *  i,
int  col,
bool  ascending 
) const [virtual]

Definition at line 27 of file categoryListItem.cpp.

00028 {
00029   int retVal;
00030   if ( col != 1 ) {
00031     double
00032       a = atof( key( col, ascending ) ),
00033       b = atof( i->key( col, ascending ) );
00034     if ( a < b )
00035       retVal = -1;
00036     else
00037       if ( a > b )
00038         retVal = 1;
00039       else
00040         retVal = 0;
00041   } else
00042     retVal = QCheckListItem::compare( i, col, ascending );
00043   return retVal;
00044 }


The documentation for this class was generated from the following files:

anymeal 0.30 - recipe management software - Make the most of your food! - © Jan Wedekind Sun Sep 14 16:01:28 2008 - GNU Free Documentation License