TarzaNN
TarzaNN neural network simulator
C:/Users/albertlr/projects/TarzaNN/TarzaNN/UI_Message.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_MESSAGE_H_INCLUDED
00024 #define UI_MESSAGE_H_INCLUDED
00025 
00026 
00027 // ******************** EVENTS *********************************************
00028 #define UI_MESSAGE_EVENT 12345
00029 
00030 #include <QCoreApplication>
00031 #include <QApplication>
00032 #include <QEvent>
00033 #include <stdarg.h>
00034 #include <stdlib.h>
00035 #include "UI_Widget.h"
00036 
00037 class UI_Message: QEvent  {
00038 public:
00039     enum Type {Info=0, Warning=1, Error=2, Popup=3, UI_Update=4, UI_Repaint=5} ; //if adding more, do not forget to edit getType as well
00040 
00041     UI_Message(const Type &tmpType, const QString &tmpText, UI_Widget* theWidget);
00042     static void echo(const Type &msg_type, const char * msg, ...);
00043     static void postRepaint(UI_Widget *theWidget);
00044     static void postUpdate(UI_Widget *theWidget);
00045     QString text;
00046     Type type;
00047         UI_Widget *widget;
00048     
00049     QString getText();
00050     QString getType();
00051 private:
00052 };
00053 #endif //UI_MESSAGE_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines