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

proposition.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 PROPOSITION_HPP
00017 #define PROPOSITION_HPP
00018 
00019 #include <QString.h>
00020 #include "category.hpp"
00021 #include "node.hpp"
00022 #include "edge.hpp"
00023 
00024 class PropositionGraph;
00025 
00026 class Proposition : public Node
00027 {
00028     Q_OBJECT
00029     
00030 public:
00031         Proposition ( QWidget *parent, const char* name=0, WFlags f=0 );             
00032         ~Proposition();
00033         
00034         Edge * connect(Proposition* destino, float confianca);
00035         void disconnect( Edge* e);
00036         
00037         void draw(QPainter* painter);
00038         
00039         Category *cat;
00040         QString category() { return cat->id(); }
00041         QString references() { return p_references; }
00042         
00043         //Set
00044         void setCategory (QString catid);
00045         void setCategoryId (QString newcatid);
00046         void setTrust (float newTrust);
00047         void setReferences (QString newReferences);
00048 
00049         QColor fillColor;
00050         QColor borderColor;
00051         QColor propFillColor;
00052         QColor textColor;
00053         PropositionGraph* graph;
00054         
00055     protected:
00056     
00057     QString p_references;
00058         void paintEvent(QPaintEvent *event);
00059         void changeActive( QColor thisColor);
00060         void mousePressEvent ( QMouseEvent *e);
00061         void init();
00062 };
00063 
00064 #endif // PROPOSITION
Untitled Document Pesquisa Psi SourceForge.net Logo