selectedtransaction.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           selectedtransaction.h  -  description
00003                              -------------------
00004     begin                : Tue Jun 13 2006
00005     copyright            : (C) 2000-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 SELECTEDTRANSACTION_H
00019 #define SELECTEDTRANSACTION_H
00020 
00021 // ----------------------------------------------------------------------------
00022 // QT Includes
00023 
00024 // ----------------------------------------------------------------------------
00025 // KDE Includes
00026 
00027 // ----------------------------------------------------------------------------
00028 // Project Includes
00029 
00030 #include <kmymoney/mymoneytransaction.h>
00031 #include <kmymoney/mymoneyscheduled.h>
00032 #include <kmymoney/mymoneysplit.h>
00033 
00034 namespace KMyMoneyRegister {
00035 
00036 class SelectedTransaction
00037 {
00038 public:
00039   SelectedTransaction() {}
00040   SelectedTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s, const QString& scheduleId = QString()) :
00041     m_transaction(t), m_split(s), m_scheduleId(scheduleId) {}
00042 
00043   MyMoneyTransaction& transaction(void) { return m_transaction; }
00044   const MyMoneyTransaction& transaction(void) const { return m_transaction; }
00045   MyMoneySplit& split(void) { return m_split; }
00046   const MyMoneySplit& split(void) const { return m_split; }
00047 
00048   bool isScheduled(void) const { return !m_scheduleId.isEmpty(); }
00049   const QString& scheduleId(void) const { return m_scheduleId; }
00050 
00059   int warnLevel() const;
00060 
00061 private:
00062   MyMoneyTransaction      m_transaction;
00063   MyMoneySplit            m_split;
00064   QString                 m_scheduleId;
00065 };
00066 
00067 class Register;
00068 
00069 class SelectedTransactions:public QValueList<SelectedTransaction>
00070 {
00071 public:
00072   SelectedTransactions() {}
00073   SelectedTransactions(const Register* r);
00074 
00078   int warnLevel() const;
00079 
00080   bool canModify() const;
00081   bool canDuplicate() const;
00082 };
00083 
00084 } // namespace
00085 
00086 #endif
00087 

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