1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include <QGuiApplication>
- #include <QQmlApplicationEngine>
- #include "api/Voip.h"
- #include "models/Appointment.h"
- #include "models/Subscriber.h"
- #include "models/Unit.h"
- #include "main.h"
- int main ( int argc, char *argv[] )
- {
- QGuiApplication::setApplicationName ( "mephi-voip" );
- QGuiApplication::setApplicationVersion ( "0.1" );
- QGuiApplication::setOrganizationName ( "mephi.ru" );
- QCoreApplication::setAttribute ( Qt::AA_EnableHighDpiScaling );
- QGuiApplication app ( argc, argv );
- //QApplication app ( argc, argv );
- QQmlApplicationEngine engine;
- /*
- qmlRegisterUncreatableType<DisplayFileSystemModel>("io.qt.examples.quick.controls.filesystembrowser", 1, 0, "FileSystemModel", "Cannot create a FileSystemModel instance.");
- QFileSystemModel *fsm = new DisplayFileSystemModel(&engine);
- QString homeDir = QDir::homePath();
- fsm->setRootPath(homeDir);
- fsm->setResolveSymlinks(true);
- engine.rootContext()->setContextProperty("fileSystemModel", fsm);
- engine.rootContext()->setContextProperty("rootPathIndex", fsm->index(fsm->rootPath()));
- */
- // API
- Voip::declareQML();
- // models
- Appointment::declareQML();
- Subscriber::declareQML();
- Unit::declareQML();
- engine.load ( QUrl ( QLatin1String ( "qrc:/main.qml" ) ) );
- return app.exec();
- }
|