Commit bda67f19 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Cleanup includes.

parent 9458f9ad
......@@ -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>
......
......@@ -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");
......
......@@ -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),
......
......@@ -15,10 +15,11 @@
#ifndef DEMOANIMATION_H
#define DEMOANIMATION_H
#include "kmtypes.h"
// Qt
#include <QTimer>
// KMahjongg
#include "kmtypes.h"
// Forward declarations...
class GameData;
......
......@@ -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),
......
......@@ -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;
......
......@@ -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),
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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),
......
......@@ -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.
......
......@@ -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),
......
......@@ -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
......
......@@ -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),
......
......@@ -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...
......
......@@ -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;
......
......@@ -18,7 +18,8 @@
#ifndef KMAHJONGG_H
#define KMAHJONGG_H
#include <kxmlguiwindow.h>
// KDE
#include <KXmlGuiWindow>
class KToggleAction;
class QLabel;
......
......@@ -17,6 +17,7 @@
Boston, MA 02110-1301, USA.
*/
// own
#include "kmahjongg_debug.h"
Q_LOGGING_CATEGORY(KMAHJONGG_LOG, "log_kmahjongg")
......@@ -20,6 +20,7 @@
#ifndef KMAHJONGG_DEBUG_H
#define KMAHJONGG_DEBUG_H
// Qt
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KMAHJONGG_LOG)
......
......@@ -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;
......
......@@ -20,6 +20,7 @@
#ifndef KMAHJONGGLAYOUT_H
#define KMAHJONGGLAYOUT_H
// Qt
#include <QString>
class BoardLayout;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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");
......
......@@ -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),
......
......@@ -15,10 +15,12 @@
#ifndef MOVELISTANIMATION_H
#define MOVELISTANIMATION_H
#include "kmtypes.h"
// Qt
#include <QTimer>
// KMahjongg
#include "kmtypes.h"
// Forward declarations...
class GameData;
......
......@@ -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),
......
......@@ -15,9 +15,9 @@
#ifndef SELECTIONANIMATION_H
#define SELECTIONANIMATION_H
// Qt
#include <QTimer>
// Forward declarations...
template <class T> class QList;
class GameItem;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment