kmymoneycurrencyselector.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           kmymoneycurrencyselector.h  -  description
00003                              -------------------
00004     begin                : Tue Apr 6 2004
00005     copyright            : (C) 2000-2004 by Michael Edwardes
00006     email                : mte@users.sourceforge.net
00007                            Javier Campos Morales <javi_c@users.sourceforge.net>
00008                            Felix Rodriguez <frodriguez@users.sourceforge.net>
00009                            John C <thetacoturtle@users.sourceforge.net>
00010                            Thomas Baumgart <ipwizard@users.sourceforge.net>
00011                            Kevin Tambascio <ktambascio@users.sourceforge.net>
00012  ***************************************************************************/
00013 
00014 /***************************************************************************
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef KMYMONEYCURRENCYSELECTOR_H
00024 #define KMYMONEYCURRENCYSELECTOR_H
00025 
00026 // ----------------------------------------------------------------------------
00027 // QT Includes
00028 
00029 #include <qwidget.h>
00030 
00031 // ----------------------------------------------------------------------------
00032 // KDE Includes
00033 
00034 #include <kcombobox.h>
00035 
00036 // ----------------------------------------------------------------------------
00037 // Project Includes
00038 
00039 #include <kmymoney/mymoneyfile.h>
00040 
00045 class KMyMoneySecuritySelector : public KComboBox
00046 {
00047   Q_OBJECT
00048 public:
00049   enum displayItemE {
00050     Symbol = 0,
00051     FullName
00052   };
00053 
00054   enum displayTypeE {
00055     TypeCurrencies = 0x01,
00056     TypeSecurities = 0x02,
00057     TypeAll        = 0x03
00058   };
00059 
00060   KMyMoneySecuritySelector(QWidget *parent=0, const char *name=0);
00061   KMyMoneySecuritySelector(displayTypeE type = TypeAll, QWidget *parent=0, const char *name=0);
00062   virtual ~KMyMoneySecuritySelector();
00063 
00064   const MyMoneySecurity& security(void) const;
00065   void setSecurity(const MyMoneySecurity& currency);
00066   void selectDisplayItem(KMyMoneySecuritySelector::displayItemE item);
00067   void setDisplayOnly(const bool disp);
00068 
00069   void update(const QString& id);
00070 
00071 public slots:
00072   void slotSetInitialSecurity(void);
00073 
00074 private:
00075   MyMoneySecurity m_currency;
00076   displayItemE    m_displayItem;
00077   int             m_selectedItemId;
00078   bool            m_displayOnly;
00079   displayTypeE    m_displayType;
00080   QValueList<MyMoneySecurity> m_list;
00081 };
00082 
00083 class KMyMoneyCurrencySelector : public KMyMoneySecuritySelector
00084 {
00085 public:
00086   KMyMoneyCurrencySelector(QWidget *parent=0, const char *name=0);
00087   virtual ~KMyMoneyCurrencySelector() {}
00088 };
00089 
00090 #endif

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