mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
/* Copyright (C) 2013 VATSIM Community / contributors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "samplesfscommon.h"
|
|
#include "blacksim/fscommon/aircraftcfgentrieslist.h"
|
|
#include <QDebug>
|
|
#include <QTextStream>
|
|
|
|
namespace BlackSimTest
|
|
{
|
|
|
|
/*
|
|
* Samples
|
|
*/
|
|
int CSamplesFsCommon::samples()
|
|
{
|
|
QTextStream streamIn(stdin);
|
|
QTextStream streamOut(stdout);
|
|
QString fsxDir = "P:/FlightSimulatorX (MSI)/SimObjects";
|
|
streamOut << "Enter FSX directory:" << endl;
|
|
streamOut << fsxDir << '\r';
|
|
streamOut.flush();
|
|
QString input = streamIn.readLine();
|
|
if (!input.isEmpty()) fsxDir = input;
|
|
|
|
BlackSim::FsCommon::CAircraftCfgEntriesList entriesList(fsxDir);
|
|
if (entriesList.existsDir())
|
|
{
|
|
streamOut << "reading " << entriesList.getRootDirectory() << endl;
|
|
entriesList.read();
|
|
streamOut << "read entries: " << entriesList.size() << endl;
|
|
// streamOut << entriesList << endl;
|
|
}
|
|
|
|
streamOut << "-----------------------------------------------" << endl;
|
|
return 0;
|
|
}
|
|
|
|
} // namespace
|