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
KMahjongg
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
KMahjongg
Commits
bda67f19
Commit
bda67f19
authored
Apr 27, 2016
by
Frederik Schwarzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup includes.
parent
9458f9ad
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
166 additions
and
95 deletions
+166
-95
src/boardlayout.cpp
src/boardlayout.cpp
+2
-0
src/boardlayout.h
src/boardlayout.h
+4
-2
src/demoanimation.cpp
src/demoanimation.cpp
+5
-2
src/demoanimation.h
src/demoanimation.h
+3
-2
src/editor.cpp
src/editor.cpp
+12
-8
src/editor.h
src/editor.h
+8
-6
src/frameimage.cpp
src/frameimage.cpp
+7
-2
src/frameimage.h
src/frameimage.h
+4
-5
src/gamedata.cpp
src/gamedata.cpp
+6
-3
src/gamedata.h
src/gamedata.h
+5
-2
src/gameitem.cpp
src/gameitem.cpp
+2
-1
src/gameitem.h
src/gameitem.h
+3
-2
src/gamescene.cpp
src/gamescene.cpp
+7
-4
src/gamescene.h
src/gamescene.h
+4
-2
src/gameview.cpp
src/gameview.cpp
+12
-8
src/gameview.h
src/gameview.h
+4
-2
src/kmahjongg.cpp
src/kmahjongg.cpp
+29
-21
src/kmahjongg.h
src/kmahjongg.h
+2
-1
src/kmahjongg_debug.cpp
src/kmahjongg_debug.cpp
+1
-0
src/kmahjongg_debug.h
src/kmahjongg_debug.h
+1
-0
src/kmahjongglayout.cpp
src/kmahjongglayout.cpp
+10
-5
src/kmahjongglayout.h
src/kmahjongglayout.h
+1
-0
src/kmahjongglayoutselector.cpp
src/kmahjongglayoutselector.cpp
+10
-6
src/kmahjongglayoutselector.h
src/kmahjongglayoutselector.h
+4
-2
src/main.cpp
src/main.cpp
+7
-4
src/movelistanimation.cpp
src/movelistanimation.cpp
+4
-1
src/movelistanimation.h
src/movelistanimation.h
+4
-2
src/selectionanimation.cpp
src/selectionanimation.cpp
+4
-1
src/selectionanimation.h
src/selectionanimation.h
+1
-1
No files found.
src/boardlayout.cpp
View file @
bda67f19
...
...
@@ -17,8 +17,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// own
#include "boardlayout.h"
// Qt
#include <QFile>
#include <QTextCodec>
#include <QTextStream>
...
...
src/boardlayout.h
View file @
bda67f19
...
...
@@ -19,10 +19,12 @@
#ifndef BOARDLAYOUT_H
#define BOARDLAYOUT_H
#include "kmtypes.h"
// Qt
#include <QString>
// KMahjongg
#include "kmtypes.h"
const
QString
layoutMagic1_0
=
QStringLiteral
(
"kmahjongg-layout-v1.0"
);
const
QString
layoutMagic1_1
=
QStringLiteral
(
"kmahjongg-layout-v1.1"
);
...
...
src/demoanimation.cpp
View file @
bda67f19
...
...
@@ -12,12 +12,15 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "demoanimation.h"
#include "gamedata.h"
#include "kmahjongg_debug.h"
// Qt
#include <QList>
// KMahjongg
#include "gamedata.h"
#include "kmahjongg_debug.h"
DemoAnimation
::
DemoAnimation
(
QObject
*
parent
)
:
QTimer
(
parent
),
...
...
src/demoanimation.h
View file @
bda67f19
...
...
@@ -15,10 +15,11 @@
#ifndef DEMOANIMATION_H
#define DEMOANIMATION_H
#include "kmtypes.h"
// Qt
#include <QTimer>
// KMahjongg
#include "kmtypes.h"
// Forward declarations...
class
GameData
;
...
...
src/editor.cpp
View file @
bda67f19
...
...
@@ -15,16 +15,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
// own
#include "editor.h"
#include "frameimage.h"
#include "prefs.h"
#include <KActionCollection>
#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardAction>
#include <KToggleAction>
// Qt
#include <QAction>
#include <QFileDialog>
#include <QFileInfo>
...
...
@@ -34,6 +28,16 @@
#include <QResizeEvent>
#include <QPainter>
// KDE
#include <KActionCollection>
#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardAction>
#include <KToggleAction>
// KMahjongg
#include "frameimage.h"
#include "prefs.h"
Editor
::
Editor
(
QWidget
*
parent
)
:
QDialog
(
parent
),
...
...
src/editor.h
View file @
bda67f19
...
...
@@ -18,17 +18,19 @@
#ifndef EDITOR_H
#define EDITOR_H
// Qt
#include <QDialog>
#include <QFrame>
// KDE
#include <KToolBar>
// KMahjongg
#include "boardlayout.h"
#include "frameimage.h"
#include "kmahjonggtileset.h"
#include "kmtypes.h"
#include <KToolBar>
#include <QDialog>
#include <QFrame>
class
FrameImage
;
class
QLabel
;
class
KToolBar
;
...
...
src/frameimage.cpp
View file @
bda67f19
...
...
@@ -15,10 +15,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
// own
#include "frameimage.h"
#include "editor.h"
#include "prefs.h"
// Qt
#include <QEvent>
#include <QImage>
#include <QPainter>
...
...
@@ -26,10 +26,15 @@
#include <QPixmap>
#include <QTextStream>
// KDE
#include <KLocalizedString>
#include <KMessageBox>
#include <KStandardGuiItem>
// KMahjongg
#include "editor.h"
#include "prefs.h"
FrameImage
::
FrameImage
(
QWidget
*
parent
,
const
QSize
&
initialImageSize
)
:
QWidget
(
parent
),
m_rx
(
-
1
),
...
...
src/frameimage.h
View file @
bda67f19
...
...
@@ -18,17 +18,16 @@
#ifndef FRAMEIMAGE_H
#define FRAMEIMAGE_H
// Qt
#include <QWidget>
#include <QFrame>
class
QPixmap
;
// KMahjongg
#include "boardlayout.h"
#include "kmahjonggtileset.h"
#include "kmahjonggbackground.h"
#include <QFrame>
class
QPixmap
;
class
QComboBox
;
class
QPixmap
;
...
...
src/gamedata.cpp
View file @
bda67f19
...
...
@@ -17,13 +17,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
// own
#include "gamedata.h"
#include "prefs.h"
#include "boardlayout.h"
#include "kmahjongg_debug.h"
// Qt
#include <QDataStream>
// KMahjongg
#include "prefs.h"
#include "boardlayout.h"
#include "kmahjongg_debug.h"
GameData
::
GameData
(
BoardLayout
*
boardlayout
)
{
...
...
src/gamedata.h
View file @
bda67f19
...
...
@@ -20,11 +20,14 @@
#ifndef GAMEDATA_H
#define GAMEDATA_H
#include "kmtypes.h"
// Qt
#include <QVector>
// KDE
#include <KRandomSequence>
#include <QVector>
// KMahjongg
#include "kmtypes.h"
class
BoardLayout
;
...
...
src/gameitem.cpp
View file @
bda67f19
...
...
@@ -12,14 +12,15 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "gameitem.h"
// Qt
#include <QGraphicsSceneMouseEvent>
#include <QPainter>
#include <QPixmap>
#include <QTimer>
GameItem
::
GameItem
(
bool
selected
,
QGraphicsObject
*
item
)
:
QGraphicsObject
(
item
),
m_dying
(
false
),
...
...
src/gameitem.h
View file @
bda67f19
...
...
@@ -15,11 +15,12 @@
#ifndef GAMEITEM_H
#define GAMEITEM_H
#include "kmtypes.h"
// Qt
#include <QGraphicsObject>
#include <QObject>
// KMahjongg
#include "kmtypes.h"
/**
* The tile of a mahjongg board.
...
...
src/gamescene.cpp
View file @
bda67f19
...
...
@@ -12,15 +12,18 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "gamescene.h"
#include "gamedata.h"
#include "gameview.h"
#include "gameitem.h"
#include "kmahjongglayout.h"
// Qt
#include <QGraphicsSceneMouseEvent>
#include <QList>
// KMahjongg
#include "gamedata.h"
#include "gameview.h"
#include "gameitem.h"
#include "kmahjongglayout.h"
GameScene
::
GameScene
(
QObject
*
parent
)
:
QGraphicsScene
(
parent
),
...
...
src/gamescene.h
View file @
bda67f19
...
...
@@ -15,10 +15,12 @@
#ifndef GAMESCENE_H
#define GAMESCENE_H
#include "kmtypes.h"
// Qt
#include <QGraphicsScene>
// KMahjongg
#include "kmtypes.h"
#define BOARD_WIDTH 36
#define BOARD_HEIGHT 16
#define BOARD_DEPTH 5
...
...
src/gameview.cpp
View file @
bda67f19
...
...
@@ -12,7 +12,19 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "gameview.h"
// Qt
#include <QMouseEvent>
#include <QResizeEvent>
// KDE
#include <KLocalizedString>
#include <KMessageBox>
#include <KRandom>
// KMahjongg
#include "gamedata.h"
#include "gamescene.h"
#include "gameitem.h"
...
...
@@ -25,14 +37,6 @@
#include "kmahjongg_debug.h"
#include "prefs.h"
#include <KLocalizedString>
#include <KMessageBox>
#include <KRandom>
#include <QMouseEvent>
#include <QResizeEvent>
GameView
::
GameView
(
GameScene
*
gameScene
,
GameData
*
gameData
,
QWidget
*
parent
)
:
QGraphicsView
(
gameScene
,
parent
),
m_cheatsUsed
(
0
),
...
...
src/gameview.h
View file @
bda67f19
...
...
@@ -15,10 +15,12 @@
#ifndef GAMEVIEW_H
#define GAMEVIEW_H
#include "kmtypes.h"
// Qt
#include <QGraphicsView>
// KMahjongg
#include "kmtypes.h"
static
const
int
ANIMATION_SPEED
=
200
;
// Forward declaration...
...
...
src/kmahjongg.cpp
View file @
bda67f19
...
...
@@ -15,29 +15,13 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "kmahjongg.h"
#include "prefs.h"
#include "kmahjongglayoutselector.h"
#include "ui_settings.h"
#include "editor.h"
#include "gameview.h"
#include "gamescene.h"
#include "gamedata.h"
#include "kmahjongglayout.h"
#include "kmahjongg_debug.h"
#include <kmahjonggconfigdialog.h>
#include <KAboutData>
#include <KActionCollection>
#include <KConfigDialog>
#include <KGameClock>
#include <KLocalizedString>
#include <KMessageBox>
#include <KScoreDialog>
#include <KStandardAction>
#include <KStandardGameAction>
#include <KToggleAction>
// STL
#include <limits.h>
// Qt
#include <QAction>
#include <QDesktopWidget>
#include <QFileDialog>
...
...
@@ -51,7 +35,31 @@
#include <QStatusBar>
#include <QWindowStateChangeEvent>
#include <limits.h>
// KDE
#include <KAboutData>
#include <KActionCollection>
#include <KConfigDialog>
#include <KGameClock>
#include <KLocalizedString>
#include <KMessageBox>
#include <KScoreDialog>
#include <KStandardAction>
#include <KStandardGameAction>
#include <KToggleAction>
// LibKMahjongg
#include <kmahjonggconfigdialog.h>
// KMahjongg
#include "prefs.h"
#include "kmahjongglayoutselector.h"
#include "ui_settings.h"
#include "editor.h"
#include "gameview.h"
#include "gamescene.h"
#include "gamedata.h"
#include "kmahjongglayout.h"
#include "kmahjongg_debug.h"
const
QString
KMahjongg
::
gameMagic
=
"kmahjongg-gamedata"
;
const
int
KMahjongg
::
gameDataVersion
=
1
;
...
...
src/kmahjongg.h
View file @
bda67f19
...
...
@@ -18,7 +18,8 @@
#ifndef KMAHJONGG_H
#define KMAHJONGG_H
#include <kxmlguiwindow.h>
// KDE
#include <KXmlGuiWindow>
class
KToggleAction
;
class
QLabel
;
...
...
src/kmahjongg_debug.cpp
View file @
bda67f19
...
...
@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
// own
#include "kmahjongg_debug.h"
Q_LOGGING_CATEGORY
(
KMAHJONGG_LOG
,
"log_kmahjongg"
)
src/kmahjongg_debug.h
View file @
bda67f19
...
...
@@ -20,6 +20,7 @@
#ifndef KMAHJONGG_DEBUG_H
#define KMAHJONGG_DEBUG_H
// Qt
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY
(
KMAHJONGG_LOG
)
...
...
src/kmahjongglayout.cpp
View file @
bda67f19
...
...
@@ -17,17 +17,22 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// own
#include "kmahjongglayout.h"
#include "boardlayout.h"
#include "kmahjongg_debug.h"
// Qt
#include <QFile>
#include <QMap>
#include <QStandardPaths>
// KDE
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <QFile>
#include
<QMap>
#include
<QStandardPaths>
// KMahjongg
#include
"boardlayout.h"
#include
"kmahjongg_debug.h"
const
int
KMahjonggLayout
::
kLayoutVersionFormat
=
1
;
...
...
src/kmahjongglayout.h
View file @
bda67f19
...
...
@@ -20,6 +20,7 @@
#ifndef KMAHJONGGLAYOUT_H
#define KMAHJONGGLAYOUT_H
// Qt
#include <QString>
class
BoardLayout
;
...
...
src/kmahjongglayoutselector.cpp
View file @
bda67f19
...
...
@@ -20,19 +20,23 @@
*/
// own
#include "kmahjongglayoutselector.h"
// Qt
#include <QDir>
#include <QPainter>
// KDE
#include <KLocalizedString>
// KMahjongg
#include "kmahjongglayout.h"
#include "gameview.h"
#include "gamescene.h"
#include "gamedata.h"
#include "prefs.h"
#include <KLocalizedString>
#include <QDir>
#include <QPainter>
KMahjonggLayoutSelector
::
KMahjonggLayoutSelector
(
QWidget
*
parent
,
KConfigSkeleton
*
aconfig
)
:
QWidget
(
parent
),
m_gameData
(
nullptr
)
...
...
src/kmahjongglayoutselector.h
View file @
bda67f19
...
...
@@ -23,10 +23,12 @@
#ifndef KMAHJONGGLAYOUTSELECTOR_H
#define KMAHJONGGLAYOUTSELECTOR_H
#include "ui_gametype.h"
// KDE
#include <KConfigSkeleton>
// KMahjongg
#include "ui_gametype.h"
class
GameView
;
class
GameData
;
class
GameScene
;
...
...
src/main.cpp
View file @
bda67f19
...
...
@@ -12,17 +12,20 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
#include "kmahjongg.h"
#include "version.h"
// Qt
#include <QApplication>
#include <QCommandLineParser>
// KDE
#include <KAboutData>
#include <KCrash>
#include <KDBusService>
#include <Kdelibs4ConfigMigrator>
#include <KLocalizedString>
#include <QApplication>
#include <QCommandLineParser>
// KMahjongg
#include "kmahjongg.h"
#include "version.h"
static
const
char
description
[]
=
I18N_NOOP
(
"Mahjongg Solitaire for KDE"
);
...
...
src/movelistanimation.cpp
View file @
bda67f19
...
...
@@ -12,11 +12,14 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "movelistanimation.h"
#include "gamedata.h"
// Qt
#include <QList>
// KMahjongg
#include "gamedata.h"
MoveListAnimation
::
MoveListAnimation
(
QObject
*
parent
)
:
QTimer
(
parent
),
...
...
src/movelistanimation.h
View file @
bda67f19
...
...
@@ -15,10 +15,12 @@
#ifndef MOVELISTANIMATION_H
#define MOVELISTANIMATION_H
#include "kmtypes.h"
// Qt
#include <QTimer>
// KMahjongg
#include "kmtypes.h"
// Forward declarations...
class
GameData
;
...
...
src/selectionanimation.cpp
View file @
bda67f19
...
...
@@ -12,11 +12,14 @@
* not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
// own
#include "selectionanimation.h"
#include "gameitem.h"
// Qt
#include <QList>
// KMahjongg
#include "gameitem.h"
SelectionAnimation
::
SelectionAnimation
(
QObject
*
parent
)
:
QTimer
(
parent
),
...
...
src/selectionanimation.h
View file @
bda67f19
...
...
@@ -15,9 +15,9 @@
#ifndef SELECTIONANIMATION_H
#define SELECTIONANIMATION_H
// Qt
#include <QTimer>
// Forward declarations...
template
<
class
T
>
class
QList
;
class
GameItem
;
...
...
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