7 class MainWindow < KDE::XmlGuiWindow
10 Theme = Struct.new(:pieces, :board)
12 def initialize(loader, game)
26 std_action :open_new do
29 std_action :quit, :close
33 config = KDE::Global.config.group('themes')
36 theme.pieces = @loader.get_matching('Celtic', game,
37 (game.keywords || []) + ['pieces'], [], :shadow => true)
38 theme.board = @loader.get_matching(nil, game,
39 ['board'], game.keywords || [])
41 scene = Qt::GraphicsScene.new
43 state = game.state.new.tap {|s| s.setup }
45 board = Board.new(scene, theme, game, state)
47 table = Table.new(scene, self, board)
48 self.central_widget = table
50 history = History.new(state)
51 controller = Controller.new(board, history)