Moved includes out of the CPP files into the header files.

Reimplementation of `30a87d23c9c63bed072b3460e7482075dc530b2c` from the
old origin.
This commit is contained in:
Cerapter 2018-08-19 09:37:34 +02:00
parent e6eace9a39
commit d314b8dd07
52 changed files with 72 additions and 116 deletions

View File

@ -7,10 +7,6 @@
#include "aooptionsdialog.h" #include "aooptionsdialog.h"
#include <QDebug>
#include <QRect>
#include <QDesktopWidget>
AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv) AOApplication::AOApplication(int &argc, char **argv) : QApplication(argc, argv)
{ {
// Create the QSettings class that points to the config.ini. // Create the QSettings class that points to the config.ini.

View File

@ -10,6 +10,19 @@
#include <QFile> #include <QFile>
#include <QSettings> #include <QSettings>
#include <QDebug>
#include <QRect>
#include <QDesktopWidget>
#include <QCryptographicHash>
#include <QDir>
#include <QStandardPaths>
#include <QTextStream>
#include <QStringList>
#include <QColor>
class NetworkManager; class NetworkManager;
class Lobby; class Lobby;
class Courtroom; class Courtroom;

View File

@ -1,9 +1,5 @@
#include "aoblipplayer.h" #include "aoblipplayer.h"
#include <string.h>
#include <QDebug>
AOBlipPlayer::AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app) AOBlipPlayer::AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app)
{ {
m_parent = parent; m_parent = parent;

View File

@ -5,6 +5,8 @@
#include "aoapplication.h" #include "aoapplication.h"
#include <QWidget> #include <QWidget>
#include <string.h>
#include <QDebug>
class AOBlipPlayer class AOBlipPlayer
{ {

View File

@ -3,8 +3,6 @@
#include "debug_functions.h" #include "debug_functions.h"
#include "file_functions.h" #include "file_functions.h"
#include <QDebug>
AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) : QPushButton(parent) AOButton::AOButton(QWidget *parent, AOApplication *p_ao_app) : QPushButton(parent)
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -4,6 +4,7 @@
#include "aoapplication.h" #include "aoapplication.h"
#include <QPushButton> #include <QPushButton>
#include <QDebug>
class AOButton : public QPushButton class AOButton : public QPushButton
{ {

View File

@ -2,8 +2,6 @@
#include "file_functions.h" #include "file_functions.h"
#include <QFile>
AOCharButton::AOCharButton(QWidget *parent, AOApplication *p_ao_app, int x_pos, int y_pos, bool is_taken) : QPushButton(parent) AOCharButton::AOCharButton(QWidget *parent, AOApplication *p_ao_app, int x_pos, int y_pos, bool is_taken) : QPushButton(parent)
{ {
m_parent = parent; m_parent = parent;

View File

@ -2,11 +2,12 @@
#define AOCHARBUTTON_H #define AOCHARBUTTON_H
#include "aoapplication.h" #include "aoapplication.h"
#include "aoimage.h"
#include <QPushButton> #include <QPushButton>
#include <QString> #include <QString>
#include <QWidget> #include <QWidget>
#include "aoimage.h" #include <QFile>
class AOCharButton : public QPushButton class AOCharButton : public QPushButton
{ {

View File

@ -4,9 +4,6 @@
#include "file_functions.h" #include "file_functions.h"
#include "aoapplication.h" #include "aoapplication.h"
#include <QDebug>
#include <QImageReader>
AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent) AOCharMovie::AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent)
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -4,6 +4,8 @@
#include <QMovie> #include <QMovie>
#include <QLabel> #include <QLabel>
#include <QTimer> #include <QTimer>
#include <QDebug>
#include <QImageReader>
class AOApplication; class AOApplication;

View File

@ -1,7 +1,6 @@
#include "aoemotebutton.h" #include "aoemotebutton.h"
#include "file_functions.h" #include "file_functions.h"
#include <QDebug>
AOEmoteButton::AOEmoteButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y) : QPushButton(p_parent) AOEmoteButton::AOEmoteButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y) : QPushButton(p_parent)
{ {

View File

@ -1,10 +1,11 @@
#ifndef AOEMOTEBUTTON_H #ifndef AOEMOTEBUTTON_H
#define AOEMOTEBUTTON_H #define AOEMOTEBUTTON_H
#include <QPushButton>
#include "aoapplication.h" #include "aoapplication.h"
#include <QPushButton>
#include <QDebug>
class AOEmoteButton : public QPushButton class AOEmoteButton : public QPushButton
{ {
Q_OBJECT Q_OBJECT

View File

@ -2,8 +2,6 @@
#include "file_functions.h" #include "file_functions.h"
#include <QDebug>
AOEvidenceButton::AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y) : QPushButton(p_parent) AOEvidenceButton::AOEvidenceButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y) : QPushButton(p_parent)
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -6,6 +6,7 @@
#include <QPushButton> #include <QPushButton>
#include <QString> #include <QString>
#include <QDebug>
class AOEvidenceButton : public QPushButton class AOEvidenceButton : public QPushButton
{ {

View File

@ -1,5 +1,3 @@
#include <QDebug>
#include "aoevidencedisplay.h" #include "aoevidencedisplay.h"
#include "file_functions.h" #include "file_functions.h"

View File

@ -1,12 +1,13 @@
#ifndef AOEVIDENCEDISPLAY_H #ifndef AOEVIDENCEDISPLAY_H
#define AOEVIDENCEDISPLAY_H #define AOEVIDENCEDISPLAY_H
#include <QLabel>
#include <QMovie>
#include "aoapplication.h" #include "aoapplication.h"
#include "aosfxplayer.h" #include "aosfxplayer.h"
#include <QLabel>
#include <QMovie>
#include <QDebug>
class AOEvidenceDisplay : public QLabel class AOEvidenceDisplay : public QLabel
{ {
Q_OBJECT Q_OBJECT

View File

@ -2,8 +2,6 @@
#include "aoimage.h" #include "aoimage.h"
#include <QDebug>
AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent) AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent)
{ {
m_parent = parent; m_parent = parent;

View File

@ -6,6 +6,7 @@
#include "aoapplication.h" #include "aoapplication.h"
#include <QLabel> #include <QLabel>
#include <QDebug>
class AOImage : public QLabel class AOImage : public QLabel
{ {

View File

@ -1,9 +1,5 @@
#include "aomusicplayer.h" #include "aomusicplayer.h"
#include <string.h>
#include <QDebug>
AOMusicPlayer::AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app) AOMusicPlayer::AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app)
{ {
m_parent = parent; m_parent = parent;

View File

@ -5,6 +5,8 @@
#include "aoapplication.h" #include "aoapplication.h"
#include <QWidget> #include <QWidget>
#include <string.h>
#include <QDebug>
class AOMusicPlayer class AOMusicPlayer
{ {

View File

@ -2,25 +2,6 @@
#include "aoapplication.h" #include "aoapplication.h"
#include "bass.h" #include "bass.h"
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QFormLayout>
#include <QtWidgets/QFrame>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPlainTextEdit>
#include <QtWidgets/QSpinBox>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
#include <QDirIterator>
#include <QTextStream>
AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) : QDialog(parent) AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) : QDialog(parent)
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -20,6 +20,9 @@
#include <QtWidgets/QVBoxLayout> #include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget> #include <QtWidgets/QWidget>
#include <QDirIterator>
#include <QTextStream>
class AOOptionsDialog: public QDialog class AOOptionsDialog: public QDialog
{ {
Q_OBJECT Q_OBJECT

View File

@ -2,8 +2,6 @@
#include "encryption_functions.h" #include "encryption_functions.h"
#include <QDebug>
AOPacket::AOPacket(QString p_packet_string) AOPacket::AOPacket(QString p_packet_string)
{ {
QStringList packet_contents = p_packet_string.split("#"); QStringList packet_contents = p_packet_string.split("#");

View File

@ -3,6 +3,7 @@
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QDebug>
class AOPacket class AOPacket
{ {

View File

@ -4,8 +4,6 @@
#include "file_functions.h" #include "file_functions.h"
#include <QDebug>
AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent) AOScene::AOScene(QWidget *parent, AOApplication *p_ao_app) : QLabel(parent)
{ {
m_parent = parent; m_parent = parent;

View File

@ -2,6 +2,7 @@
#define AOSCENE_H #define AOSCENE_H
#include <QLabel> #include <QLabel>
#include <QDebug>
class Courtroom; class Courtroom;
class AOApplication; class AOApplication;

View File

@ -1,9 +1,5 @@
#include "aosfxplayer.h" #include "aosfxplayer.h"
#include <string.h>
#include <QDebug>
AOSfxPlayer::AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app) AOSfxPlayer::AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app)
{ {
m_parent = parent; m_parent = parent;

View File

@ -5,6 +5,8 @@
#include "aoapplication.h" #include "aoapplication.h"
#include <QWidget> #include <QWidget>
#include <string.h>
#include <QDebug>
class AOSfxPlayer class AOSfxPlayer
{ {

View File

@ -1,10 +1,5 @@
#include "aotextarea.h" #include "aotextarea.h"
#include <QScrollBar>
#include <QTextCursor>
#include <QRegExp>
#include <QDebug>
AOTextArea::AOTextArea(QWidget *p_parent) : QTextBrowser(p_parent) AOTextArea::AOTextArea(QWidget *p_parent) : QTextBrowser(p_parent)
{ {

View File

@ -2,6 +2,10 @@
#define AOTEXTAREA_H #define AOTEXTAREA_H
#include <QTextBrowser> #include <QTextBrowser>
#include <QScrollBar>
#include <QTextCursor>
#include <QRegExp>
#include <QDebug>
class AOTextArea : public QTextBrowser class AOTextArea : public QTextBrowser
{ {

View File

@ -5,8 +5,6 @@
#include "debug_functions.h" #include "debug_functions.h"
#include "hardware_functions.h" #include "hardware_functions.h"
#include <QDebug>
void Courtroom::construct_char_select() void Courtroom::construct_char_select()
{ {
ui_char_select_background = new AOImage(this, ao_app); ui_char_select_background = new AOImage(this, ao_app);

View File

@ -7,14 +7,6 @@
#include "datatypes.h" #include "datatypes.h"
#include "debug_functions.h" #include "debug_functions.h"
#include <QDebug>
#include <QScrollBar>
#include <QRegExp>
#include <QBrush>
#include <QTextCharFormat>
#include <QFont>
#include <QInputDialog>
Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -33,6 +33,15 @@
#include <QTextBrowser> #include <QTextBrowser>
#include <QSpinBox> #include <QSpinBox>
#include <QDebug>
#include <QScrollBar>
#include <QRegExp>
#include <QBrush>
#include <QTextCharFormat>
#include <QFont>
#include <QInputDialog>
#include <QFileDialog>
#include <stack> #include <stack>
class AOApplication; class AOApplication;

View File

@ -1,5 +1,3 @@
#include <QMessageBox>
#include "debug_functions.h" #include "debug_functions.h"
void call_error(QString p_message) void call_error(QString p_message)

View File

@ -2,6 +2,7 @@
#define DEBUG_FUNCTIONS_H #define DEBUG_FUNCTIONS_H
#include <QString> #include <QString>
#include <QMessageBox>
void call_error(QString message); void call_error(QString message);
void call_notice(QString message); void call_notice(QString message);

View File

@ -1,10 +1,5 @@
#include "discord_rich_presence.h" #include "discord_rich_presence.h"
#include <cstring>
#include <ctime>
#include <QDebug>
namespace AttorneyOnline { namespace AttorneyOnline {
Discord::Discord() Discord::Discord()

View File

@ -4,6 +4,11 @@
#include <string> #include <string>
#include <discord-rpc.h> #include <discord-rpc.h>
#include <cstring>
#include <ctime>
#include <QDebug>
namespace AttorneyOnline { namespace AttorneyOnline {
class Discord class Discord

View File

@ -2,8 +2,6 @@
#include "aoemotebutton.h" #include "aoemotebutton.h"
#include <QDebug>
void Courtroom::construct_emotes() void Courtroom::construct_emotes()
{ {
ui_emotes = new QWidget(this); ui_emotes = new QWidget(this);

View File

@ -2,12 +2,6 @@
#include "hex_functions.h" #include "hex_functions.h"
#include <cstddef>
#include <stdlib.h>
#include <sstream>
#include <iomanip>
#include <QVector>
QString fanta_encrypt(QString temp_input, unsigned int p_key) QString fanta_encrypt(QString temp_input, unsigned int p_key)
{ {
//using standard stdlib types is actually easier here because of implicit char<->int conversion //using standard stdlib types is actually easier here because of implicit char<->int conversion

View File

@ -3,6 +3,12 @@
#include <QString> #include <QString>
#include <cstddef>
#include <stdlib.h>
#include <sstream>
#include <iomanip>
#include <QVector>
QString fanta_encrypt(QString p_input, unsigned int key); QString fanta_encrypt(QString p_input, unsigned int key);
QString fanta_decrypt(QString p_input, unsigned int key); QString fanta_decrypt(QString p_input, unsigned int key);

View File

@ -1,8 +1,5 @@
#include "courtroom.h" #include "courtroom.h"
#include <QDebug>
#include <QFileDialog>
void Courtroom::construct_evidence() void Courtroom::construct_evidence()
{ {
ui_evidence = new AOImage(this, ao_app); ui_evidence = new AOImage(this, ao_app);

View File

@ -1,6 +1,3 @@
#include <QFileInfo>
#include <QDir>
#include "file_functions.h" #include "file_functions.h"
bool file_exists(QString file_path) bool file_exists(QString file_path)

View File

@ -1,6 +1,8 @@
#ifndef FILE_FUNCTIONS_H #ifndef FILE_FUNCTIONS_H
#define FILE_FUNCTIONS_H #define FILE_FUNCTIONS_H
#include <QFileInfo>
#include <QDir>
#include <QString> #include <QString>
bool file_exists(QString file_path); bool file_exists(QString file_path);

View File

@ -5,9 +5,6 @@
#include "networkmanager.h" #include "networkmanager.h"
#include "aosfxplayer.h" #include "aosfxplayer.h"
#include <QDebug>
#include <QScrollBar>
Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow() Lobby::Lobby(AOApplication *p_ao_app) : QMainWindow()
{ {
ao_app = p_ao_app; ao_app = p_ao_app;

View File

@ -14,6 +14,9 @@
#include <QProgressBar> #include <QProgressBar>
#include <QTextBrowser> #include <QTextBrowser>
#include <QDebug>
#include <QScrollBar>
class AOApplication; class AOApplication;
class Lobby : public QMainWindow class Lobby : public QMainWindow

View File

@ -1,8 +1,5 @@
#include "misc_functions.h" #include "misc_functions.h"
#include <QTime>
#include <QCoreApplication>
void delay(int p_milliseconds) void delay(int p_milliseconds)
{ {
QTime dieTime = QTime::currentTime().addMSecs(p_milliseconds); QTime dieTime = QTime::currentTime().addMSecs(p_milliseconds);

View File

@ -1,6 +1,9 @@
#ifndef MISC_FUNCTIONS_H #ifndef MISC_FUNCTIONS_H
#define MISC_FUNCTIONS_H #define MISC_FUNCTIONS_H
#include <QTime>
#include <QCoreApplication>
void delay(int p_milliseconds); void delay(int p_milliseconds);
#endif // MISC_FUNCTIONS_H #endif // MISC_FUNCTIONS_H

View File

@ -4,9 +4,6 @@
#include "debug_functions.h" #include "debug_functions.h"
#include "lobby.h" #include "lobby.h"
#include <cstring>
NetworkManager::NetworkManager(AOApplication *parent) : QObject(parent) NetworkManager::NetworkManager(AOApplication *parent) : QObject(parent)
{ {
ao_app = parent; ao_app = parent;

View File

@ -21,6 +21,7 @@
#include <QDnsLookup> #include <QDnsLookup>
#include <QTime> #include <QTime>
#include <QTimer> #include <QTimer>
#include <cstring>
class NetworkManager : public QObject class NetworkManager : public QObject
{ {

View File

@ -7,9 +7,6 @@
#include "hardware_functions.h" #include "hardware_functions.h"
#include "debug_functions.h" #include "debug_functions.h"
#include <QDebug>
#include <QCryptographicHash>
void AOApplication::ms_packet_received(AOPacket *p_packet) void AOApplication::ms_packet_received(AOPacket *p_packet)
{ {
p_packet->net_decode(); p_packet->net_decode();

View File

@ -1,9 +1,6 @@
#include "aoapplication.h" #include "aoapplication.h"
#include "courtroom.h" #include "courtroom.h"
#include "file_functions.h" #include "file_functions.h"
#include <QDir>
#include <QDebug>
#include <QStandardPaths>
#ifdef BASE_OVERRIDE #ifdef BASE_OVERRIDE
#include "base_override.h" #include "base_override.h"

View File

@ -2,12 +2,6 @@
#include "file_functions.h" #include "file_functions.h"
#include <QTextStream>
#include <QStringList>
#include <QVector>
#include <QDebug>
#include <QColor>
/* /*
* This may no longer be necessary, if we use the QSettings class. * This may no longer be necessary, if we use the QSettings class.
* *