Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

resultwindows.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA result window declarations
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/03/18
00008 // $Header: /sources/yasa/yasagui/resultwindows.h,v 1.4 2003/01/24 15:47:42 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 #ifndef YASAGUI_RESULT_WINDOWS_INCLUDE
00029 #define YASAGUI_RESULT_WINDOWS_INCLUDE
00030 
00031 
00033 #include <qsplitter.h>
00034 #include "frame.h"
00035 #include "environment.h"
00036 #include "project.h"
00037 
00038 
00040 class YResultHandler;
00041 
00042 class YTimingFrameObjectArgs : public YFrameObjectArgs
00043 {
00044 public:                         YTimingFrameObjectArgs(CreateYFrameCall call, YTimingResults *timingresult);
00045 };
00046 class YStatisticFrameObjectArgs : public YFrameObjectArgs
00047 {
00048 public:                         YStatisticFrameObjectArgs(CreateYFrameCall call, YStatisticResults *statisticresult);
00049 };
00050 
00051 
00055 class YResultFrame : public YObjectFrame
00056 {   Q_OBJECT
00057     QSplitter                   splitter;
00058     YResultHandler              *resulthandler;
00059 public:                         YResultFrame(QWidget *parent, YFrameArgs &args) :
00060                                 YObjectFrame(args),
00061                                 splitter(parent),
00062                                 resulthandler(0)
00063                                 { }
00064     virtual                     ~YResultFrame();
00065     virtual int                 InitInstance();
00066     virtual QWidget*            GetMainWidget()                         {   return &splitter;       }
00067     virtual void                PostCreateWindow(YMDIWindow *)          {   PostCreateTimingFrame();}
00068     virtual void                PostCreateTimingFrame()                 {   return;                 }
00069     YResultHandler *            GetResultHandler() const                {   return resulthandler;   }
00070     static YFrame*              CreateTimingFrame(QWidget *parent, YFrameArgs &args);
00071     static YFrame*              CreateStatisticFrame(QWidget *parent, YFrameArgs &args);
00072 protected:
00076     virtual YResultHandler*     CreateResultHandler(QSplitter *parent) const =0;
00077     virtual int                 InsertResults(YResultHandler *resulthandler) const=0;
00078 public slots:
00079     virtual void                UpdateResults();
00080 };
00081 
00082 
00086 class YEnvironmentResultFrame : public YResultFrame
00087 {   Q_OBJECT
00088 public:                         YEnvironmentResultFrame(QWidget *parent, YFrameArgs &args) :
00089                                 YResultFrame(parent, args)
00090                                 { }
00091     virtual void                PostCreateTimingFrame();
00092     virtual int                 InitInstance()
00093                                 {
00094                                     YEnvironment    *environment = GetEnvironment();
00095                                     int             retvalue=environment->EvaluateLogFile();
00096                                     if ( ! retvalue )
00097                                     {
00098                                         retvalue = YResultFrame::InitInstance();
00099                                     }
00100                                     return retvalue;
00101                                 }
00102 protected:  YEnvironment *      GetEnvironment() const
00103                                 {
00104                                     return (YEnvironment*) ((YTimingResults*)GetObject())->GetParent()->GetParent();
00105                                 }
00106 };
00107 
00108 
00112 class YProjectResultFrame : public YResultFrame
00113 {   Q_OBJECT
00114 public:                         YProjectResultFrame(QWidget *parent, YFrameArgs &args) :
00115                                 YResultFrame(parent, args)
00116                                 { }
00117     virtual void                PostCreateTimingFrame();
00118     virtual int                 InitInstance()
00119                                 {
00120                                     YProject    *project= GetProject();
00121                                     int         retvalue=project->EvaluateLogFiles();
00122                                     if ( ! retvalue )
00123                                     {
00124                                         retvalue = YResultFrame::InitInstance();
00125                                     }
00126                                     return retvalue;
00127                                 }
00128 protected:
00129     YProject *                  GetProject() const
00130                                 {
00131                                     return (YProject*) ((YTimingResults*)GetObject())->GetParent()->GetParent();
00132                                 }
00133 public slots:
00134     virtual void                NewEnvironment(YObject *);
00135     virtual void                RemoveEnvironment(YObject *object);
00136 };
00137 
00138 
00139 
00140 
00141 
00142 
00143 /*
00146 class YTimingFrame : public YResultFrame
00147 {   Q_OBJECT
00148 public:                         YTimingFrame(QWidget *parent, YFrameArgs &args) :
00149                                 YResultFrame(parent, args)
00150                                 { }
00151     virtual void                PostCreateWindow(YMDIWindow *)          {   PostCreateTimingFrame();    }
00152     virtual void                PostCreateTimingFrame()                 {   return;                     }
00153     static YFrame*              CreateTimingFrame(QWidget *parent, YFrameArgs &args);
00154 protected:
00158     virtual YResultHandler*     CreateResultHandler(QSplitter *parent) const;
00159 };
00160 
00164 class YEnvironmentTimingFrame : public YTimingFrame
00165 {   Q_OBJECT
00166 public:                         YEnvironmentTimingFrame(QWidget *parent, YFrameArgs &args) :
00167                                 YTimingFrame(parent, args)
00168                                 { }
00169     virtual void                PostCreateTimingFrame();
00170     virtual int                 InitInstance()
00171                                 {
00172                                     YEnvironment    *environment = GetEnvironment();
00173                                     int             retvalue=environment->EvaluateLogFile();
00174                                     if ( ! retvalue )
00175                                     {
00176                                         retvalue = YTimingFrame::InitInstance();
00177                                     }
00178                                     return retvalue;
00179                                 }
00180 protected:
00181     virtual int                 InsertResults(YResultHandler *resulthandler) const;
00182     YEnvironment *              GetEnvironment() const
00183                                 {
00184                                     return (YEnvironment*) ((YTimingResults*)GetObject())->GetParent()->GetParent();
00185                                 }
00186 };
00187 
00191 class YProjectTimingFrame : public YTimingFrame
00192 {   Q_OBJECT
00193 public:                         YProjectTimingFrame(QWidget *parent, YFrameArgs &args) :
00194                                 YTimingFrame(parent, args)
00195                                 { }
00196     virtual void                PostCreateTimingFrame();
00197     virtual int                 InitInstance()
00198                                 {
00199                                     YProject    *project= GetProject();
00200                                     int         retvalue=project->EvaluateLogFiles();
00201                                     if ( ! retvalue )
00202                                     {
00203                                         retvalue = YTimingFrame::InitInstance();
00204                                     }
00205                                     return retvalue;
00206                                 }
00207 protected:
00208     virtual int                 InsertResults(YResultHandler *timinghandler) const;
00209     YProject *                  GetProject() const
00210                                 {
00211                                     return (YProject*) ((YTimingResults*)GetObject())->GetParent()->GetParent();
00212                                 }
00213 public slots:
00214     virtual void                NewEnvironment(YObject *);
00215     virtual void                RemoveEnvironment(YObject *object);
00216 };
00217 */
00218 
00219 
00220 
00221 
00222 
00223 
00225 #endif                                                                          // ifndef YASAGUI_RESULT_WINDOWS_INCLUDE

Generated on Thu Feb 13 23:43:55 2003 for Yasa by doxygen1.3-rc3