You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.4 KiB
57 lines
1.4 KiB
/* VierGewinnt - A simple 4-in-a-row network game
|
|
*
|
|
* Copyright (c) 2008 by Sebastian Lohff, seba@seba-geek.de
|
|
* http://www.seba-geek.de
|
|
*
|
|
* This file is part of VierGewinnt.
|
|
*
|
|
* VierGewinnt is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* VierGewinnt is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with VierGewinnt. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __RENDERAREA_H
|
|
#define __RENDERAREA_H
|
|
|
|
#include <QWidget>
|
|
#include <QPen>
|
|
#include <QMouseEvent>
|
|
#include "viergewinnt.h"
|
|
|
|
class RenderArea : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
RenderArea(QWidget *parent=0);
|
|
|
|
void setFeldInfo(int _x, int _y, VierGewinntWidget::Stein **_feld);
|
|
QSize minimumSizeHint() const;
|
|
QSize sizeHint() const;
|
|
|
|
signals:
|
|
void addStein(int row);
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
int fx;
|
|
int fy;
|
|
float mfact;
|
|
VierGewinntWidget::Stein **feld;
|
|
QPen xpen;
|
|
QPen ypen;
|
|
};
|
|
|
|
#endif
|