Окно 1
|
@ -0,0 +1,24 @@
|
|||
cmake_minimum_required(VERSION 3.18)
|
||||
|
||||
project(QML_BalancerApp LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(Qt6 COMPONENTS Gui Qml Quick)
|
||||
qt_add_executable(QML_BalancerApp src/main.cpp)
|
||||
|
||||
qt_add_resources(QML_BalancerApp "configuration"
|
||||
PREFIX "/"
|
||||
FILES
|
||||
qtquickcontrols2.conf
|
||||
)
|
||||
|
||||
target_link_libraries(QML_BalancerApp PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Quick
|
||||
Qt${QT_VERSION_MAJOR}::Qml
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules)
|
|
@ -0,0 +1,99 @@
|
|||
import QmlProject
|
||||
|
||||
Project {
|
||||
mainFile: "content/App.qml"
|
||||
|
||||
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||
QmlFiles {
|
||||
directory: "content"
|
||||
}
|
||||
|
||||
QmlFiles {
|
||||
directory: "imports"
|
||||
}
|
||||
|
||||
JavaScriptFiles {
|
||||
directory: "content"
|
||||
}
|
||||
|
||||
JavaScriptFiles {
|
||||
directory: "imports"
|
||||
}
|
||||
|
||||
ImageFiles {
|
||||
directory: "content"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.conf"
|
||||
files: ["qtquickcontrols2.conf"]
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "qmldir"
|
||||
directory: "."
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.ttf;*.otf"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.wav;*.mp3"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.mp4"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag"
|
||||
}
|
||||
|
||||
Files {
|
||||
filter: "*.mesh"
|
||||
directory: "asset_imports"
|
||||
}
|
||||
|
||||
Environment {
|
||||
QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR: "1"
|
||||
QT_LOGGING_RULES: "qt.qml.connections=false"
|
||||
QT_ENABLE_HIGHDPI_SCALING: "0"
|
||||
/* Useful for debugging
|
||||
QSG_VISUALIZE=batches
|
||||
QSG_VISUALIZE=clip
|
||||
QSG_VISUALIZE=changes
|
||||
QSG_VISUALIZE=overdraw
|
||||
*/
|
||||
}
|
||||
|
||||
qt6Project: true
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
importPaths: [ "imports", "asset_imports" ]
|
||||
|
||||
/* Required for deployment */
|
||||
targetDirectory: "/opt/QML_Balancer"
|
||||
|
||||
qdsVersion: "3.5"
|
||||
|
||||
quickVersion: "6.2"
|
||||
|
||||
/* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */
|
||||
widgetApp: true
|
||||
|
||||
/* args: Specifies command line arguments for qsb tool to generate shaders.
|
||||
files: Specifies target files for qsb tool. If path is included, it must be relative to this file.
|
||||
Wildcard '*' can be used in the file name part of the path.
|
||||
e.g. files: [ "content/shaders/*.vert", "*.frag" ] */
|
||||
ShaderTool {
|
||||
args: "-s --glsl \"100 es,120,150\" --hlsl 50 --msl 12"
|
||||
files: [ "content/shaders/*" ]
|
||||
}
|
||||
|
||||
multilanguageSupport: true
|
||||
supportedLanguages: ["en"]
|
||||
primaryLanguage: "en"
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Quick Studio Components.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:GPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 or (at your option) any later version
|
||||
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 6.2
|
||||
import QtQuick.Window 6.2
|
||||
import QML_Balancer
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Window {
|
||||
width: mainScreen.width
|
||||
height: mainScreen.height
|
||||
|
||||
//Material.theme: darkModeToggle.checked ? Material.Dark : Material.Light
|
||||
|
||||
|
||||
|
||||
visible: true
|
||||
title: "Балансировщик"
|
||||
|
||||
Screen01 {
|
||||
id: mainScreen
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
### This file is automatically generated by Qt Design Studio.
|
||||
### Do not change
|
||||
|
||||
qt_add_library(content STATIC)
|
||||
qt6_add_qml_module(content
|
||||
URI "content"
|
||||
VERSION 1.0
|
||||
QML_FILES
|
||||
App.qml
|
||||
Screen01.ui.qml
|
||||
RESOURCES
|
||||
fonts/fonts.txt
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QML_Balancer 1.0
|
||||
|
||||
Label {
|
||||
width: Constants.width
|
||||
height: Constants.height
|
||||
font.weight: Font.Normal
|
||||
font.pointSize: 40
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
|
||||
/*
|
||||
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
||||
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
||||
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
||||
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
||||
*/
|
||||
import QtQuick 6.2
|
||||
import QtQuick.Controls 6.2
|
||||
import QML_Balancer
|
||||
import QtQuick.Controls.Material
|
||||
|
||||
Pane {
|
||||
width: Constants.width
|
||||
height: Constants.height
|
||||
|
||||
//color: "#606060"
|
||||
Material.theme: darkModeToggle.checked ? Material.Dark : Material.Light
|
||||
property url pathImg: "images/textinput.png"
|
||||
property string headerText: "Шаг 0: Ввод информации(необязательный этап)"
|
||||
|
||||
//textfield0.text: "" //введенные данные с textfield0
|
||||
//textfield1.text: "" //введенные данные с textfield1
|
||||
//textfield2.text: "" //введенные данные с textfield2
|
||||
|
||||
|
||||
/*SettingsBar {
|
||||
id: settings
|
||||
x: 0
|
||||
y: 0
|
||||
}*/
|
||||
Column {
|
||||
x: -12
|
||||
y: -8
|
||||
width: 1920
|
||||
height: 1072
|
||||
rotation: 0
|
||||
spacing: 52
|
||||
Row {
|
||||
Toggle {
|
||||
id: darkModeToggle
|
||||
text: qsTr("Dark mode")
|
||||
anchors.top: parent.top
|
||||
}
|
||||
ListView {
|
||||
width: 1097
|
||||
height: 62
|
||||
//anchors.verticalCenterOffset: -456
|
||||
//anchors.horizontalCenterOffset: 1
|
||||
|
||||
//anchors.centerIn: parent
|
||||
delegate: TextGTL.mycomponent
|
||||
|
||||
TextGTL {
|
||||
id: text0
|
||||
x: 55
|
||||
|
||||
text: headerText
|
||||
elide: Text.ElideNone
|
||||
leftPadding: 200
|
||||
}
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
leftPadding: 50
|
||||
layoutDirection: Qt.LeftToRight
|
||||
spacing: 48
|
||||
anchors.left: parent.middle
|
||||
Column {
|
||||
id: column0
|
||||
x: 0
|
||||
y: 184
|
||||
width: 602
|
||||
height: 565
|
||||
rotation: 0
|
||||
clip: true
|
||||
spacing: 54
|
||||
padding: 0
|
||||
//anchors.top: parent.middle
|
||||
|
||||
//add: touchStyle
|
||||
//add1: touchStyle
|
||||
//children: [ touchStyle, touchStyle]
|
||||
LabelGTL {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
text: "Скорость вращения, об/мин"
|
||||
font.pointSize: 30
|
||||
anchors.top: bottom
|
||||
rightInset: 0
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
//delegate: TextFieldGTL.mycomponent
|
||||
|
||||
|
||||
/*TextFieldGTL {
|
||||
id: textfield01
|
||||
}*/
|
||||
}
|
||||
|
||||
LabelGTL {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
text: "Радиус установки грузов, мм"
|
||||
//topPadding: 0
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
font.pointSize: 30
|
||||
//delegate: TextFieldGTL.mycomponent
|
||||
|
||||
|
||||
/*TextFieldGTL {
|
||||
id: textfield01
|
||||
}*/
|
||||
}
|
||||
LabelGTL {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
text: "Масса ротора, гр."
|
||||
|
||||
font.pointSize: 30
|
||||
|
||||
//delegate: TextFieldGTL.mycomponent
|
||||
|
||||
|
||||
/*TextFieldGTL {
|
||||
id: textfield01
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
/*ListView {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
model: 5
|
||||
delegate: TextFieldGTL.mycomponent
|
||||
|
||||
TextFieldGTL {
|
||||
id: textfield11
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
model: 5
|
||||
delegate: TextFieldGTL.mycomponent
|
||||
|
||||
TextFieldGTL {
|
||||
id: textfield21
|
||||
x: 0
|
||||
y: -8
|
||||
}
|
||||
}*/
|
||||
}
|
||||
Column {
|
||||
id: column1
|
||||
x: 792
|
||||
y: 184
|
||||
width: 602
|
||||
height: 565
|
||||
rotation: 0
|
||||
clip: true
|
||||
spacing: 54
|
||||
padding: 0
|
||||
|
||||
//add: touchStyle
|
||||
//add1: touchStyle
|
||||
//children: [ touchStyle, touchStyle]
|
||||
ListView {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
model: 5
|
||||
delegate: TextFieldGTL.mycomponent
|
||||
|
||||
TextFieldGTL {
|
||||
id: textfield0
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
model: 5
|
||||
delegate: TextFieldGTL.mycomponent
|
||||
|
||||
TextFieldGTL {
|
||||
id: textfield1
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
//anchors.fill: parent
|
||||
width: 600
|
||||
height: 140
|
||||
model: 5
|
||||
delegate: TextFieldGTL.mycomponent
|
||||
|
||||
TextFieldGTL {
|
||||
id: textfield2
|
||||
x: 0
|
||||
y: -8
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Button {
|
||||
id: button
|
||||
x: 21
|
||||
y: 776
|
||||
width: 286
|
||||
height: 87
|
||||
text: qsTr("Button")
|
||||
}
|
||||
|
||||
/* Rectangle {
|
||||
id: backButton
|
||||
width: 0
|
||||
//width: opacity ? 60 : 0
|
||||
anchors.left: parent
|
||||
//anchors.leftMargin: 20
|
||||
//opacity: stackView.depth > 1 ? 1 : 0
|
||||
//anchors.verticalCenter: parent.verticalCenter
|
||||
antialiasing: true
|
||||
height: 60
|
||||
radius: 4
|
||||
color: backmouse.pressed ? "#222" : "transparent"
|
||||
//Behavior on opacity { NumberAnimation{} }
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: "images/navigation_previous_item.png"
|
||||
}
|
||||
MouseArea {
|
||||
id: backmouse
|
||||
anchors.fill: parent
|
||||
anchors.margins: -10
|
||||
//onClicked: stackView.pop()
|
||||
}
|
||||
}*/
|
||||
}
|
|
@ -0,0 +1,405 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.10
|
||||
//import ebikeDesign 1.0
|
||||
//import EbikeData 1.0
|
||||
import QtQuick.Studio.Components 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Timeline 1.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Item {
|
||||
id: settings
|
||||
width: Constants.width
|
||||
height: Constants.height
|
||||
|
||||
state: "closed"
|
||||
|
||||
Rectangle {
|
||||
id: blocker
|
||||
x: 0
|
||||
width: Constants.width
|
||||
color: "#464646"
|
||||
opacity: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: stack.bottom
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea2
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: close
|
||||
x: 564
|
||||
y: 44
|
||||
source: "images/top_curtain_drag_back.png"
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.rightMargin: -16
|
||||
anchors.leftMargin: -16
|
||||
anchors.bottomMargin: -16
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: stack
|
||||
x: 0
|
||||
y: 44
|
||||
width: Constants.width
|
||||
height: 200
|
||||
color: "#0d0d0d"
|
||||
clip: true
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
width: Constants.width
|
||||
currentIndex: tabbar.index
|
||||
anchors.fill: parent
|
||||
|
||||
Info {}
|
||||
|
||||
GeneralSettings {}
|
||||
|
||||
ViewSettings {}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: topBar
|
||||
x: 0
|
||||
y: 0
|
||||
width: Constants.width
|
||||
height: 45
|
||||
color: "#0d0d0d"
|
||||
|
||||
Image {
|
||||
id: image4
|
||||
x: 1240
|
||||
y: 5
|
||||
source: "images/search_cancel.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: image3
|
||||
x: 1193
|
||||
y: 5
|
||||
source: "images/info.png"
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: open
|
||||
x: 564
|
||||
y: 44
|
||||
source: "images/top_curtain_drag.png"
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea1
|
||||
anchors.rightMargin: -16
|
||||
anchors.leftMargin: -16
|
||||
anchors.bottomMargin: -16
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
CustomLabel {
|
||||
id: customLabel
|
||||
x: -245
|
||||
y: 316
|
||||
text: Backend.time
|
||||
font.pixelSize: 22
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Timeline {
|
||||
id: timeline
|
||||
animations: [
|
||||
TimelineAnimation {
|
||||
id: openAnimation
|
||||
onFinished: settings.state = "Open"
|
||||
loops: 1
|
||||
duration: 250
|
||||
from: 0
|
||||
to: 1000
|
||||
running: false
|
||||
},
|
||||
TimelineAnimation {
|
||||
id: closeAnimation
|
||||
onFinished: settings.state = "Closed"
|
||||
loops: 1
|
||||
duration: 250
|
||||
from: 1000
|
||||
to: 0
|
||||
running: false
|
||||
}
|
||||
]
|
||||
endFrame: 1000
|
||||
enabled: true
|
||||
startFrame: 0
|
||||
|
||||
KeyframeGroup {
|
||||
target: stack
|
||||
property: "height"
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
easing.bezierCurve: [0.39, 0.575, 0.565, 1, 1, 1]
|
||||
value: 320
|
||||
frame: 1000
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 89
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: close
|
||||
property: "opacity"
|
||||
Keyframe {
|
||||
easing.bezierCurve: [0.39, 0.575, 0.565, 1, 1, 1]
|
||||
value: 1
|
||||
frame: 1000
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 850
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 0
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: close
|
||||
property: "y"
|
||||
Keyframe {
|
||||
value: 315
|
||||
frame: 850
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
easing.bezierCurve: [0.39, 0.575, 0.565, 1, 1, 1]
|
||||
value: 360
|
||||
frame: 1000
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: open
|
||||
property: "opacity"
|
||||
|
||||
Keyframe {
|
||||
value: 1
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 88
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: tabbar
|
||||
property: "opacity"
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 1
|
||||
frame: 1000
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: blocker
|
||||
property: "opacity"
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0.2
|
||||
frame: 1000
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
frame: 794
|
||||
value: "0"
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: stackLayout
|
||||
property: "opacity"
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 300
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 1
|
||||
frame: 1000
|
||||
}
|
||||
}
|
||||
|
||||
KeyframeGroup {
|
||||
target: blocker
|
||||
property: "anchors.bottomMargin"
|
||||
Keyframe {
|
||||
value: 708
|
||||
frame: 0
|
||||
}
|
||||
|
||||
Keyframe {
|
||||
value: 0
|
||||
frame: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: mouseArea
|
||||
onClicked: {
|
||||
settings.state = "Closing"
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: mouseArea1
|
||||
onClicked: {
|
||||
if (settings.state != "Open")
|
||||
settings.state = "Opening"
|
||||
}
|
||||
}
|
||||
|
||||
Tabbar {
|
||||
id: tabbar
|
||||
x: 0
|
||||
y: 0
|
||||
index: 0
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "Open"
|
||||
|
||||
PropertyChanges {
|
||||
target: timeline
|
||||
currentFrame: 1000
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Closed"
|
||||
|
||||
PropertyChanges {
|
||||
target: timeline
|
||||
currentFrame: 0
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Opening"
|
||||
|
||||
PropertyChanges {
|
||||
target: timeline
|
||||
enabled: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: openAnimation
|
||||
running: true
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Closing"
|
||||
|
||||
PropertyChanges {
|
||||
target: timeline
|
||||
enabled: true
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: closeAnimation
|
||||
running: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.10
|
||||
//import ebikeDesign 1.0
|
||||
import QtQuick.Studio.Components 1.0
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Timeline 1.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Rectangle {
|
||||
id: tabbar
|
||||
width: 1200
|
||||
height: 50
|
||||
color: "#0d0d0d"
|
||||
|
||||
property int index: 0
|
||||
|
||||
RowLayout {
|
||||
y: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
Image {
|
||||
id: info
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
source: "images/info.png"
|
||||
|
||||
MouseArea {
|
||||
id: infoClicked
|
||||
anchors.rightMargin: -64
|
||||
anchors.leftMargin: -64
|
||||
anchors.bottomMargin: -4
|
||||
anchors.topMargin: -4
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: list
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
source: "images/list.png"
|
||||
|
||||
MouseArea {
|
||||
id: listClicked
|
||||
anchors.topMargin: -4
|
||||
anchors.bottomMargin: -4
|
||||
anchors.rightMargin: -64
|
||||
anchors.leftMargin: -64
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: settings
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
source: "images/settings.png"
|
||||
|
||||
MouseArea {
|
||||
id: settingsClicked
|
||||
anchors.rightMargin: -64
|
||||
anchors.leftMargin: -64
|
||||
anchors.bottomMargin: -4
|
||||
anchors.topMargin: -4
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
x: 8
|
||||
y: 38
|
||||
width: 365
|
||||
height: 4
|
||||
color: "#ffffff"
|
||||
Behavior on x {
|
||||
|
||||
PropertyAnimation {
|
||||
duration: 140
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: listClicked
|
||||
onClicked: {
|
||||
tabbar.index = "1"
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: infoClicked
|
||||
onClicked: {
|
||||
tabbar.index = "0"
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: settingsClicked
|
||||
onClicked: {
|
||||
tabbar.index = "2"
|
||||
}
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
name: "Left"
|
||||
when: tabbar.index === 0
|
||||
|
||||
PropertyChanges {
|
||||
target: info
|
||||
source: "images/info_selected.png"
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle
|
||||
x: 8
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Middle"
|
||||
when: tabbar.index === 1
|
||||
|
||||
PropertyChanges {
|
||||
target: list
|
||||
source: "images/list_selected.png"
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle
|
||||
x: 418
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "Right"
|
||||
when: tabbar.index === 2
|
||||
|
||||
PropertyChanges {
|
||||
target: settings
|
||||
source: "images/settings_selected.png"
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle
|
||||
x: 827
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QML_Balancer 1.0
|
||||
|
||||
//Item {
|
||||
|
||||
TextField {
|
||||
id: textfieldgtl
|
||||
width: 600
|
||||
height: 140
|
||||
//selectedTextColor: "white"
|
||||
//placeholderTextColor: "white"
|
||||
layer.enabled: false
|
||||
focus: false
|
||||
antialiasing: false
|
||||
font.weight: Font.Normal
|
||||
font.pointSize: 40
|
||||
background: Item {
|
||||
|
||||
implicitHeight: 140
|
||||
implicitWidth: 600
|
||||
BorderImage {
|
||||
|
||||
source: pathImg
|
||||
border.left: 8
|
||||
border.right: 8
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
}
|
||||
|
||||
placeholderText: qsTr("Введите значение")
|
||||
}
|
||||
//}
|
|
@ -0,0 +1,14 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
Text {
|
||||
color: "#b7b7b7"
|
||||
text: headerText
|
||||
transformOrigin: Item.Top
|
||||
font.pointSize: 32
|
||||
minimumPointSize: 16
|
||||
minimumPixelSize: 16
|
||||
font.family: "Verdana"
|
||||
font.styleName: "Полужирный"
|
||||
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
||||
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
||||
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
||||
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
||||
*/
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2022 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the examples of the Qt Design Studio.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** BSD License Usage
|
||||
** Alternatively, you may use this file under the terms of the BSD license
|
||||
** as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
|
||||
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
|
||||
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
|
||||
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
|
||||
*/
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
property string text
|
||||
property alias checked: toggleIndicator.checked
|
||||
readonly property alias hasFocus: toggleIndicator.activeFocus
|
||||
implicitWidth: toggleText.width + toggleIndicator.width
|
||||
implicitHeight: 50
|
||||
|
||||
Label {
|
||||
id: toggleText
|
||||
text: parent.text
|
||||
anchors.verticalCenter: toggleIndicator.verticalCenter
|
||||
}
|
||||
Switch {
|
||||
id: toggleIndicator
|
||||
anchors.left: toggleText.right
|
||||
anchors.rightMargin: 8
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Fonts in this folder are loaded automatically.
|
|
@ -0,0 +1,2 @@
|
|||
Notice some of these images are derived from Google applications resources. They were provided under the following license:
|
||||
You may use the materials in this directory without restriction to develop your apps and to use in your apps.
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 439 B |
After Width: | Height: | Size: 368 B |
After Width: | Height: | Size: 179 B |
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 630 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
|
@ -0,0 +1,4 @@
|
|||
### This file is automatically generated by Qt Design Studio.
|
||||
### Do not change
|
||||
|
||||
add_subdirectory(QML_Balancer)
|
|
@ -0,0 +1,18 @@
|
|||
### This file is automatically generated by Qt Design Studio.
|
||||
### Do not change
|
||||
|
||||
qt_add_library(QML_Balancer STATIC)
|
||||
set_source_files_properties(Constants.qml
|
||||
PROPERTIES
|
||||
QT_QML_SINGLETON_TYPE true
|
||||
)
|
||||
|
||||
qt6_add_qml_module(QML_Balancer
|
||||
URI "QML_Balancer"
|
||||
VERSION 1.0
|
||||
QML_FILES
|
||||
Constants.qml
|
||||
DirectoryFontLoader.qml
|
||||
EventListModel.qml
|
||||
EventListSimulator.qml
|
||||
)
|
|
@ -0,0 +1,27 @@
|
|||
pragma Singleton
|
||||
import QtQuick 6.2
|
||||
import QtQuick.Studio.Application
|
||||
|
||||
QtObject {
|
||||
readonly property int width: 1920
|
||||
readonly property int height: 1080
|
||||
|
||||
property string relativeFontDirectory: "fonts"
|
||||
|
||||
/* Edit this comment to add your custom font */
|
||||
readonly property font font: Qt.font({
|
||||
family: Qt.application.font.family,
|
||||
pixelSize: Qt.application.font.pixelSize
|
||||
})
|
||||
readonly property font largeFont: Qt.font({
|
||||
family: Qt.application.font.family,
|
||||
pixelSize: Qt.application.font.pixelSize * 1.6
|
||||
})
|
||||
|
||||
readonly property color backgroundColor: "#c2c2c2"
|
||||
|
||||
|
||||
property StudioApplication application: StudioApplication {
|
||||
fontPath: Qt.resolvedUrl("../../content/" + relativeFontDirectory)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Quick Designer Components.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:GPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 or (at your option) any later version
|
||||
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 6.2
|
||||
import Qt.labs.folderlistmodel 6.2
|
||||
|
||||
QtObject {
|
||||
id: loader
|
||||
|
||||
property url fontDirectory: Qt.resolvedUrl("../../content/" + relativeFontDirectory)
|
||||
property string relativeFontDirectory: "fonts"
|
||||
|
||||
function loadFont(url) {
|
||||
var fontLoader = Qt.createQmlObject('import QtQuick 2.15; FontLoader { source: "' + url + '"; }',
|
||||
loader,
|
||||
"dynamicFontLoader");
|
||||
}
|
||||
|
||||
property FolderListModel folderModel: FolderListModel {
|
||||
id: folderModel
|
||||
folder: loader.fontDirectory
|
||||
nameFilters: [ "*.ttf", "*.otf" ]
|
||||
showDirs: false
|
||||
|
||||
onStatusChanged: {
|
||||
if (folderModel.status == FolderListModel.Ready) {
|
||||
var i
|
||||
for (i = 0; i < count; i++) {
|
||||
loadFont(folderModel.get(i, "fileURL"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Quick Designer Components.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:GPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 or (at your option) any later version
|
||||
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 6.2
|
||||
|
||||
ListModel {
|
||||
id: eventListModel
|
||||
|
||||
ListElement {
|
||||
eventId: "enterPressed"
|
||||
eventDescription: "Emitted when pressing the enter button"
|
||||
shortcut: "Return"
|
||||
parameters: "Enter"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Quick Designer Components.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:GPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 or (at your option) any later version
|
||||
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 6.2
|
||||
import QtQuick.Studio.EventSimulator 1.0
|
||||
import QtQuick.Studio.EventSystem 1.0
|
||||
|
||||
QtObject {
|
||||
id: simulator
|
||||
property bool active: true
|
||||
|
||||
property Timer __timer: Timer {
|
||||
id: timer
|
||||
interval: 100
|
||||
onTriggered: {
|
||||
EventSimulator.show()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
EventSystem.init(Qt.resolvedUrl("EventListModel.qml"))
|
||||
if (simulator.active)
|
||||
timer.start()
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
MetaInfo {
|
||||
Type {
|
||||
name: "QML_Balancer.EventListSimulator"
|
||||
icon: ":/qtquickplugin/images/item-icon16.png"
|
||||
|
||||
Hints {
|
||||
visibleInNavigator: true
|
||||
canBeDroppedInNavigator: true
|
||||
canBeDroppedInFormEditor: false
|
||||
canBeDroppedInView3D: false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
Module QML_Balancer
|
||||
singleton Constants 1.0 Constants.qml
|
||||
EventListSimulator 1.0 EventListSimulator.qml
|
||||
EventListModel 1.0 EventListModel.qml
|
||||
DirectoryFontLoader 1.0 DirectoryFontLoader.qml
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/* This file is generated and only relevant for integrating the project into a Qt 6 and cmake based
|
||||
C++ project. */
|
||||
|
||||
import QtQuick
|
||||
import content
|
||||
|
||||
App {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
### This file is automatically generated by Qt Design Studio.
|
||||
### Do not change
|
||||
|
||||
qt6_add_qml_module(QML_BalancerApp
|
||||
URI "Main"
|
||||
VERSION 1.0
|
||||
NO_PLUGIN
|
||||
QML_FILES main.qml
|
||||
)
|
||||
|
||||
add_subdirectory(content)
|
||||
add_subdirectory(imports)
|
||||
|
||||
target_link_libraries(QML_BalancerApp PRIVATE
|
||||
contentplugin
|
||||
QML_Balancerplugin
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
; This file can be edited to change the style of the application
|
||||
; Read "Qt Quick Controls 2 Configuration File" for details:
|
||||
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
|
||||
|
||||
[Controls]
|
||||
Style=Material
|
||||
;FallbackStyle=Material
|
||||
|
||||
[Material]
|
||||
Theme=System
|
||||
Variant=Normal
|
||||
Accent=#067fff
|
||||
;Primary=Red
|
||||
;Foreground=Red
|
||||
;Background=Red
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* This file is automatically generated by Qt Design Studio.
|
||||
* Do not change.
|
||||
*/
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
||||
void set_qt_environment()
|
||||
{
|
||||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
qputenv("QT_ENABLE_HIGHDPI_SCALING", "0");
|
||||
qputenv("QT_LOGGING_RULES", "qt.qml.connections=false");
|
||||
qputenv("QT_QUICK_CONTROLS_CONF", ":/qtquickcontrols2.conf");
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* This file is automatically generated by Qt Design Studio.
|
||||
* Do not change.
|
||||
*/
|
||||
|
||||
#include <QtQml/qqmlextensionplugin.h>
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(contentPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(QML_BalancerPlugin)
|
|
@ -0,0 +1,62 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Quick Studio Components.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:GPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 or (at your option) any later version
|
||||
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#include "app_environment.h"
|
||||
#include "import_qml_plugins.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
set_qt_environment();
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
const QUrl url(u"qrc:Main/main.qml"_qs);
|
||||
QObject::connect(
|
||||
&engine, &QQmlApplicationEngine::objectCreated, &app,
|
||||
[url](QObject *obj, const QUrl &objUrl) {
|
||||
if (!obj && url == objUrl)
|
||||
QCoreApplication::exit(-1);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
engine.addImportPath(QCoreApplication::applicationDirPath() + "/qml");
|
||||
engine.addImportPath(":/");
|
||||
|
||||
engine.load(url);
|
||||
|
||||
if (engine.rootObjects().isEmpty()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|