00001 /* 00002 Challenge - Virtual Robot Challenge System 00003 Copyright (C) 1999 - 2008: 00004 Stephane Magnenat <stephane at magnenat dot net> 00005 (http://stephane.magnenat.net) 00006 3D models 00007 Copyright (C) 2008: 00008 Basilio Noris 00009 Aseba - an event-based framework for distributed robot control 00010 Copyright (C) 2007--2009: 00011 Stephane Magnenat <stephane at magnenat dot net> 00012 (http://stephane.magnenat.net) 00013 Mobots group (http://mobots.epfl.ch) 00014 Laboratory of Robotics Systems (http://lsro.epfl.ch) 00015 EPFL, Lausanne (http://www.epfl.ch) 00016 00017 This program is free software: you can redistribute it and/or modify 00018 it under the terms of the GNU General Public License as published by 00019 the Free Software Foundation, either version 3 of the License, or 00020 any other version as decided by the two original authors 00021 Stephane Magnenat and Valentin Longchamp. 00022 00023 This program is distributed in the hope that it will be useful, 00024 but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00026 GNU General Public License for more details. 00027 00028 You should have received a copy of the GNU General Public License 00029 along with this program. If not, see <http://www.gnu.org/licenses/>. 00030 */ 00031 00032 #ifndef __CHALLENGE_H 00033 #define __CHALLENGE_H 00034 00035 #include <viewer/Viewer.h> 00036 #include <QDialog> 00037 00038 class QPushButton; 00039 class QCheckBox; 00040 class QComboBox; 00041 class QTextBrowser; 00042 00043 namespace Enki 00044 { 00045 class ChallengeViewer : public ViewerWidget 00046 { 00047 Q_OBJECT 00048 00049 protected: 00050 bool savingVideo; 00051 int ePuckCount; 00052 QTextBrowser* helpViewer; 00053 00054 #ifndef Q_WS_MAC 00055 QPushButton* addRobotButton; 00056 QPushButton* delRobotButton; 00057 QCheckBox* autoCamera; 00058 QCheckBox* hideButtons; 00059 QPushButton* helpButton; 00060 QFrame* menuFrame; 00061 #else // Q_WS_MAC 00062 QAction* autoCamera; 00063 #endif // Q_WS_MAC 00064 00065 QFont titleFont; 00066 QFont entryFont; 00067 QFont labelFont; 00068 00069 public: 00070 ChallengeViewer(World* world, int ePuckCount); 00071 00072 signals: 00073 void windowClosed(); 00074 00075 protected slots: 00076 void addNewRobot(); 00077 void removeRobot(); 00078 00079 protected: 00080 virtual void timerEvent(QTimerEvent * event); 00081 virtual void mouseMoveEvent ( QMouseEvent * event ); 00082 virtual void keyPressEvent ( QKeyEvent * event ); 00083 virtual void keyReleaseEvent ( QKeyEvent * event ); 00084 virtual void closeEvent ( QCloseEvent * event ); 00085 00086 void drawQuad2D(double x, double y, double w, double ar); 00087 00088 virtual void initializeGL(); 00089 00090 virtual void renderObjectsTypesHook(); 00091 virtual void displayObjectHook(PhysicalObject *object); 00092 virtual void sceneCompletedHook(); 00093 }; 00094 } 00095 00096 class LanguageSelectionDialog : public QDialog 00097 { 00098 Q_OBJECT 00099 00100 public: 00101 QComboBox* languageSelectionBox; 00102 00103 LanguageSelectionDialog(); 00104 }; 00105 00106 #endif 00107