miniature:p1xells-miniature.git
7 years agoblub qtbug-6265
Mathias Hasselmann [Fri, 27 Nov 2009 09:57:20 +0000 (10:57 +0100)]
blub

7 years agopure frustration...
Mathias Hasselmann [Thu, 26 Nov 2009 21:06:41 +0000 (22:06 +0100)]
pure frustration...

7 years agoHunting a true Heisenbug
Mathias Hasselmann [Thu, 26 Nov 2009 21:00:30 +0000 (22:00 +0100)]
Hunting a true Heisenbug

7 years agoUpdated debian changelog
Michael Hasselmann [Thu, 26 Nov 2009 01:27:24 +0000 (02:27 +0100)]
Updated debian changelog

7 years agoDisabled stdout debugging output
Michael Hasselmann [Thu, 26 Nov 2009 01:18:15 +0000 (02:18 +0100)]
Disabled stdout debugging output

7 years agoAdded clean newGame reset
Michael Hasselmann [Thu, 26 Nov 2009 01:14:22 +0000 (02:14 +0100)]
Added clean newGame reset

7 years agoAdded a hackish way to show which side has to move, hide debug window
Michael Hasselmann [Thu, 26 Nov 2009 00:54:50 +0000 (01:54 +0100)]
Added a hackish way to show which side has to move, hide debug window

7 years agoImplemented alternating move order
Michael Hasselmann [Thu, 26 Nov 2009 00:40:19 +0000 (01:40 +0100)]
Implemented alternating move order

7 years agoAdded auto-promotion to queens for pawns
Michael Hasselmann [Thu, 26 Nov 2009 00:01:42 +0000 (01:01 +0100)]
Added auto-promotion to queens for pawns

7 years agofix for the last commit
dennis [Thu, 26 Nov 2009 00:12:06 +0000 (01:12 +0100)]
fix for the last commit

7 years agoadded a flag that tracks the colour to move
dennis [Thu, 26 Nov 2009 00:03:00 +0000 (01:03 +0100)]
added a flag that tracks the colour to move

7 years agoand kore said: let the kings move!
dennis [Wed, 25 Nov 2009 23:20:47 +0000 (00:20 +0100)]
and kore said: let the kings move!

7 years agoMade the logic analyzer's verifyMove more expressive
Michael Hasselmann [Wed, 25 Nov 2009 22:31:07 +0000 (23:31 +0100)]
Made the logic analyzer's verifyMove more expressive

* Makefile.am: Removed moc dependency for MLogicAnalyzer.

* src/logic_analyzer.[h|cc], src/game.cc: Removed QObject dependency from
MLogicAnalyzer. Also, verifyMove now returns a MLogicAnalyzer::MStateFlags so
that it is easier to capture all states that are checked for during
verification.

7 years agocleaned up MKing and added it to the makefile
dennis [Wed, 25 Nov 2009 22:03:41 +0000 (23:03 +0100)]
cleaned up MKing and added it to the makefile

7 years agoimplemented the check check (a method that tests a given position for a players beein...
dennis [Wed, 25 Nov 2009 18:33:16 +0000 (19:33 +0100)]
implemented the check check (a method that tests a given position for a players beeing in check)

7 years agoRemoved portrait mode support for Qt 4.5, activated for Qt 4.6 again
Michael Hasselmann [Wed, 25 Nov 2009 00:44:16 +0000 (01:44 +0100)]
Removed portrait mode support for Qt 4.5, activated for Qt 4.6 again

7 years agoMade the board's background corners transparent again
Michael Hasselmann [Wed, 25 Nov 2009 00:30:37 +0000 (01:30 +0100)]
Made the board's background corners transparent again

7 years agoFixed null-pointer issue in piece type lookup, style changes
Michael Hasselmann [Tue, 24 Nov 2009 19:13:11 +0000 (20:13 +0100)]
Fixed null-pointer issue in piece type lookup, style changes

7 years agoUse QGraphicsView's background caching for the SVG board
Michael Hasselmann [Tue, 24 Nov 2009 18:47:57 +0000 (19:47 +0100)]
Use QGraphicsView's background caching for the SVG board

7 years agoRemoved Webkit rendering inside scene graph, it kills mouse events performance
Michael Hasselmann [Tue, 24 Nov 2009 17:00:22 +0000 (18:00 +0100)]
Removed Webkit rendering inside scene graph, it kills mouse events performance

7 years agomade MPosition remember the positions of the two kings
korius [Tue, 24 Nov 2009 18:24:31 +0000 (19:24 +0100)]
made MPosition remember the positions of the two kings

7 years agofixed a small bug which prevented pawns from moving
korius [Tue, 24 Nov 2009 17:20:27 +0000 (18:20 +0100)]
fixed a small bug which prevented pawns from moving

7 years agoIncluded MPawn in Makefile.am, fixed compile errors
Michael Hasselmann [Tue, 24 Nov 2009 16:37:03 +0000 (17:37 +0100)]
Included MPawn in Makefile.am, fixed compile errors

7 years agoAdded debug output to mouse event handling, turns out it is slow
Michael Hasselmann [Tue, 24 Nov 2009 13:36:11 +0000 (14:36 +0100)]
Added debug output to mouse event handling, turns out it is slow

7 years agoAdded SVG item caching in MBoardView
Michael Hasselmann [Tue, 24 Nov 2009 12:54:36 +0000 (13:54 +0100)]
Added SVG item caching in MBoardView

7 years agomade pawns move (doesn't build completely, i think the linker complains, but I dunno...
korius [Tue, 24 Nov 2009 15:13:04 +0000 (16:13 +0100)]
made pawns move (doesn't build completely, i think the linker complains, but I dunno why)

7 years agoallowed queens to move straight as well :)
korius [Tue, 24 Nov 2009 01:45:41 +0000 (02:45 +0100)]
allowed queens to move straight as well :)

7 years agoAdded bishops and queens to start position
Michael Hasselmann [Tue, 24 Nov 2009 01:29:18 +0000 (02:29 +0100)]
Added bishops and queens to start position

7 years agoDisabled terminal debug output
Michael Hasselmann [Tue, 24 Nov 2009 01:24:39 +0000 (02:24 +0100)]
Disabled terminal debug output

7 years agoRedirected MGame debug output to main window
Michael Hasselmann [Tue, 24 Nov 2009 01:10:52 +0000 (02:10 +0100)]
Redirected MGame debug output to main window

7 years agoAdded a generic debug output to main window, cleaned up menu
Michael Hasselmann [Tue, 24 Nov 2009 01:00:38 +0000 (02:00 +0100)]
Added a generic debug output to main window, cleaned up menu

7 years agoCleaned up MPosition, added piece captured check
Michael Hasselmann [Tue, 24 Nov 2009 00:17:37 +0000 (01:17 +0100)]
Cleaned up MPosition, added piece captured check

7 years agoadded the move list constraints for bishops and queens
korius [Tue, 24 Nov 2009 00:10:39 +0000 (01:10 +0100)]
added the move list constraints for bishops and queens

7 years agoadded the renderers to MQueen and MBishop
korius [Mon, 23 Nov 2009 23:20:40 +0000 (00:20 +0100)]
added the renderers to MQueen and MBishop

7 years agoCode cut: Killed MPiecesPool, MPiecesPoolManager and MGraphicsChessPieceItem
Michael Hasselmann [Mon, 23 Nov 2009 22:29:17 +0000 (23:29 +0100)]
Code cut: Killed MPiecesPool, MPiecesPoolManager and MGraphicsChessPieceItem

7 years agoRemoved MPiecesPoolManager, MGraphicsChessPieceItem dependencies for rendering
Michael Hasselmann [Mon, 23 Nov 2009 22:17:08 +0000 (23:17 +0100)]
Removed MPiecesPoolManager, MGraphicsChessPieceItem dependencies for rendering

* src/board_view.[h|cc], src/graphics_board_item.[h|cc] (addPiece,
removePieces): The MGraphicsBoardItem takes care of the pieces
(= QGraphicsSvgItem) we put on it so that cleaning the board does delete other
animation items by accident. Also, we do not need the MPiecesPoolManager
anymore for caching, QGraphicsSvgItem + shared SVG renderers does sufficient
caching.

* src/pieces/pieces.[h|cc], src/pieces/rook.[h|cc], src/pieces/knight.[h|cc]:
Chess pieces create SVG items of themselves, suitable for displaying them.
Removed the MGraphicsBoardItem depedency.

7 years agoAdded simple performance profiling to MGame
Michael Hasselmann [Mon, 23 Nov 2009 20:11:22 +0000 (21:11 +0100)]
Added simple performance profiling to MGame

7 years agoMoved rendering support into MPiece classes
Michael Hasselmann [Mon, 23 Nov 2009 20:00:07 +0000 (21:00 +0100)]
Moved rendering support into MPiece classes

* src/board_view.cc: The rendering now asks each piece for the SVG item to
place onto the board.

* src/pieces/piece.[h|cc]: Added support for cached SVG rendering.

* src/pieces/knight.[h|cc], src/pieces/rook.[h|cc]: Each concrete piece class
now has two renders (static class members). We have to lazy-initialize the SVG
renderers since we need to wait until the Qt resource system is up.

7 years agomade pieces/bishop.{h|cc} and src pieces/queen.{h|cc} compile
korius [Mon, 23 Nov 2009 20:38:37 +0000 (21:38 +0100)]
made pieces/bishop.{h|cc} and src pieces/queen.{h|cc} compile

7 years agofixed knight constraint from not beeing applied ^^
korius [Mon, 23 Nov 2009 02:59:31 +0000 (03:59 +0100)]
fixed knight constraint from not beeing applied ^^

7 years agoFixed MKnight and added knight rendering to MBoardView
Michael Hasselmann [Mon, 23 Nov 2009 02:47:11 +0000 (03:47 +0100)]
Fixed MKnight and added knight rendering to MBoardView

7 years agocleaned up knight.{c|hh}
korius [Mon, 23 Nov 2009 02:24:49 +0000 (03:24 +0100)]
cleaned up knight.{c|hh}

7 years agoadded the knight constraint
korius [Mon, 23 Nov 2009 02:12:55 +0000 (03:12 +0100)]
added the knight constraint

7 years agoExtended black rook test
Michael Hasselmann [Mon, 23 Nov 2009 01:27:31 +0000 (02:27 +0100)]
Extended black rook test

7 years agoquick fix of the last commit
korius [Mon, 23 Nov 2009 01:16:01 +0000 (02:16 +0100)]
quick fix of the last commit

7 years agoMade the logic analyzer compile again
Michael Hasselmann [Mon, 23 Nov 2009 00:47:12 +0000 (01:47 +0100)]
Made the logic analyzer compile again

7 years agogame logic - move analyzer
korius [Sun, 22 Nov 2009 23:21:59 +0000 (00:21 +0100)]
game logic - move analyzer

implemented the move list constraints for straight moves (e.g. rook)

7 years agoAdapted board rendering to new board model, added logic test for rook
Michael Hasselmann [Sun, 22 Nov 2009 13:13:46 +0000 (14:13 +0100)]
Adapted board rendering to new board model, added logic test for rook

* Makefile.am: Added MLogicAnalyzer dependencies.

* src/board_view.[h|cc], src/graphics_board_item.[h|cc]: Renamed pieceMoved
signal to pieceMoveRequest since MBoardView (more precisely,
MGraphicsBoardItem) is no longer allowed to move pieces on its own. Instead, it
sends a request to the MGame controller and patiently waits for a position
update. The rendering itself also changed: Instead of FEN string parsing the
MBoardView uses the MPiece stored in the MPosition directly.

* src/game.[h|cc], src/position.[h|cc]: Moved signals and slots from MPosition
to MGame, our controller. This makes MPosition a passive component again,
suited to be passed around much like a container. Also added a test slot
(blackRookTest) so that we test our new MLogicAnalyzer.

* src/logic_analyzer.[h|cc]: This new class performs move validation. It knows
about MPosition and MPiece so it has a full understanding of a static chess
position and can also check transitions from a current position to possible
next positions.

* src/pieces/piece.[h|cc], src/pieces/rook.[h|cc]: Cleanup. Also added some
debug info which hopefully goes away soon.

* src/miniature.[h|cc], src/miniature.ui: Rewired some signals. Also activated
the blackRookTest from the menu.

7 years agoMade the new internal model compile again
Michael Hasselmann [Sat, 21 Nov 2009 21:40:48 +0000 (22:40 +0100)]
Made the new internal model compile again

* src/game.cc: Disabled move logic for now.

* src/pieces/piece.[h|cc]: Cleaned up to allow better support for polymorphism.

* src/piece/rook.[h|cc]: Cleaned up to have one working example piece for the
board.

* src/position.[h|cc]: Cleaned up move validation.

7 years agogame logic - move analyzer
korius [Sat, 21 Nov 2009 01:13:14 +0000 (02:13 +0100)]
game logic - move analyzer

Rewrote the class 'MPiece' as interface for the different piece types.
Created a class for each piece type (e.g. MQueen) and implemented the move rules for each piece type. Each piece given its current position can now return a list of possible moves on an empty board.

7 years agogame logic - move analizer
korius [Thu, 19 Nov 2009 21:31:36 +0000 (22:31 +0100)]
game logic - move analizer

src/position.[h|cc]: prepared the files for implementing the move analizer

7 years agoMerge less glossy chess board
Mathias Hasselmann [Tue, 24 Nov 2009 09:41:56 +0000 (10:41 +0100)]
Merge less glossy chess board

7 years agoImplement OSSO D-Bus interface
Mathias Hasselmann [Tue, 24 Nov 2009 09:35:55 +0000 (10:35 +0100)]
Implement OSSO D-Bus interface

* configure.ac: Request D-Bus module.
* Makefile.am: Update MIME database after installation.
* data/miniature.desktop.in: Register PGN MIME type for Miniature.

* src/miniature.cc:
* src/miniature.h: Register D-Bus service to stop hildon-desktop from
killing Miniature. Also implement top_application and mime_open stub.

7 years agoAutomatically chose proper QT_PATH for Maemo 5
Mathias Hasselmann [Sat, 21 Nov 2009 21:53:48 +0000 (22:53 +0100)]
Automatically chose proper QT_PATH for Maemo 5

* build/miniature.m4:
* configure.ac: Introduce MINIATURE_CHECK_PLATFORM.

7 years agoCheck for proper Qt version
Mathias Hasselmann [Sat, 21 Nov 2009 21:27:49 +0000 (22:27 +0100)]
Check for proper Qt version

* build/autotroll.m4(AT_REQUIRE_QT_VERSION):
  Properly use AX_INSTEAD_IF when required Qt version not found.
* configure.ac: Explicitely require Qt 4.6.

7 years agoAdd Standards-Version field to Maemo packaging.
Mathias Hasselmann [Sat, 21 Nov 2009 21:30:43 +0000 (22:30 +0100)]
Add Standards-Version field to Maemo packaging.

7 years agoIntegrated QtWebkit SVG rendering
Mathias Hasselmann [Thu, 19 Nov 2009 00:36:46 +0000 (01:36 +0100)]
Integrated QtWebkit SVG rendering

* configure.ac: Added new dependencies for QtWebkit.

* src/board_view.[ħ|cc]: Changed MGraphicsBoardItem construction to load the
SVG board in a separate step.

* src/graphics_board_item.[h|cc]: This class has effectively become a QWebPage
proxy w.r.t SVG rendering. It also uses the QWebPage's main frame painter to
paint itself. By doing so, we got around the SVG bugs in QtSvg.  The proof of
concept was contributed by Mathias Hasselmann <mathias.hasselmann@maemo.org>.

7 years agoAdd missing postinst script. fremantle/0.1.1-1
Mathias Hasselmann [Tue, 17 Nov 2009 23:06:46 +0000 (00:06 +0100)]
Add missing postinst script.

* debian/miniature.postinst: Update icon cache after installation.

7 years agoPrepare 0.1.1 release.
Mathias Hasselmann [Tue, 17 Nov 2009 22:58:24 +0000 (23:58 +0100)]
Prepare 0.1.1 release.

* Makefile.am: Use proper path for icon files.
* configure.ac: Bump version. Link to homepage instead of ML.
* debian/changelog: Bump version.
* debian/control: Move to user/games sections. Shuffle attributes a
little bit for better readability.

7 years agoInstall application icons and specify them in the desktop file
David King [Tue, 17 Nov 2009 20:36:15 +0000 (21:36 +0100)]
Install application icons and specify them in the desktop file

* Makefile.am: Distribute icons to the relevant directories.

* data/data.qrc:
* data/icons/48x48/miniature.png:
* data/icons/scalable/miniature.svg: Move icons in source tree.

* data/miniature.desktop.in: Specify the application icon and correct
the Version field.

7 years agoCleaned up UI file
Michael Hasselmann [Tue, 17 Nov 2009 22:20:40 +0000 (23:20 +0100)]
Cleaned up UI file

* src/miniature.ui: Moved layouts into their parent widgets, to clean up the
element tree. Also fixed some spacing issues w.r.t. to big fonts and too small
QLabels.

7 years agoUse the common idiom for connecting Qt signals.
Mathias Hasselmann [Tue, 17 Nov 2009 18:54:41 +0000 (19:54 +0100)]
Use the common idiom for connecting Qt signals.

* src/board_view.cc:
* src/graphics_board_item.cc:
* src/miniature.cc: Just call connect() without any prefix like all Qt
expamples are demonstrating.

7 years agoAdd an application icon PNG and the source SVG
Ekaterina Gerasimova [Mon, 16 Nov 2009 21:52:33 +0000 (22:52 +0100)]
Add an application icon PNG and the source SVG

* data/miniature-48x48.png: 48x48 pixels application icon.

* data/miniature.svg: Source SVG for the application icon.

* data/data.qrc: Add both the icons to the resource file.

* debian/changelog: Bump the Debian package version.

* debian/control: Add a uuencoded application icon for Hildon
Application Manager.

7 years agoUpdated class diagram
Michael Hasselmann [Mon, 16 Nov 2009 19:21:34 +0000 (20:21 +0100)]
Updated class diagram

7 years agoUse short slogan for package description
Mathias Hasselmann [Mon, 16 Nov 2009 20:56:29 +0000 (21:56 +0100)]
Use short slogan for package description

7 years agoUpdated class diagram, this time with a PNG, too
Michael Hasselmann [Mon, 16 Nov 2009 19:08:25 +0000 (20:08 +0100)]
Updated class diagram, this time with a PNG, too

7 years agoUpdated class diagram
Michael Hasselmann [Mon, 16 Nov 2009 19:05:23 +0000 (20:05 +0100)]
Updated class diagram

7 years agoMerge branch 'master' of git@gitorious.org:miniature/miniature
Mathias Hasselmann [Mon, 16 Nov 2009 10:50:23 +0000 (11:50 +0100)]
Merge branch 'master' of git@gitorious.org:miniature/miniature

7 years agoCreated a more visible selection frame, refined move handling
Michael Hasselmann [Mon, 16 Nov 2009 10:37:45 +0000 (11:37 +0100)]
Created a more visible selection frame, refined move handling

7 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.

7 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

7 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

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

7 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.

7 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.

7 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

7 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.

7 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.

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

7 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.

7 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

7 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

7 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

7 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).

7 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).

7 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

7 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

7 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.

7 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

7 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.

7 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

7 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

7 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.

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

7 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

7 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.

7 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.

7 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

7 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

7 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