Skip to content

Commit

Permalink
Original unmodified source code of TransferTool v1.0.3 from previous …
Browse files Browse the repository at this point in the history
…developer.
  • Loading branch information
MScientistCM committed Jan 21, 2019
0 parents commit d08c3d5
Show file tree
Hide file tree
Showing 134 changed files with 10,801 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.dll
*.dylib

# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*

# Qt unit tests
target_wrapper.*

# QtCreator
*.autosave

# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator CMake
CMakeLists.txt.user*
146 changes: 146 additions & 0 deletions cmxf.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#-------------------------------------------------
#
# Project created by QtCreator 2016-03-08T21:04:56
#
#-------------------------------------------------

QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Transfer_Tool
TEMPLATE = app

RC_FILE = cmxf.rc
RESOURCES = cmxf.qrc

# The application version
VERSION = 1.0.3
DEFINES += APP_VERSION=\\\"$$VERSION\\\"

win32 {
DEFINES += BUILDTIME=\\\"$$system('echo %time%')\\\"
DEFINES += BUILDDATE=\\\"$$system('echo %date%')\\\"
} else {
DEFINES += BUILDTIME=\\\"$$system(date '+%H:%M')\\\"
DEFINES += BUILDDATE=\\\"$$system(date '+%d/%m/%y')\\\"
}

SOURCES += main.cpp\
mainwindow.cpp \
database/database.cpp \
database/index.cpp \
settings.cpp \
models/index_model.cpp \
database/city.cpp \
data_types/city_weather.cpp \
data_types/string.cpp \
database/club.cpp \
database/club_comp.cpp \
database/club_comp_history.cpp \
database/colour.cpp \
database/continent.cpp \
database/name.cpp \
database/nation.cpp \
database/stadium.cpp \
database/staff_comp.cpp \
database/staff_comp_history.cpp \
database/staff_history.cpp \
database/official.cpp \
data_types/date.cpp \
database/non_player.cpp \
database/player.cpp \
database/staff.cpp \
database/staff_preferences.cpp \
importer/transfer_importer.cpp \
data_types/data_pointer.cpp \
data_types/ptr_club.cpp \
data_types/ptr_club_comp.cpp \
data_types/ptr_name.cpp \
data_types/ptr_staff.cpp \
data_types/staff_classification.cpp \
data_types/cm_char.cpp \
spreadsheet/spreadsheet.cpp \
progress_window.cpp \
data_types/year.cpp \
importer/vlookup_hash.cpp \
ui/summary_item.cpp \
ui/style_sheet.cpp \
data_types/ptr_nation.cpp \
data_types/job.cpp \
data_types/attribute.cpp \
data_types/ptr_player.cpp \
data_types/ptr_non_player.cpp \
data_types/cm_int.cpp \
data_types/cm_uchar.cpp \
exporter/exporter.cpp \
exporter/exporter_item.cpp \
exporter/exporter_model.cpp \
data_types/cm_short.cpp \
data_types/reputation.cpp \
data_types/wage.cpp \
data_types/ptr_preferences.cpp \
data_types/ability.cpp \
data_types/squad.cpp \
data_types/player_squad_number.cpp

HEADERS += mainwindow.h \
database/database.h \
database/index.h \
data_types/data_types.h \
settings.h \
models/index_model.h \
database/city.h \
data_types/city_weather.h \
data_types/weather.h \
data_types/string.h \
database/club.h \
database/club_comp.h \
database/club_comp_history.h \
database/colour.h \
database/continent.h \
database/name.h \
database/nation.h \
database/stadium.h \
database/staff_comp.h \
database/staff_comp_history.h \
database/staff_history.h \
database/official.h \
data_types/date.h \
database/non_player.h \
database/player.h \
database/staff.h \
database/staff_preferences.h \
importer/transfer_importer.h \
data_types/data_pointer.h \
data_types/ptr_club.h \
data_types/ptr_club_comp.h \
data_types/ptr_name.h \
data_types/ptr_staff.h \
data_types/staff_classification.h \
data_types/cm_char.h \
spreadsheet/spreadsheet.h \
progress_window.h \
data_types/year.h \
importer/vlookup_hash.h \
ui/summary_item.h \
ui/style_sheet.h \
data_types/ptr_nation.h \
data_types/job.h \
data_types/attribute.h \
data_types/ptr_player.h \
data_types/ptr_non_player.h \
data_types/cm_int.h \
data_types/cm_uchar.h \
exporter/exporter.h \
exporter/exporter_item.h \
exporter/exporter_model.h \
data_types/cm_short.h \
data_types/reputation.h \
data_types/wage.h \
data_types/ptr_preferences.h \
data_types/ability.h \
data_types/squad.h \
data_types/player_squad_number.h

