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 UI_IMAGE_H_INCLUDED 00024 #define UI_IMAGE_H_INCLUDED 00025 00026 /* 00027 * UI_ImageViewer.h 00028 */ 00029 00030 #include "UI_Message.h" 00031 #include <QWidget> 00032 #include <QImage> 00033 #include <QPixmap> 00034 #include <QWidget> 00035 #include <QMutex> 00036 #include <QLayout> 00037 #include <QLabel> 00038 #include <QPushButton> 00039 #include <QResizeEvent> 00040 #include <QPaintEvent> 00041 00042 class UI_Image: public UI_Widget 00043 { 00044 public: 00045 UI_Image(QWidget *p=0, const char *name=0); 00046 void setMyPixmap(QPixmap* newPixmap); 00047 void setMyPixmap(QImage* newImage); 00048 void saveImage(QString theFilename, QString theType); 00049 00050 ~UI_Image(); 00051 00052 virtual void resizeEvent( QResizeEvent *e ); 00053 virtual void paintEvent( QPaintEvent *e ); 00054 00055 private: 00056 QMutex localAccess; 00057 QImage *theImage; 00058 QImage *theImageScaled; 00059 void scale(); 00060 }; 00061 #endif //UI_IMAGE_H_INCLUDED