mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
31 lines
370 B
C++
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();
|
|
}
|