summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantic/atlantic_core.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /atlantik/libatlantic/atlantic_core.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'atlantik/libatlantic/atlantic_core.h')
-rw-r--r--atlantik/libatlantic/atlantic_core.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/atlantik/libatlantic/atlantic_core.h b/atlantik/libatlantic/atlantic_core.h
new file mode 100644
index 00000000..bca5b783
--- /dev/null
+++ b/atlantik/libatlantic/atlantic_core.h
@@ -0,0 +1,105 @@
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License version 2.1 as published by the Free Software Foundation.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this library; see the file COPYING.LIB. If not, write to
+// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+// Boston, MA 02110-1301, USA.
+
+#ifndef LIBATLANTIC_CORE_H
+#define LIBATLANTIC_CORE_H
+
+#include <qobject.h>
+#include <qptrlist.h>
+
+#include "libatlantic_export.h"
+
+class Player;
+class ConfigOption;
+class Estate;
+class EstateGroup;
+class Game;
+class Trade;
+class Auction;
+
+class LIBATLANTIC_EXPORT AtlanticCore : public QObject
+{
+Q_OBJECT
+
+public:
+ AtlanticCore(QObject *parent, const char *name);
+
+ void reset(bool deletePermanents = false);
+
+ bool selfIsMaster() const;
+
+ void setPlayerSelf(Player *player);
+ Player *playerSelf();
+
+ QPtrList<Player> players();
+ Player *newPlayer(int playerId, const bool &playerSelf = false);
+ Player *findPlayer(int playerId);
+ void removePlayer(Player *player);
+
+ QPtrList<Game> games();
+ Game *newGame(int gameId, const QString &type = QString::null);
+ Game *findGame(const QString &type); // finds game types
+ Game *findGame(int gameId); // finds actual games
+ Game *gameSelf();
+ void removeGame(Game *game);
+ void emitGames();
+
+ QPtrList<Estate> estates();
+ Estate *newEstate(int estateId);
+ Estate *findEstate(int estateId);
+ Estate *estateAfter(Estate *estate);
+
+ QPtrList<EstateGroup> estateGroups();
+ EstateGroup *newEstateGroup(int groupId);
+ EstateGroup *findEstateGroup(int groupId);
+
+ QPtrList<Trade> trades();
+ Trade *newTrade(int tradeId);
+ Trade *findTrade(int tradeId);
+ void removeTrade(Trade *trade);
+
+ QPtrList<Auction> auctions();
+ Auction *newAuction(int auctionId, Estate *estate);
+ void delAuction(Auction *auction);
+
+ ConfigOption *newConfigOption(int configId);
+ void removeConfigOption(ConfigOption *configOption);
+ ConfigOption *findConfigOption(int configId);
+
+ void printDebug();
+
+signals:
+ void createGUI(Player *player);
+ void removeGUI(Player *player);
+ void createGUI(Game *game);
+ void removeGUI(Game *game);
+ void createGUI(Trade *trade);
+ void removeGUI(Trade *trade);
+ void createGUI(ConfigOption *configOption);
+ void removeGUI(ConfigOption *configOption);
+
+private:
+ Player *m_playerSelf;
+ QPtrList<Player> m_players;
+ QPtrList<Game> m_games;
+ QPtrList<Estate> m_estates;
+ QPtrList<EstateGroup> m_estateGroups;
+ QPtrList<Trade> m_trades;
+ QPtrList<Auction> m_auctions;
+ QPtrList<ConfigOption> m_configOptions;
+};
+
+#endif