subsurface/qt-mobile/qmlmanager.cpp
Grace Karanja 315a245868 Link QMLManager to the main.qml file
Add a link between the C++ and QML parts of the app using the
qmlRegisterType function.

[Dirk Hohndel: changed the name to org.subsurfacedivelog.mobile]

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:24:25 -07:00

31 lines
370 B
C++

#include "qmlmanager.h"
#include <QUrl>
QMLManager::QMLManager()
{
}
QMLManager::~QMLManager()
{
}
QString QMLManager::filename()
{
return m_fileName;
}
void QMLManager::setFilename(const QString &f)
{
m_fileName = f;
emit filenameChanged();
loadFile();
}
void QMLManager::loadFile()
{
QUrl url(m_fileName);
QString strippedFileName = url.toLocalFile();
}