Main Page   Class Hierarchy   Data Structures   File List   Data Fields  

stockgui.h

00001 /***************************************************************************
00002                           stockgui.h  -  description
00003                              -------------------
00004     begin                : Mon Oct 28 2002
00005     copyright            : (C) 2002 by Michael Otto
00006     email                : Michael.Otto@saskathex.de
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 STOCKGUI_H
00019 #define STOCKGUI_H
00020 
00021 #include <gtkmm.h>
00022 #include <iostream>
00023 
00024 #include "Observer.h"
00025 
00026 using namespace std;
00027 
00028 class Stock;
00029 
00034 class StockGui : public Gtk::Label , Observer{
00035   private:
00036     Gtk::Label *labelWkn, *labelBuyingDate;
00037     Gtk::SpinButton *spinButtonAmount, *spinButtonBuyingRate;
00038     Gtk::Label *labelPurchaseValue;
00039     Gtk::SpinButton *spinButtonPurchaseCost, *spinButtonCurrentMarketPrice;
00040     Gtk::Label *labelDayPerformance, *labelTotalMarketValue, *labelOverallPerformance;
00041     Gtk::Button *buttonInfo, *buttonChart;
00042     Gtk::Adjustment *adjustmentAmount, *adjustmentBuyingRate, *adjustmentPurchaseCost, *adjustmentCurrentMarketPrice;
00043 
00044         
00045     Stock *stock;
00046     
00047     void eventAmountChanged();
00048     void eventBuyingRateChanged();
00049     void eventPurchaseCostChanged();
00050     void eventCurrentMarketPriceChanged();
00051 
00052     void updateLabelPurchaseValue();
00053     void updateLabelDayPerformance();
00054     void updateLabelTotalMarketValue();
00055     void updateLabelOverallPerformance();
00056 
00057     void eventButtonInfo();
00058     void eventButtonChart();
00059     
00060 
00061       
00062   public:
00063     StockGui(Stock * const stock);
00064     ~StockGui();
00065 
00066     Gtk::Label *getLabelWkn() const;
00067     Gtk::Label *getLabelBuyingDate() const;
00068     Gtk::SpinButton *getSpinButtonAmount() const;
00069     Gtk::SpinButton *getSpinButtonBuyingRate() const;
00070     Gtk::Label *getLabelPurchaseValue() const;
00071     Gtk::SpinButton *getSpinButtonPurchaseCost() const;
00072     Gtk::SpinButton *getSpinButtonCurrentMarketPrice() const;
00073     Gtk::Label *getLabelDayPerformance() const;
00074     Gtk::Label *getLabelTotalMarketValue() const;
00075     Gtk::Label *getLabelOverallPerformance() const;
00076     Gtk::Button *getButtonInfo() const;
00077     Gtk::Button *getButtonChart() const;
00078 
00079     void update(const Subject *const subject);
00080         
00081 };
00082 
00083 #endif
00084 

Generated on Tue May 27 21:24:02 2003 for gstockcalc by doxygen1.3-rc3