- moved some stuff

- added qml module for shared components
This commit is contained in:
Dorian Zedler 2020-05-22 18:23:35 +02:00
parent cf443a1c70
commit bd52819a96
Signed by: dorian
GPG Key ID: 989DE36109AFA354
16 changed files with 84 additions and 6 deletions

View File

@ -16,5 +16,6 @@ android {
ANDROID_EXTRA_LIBS += $$SCSTWSTYLING_LIB_OUTPUT_DIR/libScStwStyling.so
}
QML_IMPORT_PATH = "$$PWD/resources/qml/lib"
INCLUDEPATH += "$$PWD"
INCLUDEPATH += "$$PWD"/headers

View File

@ -1,4 +1,4 @@
QT += gui
QT += gui qml
TEMPLATE = lib
DEFINES += SCSTWSTYLING_LIBRARY
@ -25,9 +25,8 @@ HEADERS += \
headers/scstwappthememanager.h
RESOURCES += \
resources/ScStwStylingShared.qrc
DISTFILES +=
resources/qml/ScStwStylingQml.qrc \
resources/shared/ScStwStylingShared.qrc \
#DEPENDS
CONFIG(release, debug|release): {

View File

@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/">
<file>lib/ScStwQmlComponents/qmldir</file>
<file>lib/ScStwQmlComponents/Test.qml</file>
<file>lib/ScStwQmlComponents/BusyIndicator.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,65 @@
import QtQuick 2.3
import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.2
BusyIndicator {
id: control
property double animationSpeed: 1000
property double formFactor: 4.5
property color lineColor: "#21be2b"
contentItem: Item {
implicitWidth: 64
implicitHeight: 64
Item {
id: item
anchors.fill: parent
property int currentHeight: 0
SequentialAnimation {
running: control.running
loops: Animation.Infinite
NumberAnimation {
target: item
property: "currentHeight"
from: 0
to: 800
duration: control.animationSpeed
}
}
Row {
anchors.fill: parent
spacing: item.width / 9
Repeater {
id: repeater
model: 5
Rectangle {
property double heightMultiplier: Math.abs( Math.sin( ( ((item.currentHeight/100) + (index*(control.formFactor/repeater.model)))) * (Math.PI/8) ) )
anchors.verticalCenter: parent.verticalCenter
width: item.width / 9
height: ( heightMultiplier ) * ( item.height - 1 ) + 1
radius: width * 0.5
color: control.lineColor
}
}
}
}
}
}

View File

@ -0,0 +1,5 @@
import QtQuick 2.12
Item {
}

View File

@ -0,0 +1,3 @@
module ScStwQmlComponents
Test 1.0 Test.qml
BusyIndicator 1.0 BusyIndicator.qml

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -1,2 +0,0 @@
<!DOCTYPE RCC>
<RCC version="1.0"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 18 KiB