From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kolf/kolf.h | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 kolf/kolf.h (limited to 'kolf/kolf.h') diff --git a/kolf/kolf.h b/kolf/kolf.h new file mode 100644 index 00000000..8a2c6d78 --- /dev/null +++ b/kolf/kolf.h @@ -0,0 +1,147 @@ +#ifndef KOLF_H +#define KOLF_H + +#include +#include + +#include +#include +#include +#include +#include +#include +#include "game.h" + +class KolfGame; +class KToggleAction; +class KListAction; +class KAction; +class QGridLayout; +class ScoreBoard; +class QCloseEvent; +class QEvent; +class Player; +class QWidget; +class Editor; + +class KDE_EXPORT Kolf : public KMainWindow +{ + Q_OBJECT + +public: + Kolf(); + ~Kolf(); + + void openURL(KURL url); + +public slots: + void closeGame(); + void updateModified(bool); + +protected: + virtual bool queryClose(); + +protected slots: + void startNewGame(); + void loadGame(); + void tutorial(); + void newGame(); + void save(); + void saveAs(); + void saveGame(); + void saveGameAs(); + void print(); + void newPlayersTurn(Player *); + void gameOver(); + void editingStarted(); + void editingEnded(); + void checkEditing(); + void setHoleFocus() { game->setFocus(); } + void inPlayStart(); + void inPlayEnd(); + void maxStrokesReached(const QString &); + void updateHoleMenu(int); + void titleChanged(const QString &); + void newStatusText(const QString &); + void showInfoChanged(bool); + void useMouseChanged(bool); + void useAdvancedPuttingChanged(bool); + void showGuideLineChanged(bool); + void soundChanged(bool); + void initPlugins(); + void showPlugins(); + void showHighScores(); + void enableAllMessages(); + void createSpacer(); + + void emptySlot() {}; + + void setCurrentHole(int); + +private: + QWidget *dummy; + KolfGame *game; + Editor *editor; + KolfGame *spacer; + void initGUI(); + QString filename; + PlayerList players; + PlayerList spacerPlayers; + QGridLayout *layout; + ScoreBoard *scoreboard; + KToggleAction *editingAction; + KAction *newHoleAction; + KAction *resetHoleAction; + KAction *undoShotAction; + //KAction *replayShotAction; + KAction *clearHoleAction; + KAction *tutorialAction; + KAction *newAction; + KAction *endAction; + KAction *printAction; + KAction *saveAction; + KAction *saveAsAction; + KAction *saveGameAction; + KAction *saveGameAsAction; + KAction *loadGameAction; + KAction *aboutAction; + KListAction *holeAction; + KAction *highScoreAction; + KAction *nextAction; + KAction *prevAction; + KAction *firstAction; + KAction *lastAction; + KAction *randAction; + KToggleAction *showInfoAction; + KToggleAction *useMouseAction; + KToggleAction *useAdvancedPuttingAction; + KToggleAction *showGuideLineAction; + KToggleAction *soundAction; + void setHoleMovementEnabled(bool); + void setHoleOtherEnabled(bool); + inline void setEditingEnabled(bool); + bool competition; + + // contains everything + ObjectList *obj; + // contains subset of obj + ObjectList plugins; + + QString loadedGame; + + bool isTutorial; + bool courseModified; + QString title; + QString tempStatusBarText; +}; + +struct HighScore +{ + HighScore() {} + HighScore(const QString &name, int score) { this->name = name; this->score = score; } + QString name; + int score; +}; +typedef QValueList HighScoreList; + +#endif -- cgit v1.2.1