Fix UI to work better on smaller screens. Implement first version of data import from carfax json.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <QQmlContext>
|
||||
#include "db/sqlvehicle.h"
|
||||
#include "db/sqlservicerecord.h"
|
||||
#include "jsonio.h"
|
||||
|
||||
Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -75,11 +76,13 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
//Fill model with inital data.
|
||||
vehicles.select();
|
||||
records.select();
|
||||
JsonIO converter(&vehicles, &records);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("appAboutData"), QVariant::fromValue(aboutData));
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("vehicleModel"), &vehicles);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("recordModel"), &records);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("jsonConverter"), &converter);
|
||||
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
|
||||
|
||||
if (engine.rootObjects().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user