Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KSudoku
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Games
KSudoku
Commits
72563b83
Commit
72563b83
authored
Mar 27, 2012
by
Ian Wadham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add keyboard entry of values into 3-D Roxdoku puzzles.
svn path=/trunk/KDE/kdegames/ksudoku/; revision=1287217
parent
22b7968d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
src/gui/views/ksview.cpp
src/gui/views/ksview.cpp
+4
-2
src/gui/views/roxdokuview.cpp
src/gui/views/roxdokuview.cpp
+12
-3
src/gui/views/roxdokuview.h
src/gui/views/roxdokuview.h
+3
-2
No files found.
src/gui/views/ksview.cpp
View file @
72563b83
...
...
@@ -62,7 +62,8 @@ void KsView::createView() {
case
TypeCustom
:
{
#ifdef OPENGL_SUPPORT
if
(
m_game
.
puzzle
()
->
graph
()
->
sizeZ
()
>
1
)
{
setWidget
(
new
RoxdokuView
(
m_game
,
0
,
0
));
// TODO - IDW - Add a parent widget. Memory leak?
setWidget
(
new
RoxdokuView
(
m_game
,
m_gameActions
,
0
));
}
else
{
setWidget
(
new
View2D
(
0
,
m_game
,
m_gameActions
));
...
...
@@ -74,7 +75,8 @@ void KsView::createView() {
}
#ifdef OPENGL_SUPPORT
case
TypeRoxdoku
:
{
setWidget
(
new
RoxdokuView
(
m_game
,
0
,
0
));
// TODO - IDW - Add a parent widget. Memory leak?
setWidget
(
new
RoxdokuView
(
m_game
,
m_gameActions
,
0
));
break
;
}
#endif
...
...
src/gui/views/roxdokuview.cpp
View file @
72563b83
...
...
@@ -35,6 +35,7 @@
#include "settings.h"
#include "renderer.h"
#include "gameactions.h"
namespace
ksudoku
{
...
...
@@ -62,10 +63,9 @@ Matrix3fT ThisRot = {{ {1.0f}, {0.0f}, {0.0f}, // NEW: This Rota
{
0.0
f
},
{
0.0
f
},
{
1.0
f
}
}};
RoxdokuView
::
RoxdokuView
(
ksudoku
::
Game
game
,
Symbols
*
symbols
,
QWidget
*
parent
)
RoxdokuView
::
RoxdokuView
(
ksudoku
::
Game
game
,
GameActions
*
gameActions
,
QWidget
*
parent
)
:
QGLWidget
(
parent
)
,
m_symbols
(
symbols
)
{
m_game
=
game
;
m_graph
=
m_game
.
puzzle
()
->
graph
();
...
...
@@ -79,6 +79,7 @@ RoxdokuView::RoxdokuView(ksudoku::Game game, Symbols* symbols, QWidget *parent)
connect
(
m_game
.
interface
(),
SIGNAL
(
cellChange
(
int
)),
this
,
SLOT
(
updateGL
()));
connect
(
m_game
.
interface
(),
SIGNAL
(
fullChange
()),
this
,
SLOT
(
updateGL
()));
connect
(
gameActions
,
SIGNAL
(
enterValue
(
int
)),
SLOT
(
enterValue
(
int
)));
// IDW test. m_wheelmove = 0.0f;
m_wheelmove
=
-
5.0
f
;
// IDW test. Makes the viewport bigger, can see more.
...
...
@@ -105,6 +106,14 @@ RoxdokuView::~RoxdokuView()
glDeleteTextures
(
25
,
m_texture
[
1
]);
}
void
RoxdokuView
::
enterValue
(
int
value
)
{
if
(
m_selection
>=
0
)
{
m_game
.
setValue
(
m_selection
,
value
);
updateGL
();
}
}
QString
RoxdokuView
::
status
()
const
{
QString
m
;
...
...
src/gui/views/roxdokuview.h
View file @
72563b83
...
...
@@ -42,6 +42,7 @@ namespace ksudoku{
class
Game
;
class
Symbols
;
class
GameActions
;
/**
* GUI for a Roxdoku puzzle.
...
...
@@ -50,7 +51,7 @@ class RoxdokuView : public QGLWidget, public ViewInterface
{
Q_OBJECT
public:
RoxdokuView
(
ksudoku
::
Game
game
,
Symbols
*
symbols
,
QWidget
*
parent
=
0
);
RoxdokuView
(
ksudoku
::
Game
game
,
GameActions
*
gameActions
,
QWidget
*
parent
=
0
);
~
RoxdokuView
();
virtual
QString
status
()
const
;
...
...
@@ -64,6 +65,7 @@ public:
public
slots
:
void
selectValue
(
int
value
);
void
settingsChanged
();
void
enterValue
(
int
value
);
signals:
void
valueSelected
(
int
value
);
// Never used but connected to
...
...
@@ -95,7 +97,6 @@ private slots:
private:
void
loadSettings
();
Symbols
*
m_symbols
;
Game
m_game
;
SKGraph
*
m_graph
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment