TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/UI_FeaturePlane.h
Go to the documentation of this file.
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 UI_FEATUREPLANE_H
00024 #define UI_FEATUREPLANE_H
00025 
00026 #include <math.h>
00027 #include <QVariant>
00028 #include <QWidget>
00029 #include <QLayout>
00030 #include <QEvent>
00031 #include <QContextMenuEvent>
00032 #include <QLabel>
00033 #include <QVBoxLayout>
00034 #include <QHBoxLayout>
00035 #include <QGridLayout>
00036 #include <QResizeEvent>
00037 #include <QPaintEvent>
00038 #include <QBoxLayout>
00039 
00040 #include "Observer.h"
00041 #include "FeaturePlaneAbstract.h"
00042 #include "UI_Image.h"
00043 #include "UI_Widget.h"
00044 
00045 class QVBoxLayout;
00046 class QHBoxLayout;
00047 class QGridLayout;
00048 class QLabel;
00049 class QImage;
00050 class QResizeEvent;
00051 
00052 class UI_FeaturePlane : public UI_Widget, public Observer
00053 {
00054         Q_OBJECT
00055 
00056 public:
00057         void loadImage(QString filename);
00058         UI_FeaturePlane(FeaturePlaneAbstract *tmpFp, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
00059         ~UI_FeaturePlane();
00060 
00061         virtual void updateNN(Observer* sourceFP, bool functional);
00062         virtual void paintEvent( QPaintEvent *e );
00063         virtual void resizeEvent( QResizeEvent *e );
00064         virtual void contextMenuEvent(QContextMenuEvent *e);
00065 
00066         UI_Image* theImage;
00067         QImage* currentPic;
00068         float minRealPixelValue;
00069         float maxRealPixelValue;    
00070         QLabel* infoLabel;
00071 
00072         bool needsUpdate;
00073         FeaturePlaneAbstract* fp;
00074         int fp_w, fp_h;
00075         QBoxLayout *UI_FPLayout;
00076         QMutex localAccess;
00077         QMutex paintAccess;
00078         bool viewVirtualImage;
00079         void saveName(QString s);
00080 
00081         public slots:
00082                 void slotMoveUp();
00083                 void slotMoveDown();
00084                 void slotMoveLeft();
00085                 void slotMoveRight();
00086                 void slotMoveTarget();    
00088                 void slotSave();
00090                 void slotSaveScaled();
00092                 void slotInsertTimeCourse();
00094                 void slotSelectWinner();
00095 
00096 private:
00097         int moveUnit;
00098         int mouseX, mouseY;
00099 };
00100 
00101 #endif // UI_FEATUREPLANE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines