TarzaNN
TarzaNN neural network simulator
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright C 2002-2012 Laboratory for Active and Attentive Vision (LAAV), Department of Computer Science and Engineering, York University, Toronto, ON, Canada. 00004 ** All rights reserved. 00005 ** 00006 ** This file is part of the TarzaNN Neural Network Simulator. 00007 ** 00008 ** This file may be distributed and/or modified under the terms of the 00009 ** GNU General Public License version 2 as published by the Free Software 00010 ** Foundation and appearing in the file LICENSE.GPL included in the 00011 ** packaging of this file. 00012 ** 00013 ** See http://www.tarzann.org/gpl/ for GPL licensing information. 00014 ** 00015 ** Contact info@tarzann.org if any conditions of this licensing are 00016 ** not clear to you. 00017 ** 00018 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00019 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00020 ** 00021 ****************************************************************************/ 00022 00023 #ifndef CANVAS_H 00024 #define CANVAS_H 00025 00026 00027 #include <q3canvas.h> 00028 #include "UI_DesignerPlane.h" 00029 #include "Network.h" 00030 00037 class UI_DesignerCanvas : public Q3Canvas 00038 { 00039 Q_OBJECT 00040 public: 00041 00051 UI_DesignerCanvas(Network* NN, QWidget* parent=0, const char *name=0 ); 00052 00053 00059 ~UI_DesignerCanvas(); 00060 00066 void setSelected(Q3CanvasPolygonalItem * pr); 00067 00072 Q3CanvasPolygonalItem * getSelected(); 00073 00077 Q3CanvasItemList * planesList; 00078 00082 Q3CanvasItemList * connsList; 00083 00092 void repositionConnections(UI_DesignerPlane * plane, bool originPlane); 00093 00097 Network* NN; 00098 00099 private slots: 00100 00107 void slotAddPlane(); 00108 00115 void slotAddConnection(); 00116 00123 void slotRemove(); 00124 00132 void slotEdit(); 00133 00134 signals: 00135 00140 void selectedChanged( Q3CanvasPolygonalItem * item); 00141 00142 private: 00143 00144 00148 bool newNetwork; 00149 00153 Q3CanvasPolygonalItem * selected; 00154 00159 QWidget * containerWidget; 00160 00166 UI_DesignerPlane * findOrigin(FeaturePlaneAbstract * fp); 00167 00174 void addConnections(UI_DesignerPlane * currPlane, PlaneInputs * list); 00175 00176 }; 00177 00178 00179 #endif