12 QCoreApplication::setOrganizationName(
"Brigadoon");
13 QCoreApplication::setOrganizationDomain(
"little-sense.au");
14 QCoreApplication::setApplicationName(
"Terrain Editor");
18 qRegisterMetaType<REMOTE_LOG_ENTRY>(
"REMOTE_LOG_ENTRY");
24 ui->SourceDirectory->setText( settings.value(
"Directories/InputDir").toString());
25 ui->DestinationDirectory->setText(settings.value(
"Directories/OutputDir").toString());
46 QObject::connect(
ui->SourceSelect, SIGNAL(released()),
this, SLOT(
GetInputDir()));
47 QObject::connect(
ui->DestinationSelect, SIGNAL(released()),
this, SLOT(
GetOutputDir()));
49 QObject::connect(
ui->DestinationSelect, SIGNAL(released()),
this, SLOT(
GetOutputDir()));
51 qRegisterMetaType<REMOTE_WORLD_SIZE>(
"REMOTE_WORLD_SIZE");
52 qRegisterMetaType<REMOTE_WORLD_SIDES>(
"REMOTE_WORLD_SIDES");
53 qRegisterMetaType<REMOTE_REGION_ADDRESS>(
"REMOTE_REGION_ADDRESS");
54 QObject::connect(
ui->WorldXSize, SIGNAL(valueChanged(
int)),
area_calc, SLOT(WorldXChanged(
int)));
55 QObject::connect(
ui->WorldYSize, SIGNAL(valueChanged(
int)),
area_calc, SLOT(WorldYChanged(
int)));
62 QObject::connect(
ui->LowerXLocation, SIGNAL(valueChanged(
int)),
area_calc, SLOT(LowerXChanged(
int)));
63 QObject::connect(
ui->UpperXLocation, SIGNAL(valueChanged(
int)),
area_calc, SLOT(UpperXChanged(
int)));
64 QObject::connect(
ui->LowerYLocation, SIGNAL(valueChanged(
int)),
area_calc, SLOT(LowerYChanged(
int)));
65 QObject::connect(
ui->UpperYLocation, SIGNAL(valueChanged(
int)),
area_calc, SLOT(UpperYChanged(
int)));
67 QObject::connect(
ui->Region_x1, SIGNAL(pressed()),
area_calc, SLOT(Regionx1Pressed()));
68 QObject::connect(
ui->Region_x4, SIGNAL(pressed()),
area_calc, SLOT(Regionx4Pressed()));
69 QObject::connect(
ui->Region_x16, SIGNAL(pressed()),
area_calc, SLOT(Regionx16Pressed()));
71 QObject::connect(
ui->AutoCalcSize, SIGNAL(checkStateChanged(Qt::CheckState) ),
area_calc, SLOT(AutoCalcChanged(Qt::CheckState)));
72 QObject::connect(
ui->AutoCalcSize, SIGNAL(checkStateChanged(Qt::CheckState) ),
area_calc, SLOT(AutoCalcChanged(Qt::CheckState)));
73 QObject::connect(
ui->AutoCalcSize, SIGNAL(checkStateChanged(Qt::CheckState) ),
this, SLOT(
DisableXYSize(Qt::CheckState)));
75 qRegisterMetaType<QList<DIR_INFO>>(
"REMOTE_DIR_INFO");
77 QObject::connect(
ui->ProcessInputDirectory, SIGNAL(pressed()),
this, SLOT(
EnableAutoCalc(
void)));
105 float world_area_formatted;
106 QString world_area_string;
111 world_area_formatted = WorldSize.
WorldArea / 1E06;
112 ui->WorldSize->setText( QString::number(world_area_formatted));
113 ui->WorldAreaLabel->setText(
"sq. km");
117 ui->WorldSize->setText( QString::number(WorldSize.
WorldArea));
118 ui->WorldAreaLabel->setText(
"sq. m");
138 bool enable_state = (bool)State;
140 ui->WorldXSize->setReadOnly(enable_state);
141 ui->WorldYSize->setReadOnly(enable_state);
144 ui->WorldXSize->setValue(0);
145 ui->WorldYSize->setValue(0);
146 ui->LowerXLocation->setValue(0);
147 ui->LowerYLocation->setValue(0);
148 ui->UpperXLocation->setValue(0);
149 ui->UpperYLocation->setValue(0);
AreaCalculator * area_calc
void EnableAutoCalc(void)
void WorldAreaChanged(REMOTE_WORLD_SIZE WorldSize)
void ListInputDirectory(void)
void WorldSidesChanged(REMOTE_WORLD_SIDES WorldSides)
Logger * log
Pointer to the Log Class.
QString GetDirectoryName(QString DefaultDirectory)
MainWindow(QWidget *parent=nullptr)
void DisableXYSize(Qt::CheckState)
void UpdateLocation(REMOTE_REGION_ADDRESS RegionAddress)
DatabaseManager * db_manager
Pointer to the Database Class.