Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qtTsOverlay
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
C-Fu
qtTsOverlay
Commits
49efc53a
Commit
49efc53a
authored
Mar 05, 2017
by
Carsten Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove [spacer] from spacer text
parent
730008ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
Release/x64/qtTsOverlay_x64.dll
Release/x64/qtTsOverlay_x64.dll
+0
-0
Release/x64/qtTsOverlay_x64.exp
Release/x64/qtTsOverlay_x64.exp
+0
-0
Release/x64/qtTsOverlay_x64.lib
Release/x64/qtTsOverlay_x64.lib
+0
-0
overlaycontroller.cpp
overlaycontroller.cpp
+10
-12
No files found.
Release/x64/qtTsOverlay_x64.dll
View file @
49efc53a
No preview for this file type
Release/x64/qtTsOverlay_x64.exp
View file @
49efc53a
No preview for this file type
Release/x64/qtTsOverlay_x64.lib
View file @
49efc53a
No preview for this file type
overlaycontroller.cpp
View file @
49efc53a
...
...
@@ -237,17 +237,16 @@ void OverlayController::displayChannelList()
channelInfo
tmp
;
tmp
.
id
=
channelIDList
[
i
];
tmp
.
name
=
channelID2Name
(
m_SCHID
,
channelIDList
[
i
]);
ts3
.
getChannelVariableAsInt
(
m_SCHID
,
tmp
.
id
,
CHANNEL_ORDER
,
&
tmp
.
order
);
ts3
.
getParentChannelOfChannel
(
m_SCHID
,
channelIDList
[
i
],
&
tmp
.
parent
);
tmp
.
entry
=
new
QTreeWidgetItem
;
tmp
.
entry
->
setData
(
0
,
Qt
::
DisplayRole
,
tmp
.
name
);
tmp
.
entry
->
setData
(
1
,
Qt
::
UserRole
,
tmp
.
id
);
if
(
tmp
.
name
.
startsWith
(
'['
)
&&
tmp
.
name
.
contains
(
"spacer"
))
{
tmp
.
entry
->
setData
(
2
,
Qt
::
UserRole
,
spacer
);
tmp
.
name
=
tmp
.
name
.
remove
(
QRegularExpression
(
""
));
tmp
.
name
=
tmp
.
name
.
remove
(
QRegExp
(
"
\\
[.*spacer.*
\\
]"
));
tmp
.
entry
->
setData
(
0
,
Qt
::
DisplayRole
,
tmp
.
name
);
}
else
tmp
.
entry
->
setData
(
2
,
Qt
::
UserRole
,
channel
);
...
...
@@ -256,23 +255,22 @@ void OverlayController::displayChannelList()
i
++
;
}
// sort the list
qSort
(
channelList
.
begin
(),
channelList
.
end
(),
[](
const
channelInfo
&
a
,
const
channelInfo
&
b
)
{
return
a
.
order
<
b
.
order
;
});
// get all toplvl channels
QVector
<
channelInfo
>
topLvlList
;
for
(
int
i
=
0
;
i
<
channelList
.
size
();
i
++
)
if
(
channelList
[
i
]
.
parent
==
0
)
topLvlList
.
push_back
(
channelList
[
i
]
);
for
(
auto
&
it
:
channelList
)
if
(
it
.
parent
==
0
)
topLvlList
.
push_back
(
it
);
int
next
=
0
;
// sort the toplvl channels
int
prevID
=
0
;
while
(
!
topLvlList
.
isEmpty
())
{
int
i
;
for
(
i
=
0
;
i
<
topLvlList
.
size
();
i
++
)
if
(
topLvlList
[
i
].
order
==
next
)
if
(
topLvlList
[
i
].
order
==
prevID
)
break
;
next
=
topLvlList
[
i
].
id
;
prevID
=
topLvlList
[
i
].
id
;
m_tree
->
getTree
()
->
addTopLevelItem
(
topLvlList
.
takeAt
(
i
).
entry
);
}
...
...
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