Inital commit of the Komplex Hub
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
qt_add_library(KomplexHubModule_Kero STATIC)
|
||||
qt6_add_qml_module(KomplexHubModule_Kero
|
||||
URI "KomplexHub.Kero"
|
||||
VERSION 1.0
|
||||
RESOURCE_PREFIX "/qt/qml"
|
||||
QML_FILES
|
||||
"KeroBuildingAnimation.qml"
|
||||
"KeroChoiceAvatar.qml"
|
||||
"KeroErrorAvatar.qml"
|
||||
"KeroHelloAvatar.qml"
|
||||
"KeroLoadingAnimation.qml"
|
||||
"KeroNoResultsAvatar.qml"
|
||||
"KeroWarningAvatar.qml"
|
||||
)
|
||||
@@ -0,0 +1,82 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Loading")
|
||||
property string description: qsTr("Kero is busy looking for wallpapers..we promise")
|
||||
property color color: palette.window
|
||||
|
||||
id: keroLoadingOverlayRoot
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: keroLoadingOverlayRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
id: keroLoadingImage
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_build_1.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
Timer {
|
||||
property int frame: 1
|
||||
id: animationTimer
|
||||
interval: 175
|
||||
running: parent.visible
|
||||
repeat: true
|
||||
|
||||
onTriggered: () => {
|
||||
frame += 1;
|
||||
|
||||
if(frame >= 4)
|
||||
frame = 1
|
||||
|
||||
keroLoadingImage.source = "qrc:/images/kero/kero_build_" + frame + ".png"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: keroLoadingOverlayRoot.title
|
||||
font: Constants.h1Font
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
text: keroLoadingOverlayRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Please make a choice")
|
||||
property string description: qsTr("")
|
||||
property color color: palette.window
|
||||
|
||||
id: keroWarningAvatarRoot
|
||||
|
||||
Rectangle {
|
||||
id: keroWarningAvatarBackground
|
||||
anchors.fill: parent
|
||||
color: keroWarningAvatarRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_choice.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: keroWarningAvatarRoot.title
|
||||
font.pixelSize: Constants.largeFont.pixelSize * 1.5
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
text: keroWarningAvatarRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Error")
|
||||
property string description: qsTr("A description of the error")
|
||||
property color color: palette.window
|
||||
|
||||
id: errorOverlayRoot
|
||||
|
||||
Rectangle {
|
||||
id: errorOverlayBackground
|
||||
anchors.fill: parent
|
||||
color: errorOverlayRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
|
||||
Image {
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_error.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: errorOverlayRoot.title
|
||||
font: Constants.h1Font
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
Text {
|
||||
id: errorText
|
||||
text: errorOverlayRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Hello!")
|
||||
property string description: qsTr("")
|
||||
property color color: "transparent"
|
||||
|
||||
id: keroHelloAvatarRoot
|
||||
|
||||
Rectangle {
|
||||
id: keroHelloAvatarBackground
|
||||
anchors.fill: parent
|
||||
color: keroHelloAvatarRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_hello.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: keroHelloAvatarRoot.title
|
||||
font: Constants.h1Font
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
text: keroHelloAvatarRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Loading")
|
||||
property string description: qsTr("Kero is busy looking for wallpapers..we promise")
|
||||
property color color: palette.window
|
||||
|
||||
id: keroLoadingOverlayRoot
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: keroLoadingOverlayRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
id: keroLoadingImage
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_run_1.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
Timer {
|
||||
property int frame: 1
|
||||
id: animationTimer
|
||||
interval: 175
|
||||
running: parent.visible
|
||||
repeat: true
|
||||
|
||||
onTriggered: () => {
|
||||
frame += 1;
|
||||
|
||||
if(frame >= 4)
|
||||
frame = 1
|
||||
|
||||
keroLoadingImage.source = "qrc:/images/kero/kero_run_" + frame + ".png"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: keroLoadingOverlayRoot.title
|
||||
font.pixelSize: Constants.largeFont.pixelSize * 1.5
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
text: keroLoadingOverlayRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("No Results")
|
||||
property string description: qsTr("Kero couldn't find any wallpapers with that search term")
|
||||
property color color: palette.window
|
||||
|
||||
id: noResultsOverlayRoot
|
||||
|
||||
Rectangle {
|
||||
id: noResultsOverlayBackground
|
||||
anchors.fill: parent
|
||||
color: noResultsOverlayRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_no_results.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: noResultsOverlayRoot.title
|
||||
font.pixelSize: Constants.largeFont.pixelSize * 1.5
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
Text {
|
||||
id: errorText
|
||||
text: noResultsOverlayRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import KomplexHub
|
||||
|
||||
Item {
|
||||
property string title: qsTr("Warning")
|
||||
property string description: qsTr("Kero noticed there might be an issue")
|
||||
property color color: palette.window
|
||||
|
||||
id: keroWarningAvatarRoot
|
||||
|
||||
Rectangle {
|
||||
id: keroWarningAvatarBackground
|
||||
anchors.fill: parent
|
||||
color: keroWarningAvatarRoot.color
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 64
|
||||
Layout.minimumHeight: 64
|
||||
Layout.maximumWidth: 512
|
||||
Layout.maximumHeight: 512
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
|
||||
source: "qrc:/images/kero/kero_warning.png"
|
||||
antialiasing: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Text {
|
||||
color: palette.text
|
||||
text: keroWarningAvatarRoot.title
|
||||
font.pixelSize: Constants.largeFont.pixelSize * 1.5
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
}
|
||||
|
||||
Text {
|
||||
id: errorText
|
||||
text: keroWarningAvatarRoot.description
|
||||
color: palette.text.darker()
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||
Layout.bottomMargin: Constants.largeMargin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
module KomplexHub.Kero
|
||||
KeroBuildingAnimation 1.0 KeroBuildingAnimation.qml
|
||||
KeroChoiceAvatar 1.0 KeroChoiceAvatar.qml
|
||||
KeroErrorAvatar 1.0 KeroErrorAvatar.qml
|
||||
KeroHelloAvatar 1.0 KeroHelloAvatar.qml
|
||||
KeroLoadingAnimation 1.0 KeroLoadingAnimation.qml
|
||||
KeroNoResultsAvatar 1.0 KeroNoResultsAvatar.qml
|
||||
KeroWarningAvatar 1.0 KeroWarningAvatar.qml
|
||||
Reference in New Issue
Block a user