~neon/kolf/master

714 by Simon Huerlimann
Make EBN happy: Add best-guess copyright headers.
1
/*
2
    Copyright (C) 2002-2005, Jason Katz-Brown <jasonkb@mit.edu>
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
3
    Copyright 2010 Stefan Majewsky <majewsky@gmx.net>
714 by Simon Huerlimann
Make EBN happy: Add best-guess copyright headers.
4
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by
7
    the Free Software Foundation; either version 2 of the License, or
8
    (at your option) any later version.
9
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU General Public License for more details.
14
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
17
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
*/
19
1 by Jason Katz-Brown
here's kolf, read the TODO
20
#ifndef EDITOR_H_INCLUDED
21
#define EDITOR_H_INCLUDED
22
586 by Laurent Montel
#include <q...h> -> #include <Q...>
23
#include <QWidget>
1 by Jason Katz-Brown
here's kolf, read the TODO
24
25
#include "game.h"
26
1158.1.17 by Montel Laurent
KListWidget--
27
class QListWidget;
1 by Jason Katz-Brown
here's kolf, read the TODO
28
class QHBoxLayout;
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
29
class QListWidgetItem;
19 by Jason Katz-Brown
things I can think of: game knows if it's been modified, prompts if you wanna save it. no crashes, more optimized floaters (but not enough), person with best score on last hole goes first.. other things, forget, must go to bed. cheers!
30
class Config;
1 by Jason Katz-Brown
here's kolf, read the TODO
31
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
32
namespace Kolf
33
{
34
	class ItemFactory;
35
}
36
1 by Jason Katz-Brown
here's kolf, read the TODO
37
class Editor : public QWidget
38
{
39
	Q_OBJECT
40
public:
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
41
	explicit Editor(const Kolf::ItemFactory& factory, QWidget * = 0);
1 by Jason Katz-Brown
here's kolf, read the TODO
42
signals:
43
	void changed();
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
44
	void addNewItem(const QString&);
45
public Q_SLOTS:
1 by Jason Katz-Brown
here's kolf, read the TODO
46
	void setItem(CanvasItem *);
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
47
private Q_SLOTS:
48
	void listboxExecuted(QListWidgetItem*);
1 by Jason Katz-Brown
here's kolf, read the TODO
49
private:
983 by Stefan Majewsky
Replace the Object classes by the new ItemFactory.
50
	const Kolf::ItemFactory& m_factory;
1 by Jason Katz-Brown
here's kolf, read the TODO
51
	QHBoxLayout *hlayout;
1158.1.17 by Montel Laurent
KListWidget--
52
	QListWidget* m_typeList;
19 by Jason Katz-Brown
things I can think of: game knows if it's been modified, prompts if you wanna save it. no crashes, more optimized floaters (but not enough), person with best score on last hole goes first.. other things, forget, must go to bed. cheers!
53
	Config *config;
1 by Jason Katz-Brown
here's kolf, read the TODO
54
};
55
56
#endif