[dummyqml] Stub of a QML module
This commit is contained in:
parent
4924839217
commit
1cc40bda83
11
src/modules/dummyqml/CMakeLists.txt
Normal file
11
src/modules/dummyqml/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
calamares_add_plugin( dummyqml
|
||||
TYPE viewmodule
|
||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
||||
SOURCES
|
||||
DummyQmlViewStep.cpp
|
||||
RESOURCES
|
||||
dummyqml.qrc
|
||||
LINK_PRIVATE_LIBRARIES
|
||||
calamaresui
|
||||
SHARED_LIB
|
||||
)
|
35
src/modules/dummyqml/DummyQmlViewStep.cpp
Normal file
35
src/modules/dummyqml/DummyQmlViewStep.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "DummyQmlViewStep.h"
|
||||
|
||||
DummyQmlViewStep::DummyQmlViewStep( QObject* parent )
|
||||
: Calamares::QmlViewStep( "dummyqml", parent )
|
||||
{
|
||||
}
|
||||
|
||||
DummyQmlViewStep::~DummyQmlViewStep() {}
|
||||
|
||||
QString
|
||||
DummyQmlViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Example QML page" );
|
||||
}
|
||||
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( DummyQmlViewStepFactory, registerPlugin< DummyQmlViewStep >(); )
|
40
src/modules/dummyqml/DummyQmlViewStep.h
Normal file
40
src/modules/dummyqml/DummyQmlViewStep.h
Normal file
@ -0,0 +1,40 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2020, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calamares is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DUMMYQMLVIEWSTEP_H
|
||||
#define DUMMYQMLVIEWSTEP_H
|
||||
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/QmlViewStep.h"
|
||||
|
||||
class DummyQmlViewStep : public Calamares::QmlViewStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DummyQmlViewStep( QObject* parent = nullptr );
|
||||
virtual ~DummyQmlViewStep() override;
|
||||
|
||||
virtual QString prettyName() const override;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( DummyQmlViewStepFactory )
|
||||
|
||||
#endif
|
12
src/modules/dummyqml/dummyqml.qml
Normal file
12
src/modules/dummyqml/dummyqml.qml
Normal file
@ -0,0 +1,12 @@
|
||||
import QtQuick 2.3
|
||||
|
||||
Rectangle {
|
||||
width: 200
|
||||
height: 100
|
||||
color: "red"
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "Hello, World!"
|
||||
}
|
||||
}
|
5
src/modules/dummyqml/dummyqml.qrc
Normal file
5
src/modules/dummyqml/dummyqml.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="dummyqml.qml">dummyqml.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user