copasi API
0.1
|
00001 // Begin CVS Header 00002 // $Source: /fs/turing/cvs/copasi_dev/copasi/plotUI/plotwindow.h,v $ 00003 // $Revision: 1.28 $ 00004 // $Name: Build-33 $ 00005 // $Author: aekamal $ 00006 // $Date: 2010/04/08 15:45:13 $ 00007 // End CVS Header 00008 00009 // Copyright (C) 2010 by Pedro Mendes, Virginia Tech Intellectual 00010 // Properties, Inc., University of Heidelberg, and The University 00011 // of Manchester. 00012 // All rights reserved. 00013 00014 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual 00015 // Properties, Inc., EML Research, gGmbH, University of Heidelberg, 00016 // and The University of Manchester. 00017 // All rights reserved. 00018 00019 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual 00020 // Properties, Inc. and EML Research, gGmbH. 00021 // All rights reserved. 00022 00023 #include <fstream> 00024 #include <string> 00025 #include <vector> 00026 #include <QMainWindow> 00027 #include <QToolButton> 00028 00029 #include "copasi.h" 00030 #include "UI/CopasiFileDialog.h" 00031 #include "utilities/COutputHandler.h" 00032 00033 class QAction; 00034 00035 class CopasiPlot; 00036 class CPlotSpecification; 00037 class CPlotSpec2Vector; 00038 class CCopasiContainer; 00039 class COutputHandlerPlot; 00040 00041 class PlotWindow : public QMainWindow, public COutputInterface 00042 { 00043 Q_OBJECT 00044 00045 private: 00046 00047 // points to the plot instance inside this window 00048 CopasiPlot *mpPlot; 00049 COutputHandlerPlot *mpHandler; 00050 00051 void createToolBar(); 00052 void createActions(); 00053 00054 public: 00055 PlotWindow(COutputHandlerPlot * pHandler, const CPlotSpecification* ptrSpec); 00056 00057 bool initFromSpec(const CPlotSpecification* ptrSpec); 00058 00059 CopasiPlot * getPlot() const; 00060 00061 QToolButton * zoomButton; 00062 QToolButton * printButton; 00063 QToolButton * print2Button; 00064 QToolButton * saveButton; 00065 00066 QToolButton * mpSelectAll; 00067 QToolButton * mpDeselectAll; 00068 00069 ~PlotWindow(); 00070 00077 virtual bool compile(std::vector< CCopasiContainer * > listOfContainer, const CCopasiDataModel* pDataModel); 00078 00083 virtual void output(const Activity & activity); 00084 00089 virtual void separate(const Activity & activity); 00090 00094 virtual void finish(); 00095 00100 virtual const std::set< const CCopasiObject * > & getObjects() const; 00101 00102 private slots: 00103 //void enableZoom(); 00104 00105 //void mouseReleased(const QMouseEvent &e); 00106 00107 // Print the plot to printer 00108 void printPlot(); 00109 00110 // Print the plot as an image 00111 void printAsImage(); 00112 00114 void slotSaveData(); 00115 00117 void slotZoomOut(); 00118 00122 void slotSelectAll(); 00123 00127 void slotDeselectAll(); 00128 00129 /* 00130 * Close current window 00131 */ 00132 void slotCloseWindow(); 00133 };