Changeset View
Changeset View
Standalone View
Standalone View
game.h
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software | ||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef GAME_H | 20 | #ifndef GAME_H | ||
21 | #define GAME_H | 21 | #define GAME_H | ||
22 | 22 | | |||
23 | #include <kolflib_export.h> | | |||
24 | #include "ball.h" | 23 | #include "ball.h" | ||
25 | 24 | | |||
26 | #include "tagaro/scene.h" | 25 | #include "tagaro/scene.h" | ||
27 | 26 | | |||
28 | #include <QGraphicsView> | 27 | #include <QGraphicsView> | ||
29 | #include <KConfigGroup> | 28 | #include <KConfigGroup> | ||
30 | #include <KgSound> | 29 | #include <KgSound> | ||
31 | 30 | | |||
▲ Show 20 Lines • Show All 192 Lines • ▼ Show 20 Line(s) | 211 | public: | |||
224 | QRectF boundingRect() const Q_DECL_OVERRIDE; | 223 | QRectF boundingRect() const Q_DECL_OVERRIDE; | ||
225 | bool collidesWithItem(const QGraphicsItem*, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const Q_DECL_OVERRIDE; | 224 | bool collidesWithItem(const QGraphicsItem*, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const Q_DECL_OVERRIDE; | ||
226 | 225 | | |||
227 | private: | 226 | private: | ||
228 | double dvalue, dmax; | 227 | double dvalue, dmax; | ||
229 | double ithickness, iwidth, iheight; | 228 | double ithickness, iwidth, iheight; | ||
230 | }; | 229 | }; | ||
231 | 230 | | |||
232 | struct KOLFLIB_EXPORT CourseInfo | 231 | struct CourseInfo | ||
233 | { | 232 | { | ||
234 | CourseInfo(const QString &_name, const QString &_untranslatedName, const QString &_author, unsigned int _holes, unsigned int _par) { name = _name; untranslatedName = _untranslatedName, author = _author; holes = _holes; par = _par; } | 233 | CourseInfo(const QString &_name, const QString &_untranslatedName, const QString &_author, unsigned int _holes, unsigned int _par) { name = _name; untranslatedName = _untranslatedName, author = _author; holes = _holes; par = _par; } | ||
235 | CourseInfo(); | 234 | CourseInfo(); | ||
236 | 235 | | |||
237 | QString name; | 236 | QString name; | ||
238 | QString untranslatedName; | 237 | QString untranslatedName; | ||
239 | QString author; | 238 | QString author; | ||
240 | unsigned int holes; | 239 | unsigned int holes; | ||
241 | unsigned int par; | 240 | unsigned int par; | ||
242 | }; | 241 | }; | ||
243 | 242 | | |||
244 | class KOLFLIB_EXPORT KolfGame : public QGraphicsView | 243 | class KolfGame : public QGraphicsView | ||
245 | { | 244 | { | ||
246 | Q_OBJECT | 245 | Q_OBJECT | ||
247 | 246 | | |||
248 | public: | 247 | public: | ||
249 | KolfGame(const Kolf::ItemFactory& factory, PlayerList *players, const QString &filename, QWidget *parent=0); | 248 | KolfGame(const Kolf::ItemFactory& factory, PlayerList *players, const QString &filename, QWidget *parent=0); | ||
250 | ~KolfGame(); | 249 | ~KolfGame(); | ||
251 | void setFilename(const QString &filename); | 250 | void setFilename(const QString &filename); | ||
252 | QString curFilename() const { return filename; } | 251 | QString curFilename() const { return filename; } | ||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |