Removed old classes
This commit is contained in:
parent
a03a0293ef
commit
bd1b1dfdb5
11 changed files with 2 additions and 163 deletions
|
|
@ -1,7 +0,0 @@
|
|||
#include "cargoentity.h"
|
||||
|
||||
CargoEntity::CargoEntity(QString c_id, DeliveryPointEntity *dest)
|
||||
{
|
||||
this->_cargo_id = c_id;
|
||||
this->_destination = dest;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef CARGOENTITY_H
|
||||
#define CARGOENTITY_H
|
||||
|
||||
#include "deliverypointentity.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
||||
class DeliveryPointEntity;
|
||||
class StorageEntity;
|
||||
class CargoEntity
|
||||
{
|
||||
QString _cargo_id;
|
||||
DeliveryPointEntity *_destination;
|
||||
|
||||
public:
|
||||
CargoEntity();
|
||||
CargoEntity(QString _cargo_id, DeliveryPointEntity *_destination);
|
||||
};
|
||||
|
||||
#endif // CARGOENTITY_H
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#include "deliverypointentity.h"
|
||||
|
||||
DeliveryPointEntity::DeliveryPointEntity(QString title)
|
||||
{
|
||||
this->_title = title;
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#ifndef DELIVERYPOINTENTITY_H
|
||||
#define DELIVERYPOINTENTITY_H
|
||||
|
||||
#include "storageentity.h"
|
||||
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class CargoEntity;
|
||||
class StorageEntity;
|
||||
class DeliveryPointEntity
|
||||
{
|
||||
QString _title;
|
||||
std::vector<StorageEntity> _storage;
|
||||
|
||||
public:
|
||||
DeliveryPointEntity();
|
||||
DeliveryPointEntity(QString title);
|
||||
};
|
||||
|
||||
#endif // DELIVERYPOINTENTITY_H
|
||||
|
|
@ -11,29 +11,19 @@ CONFIG += c++11
|
|||
SOURCES += \
|
||||
authwindow.cpp \
|
||||
cargoeditdialog.cpp \
|
||||
cargoentity.cpp \
|
||||
deliverypointeditdialog.cpp \
|
||||
deliverypointentity.cpp \
|
||||
main.cpp \
|
||||
storageeditdialog.cpp \
|
||||
storageentity.cpp \
|
||||
usereditdialog.cpp \
|
||||
userentity.cpp \
|
||||
vesseleditdialog.cpp \
|
||||
vesselentity.cpp
|
||||
vesseleditdialog.cpp
|
||||
|
||||
HEADERS += \
|
||||
authwindow.h \
|
||||
cargoeditdialog.h \
|
||||
cargoentity.h \
|
||||
deliverypointeditdialog.h \
|
||||
deliverypointentity.h \
|
||||
storageeditdialog.h \
|
||||
storageentity.h \
|
||||
usereditdialog.h \
|
||||
userentity.h \
|
||||
vesseleditdialog.h \
|
||||
vesselentity.h
|
||||
vesseleditdialog.h
|
||||
|
||||
FORMS += \
|
||||
authwindow.ui \
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#include "storageentity.h"
|
||||
|
||||
StorageEntity::StorageEntity(int st_id, int mx_cap)
|
||||
{
|
||||
this->_storage_id = st_id;
|
||||
this->_max_capacity = mx_cap;
|
||||
this->_cargo.reserve(mx_cap);
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef STORAGEENTITY_H
|
||||
#define STORAGEENTITY_H
|
||||
|
||||
#include "cargoentity.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class DeliveryPointEntity;
|
||||
class CargoEntity;
|
||||
class StorageEntity
|
||||
{
|
||||
int _storage_id;
|
||||
int _max_capacity;
|
||||
std::vector<CargoEntity> _cargo;
|
||||
|
||||
public:
|
||||
StorageEntity();
|
||||
StorageEntity(int st_id, int mx_cap);
|
||||
};
|
||||
|
||||
#endif // STORAGEENTITY_H
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#include "userentity.h"
|
||||
|
||||
UserEntity::UserEntity(QString login, QString password, UserEntity::UserRoleEnum role)
|
||||
{
|
||||
this->_login = login;
|
||||
|
||||
this->_password_hash = 0;
|
||||
for (auto pchar : password) {
|
||||
this->_password_hash += pchar.unicode();
|
||||
}
|
||||
this->_password_hash %= (1 << 16);
|
||||
|
||||
this->_role = role;
|
||||
}
|
||||
22
userentity.h
22
userentity.h
|
|
@ -1,22 +0,0 @@
|
|||
#ifndef USERENTITY_H
|
||||
#define USERENTITY_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
typedef long long pwd_type;
|
||||
|
||||
class UserEntity
|
||||
{
|
||||
QString _login;
|
||||
pwd_type _password_hash;
|
||||
enum UserRoleEnum {
|
||||
ADMINISTRATOR = 0,
|
||||
DISPATCHER = 1,
|
||||
CAPTAIN = 2
|
||||
} _role;
|
||||
|
||||
public:
|
||||
UserEntity(QString login, QString password, UserEntity::UserRoleEnum role);
|
||||
};
|
||||
|
||||
#endif // USERENTITY_H
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#include "vesselentity.h"
|
||||
|
||||
VesselEntity::VesselEntity(int v_id, QString hp, int mx_cap)
|
||||
{
|
||||
this->_vessel_id = v_id;
|
||||
this->_home_port = hp;
|
||||
this->_max_capacity = mx_cap;
|
||||
this->_cargo_list.reserve(mx_cap);
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#ifndef VESSELENTITY_H
|
||||
#define VESSELENTITY_H
|
||||
|
||||
#include "cargoentity.h"
|
||||
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class VesselEntity
|
||||
{
|
||||
int _vessel_id;
|
||||
QString _home_port;
|
||||
int _max_capacity;
|
||||
std::vector<CargoEntity> _cargo_list;
|
||||
|
||||
public:
|
||||
VesselEntity(int v_id, QString hp, int mx_cap);
|
||||
};
|
||||
|
||||
#endif // VESSELENTITY_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue