22 #ifndef MOBILECOMPONENTSPLUGIN_H
23 #define MOBILECOMPONENTSPLUGIN_H
25 #ifdef KIRIGAMI_BUILD_TYPE_STATIC
31 #include <QQmlExtensionPlugin>
36 #ifdef KIRIGAMI_BUILD_TYPE_STATIC
38 class KirigamiPlugin :
public QObject
41 static KirigamiPlugin& getInstance()
43 static KirigamiPlugin instance;
46 KirigamiPlugin(KirigamiPlugin
const&) =
delete;
47 void operator=(KirigamiPlugin
const&) =
delete;
48 void registerTypes(
const char *uri);
49 static void registerTypes()
51 getInstance().registerTypes(
"org.kde.kirigami");
56 QString componentPath(
const QString &fileName)
const;
57 QString resolveFilePath(
const QString &path)
const
59 return QLatin1Char(
':') + path;
61 QString resolveFileUrl(
const QString &filePath)
const
63 if (filePath.startsWith(QLatin1Char(
':'))) {
64 return QStringLiteral(
"qrc:") + filePath.right(filePath.length() - 1);
66 return QStringLiteral(
"qrc:/") + filePath;
68 QStringList m_stylesFallbackChain;
73 class KirigamiPlugin :
public QQmlExtensionPlugin
76 Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QQmlExtensionInterface")
79 void registerTypes(const
char *uri);
82 QString componentPath(const QString &fileName) const;
83 QString resolveFilePath(const QString &path)
const
85 return baseUrl().toLocalFile() + QLatin1Char(
'/') + path;
87 QString resolveFileUrl(
const QString &filePath)
const
89 return baseUrl().toString() + QLatin1Char(
'/') + filePath;
91 QStringList m_stylesFallbackChain;
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Fri Feb 17 2017 11:09:23 by
doxygen 1.8.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.