Commit ba8c908e authored by Matt Williams's avatar Matt Williams
Browse files

Bump to version 0.2 since it is absolutely playable (with two players) and quite fun.

Now requires libkdegames.

svn path=/trunk/playground/games/ksquares/; revision=616481
parent f839e66d
#PROJECT(ksquares)
PROJECT(ksquares)
#find_package(KDE4 REQUIRED)
#include (KDE4Defaults)
......@@ -10,4 +10,5 @@
#if (KDEGAMES_LIB)
# add_subdirectory(src)
#endif (KDEGAMES_LIB)
add_subdirectory(src)
\ No newline at end of file
add_subdirectory(src)
#add_subdirectory(doc)
\ No newline at end of file
PROJECT(ksquares)
FIND_PACKAGE(KDE4 REQUIRED)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
set(ksquares_SRCS
......@@ -20,7 +20,7 @@ kde4_add_kcfg_files(ksquares_SRCS GENERATE_MOC settings.kcfgc) #GENERATE_MOC is
kde4_add_executable(ksquares ${ksquares_SRCS})
target_link_libraries(ksquares ${KDE4_KDEUI_LIBS})
target_link_libraries(ksquares ${KDE4_KDEUI_LIBS} kdegames)
install(TARGETS ksquares DESTINATION ${BIN_INSTALL_DIR})
......
#! /bin/sh
$XGETTEXT *.cpp -o $podir/ksquares.pot
\ No newline at end of file
......@@ -23,6 +23,7 @@ using std::endl;
#include <kstdaccel.h>
#include <kaction.h>
#include <kstandardaction.h>
#include <kstdgameaction.h>
#include <kdebug.h>
#include "gameboardscene.h"
......@@ -36,11 +37,11 @@ KSquares::KSquares() : KMainWindow(), m_view(new GameBoardView(this))
connect(sGame, SIGNAL(playerChangedSig(int)), this, SLOT(playerChanged(int)));
setCentralWidget(m_view);
setupActions();
statusBar()->insertPermanentItem("Current Player", 0);
statusBar()->insertPermanentItem(i18n("Current Player"), 0);
statusBar()->show();
setAutoSaveSettings();
//fileNew(); //uncomment to start a new game on startup
//gameNew(); //uncomment to start a new game on startup
}
KSquares::~KSquares()
......@@ -49,7 +50,9 @@ KSquares::~KSquares()
void KSquares::setupActions()
{
KStandardAction::openNew(this, SLOT(fileNew()), actionCollection());
//KStdGameAction::gameNew(this, SLOT(gameNew()), actionCollection());
//KStdGameAction::quit(kapp, SLOT(quit()), actionCollection());
KStandardAction::openNew(this, SLOT(gameNew()), actionCollection());
KStandardAction::quit(kapp, SLOT(quit()), actionCollection());
KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
......@@ -59,7 +62,7 @@ void KSquares::setupActions()
setupGUI();
}
void KSquares::fileNew()
void KSquares::gameNew()
{
//load settings
NewGameDialog dialog(this);
......@@ -169,7 +172,6 @@ void KSquares::optionsPreferences()
connect(dialog, SIGNAL(settingsChanged(const QString &)), m_view, SLOT(setBoardSize()));
dialog->show();
}
void KSquares::playerChanged(int playerNumber)
......
......@@ -34,7 +34,7 @@ class KSquares : public KMainWindow
virtual ~KSquares();
private slots:
void fileNew();
void gameNew();
void optionsPreferences();
void playerChanged(int playerNumber); //for updating the statusbar
void gameOver(QVector<KSquaresPlayer> playerList); //when KSquaresGame says the game is over. Display score board
......
......@@ -18,18 +18,18 @@
static const char description[] =
I18N_NOOP("Draw lines to make squares");
static const char version[] = "0.1.1";
static const char version[] = "0.2.0";
static KCmdLineOptions options[] =
{
{ "+[URL]", I18N_NOOP( "Document to open" ), 0 },
KCmdLineLastOption
/*{ "+[URL]", I18N_NOOP( "Document to open" ), 0 },
KCmdLineLastOption*/
};
int main(int argc, char **argv)
{
KAboutData about("ksquares", I18N_NOOP("KSquares"), version, description,
KAboutData::License_GPL, "(C) 2006 Matt Williams}", 0, 0, "matt@milliams.com");
KAboutData::License_GPL, "(C) 2006 Matt Williams", 0, 0, "matt@milliams.com");
about.addAuthor( "Matt Williams", 0, "matt@milliams.com" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
......
......@@ -109,6 +109,9 @@ p, li { white-space: pre-wrap; }
</item>
<item row="1" column="2" >
<widget class="QCheckBox" name="playerOneHuman" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Human?</string>
</property>
......@@ -119,6 +122,9 @@ p, li { white-space: pre-wrap; }
</item>
<item row="2" column="2" >
<widget class="QCheckBox" name="playerTwoHuman" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Human?</string>
</property>
......
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