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
d8889223
Commit
d8889223
authored
Jan 03, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it compile
parent
4b5a7221
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
11 deletions
+14
-11
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/gui/CMakeLists.txt
src/gui/CMakeLists.txt
+1
-0
src/gui/views/gameactions.cpp
src/gui/views/gameactions.cpp
+11
-9
src/gui/views/renderer.cpp
src/gui/views/renderer.cpp
+1
-1
No files found.
src/CMakeLists.txt
View file @
d8889223
...
@@ -27,7 +27,7 @@ add_executable(ksudoku ${ksudoku_SRCS})
...
@@ -27,7 +27,7 @@ add_executable(ksudoku ${ksudoku_SRCS})
target_link_libraries
(
ksudoku
target_link_libraries
(
ksudoku
ksudoku_gui ksudoku_logic
ksudoku_gui ksudoku_logic
KF5KDEGames
kdegamesp
rivate
KF5KDEGames
KF5KDEGamesP
rivate
KF5::KIOCore
KF5::KIOCore
)
)
...
...
src/gui/CMakeLists.txt
View file @
d8889223
...
@@ -40,6 +40,7 @@ target_link_libraries(ksudoku_gui
...
@@ -40,6 +40,7 @@ target_link_libraries(ksudoku_gui
KF5::KIOCore
KF5::KIOCore
Qt5::Core
Qt5::Core
Qt5::Gui
Qt5::Gui
Qt5::Svg
)
)
if
(
OPENGL_SUPPORT
)
if
(
OPENGL_SUPPORT
)
...
...
src/gui/views/gameactions.cpp
View file @
d8889223
...
@@ -41,7 +41,7 @@ void GameActions::init() {
...
@@ -41,7 +41,7 @@ void GameActions::init() {
QAction
*
a
;
QAction
*
a
;
KShortcut
shortcut
;
//QT5
KShortcut shortcut;
for
(
int
i
=
0
;
i
<
25
;
++
i
)
{
for
(
int
i
=
0
;
i
<
25
;
++
i
)
{
a
=
new
QAction
(
this
);
a
=
new
QAction
(
this
);
m_collection
->
addAction
(
QString
(
"val-select%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
m_collection
->
addAction
(
QString
(
"val-select%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
...
@@ -53,12 +53,14 @@ void GameActions::init() {
...
@@ -53,12 +53,14 @@ void GameActions::init() {
a
=
new
QAction
(
this
);
a
=
new
QAction
(
this
);
m_collection
->
addAction
(
QString
(
"val-enter%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
m_collection
->
addAction
(
QString
(
"val-enter%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
a
->
setText
(
i18n
(
"Enter %1 (%2)"
,
QChar
(
'a'
+
i
),
i
+
1
));
a
->
setText
(
i18n
(
"Enter %1 (%2)"
,
QChar
(
'a'
+
i
),
i
+
1
));
#if 0 //QT5
shortcut = a->shortcut();
shortcut = a->shortcut();
shortcut.setPrimary( Qt::Key_A + i);
shortcut.setPrimary( Qt::Key_A + i);
if(i < 9) {
if(i < 9) {
shortcut.setAlternate( Qt::Key_1 + i);
shortcut.setAlternate( Qt::Key_1 + i);
}
}
a->setShortcut(shortcut);
a->setShortcut(shortcut);
#endif
m_enterValueMapper
->
setMapping
(
a
,
i
+
1
);
m_enterValueMapper
->
setMapping
(
a
,
i
+
1
);
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
m_enterValueMapper
,
SLOT
(
map
()));
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
m_enterValueMapper
,
SLOT
(
map
()));
m_actions
<<
a
;
m_actions
<<
a
;
...
@@ -66,12 +68,12 @@ void GameActions::init() {
...
@@ -66,12 +68,12 @@ void GameActions::init() {
a
=
new
QAction
(
this
);
a
=
new
QAction
(
this
);
m_collection
->
addAction
(
QString
(
"val-mark%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
m_collection
->
addAction
(
QString
(
"val-mark%1"
).
arg
(
i
+
1
,
2
,
10
,
QChar
(
'0'
)),
a
);
a
->
setText
(
i18n
(
"Mark %1 (%2)"
,
QChar
(
'a'
+
i
),
i
+
1
));
a
->
setText
(
i18n
(
"Mark %1 (%2)"
,
QChar
(
'a'
+
i
),
i
+
1
));
shortcut
=
a
->
shortcut
();
//QT5
shortcut = a->shortcut();
shortcut
.
setPrimary
(
QKeySequence
(
Qt
::
ShiftModifier
|
Qt
::
Key_A
+
i
));
//QT5
shortcut.setPrimary( QKeySequence(Qt::ShiftModifier | Qt::Key_A + i));
if
(
i
<
9
)
{
if
(
i
<
9
)
{
shortcut
.
setAlternate
(
QKeySequence
(
Qt
::
ShiftModifier
|
Qt
::
Key_1
+
i
));
//QT5
shortcut.setAlternate( QKeySequence(Qt::ShiftModifier | Qt::Key_1 + i));
}
}
a
->
setShortcut
(
shortcut
);
//QT5
a->setShortcut(shortcut);
m_markValueMapper
->
setMapping
(
a
,
i
+
1
);
m_markValueMapper
->
setMapping
(
a
,
i
+
1
);
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
m_markValueMapper
,
SLOT
(
map
()));
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
m_markValueMapper
,
SLOT
(
map
()));
m_actions
<<
a
;
m_actions
<<
a
;
...
@@ -108,10 +110,10 @@ void GameActions::init() {
...
@@ -108,10 +110,10 @@ void GameActions::init() {
a
=
new
QAction
(
this
);
a
=
new
QAction
(
this
);
m_collection
->
addAction
(
"move_clear_cell"
,
a
);
m_collection
->
addAction
(
"move_clear_cell"
,
a
);
a
->
setText
(
i18n
(
"Clear Cell"
));
a
->
setText
(
i18n
(
"Clear Cell"
));
shortcut
=
a
->
shortcut
();
//QT5
shortcut = a->shortcut();
shortcut
.
setPrimary
(
Qt
::
Key_Backspace
);
//QT5
shortcut.setPrimary(Qt::Key_Backspace);
shortcut
.
setAlternate
(
Qt
::
Key_Delete
);
//QT5
shortcut.setAlternate(Qt::Key_Delete);
a
->
setShortcut
(
shortcut
);
//QT5
a->setShortcut(shortcut);
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
SLOT
(
clearValue
()));
connect
(
a
,
SIGNAL
(
triggered
(
bool
)),
SLOT
(
clearValue
()));
m_actions
<<
a
;
m_actions
<<
a
;
}
}
...
...
src/gui/views/renderer.cpp
View file @
d8889223
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <QSvgRenderer>
#include <QSvgRenderer>
#include <KStandardDirs>
#include <KStandardDirs>
#include <kpixmapcache.h>
#include <kpixmapcache.h>
#include <KDebug>
#define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API
#define USE_UNSTABLE_LIBKDEGAMESPRIVATE_API
#include <libkdegamesprivate/kgametheme.h>
#include <libkdegamesprivate/kgametheme.h>
...
...
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