Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
QtCAN Tool CAN TestBench
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qt CAN 2.0
QtCAN Tool CAN TestBench
Commits
fae5ae38
Commit
fae5ae38
authored
May 18, 2017
by
Thomas BOUTROUE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new StringValueDisplay component for dashboard
parent
3336c395
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
0 deletions
+72
-0
CanTestBench.qbs
CanTestBench.qbs
+1
-0
import/QtCAN/CanTestBench.2/StringValueDisplay.qml
import/QtCAN/CanTestBench.2/StringValueDisplay.qml
+70
-0
import/QtCAN/CanTestBench.2/qmldir
import/QtCAN/CanTestBench.2/qmldir
+1
-0
No files found.
CanTestBench.qbs
View file @
fae5ae38
...
...
@@ -185,6 +185,7 @@ Project {
"import/QtCAN/CanTestBench.2/Oscilloscope.qml",
"import/QtCAN/CanTestBench.2/PlotParams.qml",
"import/QtCAN/CanTestBench.2/RotativeKnob.qml",
"import/QtCAN/CanTestBench.2/StringValueDisplay.qml",
"import/QtCAN/CanTestBench.2/TicksJauge.qml",
"import/QtCAN/CanTestBench.2/qmldir",
"ui_testBench.qml",
...
...
import/QtCAN/CanTestBench.2/StringValueDisplay.qml
0 → 100644
View file @
fae5ae38
import
QtQuick
2.1
;
import
QtQmlTricks
.
UiElements
2.0
;
import
QtCAN
.
CanTestBench
2.0
;
Item
{
implicitWidth
:
(
column
.
width
+
column
.
anchors
.
margins
*
2
);
implicitHeight
:
(
column
.
height
+
column
.
anchors
.
margins
*
2
);
property
int
size
:
50
;
property
string
value
:
""
;
property
int
len
:
0
;
property
color
background
:
Style
.
colorWindow
;
property
string
unit
:
""
;
property
string
legend
:
""
;
Rectangle
{
radius
:
Math
.
round
(
size
*
0.15
);
antialiasing
:
radius
;
border
{
width
:
Math
.
max
(
Style
.
lineSize
,
Style
.
lineSize
/
Shared
.
manager
.
dashboardZoom
)
*
2
;
color
:
Style
.
colorBorder
;
}
gradient
:
Gradient
{
GradientStop
{
position
:
0
;
color
:
Qt
.
darker
(
background
,
1.15
);
}
GradientStop
{
position
:
1
;
color
:
Qt
.
lighter
(
background
,
1.15
);
}
}
anchors.fill
:
parent
;
}
Column
{
id
:
column
;
spacing
:
Style
.
spacingSmall
;
anchors.centerIn
:
parent
;
anchors.margins
:
Style
.
spacingNormal
;
Repeater
{
model
:
value
.
trim
().
split
(
"
\n
"
);
delegate
:
TextLabel
{
id
:
lblHolder
;
text
:
{
var
ret
=
""
;
for
(
var
charIdx
=
0
;
charIdx
<
len
;
++
charIdx
)
{
ret
+=
"
W
"
;
}
return
ret
;
}
color
:
Style
.
colorNone
;
font.pixelSize
:
size
;
anchors.horizontalCenter
:
parent
.
horizontalCenter
;
TextLabel
{
id
:
lblValue
;
text
:
modelData
.
substring
(
0
,
len
).
trim
();
color
:
lblLegend
.
color
;
horizontalAlignment
:
TextInput
.
AlignHCenter
;
font.pixelSize
:
size
;
anchors.fill
:
parent
;
}
}
}
TextLabel
{
id
:
lblLegend
;
text
:
legend
;
color
:
(((
background
.
r
+
background
.
g
+
background
.
b
)
/
3
)
<
0.5
?
"
white
"
:
"
black
"
);
visible
:
(
text
!==
""
);
opacity
:
0.65
;
font.pixelSize
:
(
size
*
0.35
);
anchors.horizontalCenter
:
parent
.
horizontalCenter
;
}
}
}
import/QtCAN/CanTestBench.2/qmldir
View file @
fae5ae38
...
...
@@ -4,6 +4,7 @@ CircleButton 2.0 CircleButton.qml
CircularGauge 2.0 CircularGauge.qml
LedLight 2.0 LedLight.qml
LinearGauge 2.0 LinearGauge.qml
StringValueDisplay 2.0 StringValueDisplay.qml
NumberValueDisplay 2.0 NumberValueDisplay.qml
NumberValueInput 2.0 NumberValueInput.qml
OnOffSwitcher 2.0 OnOffSwitcher.qml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment