2016-12-03 14:14:06 +00:00
|
|
|
#include "temporarywidget.h"
|
2016-12-20 10:31:38 +00:00
|
|
|
|
2016-12-03 14:14:06 +00:00
|
|
|
#include <QApplication>
|
2016-12-20 10:31:38 +00:00
|
|
|
#include <QNetworkAccessManager>
|
2016-12-21 10:25:58 +00:00
|
|
|
#include <QNetworkDiskCache>
|
|
|
|
#include <QStandardPaths>
|
2016-12-20 10:31:38 +00:00
|
|
|
|
|
|
|
#include "fgqcanvasfontcache.h"
|
2016-12-21 10:25:58 +00:00
|
|
|
#include "fgqcanvasimageloader.h"
|
2016-12-03 14:14:06 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
|
|
|
|
a.setApplicationName("FGCanvas");
|
|
|
|
a.setOrganizationDomain("flightgear.org");
|
|
|
|
a.setOrganizationName("FlightGear");
|
|
|
|
|
2016-12-20 10:31:38 +00:00
|
|
|
QNetworkAccessManager* downloader = new QNetworkAccessManager;
|
|
|
|
|
2016-12-21 10:25:58 +00:00
|
|
|
QNetworkDiskCache* cache = new QNetworkDiskCache;
|
|
|
|
cache->setCacheDirectory(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
|
|
|
downloader->setCache(cache); // takes ownership
|
|
|
|
|
2016-12-20 10:31:38 +00:00
|
|
|
FGQCanvasFontCache::initialise(downloader);
|
2016-12-21 10:25:58 +00:00
|
|
|
FGQCanvasImageLoader::initialise(downloader);
|
2016-12-20 10:31:38 +00:00
|
|
|
|
2016-12-03 14:14:06 +00:00
|
|
|
TemporaryWidget w;
|
|
|
|
w.show();
|
|
|
|
|
2016-12-21 10:25:58 +00:00
|
|
|
int result = a.exec();
|
|
|
|
delete downloader;
|
|
|
|
|
|
|
|
return result;
|
2016-12-03 14:14:06 +00:00
|
|
|
}
|