Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Leander Schulten
Lichtsteuerung
Commits
84948ded
Commit
84948ded
authored
Mar 29, 2018
by
Leander Schulten
Browse files
UI changes
parent
526a5a10
Changes
4
Hide whitespace changes
Inline
Side-by-side
ProgrammPrototypeView.qml
View file @
84948ded
...
...
@@ -72,10 +72,18 @@ ModelView{
}
ComboBox
{
model
:
easingModel
property
bool
open
:
false
currentIndex
:
editor
.
currentTimePoint
.
curveToNext
visible
:
editor
.
currentTimePoint
.
hasCurrent
onHighlightedIndexChanged
:
{
editor
.
currentTimePoint
.
curveToNext
=
highlightedIndex
console
.
log
(
"
selected
"
)
onDownChanged
:
{
open
|=
down
;
}
onHighlighted
:
{
if
(
open
)
editor
.
currentTimePoint
.
curveToNext
=
index
}
onActivated
:
{
editor
.
currentTimePoint
.
curveToNext
=
index
open
=
false
;
}
}
}
...
...
SwitchGroupControl.qml
View file @
84948ded
...
...
@@ -161,6 +161,7 @@ ControlItem{
width
:
200
text
:
itemData
.
name
visible
:
itemData
.
name
.
startsWith
(
search
.
text
,
Qt
.
CaseInsensitive
)
height
:
itemData
.
name
.
startsWith
(
search
.
text
,
Qt
.
CaseInsensitive
)
?
implicitHeight
:
0
;
checked
:
use
onCheckedChanged
:
use
=
checked
...
...
channelprogrammeditor.cpp
View file @
84948ded
...
...
@@ -364,6 +364,21 @@ decltype(ChannelProgramm::timeline)::iterator ChannelProgrammEditor::getTimePoin
return
best
;
}
QEasingCurve
*
ChannelProgrammEditor
::
getCurveForPoint
(
int
x
){
auto
time
=
mapFromVisualX
(
x
);
if
(
!
channelProgramm
)
return
nullptr
;
if
(
channelProgramm
->
timeline
.
empty
())
return
nullptr
;
auto
lowerBound
=
channelProgramm
->
timeline
.
lower_bound
(
x
);
if
(
lowerBound
==
channelProgramm
->
timeline
.
cend
()){
return
&
channelProgramm
->
timeline
.
crbegin
()
->
easingCurveToNextPoint
;
}
else
{
return
&
lowerBound
->
easingCurveToNextPoint
;
}
}
void
ChannelProgrammEditor
::
mousePressEvent
(
QMouseEvent
*
event
){
update
();
...
...
channelprogrammeditor.h
View file @
84948ded
...
...
@@ -92,6 +92,7 @@ public:
bool
haveCurrentTimePoint
()
const
{
return
channelProgramm
?
(
currentTimePoint
!=
channelProgramm
->
timeline
.
cend
())
:
false
;}
TimePoint
*
getCurrentTimePoint
();
CurrentTimePointWrapper
*
getCurrentTimePointWrapper
(){
return
&
currentTimePointWrapper
;}
Q_INVOKABLE
QEasingCurve
*
getCurveForPoint
(
int
x
);
protected:
virtual
void
updatePolish
()
override
;
virtual
void
geometryChanged
(
const
QRectF
&
newGeometry
,
const
QRectF
&
oldGeometry
)
override
;
...
...
Write
Preview
Supports
Markdown
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