Commit 7cabb337 authored by Roney Gomes's avatar Roney Gomes

The missing GPL headers were added as well as comments describing the new...

The missing GPL headers were added as well as comments describing the new functions added to KGrScene and KGrRenderer.

svn path=/branches/work/kgoldrunner-qgv/; revision=1307004
parent 2064e7dd
......@@ -95,11 +95,28 @@ public:
KGameRenderedItem * getBackground (const int level,
KGameRenderedItem * currentBackground);
/*
* Returns true case the current theme has a border around its background
* and false otherwise.
*/
bool hasBorder() const { return m_hasBorder; }
/*
* Get the color of the scene's background brush requested for the current
* theme.
*/
QColor borderColor() const { return m_borderColor; }
/*
* Get the color of the on-screen text which appears in certain game stages
* (the demo stage for instance) and in the score box.
*/
QColor textColor() const { return m_textColor; }
// TODO: Describe this method.
/*
* Get a list containing all the KGameRenderedItem's which make up the
* theme's border.
*/
QList <KGameRenderedItem * > borderTiles() const;
public slots:
/*
......
/****************************************************************************
* Copyright 2012 Ian Wadham <iandw.au@gmail.com> *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include <QDebug>
#include <QGraphicsView>
......
......@@ -62,9 +62,21 @@ public:
KGrScene (QObject * parent = 0);
~KGrScene ();
/*
* Resize the scene and its contents depending on the size of its primary
* viewport.
*/
void redrawScene ();
/*
* Requests the KGameRenderedItem's which make up the fancy border around
* the background and set their position accordingly.
*/
void drawBorder();
/*
* Get a pointer to scene's renderer.
*/
KGrRenderer * renderer () const { return m_renderer; }
public slots:
void currentThemeChanged(const KgTheme *);
......@@ -73,15 +85,14 @@ private:
void setTileSize (KGameRenderedItem * tile, const int tileSize);
KGrRenderer * m_renderer;
KGameRenderer * m_renderSet;
KGameRenderedItem * m_background;
int m_tilesWide;
int m_tilesHigh;
int m_tileSize;
QVector<KGameRenderedItem *> m_tiles;
QList< KGameRenderedItem * > borderElements;
QVector<KGameRenderedItem *> m_tiles; // The items of the scenario.
QList< KGameRenderedItem * > borderElements; // The items of the border.
};
#endif // KGRSCENE_H
/****************************************************************************
* Copyright 2012 Ian Wadham <iandw.au@gmail.com> *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include "kgrview.h"
#include "kgrrenderer.h"
......
/****************************************************************************
* Copyright 2012 Ian Wadham <iandw.au@gmail.com> *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#ifndef KGRVIEW_H
#define KGRVIEW_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment