-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
3,910 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import QtQuick 2.12 | ||
import QtQuick.Controls 2.12 | ||
import QtQuick.Layouts 1.12 | ||
|
||
Item { | ||
id: control | ||
Layout.fillWidth: true | ||
height: 64 | ||
property string textTitle: "VALUE NAME:" | ||
property string textValue: "" | ||
property real sliderStepCount: 0 | ||
property real sliderValue: 0 | ||
|
||
function onSliderValueChanged(value) { | ||
} | ||
|
||
AdjBoxBack { | ||
id: backRect | ||
width: control.width | ||
height: control.height | ||
} | ||
|
||
ColumnLayout { | ||
Layout.fillWidth: true | ||
width: control.width | ||
Layout.alignment: Qt.AlignTop | ||
Layout.preferredWidth: control.width | ||
|
||
RowLayout { | ||
Text { | ||
id: textT | ||
padding: 8 | ||
text: textTitle | ||
font.pixelSize: 16 | ||
color: "#F07000" | ||
} | ||
|
||
Text { | ||
id: text | ||
Layout.fillWidth: true | ||
padding: 8 | ||
text: textValue | ||
font.pixelSize: 20 | ||
color: "#F07000" | ||
} | ||
} | ||
|
||
CSlider{ | ||
id: slider | ||
value: sliderValue | ||
Layout.fillWidth: true | ||
horizontalPadding: 40 | ||
stepSize: 1.0 | ||
to: sliderStepCount | ||
onValueChanged: { | ||
onSliderValueChanged(value) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import QtQuick 2.0 | ||
|
||
import QtQuick 2.12 | ||
|
||
BackStyle { | ||
id: control | ||
property real titleWidth: 100 | ||
property real titleHeight: 100 | ||
|
||
Rectangle { | ||
id: backRect | ||
width: control.width | ||
height: control.height | ||
|
||
color: backColor | ||
opacity: backOpacity | ||
} | ||
|
||
Canvas { | ||
id: borderCanvas | ||
x: 0 | ||
y: 0 | ||
width: control.width | ||
height: control.height | ||
contextType: "2d" | ||
opacity: borderOpacity | ||
|
||
Connections { | ||
target: control | ||
onActiveChanged: borderCanvas.requestPaint() | ||
} | ||
|
||
onPaint: { | ||
context.reset(); | ||
|
||
context.moveTo(0, 0); | ||
context.lineTo(width, 0); | ||
context.lineTo(width, ticknessBase); | ||
context.lineTo(0, ticknessBase); | ||
context.closePath(); | ||
|
||
|
||
// context.moveTo(0, titleHeight); | ||
// context.lineTo(width, 0); | ||
// context.lineTo(width, ticknessBase); | ||
// context.lineTo(0, ticknessBase); | ||
// context.closePath(); | ||
|
||
// context.moveTo(width, 0); | ||
// context.lineTo(width - width*0.3, 0); | ||
// context.lineTo(width - width*0.3, ticknessBase); | ||
// context.lineTo(width - ticknessBase, ticknessBase); | ||
// context.lineTo(width - ticknessBase, height*0.3); | ||
// context.lineTo(width - 0, height*0.3); | ||
// context.closePath(); | ||
|
||
// context.moveTo(width, height); | ||
// context.lineTo(width - width*0.3, height); | ||
// context.lineTo(width - width*0.3, height - ticknessBase); | ||
// context.lineTo(width - ticknessBase, height - ticknessBase); | ||
// context.lineTo(width - ticknessBase, height - height*0.3); | ||
// context.lineTo(width, height - height*0.3); | ||
// context.closePath(); | ||
|
||
// context.moveTo(0, height); | ||
// context.lineTo(width*0.3, height); | ||
// context.lineTo(width*0.3, height - ticknessBase); | ||
// context.lineTo(ticknessBase, height - ticknessBase); | ||
// context.lineTo(ticknessBase, height - height*0.3); | ||
// context.lineTo(0, height - height*0.3); | ||
// context.closePath(); | ||
|
||
context.fillStyle = "#808080" | ||
context.fill(); | ||
} | ||
} | ||
|
||
Rectangle { | ||
id: activeRect | ||
visible: control.active | ||
y: backRect.height | ||
width: control.width | ||
height: ticknessActive | ||
color: borderColor | ||
opacity: borderOpacity | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import QtQuick 2.12 | ||
|
||
Item { | ||
id: control | ||
|
||
property color backColor: "#505050" | ||
property real backOpacity: 0.9 | ||
property color borderColor: "#595959" | ||
property real borderOpacity: 1.0 | ||
property bool active: false | ||
property int ticknessCorner: 4 | ||
property int ticknessBase: 2 | ||
property int ticknessActive: 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import QtQuick 2.12 | ||
|
||
Item { | ||
id: control | ||
|
||
StyleSet { | ||
id: styleSet | ||
} | ||
|
||
Rectangle { | ||
id: backRect | ||
radius: 1 | ||
width: control.width | ||
height: control.height | ||
color: styleSet.colorControllBack | ||
opacity: styleSet.controllBackOpacity | ||
border.color: styleSet.colorControllBorder | ||
border.width: 1 | ||
} | ||
|
||
// Canvas { | ||
// id: borderCanvas | ||
// x: 0 | ||
// y: 0 | ||
// width: control.width | ||
// height: control.height | ||
// contextType: "2d" | ||
// opacity: borderOpacity | ||
|
||
// Connections { | ||
// target: control | ||
// onActiveChanged: borderCanvas.requestPaint() | ||
// } | ||
|
||
// onPaint: { | ||
// context.reset(); | ||
|
||
// context.moveTo(0, 0); | ||
// context.lineTo(width*0.3, 0); | ||
// context.lineTo(width*0.3, ticknessBase); | ||
// context.lineTo(ticknessBase, ticknessBase); | ||
// context.lineTo(ticknessBase, height*0.3); | ||
// context.lineTo(0, height*0.3); | ||
// context.closePath(); | ||
|
||
// context.moveTo(width, 0); | ||
// context.lineTo(width - width*0.3, 0); | ||
// context.lineTo(width - width*0.3, ticknessBase); | ||
// context.lineTo(width - ticknessBase, ticknessBase); | ||
// context.lineTo(width - ticknessBase, height*0.3); | ||
// context.lineTo(width - 0, height*0.3); | ||
// context.closePath(); | ||
|
||
// context.moveTo(width, height); | ||
// context.lineTo(width - width*0.3, height); | ||
// context.lineTo(width - width*0.3, height - ticknessBase); | ||
// context.lineTo(width - ticknessBase, height - ticknessBase); | ||
// context.lineTo(width - ticknessBase, height - height*0.3); | ||
// context.lineTo(width, height - height*0.3); | ||
// context.closePath(); | ||
|
||
// context.moveTo(0, height); | ||
// context.lineTo(width*0.3, height); | ||
// context.lineTo(width*0.3, height - ticknessBase); | ||
// context.lineTo(ticknessBase, height - ticknessBase); | ||
// context.lineTo(ticknessBase, height - height*0.3); | ||
// context.lineTo(0, height - height*0.3); | ||
// context.closePath(); | ||
|
||
//// context.moveTo(width, height); | ||
//// context.lineTo(0, height); | ||
//// context.lineTo(0, height - ticknessCorner); | ||
//// context.lineTo(width*0.3, height - ticknessCorner); | ||
//// context.lineTo(width*0.3 + ticknessCorner, height - ticknessBase); | ||
//// context.lineTo(width, height - ticknessBase); | ||
//// context.closePath(); | ||
|
||
// context.fillStyle = borderColor | ||
// context.fill(); | ||
// } | ||
// } | ||
|
||
// Rectangle { | ||
// id: activeRect | ||
// visible: control.active | ||
// y: backRect.height | ||
// width: control.width | ||
// height: ticknessActive | ||
// color: borderColor | ||
// opacity: borderOpacity | ||
// } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import QtQuick 2.12 | ||
import QtQuick.Controls 2.12 | ||
|
||
Button { | ||
id: control | ||
text: "Ok" | ||
highlighted: true | ||
implicitHeight: 26 | ||
|
||
StyleSet { | ||
id: styleSet | ||
} | ||
|
||
contentItem: Text { | ||
width: control.width | ||
text: control.text | ||
font.pointSize: 12 | ||
color: control.down ? styleSet.colorControllTextActive : styleSet.colorControllText | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
elide: Text.ElideRight | ||
} | ||
|
||
background: Rectangle { | ||
id: backRect | ||
implicitWidth: 35 | ||
implicitHeight: styleSet.controllHeight | ||
radius: 1 | ||
color: control.down ? styleSet.colorControllBackActive : styleSet.colorControllBack | ||
opacity: styleSet.controllBackOpacity | ||
border.color: control.down ? styleSet.colorControllBorderActive : styleSet.colorControllBorder | ||
border.width: styleSet.controlBorderSize | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import QtQuick 2.12 | ||
import QtQuick.Controls 2.12 | ||
|
||
CheckBox { | ||
id: control | ||
text: "Check" | ||
|
||
StyleSet { | ||
id: styleSet | ||
} | ||
|
||
indicator: Rectangle { | ||
implicitWidth: 18 | ||
implicitHeight: 18 | ||
// radius: 9 | ||
x: control.leftPadding | ||
y: parent.height / 2 - height / 2 | ||
color: styleSet.colorControllBack | ||
border.color: styleSet.colorControllBorder | ||
|
||
Rectangle { | ||
width: 12 | ||
height: 12 | ||
// radius: 6 | ||
x: 3 | ||
y: 3 | ||
color: "#A0F0F0" | ||
visible: control.checked | ||
} | ||
} | ||
|
||
contentItem: Text { | ||
text: control.text | ||
font: control.font | ||
opacity: 0.9 | ||
color: styleSet.colorControllText | ||
verticalAlignment: Text.AlignVCenter | ||
leftPadding: control.indicator.width + control.spacing | ||
} | ||
} |
Oops, something went wrong.