Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

graph.hpp

Go to the documentation of this file.
00001 /*
00002  Modular Psi - A graph tracker of the Parapsychologcal scientific development
00003  Copyright (C) 2005 Leonardo Stern
00004 
00005  This program is free software; you can redistribute it and/or modify it under
00006  the terms of the Common Public License Version 1.0 or (at your option) any later version.
00007 
00008  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00009  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00010  See the Common Public License for more details.
00011 
00012  You should have received a copy of the Common Public License along with this program;
00013 */
00014 
00015 
00016 #ifndef GRAPH_HPP
00017 #define GRAPH_HPP
00018 
00019 #include <qpoint.h>
00020 #include <qstring.h>
00021 #include "proposition.hpp"
00022 #include <qdict.h>
00023 #include "principal.h"
00024 
00025 class Proposition;
00030 class Graph : public QDict<Proposition> 
00031 {
00032    
00033 public:
00034     Graph( );
00035    ~Graph( );
00036    
00037    EdgeList* edges;
00042    QPoint lastXY;
00047    int lastName() { return p_lastName; };
00048    int lastEdge() { return p_lastEdge; };
00053    void checkLastName(QString newname);
00058    void checkLastEdge(QString newEdgeName);
00059    void setLastName(int newLast);
00060    void setLastEdge(int newLastEdge);
00061    int status() { return p_status; }
00062    void setStatus(int newstatus);
00067    void checkPos(QPoint pos);
00068 
00069    
00070    void check(Proposition p);
00071    
00072    void  error(QString message);
00073    
00074    void setChanged(bool change);
00075    bool isChanged() { return changed; }
00076    void clearAllEdges();
00077    
00078    Principal *gui;
00079    
00080 protected:
00081    int p_lastName;
00082    int p_lastEdge;
00083    void init();
00084    int p_status;
00085    bool changed;
00086    
00087 };
00088 
00089 #endif // GRAPH
Untitled Document Pesquisa Psi SourceForge.net Logo