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

node.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 NODE_HPP
00017 #define NODE_HPP
00018 
00019 #include <qwidget.h>
00020 #include <qobject.h>
00021 #include <qstring.h>
00022 #include "const.hpp"
00023 #include "nodelist.hpp"
00024 #include "../gui/principal.h"
00025 
00026 class Edge;
00027 class EdgeList;
00028 class NodeList;
00029 
00030 class Node : public QWidget
00031 {
00032         Q_OBJECT
00033         Q_PROPERTY( QString publicName READ publicName WRITE setPublicName )
00034         Q_PROPERTY( QString description READ description WRITE setDescription )
00035         Q_PROPERTY( float trust READ trust WRITE setTrust )     
00036         Q_PROPERTY (bool changed READ changed WRITE setChanged )
00037         
00038     public:
00039         Node ( QWidget *parent, const char* name=0, WFlags f=0 );
00040         ~Node();
00041 
00042         QString publicName() const {return p_name; };
00043         QString description() const {return p_description;} ;
00044         float trust() const {return p_trust; };
00045         bool changed() const {return p_changed;};
00046         
00047         void setPublicName(QString nome);
00048         void setDescription(QString descricao);
00049         void setTrust(float confianca);
00050         void setChanged(bool alterado);
00051         
00052         Edge* getNode( QString dest ); 
00053         
00054         EdgeList* incoming; 
00055         EdgeList* outgoing; 
00056         
00057         QPoint center;
00058 
00059     protected:
00060         QString p_name;
00061         QString p_description;
00062         float p_trust;
00063         float p_changed;
00064         void init();
00065     };
00066         
00067 # endif // NODE_HPP
Untitled Document Pesquisa Psi SourceForge.net Logo