FORMS += mainwindow.ui
8 changes: 8 additions & 0 deletions cmxf.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<RCC>
<qresource prefix="/buttons">
<file alias="document-open.png">icons/document-open.png</file>
<file alias="document-save.png">icons/document-save.png</file>
<file alias="document-save-as.png">icons/document-save-as.png</file>
<file alias="row-buffer.png">icons/row-buffer.png</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions cmxf.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icons/app.ico"
58 changes: 58 additions & 0 deletions data_types/ability.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#include "ability.h"

// --- Default constructor: Base class -- //
Ability::Ability() :
CM_Short(0)
{

}

// --- Default constructor: Current ability -- //
AbilityCurrent::AbilityCurrent() :
Ability()
{

}

// --- Default constructor: Potential ability -- //
AbilityPotential::AbilityPotential() :
Ability()
{

}

// --- Set from QVariant --- //
void Ability::set(const QVariant &value)
{
QString tmp = value.toString();

if(tmp.isEmpty())
return;

short i = static_cast<short>(value.toInt());

if(i < 0)
i = 0;
else if(i > 200)
i = 200;

m_Value = i;
}

// --- Set from QVariant --- //
void AbilityPotential::set(const QVariant &value)
{
QString tmp = value.toString();

if(tmp.isEmpty())
return;

short i = static_cast<short>(value.toInt());

if(i < -2)
i = -2;
else if(i > 200)
i = 200;

m_Value = i;
}
39 changes: 39 additions & 0 deletions data_types/ability.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef ABILITY_H
#define ABILITY_H

#pragma warning(disable: 4103)
#pragma pack(1)

#include "cm_short.h"

// --- Current/Potential Ability Base Class --- //
class Ability : public CM_Short
{
public:
// Constructor
Ability();

// Set data
void set(const QVariant &value);
};

// --- Current Ability Wrapper --- //
class AbilityCurrent : public Ability
{
public:
// Constructor
AbilityCurrent();
};

// --- Potential Ability Wrapper --- //
class AbilityPotential : public Ability
{
public:
// Constructor
AbilityPotential();

// Set data
void set(const QVariant &value);
};

#endif // ABILITY_H
25 changes: 25 additions & 0 deletions data_types/attribute.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "attribute.h"
#include <QString>

Attribute::Attribute()
{
m_Value = 0;
}

// --- Set from QVariant --- //
void Attribute::set(const QVariant &value)
{
QString tmp = value.toString();

if(tmp.isEmpty() || tmp.contains("-"))
return;

int i = value.toInt();

if(i < 0)
i = 0;
else if(i > 20)
i = 20;

m_Value = i;
}
20 changes: 20 additions & 0 deletions data_types/attribute.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef ATTRIBUTE_H
#define ATTRIBUTE_H

#pragma warning(disable: 4103)
#pragma pack(1)

// Base class
#include "cm_char.h"

// ---Player/non-player attribute (0-20 scale) --- //
class Attribute : public CM_Char
{
public:
Attribute();

// Set data
void set(const QVariant &value);
};

#endif // ATTRIBUTE_H
7 changes: 7 additions & 0 deletions data_types/city_weather.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "city_weather.h"

CityWeather::CityWeather()
{

}

22 changes: 22 additions & 0 deletions data_types/city_weather.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef CITY_WEATHER_H
#define CITY_WEATHER_H

#pragma warning(disable: 4103)
#pragma pack(1)

#include "data_types.h"
#include "weather.h"

class CityWeather
{
private:
int CityWeatherID; // ID of the city (auto generated by editor)
char CityWeatherName[ SHORT_TEXT_LENGTH ]; // Name of the city which is modelled (editable)
WEATHER_SEASON CityWeatherSeason[ 4 ]; // Seasonal model for this city (editable)
WEATHER_CONDITION CityWeatherCondition; // Current Weather in this city (not editable)

public:
CityWeather();
};

#endif // CITY_WEATHER_H
Loading

0 comments on commit d08c3d5

Please sign in to comment.