kmymoneylistviewitem.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kmymoneylistviewitem.h
00003                              -------------------
00004     begin                : Wed Jun 28 2006
00005     copyright            : (C) 2006 by Thomas Baumgart
00006     email                : Thomas Baumgart <ipwizard@users.sourceforge.net>
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KMYMONEYLISTVIEWITEM_H
00019 #define KMYMONEYLISTVIEWITEM_H
00020 
00021 // ----------------------------------------------------------------------------
00022 // QT Includes
00023 
00024 #include <qobject.h>
00025 
00026 // ----------------------------------------------------------------------------
00027 // KDE Includes
00028 
00029 #include <klistview.h>
00030 
00031 // ----------------------------------------------------------------------------
00032 // Project Includes
00033 
00034 class KMyMoneyCheckListItem;
00035 
00042 class KMyMoneyListViewItem : public QObject, public KListViewItem
00043 {
00044   friend class KMyMoneyCheckListItem;
00045 
00046   Q_OBJECT
00047 public:
00048   KMyMoneyListViewItem(QListView *parent, const QString& txt, const QString& key, const QString& id);
00049   KMyMoneyListViewItem(QListViewItem *parent, const QString& txt, const QString& key, const QString& id);
00050   ~KMyMoneyListViewItem();
00051 
00052   const QString& id(void) const { return m_id; };
00053 
00057   void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
00058 
00062   const QColor backgroundColor();
00063 
00070   QString key(int column, bool ascending) const;
00071 
00072 
00076   bool isAlternate(void);
00077 
00078 private:
00079   QString              m_key;
00080   QString             m_id;
00081   // copied from KListViewItem()
00082   unsigned int         m_isOdd : 1;
00083   unsigned int         m_isKnown : 1;
00084   unsigned int         m_unused : 30;
00085 
00086 };
00087 
00088 #endif

Generated on Wed Jan 26 13:03:17 2011 for KMyMoney by  doxygen 1.5.6