miniature:miniature.git
8 years agoRelax launcher folder checks fremantle/0.1-1
Mathias Hasselmann [Mon, 16 Nov 2009 10:36:32 +0000 (11:36 +0100)]
Relax launcher folder checks

* configure.ac: Only check that the folder variables are not empty.
Otherwise hildon-desktop and stuff would have to be added to our build
dependencies.

8 years agoMade copyright notice in sources more standardized, hopefully
Michael Hasselmann [Sun, 15 Nov 2009 23:09:43 +0000 (00:09 +0100)]
Made copyright notice in sources more standardized, hopefully

8 years agoActivated portrait mode for Qt 4.6, too
Michael Hasselmann [Sun, 15 Nov 2009 22:10:42 +0000 (23:10 +0100)]
Activated portrait mode for Qt 4.6, too

8 years agoUpdate ignore file
Mathias Hasselmann [Sun, 15 Nov 2009 20:54:25 +0000 (21:54 +0100)]
Update ignore file

8 years agoAdd Debian packaging.
Mathias Hasselmann [Sun, 15 Nov 2009 20:56:01 +0000 (21:56 +0100)]
Add Debian packaging.

* debian/*: Provide initial Debian packaging.

8 years agoInstall launcher files at proper location
Mathias Hasselmann [Sun, 15 Nov 2009 20:49:46 +0000 (21:49 +0100)]
Install launcher files at proper location

* Makefile.am: Really install miniature in /usr/games. Install desktop
and D-Bus service file at its Maemo specific locations.

* configure.ac: Consult pkg-config to find Maemo specific locations for
desktop and D-Bus service files. Tell autoconf to substitute variables
in desktop and service files.

* data/miniature.desktop.in: Move to data folder and use valid
categories. Permit autoconf to substitute variables.

* data/org.maemo.miniature.service.in: Move to data folder and rename
the file to give D-Bus activation a change to actually find it. Permit
autoconf to substitute variables.

8 years agoAdded a cellSize property to MGraphicsBoardItem
Michael Hasselmann [Sun, 15 Nov 2009 20:05:12 +0000 (21:05 +0100)]
Added a cellSize property to MGraphicsBoardItem

8 years agoRemoved cyclic dependency between MBoardView and MGraphicsBoardItem
Michael Hasselmann [Sun, 15 Nov 2009 19:19:15 +0000 (20:19 +0100)]
Removed cyclic dependency between MBoardView and MGraphicsBoardItem

* Makefile.am: Added moc dependency for MGraphicsBoardItem.

* src/board_view.[h|cc], src/graphics_board_item.[h|cc]: The view aggregates
selected signals that come from inside the scene graph and re-emits them so
that other M* classes can easily connect to them without having any knowledge
of the scene graph itself.

8 years agoImplement basic mouse/fingertouch events for moving pieces
Michael Hasselmann [Sun, 15 Nov 2009 18:31:09 +0000 (19:31 +0100)]
Implement basic mouse/fingertouch events for moving pieces

* Makefile.am: Added dependencies for MChessPieceItem and MGraphicsBoardItem.

* src/board_view.[h|cc]: Adapted to new MGraphicsBoardItem, introduced
pieceMoved signal.

* src/pieces_pool.[h|cc], src/pieces_pool_manager.[h|cc]: Adapted to new
MGraphicsBoardItem.

* src/chess_piece_item.[h|cc]: Currently unused. Kept for later event handling.

* src/graphics_board_item.[h|cc]: Implemented simple click-from, click-to piece
move handling.

8 years agoUpdated class diagram
Michael Hasselmann [Sun, 15 Nov 2009 11:20:58 +0000 (12:20 +0100)]
Updated class diagram

8 years agoCreated a pieces pool (+manager) for the board view
Michael Hasselmann [Sun, 15 Nov 2009 10:44:13 +0000 (11:44 +0100)]
Created a pieces pool (+manager) for the board view

* src/board_view.[h|cc]: Handed over the QGraphicsSvgItem handling to the
pieces pool manager.

* src/position.[h|cc]: Added an enum type for the chess pieces and provided a
simple lookup for FEN piece characters.

* src/pieces_pool.[h|cc]: Stores an array of QGraphicsSvgItems, handing out
pointers ("take") and recycling those items after "release" was called.

* src/pieces_pool_manager.[h|cc]: Stores enough chess pieces for each type in
different piece pools, handing out correct SVG items for each piece ("take").
Notifies its piece pools to start over and recycle after "releaseAll" was
called.

8 years agoFixed player turn to player material, fixed font sizes for Maemo5
Michael Hasselmann [Sat, 14 Nov 2009 22:36:43 +0000 (23:36 +0100)]
Fixed player turn to player material, fixed font sizes for Maemo5

8 years agoAdded text file with info for creating UML diagrams with yuml.me
Michael Hasselmann [Sat, 14 Nov 2009 20:52:25 +0000 (21:52 +0100)]
Added text file with info for creating UML diagrams with yuml.me

8 years agoAdded glossy SVG board from Mathias "tbf" Hasselmann
Michael Hasselmann [Sat, 14 Nov 2009 19:56:53 +0000 (20:56 +0100)]
Added glossy SVG board from Mathias "tbf" Hasselmann

8 years agoRemoved MBoardView dependency from MGame
Michael Hasselmann [Sat, 14 Nov 2009 18:44:53 +0000 (19:44 +0100)]
Removed MBoardView dependency from MGame

* src/board_view.[h|cc], src/game.[h|cc], src/miniature.[h|cc]: Introduced
signals as communication channel for game logic and board view. This
effectively killed the board view dependency from the game logic.

* Makefile.am, src/player_info.h, src/miniature.[h|cc], src/game.[h|cc]: Allow
player info updates via signals. The player info is stored in a struct (which
might evovle into a full blown class some time later).

8 years agoMade MBoardView a proper view, using its own scene graph
Michael Hasselmann [Sat, 14 Nov 2009 17:07:51 +0000 (18:07 +0100)]
Made MBoardView a proper view, using its own scene graph

* src/board_view.[h|cc]: This class morphed into a QGraphicsView, making it
usable even from inside the Qt Designer.

* src/game.[h|cc]: Moved the UI parts away, mostly into src/miniature.ui.

* src/miniature.[h|cc|ui]: Adapted to new UI for main window (made with Qt
Designer).

8 years agoWrapped position representation in MPosition
Michael Hasselmann [Sat, 14 Nov 2009 11:23:29 +0000 (12:23 +0100)]
Wrapped position representation in MPosition

* src/board_view.[h|cc], src/game.[h|cc]: Adapted to use MPosition instead of
simple QStrings for positions.

* Makefile.am, src/position.[h|cc]: Wrapped the position description in a
proper class

8 years agoRenamed figures to pieces and tried to follow our project policies
Michael Hasselmann [Fri, 13 Nov 2009 22:33:00 +0000 (23:33 +0100)]
Renamed figures to pieces and tried to follow our project policies

8 years agoMoved resources file and added UI file for main view
Michael Hasselmann [Wed, 11 Nov 2009 22:56:46 +0000 (23:56 +0100)]
Moved resources file and added UI file for main view

* data.qrc, Makefile.am: Moved resource file to data folder and added deps for
the Qt Designer file.

* data/boards/default.png: Scaled to 480px in width, for portrait mode. It
starts to look ugly now.

* src/board.[h|cc]: Moved the figure guessing part in a separate method. Also
changed cell size to fit the new board dimension.

* src/miniature.[h|cc|ui]: Added Qt designer support for our main window.

8 years agoFixed a missing integer for portrait mode
Michael Hasselmann [Wed, 11 Nov 2009 08:18:11 +0000 (09:18 +0100)]
Fixed a missing integer for portrait mode

8 years agoActived portrait mode and scalee the SVG figures
Michael Hasselmann [Mon, 9 Nov 2009 23:02:44 +0000 (00:02 +0100)]
Actived portrait mode and scalee the SVG figures

* configure.ac: Turned out we don't need Q_WS_MAEMO_5, for now.

* src/board.cc: Implemented proper figure scaling, and cell centering.

* src/miniature:: Activated portrait mode using low level X atoms.

8 years agoAnother - obvious! - bug in the next/prev feature got fixed
Michael Hasselmann [Sun, 8 Nov 2009 23:03:54 +0000 (00:03 +0100)]
Another - obvious! - bug in the next/prev feature got fixed

8 years agoFixed a bug in newGame() and removed cruft
Michael Hasselmann [Sun, 8 Nov 2009 22:21:56 +0000 (23:21 +0100)]
Fixed a bug in newGame() and removed cruft

8 years agoMoved game logic into separate class, added next/prev move feature
Michael Hasselmann [Sun, 8 Nov 2009 19:16:51 +0000 (20:16 +0100)]
Moved game logic into separate class, added next/prev move feature

* src/game.[h|cc]: This class will become our central game controller. It knows
about the board and the scene view widget. It can also control the chess
position shown on the board.

* src/miniature.[h|cc]: Added a simplistic start menu and modified to use the
new game controller. Also added next move/previous move entries, since it is
not even sure yet whether we want this functionality in the UI. It's easy to
hide/remove when it is in a menu.

* src/board.[h|cc]: The board can now clean itself, and in fact, does so
whenever it is asked to draw a position.

* Makefile.am: Added game sources as a dependency for miniature.

8 years agoAdded compiler warnings
Michael Hasselmann [Sun, 8 Nov 2009 17:40:21 +0000 (18:40 +0100)]
Added compiler warnings

8 years agoRemoved a private member (scene view), currently not needed
Michael Hasselmann [Sun, 8 Nov 2009 17:18:40 +0000 (18:18 +0100)]
Removed a private member (scene view), currently not needed

8 years agoMoved board representation into separate class
Michael Hasselmann [Sun, 8 Nov 2009 14:54:07 +0000 (15:54 +0100)]
Moved board representation into separate class

* src/board.[h|cc]: This is a simple board representation. To make future
changes (and additions) easier it lives in its own class now.

* src/miniature.[h|cc]: Modified code to use MiniatureBoard now.

* Makefile.am: Added the board sources as a miniature dependency.

8 years agoAdded some comments. Feel free to fix the TODOs.
Michael Hasselmann [Sun, 8 Nov 2009 04:03:38 +0000 (05:03 +0100)]
Added some comments. Feel free to fix the TODOs.

8 years agoQuick and dirty redrawing of the mock-up using a scene graph
Michael Hasselmann [Sun, 8 Nov 2009 01:49:58 +0000 (02:49 +0100)]
Quick and dirty redrawing of the mock-up using a scene graph

8 years agoAdded a rectangle with rounded corners for the timer background
Michael Hasselmann [Sun, 8 Nov 2009 01:49:23 +0000 (02:49 +0100)]
Added a rectangle with rounded corners for the timer background

8 years agoAddding a C macro which hopefully allows portrait mode with Qt from git
Michael Hasselmann [Sun, 8 Nov 2009 01:47:21 +0000 (02:47 +0100)]
Addding a C macro which hopefully allows portrait mode with Qt from git

8 years agoAdded .desktop and .service files
Michael Hasselmann [Sat, 7 Nov 2009 17:07:10 +0000 (18:07 +0100)]
Added .desktop and .service files

8 years agoChanged automake req, added QtSvg, included resources
Michael Hasselmann [Sat, 7 Nov 2009 12:26:01 +0000 (13:26 +0100)]
Changed automake req, added QtSvg, included resources

8 years agoCreated minimal Qt app
Michael Hasselmann [Fri, 6 Nov 2009 23:15:15 +0000 (00:15 +0100)]
Created minimal Qt app

8 years agoAdded free SVG chess figures
mikhas [Fri, 6 Nov 2009 22:14:25 +0000 (22:14 +0000)]
Added free SVG chess figures

* data/figures/[white|black]/*.svg: Taken from
http://commons.wikimedia.org/wiki/Standard_chess_diagram, using the GDFL. Made
the background transparent to allow easier board handling.

* data/figures/LICENSE: Listed all URLs and the original author of the SVG
files.

git-svn-id: https://garage.maemo.org/svn/chess/trunk@5 8f8649a8-a3eb-440b-a239-b9a71fae4ca8

8 years agoSetting up autotroll environment
mikhas [Fri, 6 Nov 2009 18:45:12 +0000 (18:45 +0000)]
Setting up autotroll environment

8 years agoTTB initializing: trunk
mikhas [Fri, 6 Nov 2009 18:02:57 +0000 (18:02 +0000)]
TTB initializing: trunk

git-svn-id: https://garage.maemo.org/svn/chess/trunk@1 8f8649a8-a3eb-440b-a239-b9a71fae4ca8