Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
Kubrick
Commits
ba4fc343
Commit
ba4fc343
authored
Jun 02, 2017
by
Andrius Štikonas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove KDELibs4Support.
parent
44f6f39d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
38 deletions
+34
-38
CMakeLists.txt
CMakeLists.txt
+0
-1
src/CMakeLists.txt
src/CMakeLists.txt
+0
-1
src/game.cpp
src/game.cpp
+3
-1
src/gamedialog.cpp
src/gamedialog.cpp
+21
-20
src/gamedialog.h
src/gamedialog.h
+3
-5
src/gameglview.cpp
src/gameglview.cpp
+2
-6
src/kubrick.cpp
src/kubrick.cpp
+5
-4
No files found.
CMakeLists.txt
View file @
ba4fc343
...
...
@@ -14,7 +14,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
Crash
DocTools
KDELibs4Support
I18n
KIO
WidgetsAddons
...
...
src/CMakeLists.txt
View file @
ba4fc343
...
...
@@ -29,7 +29,6 @@ target_link_libraries(kubrick
Qt5::Svg
KF5::Crash
KF5::ConfigCore
KF5::KDELibs4Support
KF5::KIOCore
KF5::XmlGui
KF5KDEGames
...
...
src/game.cpp
View file @
ba4fc343
...
...
@@ -21,7 +21,9 @@
#include "movetracker.h"
#include "scenelabel.h"
#include "kubrick_debug.h"
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardAction>
...
...
@@ -1822,7 +1824,7 @@ void Game::chooseMousePointer ()
void
Game
::
startNextDisplay
()
{
// Pick off the first character of the display sequence.
char
c
=
displaySequence
.
at
(
0
).
to
Ascii
();
char
c
=
displaySequence
.
at
(
0
).
to
Latin1
();
displaySequence
.
remove
(
0
,
1
);
int
nRMoves
=
0
;
...
...
src/gamedialog.cpp
View file @
ba4fc343
...
...
@@ -17,43 +17,44 @@
*******************************************************************************/
#include "gamedialog.h"
#include <KConfigGroup>
#include <KLocalizedString>
#include <QVBoxLayout>
#include <QLabel>
#include <QDialogButtonBox>
#include <QFrame>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
/******************************************************************************/
/***************** DIALOG BOX TO SELECT A GAME AND LEVEL *****************/
/******************************************************************************/
GameDialog
::
GameDialog
(
bool
changePuzzle
,
int
optionTemp
[],
QWidget
*
parent
)
:
K
Dialog
(
parent
)
:
Q
Dialog
(
parent
)
{
myParent
=
parent
;
myChangePuzzle
=
changePuzzle
;
opt
=
optionTemp
;
int
margin
=
marginHint
();
int
spacing
=
spacingHint
();
QWidget
*
dad
=
new
QWidget
(
this
);
setMainWidget
(
dad
);
setCaption
(
i18n
(
"Rubik's Cube Options"
));
setButtons
(
KDialog
::
Ok
|
KDialog
::
Cancel
|
KDialog
::
Help
);
setDefaultButton
(
KDialog
::
Ok
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
dad
);
mainLayout
->
setSpacing
(
spacing
);
mainLayout
->
setMargin
(
margin
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
dad
);
mainLayout
->
addWidget
(
dad
);
setLayout
(
mainLayout
);
setWindowTitle
(
i18n
(
"Rubik's Cube Options"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
GameDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
GameDialog
::
reject
);
buttonBox
->
button
(
QDialogButtonBox
::
Ok
)
->
setDefault
(
true
);
QHBoxLayout
*
cubeDimensions
=
new
QHBoxLayout
();
mainLayout
->
addLayout
(
cubeDimensions
);
cubeDimensions
->
setSpacing
(
spacing
);
QHBoxLayout
*
difficulty
=
new
QHBoxLayout
();
mainLayout
->
addLayout
(
difficulty
);
difficulty
->
setSpacing
(
spacing
);
if
(
changePuzzle
)
{
// Lay out spin boxes for the cube dimensions.
...
...
@@ -116,7 +117,6 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
QHBoxLayout
*
speed
=
new
QHBoxLayout
();
mainLayout
->
addLayout
(
speed
);
speed
->
setSpacing
(
spacing
);
speedL
=
new
QLabel
(
i18n
(
"Speed of moves:"
));
speedN
=
new
QSpinBox
();
...
...
@@ -126,7 +126,6 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
QHBoxLayout
*
bevel
=
new
QHBoxLayout
();
mainLayout
->
addLayout
(
bevel
);
bevel
->
setSpacing
(
spacing
);
// xgettext: no-c-format
bevelL
=
new
QLabel
(
i18n
(
"% of bevel on edges of cubies:"
));
...
...
@@ -136,6 +135,8 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
bevel
->
addWidget
(
bevelL
);
bevel
->
addWidget
(
bevelN
);
mainLayout
->
addWidget
(
buttonBox
);
// Set the option-widgets to the current values of the options.
if
(
changePuzzle
)
{
dimX
->
setValue
(
optionTemp
[
optXDim
]);
...
...
@@ -150,8 +151,8 @@ GameDialog::GameDialog (bool changePuzzle, int optionTemp [], QWidget * parent)
bevelN
->
setValue
(
optionTemp
[
optBevel
]);
connect
(
this
,
&
GameDialog
::
okC
licked
,
this
,
&
GameDialog
::
slotOk
);
connect
(
this
,
&
GameDialog
::
h
elp
C
licked
,
this
,
&
GameDialog
::
slotHelp
);
connect
(
okButton
,
&
QPushButton
::
c
licked
,
this
,
&
GameDialog
::
slotOk
);
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
H
elp
),
&
QPushButton
::
c
licked
,
this
,
&
GameDialog
::
slotHelp
);
}
...
...
src/gamedialog.h
View file @
ba4fc343
...
...
@@ -19,14 +19,12 @@
#ifndef GAMEDIALOG_H
#define GAMEDIALOG_H
// Use KDialog and KMessageBox.
#include <KDialog>
#include <KMessageBox>
#include <QCheckBox>
#include <QDialog>
#include <QLabel>
#include <QSpinBox>
#include <QCheckBox>
#include "kbkglobal.h"
...
...
@@ -40,7 +38,7 @@ class Game;
/******************* DIALOG TO SELECT A GAME AND LEVEL *******************/
/******************************************************************************/
class
GameDialog
:
public
K
Dialog
class
GameDialog
:
public
Q
Dialog
{
public:
GameDialog
(
bool
changePuzzle
,
int
optionTemp
[
8
],
QWidget
*
parent
=
0
);
...
...
src/gameglview.cpp
View file @
ba4fc343
...
...
@@ -25,15 +25,11 @@
#include <QMouseEvent>
#include <QPainter>
#include <QPoint>
#include <QStandardPaths>
#include <QStringList>
// IDW - This is temporary code for KDE 4.1. Do themes properly in KDE 4.2.
#include <KCmdLineArgs>
#include <KAboutData>
#include <QSvgRenderer>
#include "kubrick_debug.h"
#include <KGlobal>
#include <KStandardDirs>
// C++ includes
#include <iostream>
...
...
src/kubrick.cpp
View file @
ba4fc343
...
...
@@ -21,19 +21,20 @@
// Qt includes.
#include <QAction>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QGLFormat>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QSignalMapper>
#include <QStatusBar>
#include <QString>
// KDE includes.
#include <KActionCollection>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KStandardGameAction>
#include <KMessageBox>
#include <KShortcutsDialog>
#include <KStandardGameAction>
#include <KToggleAction>
// Local includes.
...
...
@@ -47,7 +48,7 @@ Kubrick::Kubrick () :
singmasterMoves
(
0
)
{
// Window title.
// set
Caption
("Rubik's Cube"); // DELETED - This is a *trademark*.
// set
WindowTitle
("Rubik's Cube"); // DELETED - This is a *trademark*.
// use multi-sample (anti-aliased) OpenGL if available
QGLFormat
defFormat
=
QGLFormat
::
defaultFormat
();
...
...
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