00001 /* 00002 * Copyright (C) 2008 Kamil Dudka <xdudka00@stud.fit.vutbr.cz> 00003 * 00004 * This file is part of rob08 00005 * 00006 * rob08 is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * any later version. 00010 * 00011 * rob08 is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with rob08. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #ifndef ARENA_H 00021 #define ARENA_H 00022 00023 #include "config.h" 00024 00025 #include "coresync.h" 00026 00027 #ifndef BUILDING_DOX 00028 # include <QWidget> 00029 #endif 00030 00031 class ICore; 00032 class CoreSync; 00033 class Arena: public QWidget, public ICoreInfoSource { 00034 Q_OBJECT 00035 public: 00036 Arena(CoreSync *, QWidget *parent=0); 00037 ~Arena(); 00038 QSize envSize() const; 00039 int botSize() const; 00040 const CoreInfo& coreInfo() const; 00041 signals: 00042 void preferredPosChanged(QPoint); 00043 void coreInfoChanged(); 00044 public slots: 00045 void animate(); 00046 void setShrinkPathEnabled(bool); 00047 void setDrawSurfaceEnabled(bool); 00048 void zoom(qreal); 00049 protected: 00050 virtual void paintEvent(QPaintEvent *); 00051 private slots: 00052 void botPosChanged(); 00053 private: 00054 struct Private; 00055 Private *d; 00056 }; 00057 00058 class BotPath: public QObject { 00059 Q_OBJECT 00060 public: 00061 BotPath(); 00062 ~BotPath(); 00063 void addPos(QPointF); 00064 void drawPath(QPainter &); 00065 bool isEnabled() const; 00066 public slots: 00067 void setShrinkEnabled(bool); 00068 private: 00069 struct Private; 00070 Private *d; 00071 }; 00072 00073 #endif /* ARENA_H */
1.5.4