00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEDDEINITE_H
00022 #define GEDDEINITE_H
00023
00024 #define __GEDDEI_BUILD
00025
00026 #include "processorgroup.h"
00027 using namespace Geddei;
00028
00029 #include <qvaluelist.h>
00030 #include <qptrlist.h>
00031 #include <qpoint.h>
00032
00033 #include "geddeinitebase.h"
00034
00035 class QDockWindow;
00036 class QTable;
00037 class QCanvas;
00038 class QCanvasItem;
00039
00040 class BobsView;
00041 class Bob;
00042 class WatchProcessor;
00043 class ProcessorView;
00044
00048 class GeddeiNite: public GeddeiNiteBase
00049 {
00050 Q_OBJECT
00051
00052 QString theFilename;
00053
00054 QPrinter *printer;
00055 QString filename;
00056 QCanvas *theCanvas;
00057 QCanvasItem *theActive;
00058 QDockWindow *theDockSelector, *theDockProperties;
00059 QTable *theProperties;
00060 ProcessorView *theSelector;
00061 WatchProcessor *theWatch;
00062 QPtrList<Bob> theBobs;
00063 ProcessorGroup theGroup;
00064 bool theRunning, theTested, theConnected, theIgnoreNext, theModified;
00065 int theDefaultBufferSize;
00066
00067 void updateItems();
00068 void doSave(const QString &filename);
00069 void doLoad(const QString &filename);
00070 const bool connectAll();
00071 void disconnectAll();
00072
00073 virtual void updateProperties();
00074 virtual void editRemove();
00075
00076 private slots:
00077 void slotPropertyChanged(int row, int column);
00078 void slotRunToggled(bool testing);
00079 void fileOpen();
00080 void fileSave();
00081 void fileSaveAs();
00082 void filePrint();
00083 void slotDeployPlayer();
00084 void slotTest();
00085
00086 protected:
00087 void closeEvent(QCloseEvent *);
00088
00089 public:
00090 const QString makeUniqueName(const QString &type);
00091 void setActive(QCanvasItem *item = NULL);
00092 void setModified(bool modified = true);
00093
00094 const int defaultBufferSize() const { return theDefaultBufferSize; }
00095 const bool tested() const { return theTested; }
00096 const bool connected() const { return theConnected; }
00097
00098 ProcessorGroup &group() { return theGroup; }
00099 WatchProcessor *watch() { return theWatch; }
00100
00101 const bool bobCollision(Bob *b);
00102 void addBob(Bob *b);
00103 void removeBob(Bob *b);
00104 Bob *getBob(const QString &name);
00105
00106 GeddeiNite();
00107 ~GeddeiNite();
00108 };
00109
00110 #endif