#ifndef APPLICATION_H
#define APPLICATION_H

#include "API.h"

class Application {
  // QML
  QGuiApplication app;
  QQmlApplicationEngine engine;
  API api;

  struct AppIniter {
    std::string database_path;
  };

  // Init
  void initQML(const QUrl qml_url);
  AppIniter processArgs(int argc, char* argv[]);
  Application(AppIniter app_initer, int argc, char* argv[],  QUrl qml_url);

public:
  Application(int argc, char* argv[], QUrl qml_url);
  int start();
};

#endif // APPLICATION_H
