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
84cb4ff6
Commit
84cb4ff6
authored
Feb 24, 2017
by
Carsten Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timer works fine now :D
parent
db27210f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
8 deletions
+24
-8
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
+19
-7
overlaycontroller.h
overlaycontroller.h
+5
-1
No files found.
Release/x64/qtTsOverlay_x64.dll
View file @
84cb4ff6
No preview for this file type
Release/x64/qtTsOverlay_x64.exp
View file @
84cb4ff6
No preview for this file type
Release/x64/qtTsOverlay_x64.lib
View file @
84cb4ff6
No preview for this file type
overlaycontroller.cpp
View file @
84cb4ff6
...
...
@@ -21,12 +21,9 @@ OverlayController::OverlayController() : QObject()
m_timer
=
new
QTimer
;
m_timer
->
setInterval
(
1
00
);
m_timer
->
setInterval
(
50
00
);
m_timer
->
setSingleShot
(
true
);
connect
(
m_timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
debugPrint
(
"HUHU"
)));
m_timer
->
start
();
addChatLine
(
"Test12"
);
connect
(
m_timer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
hideChat
()));
}
OverlayController
::~
OverlayController
()
...
...
@@ -40,6 +37,7 @@ OverlayController::~OverlayController()
m_msgLines
.
clear
();
delete
m_debugWindow
;
m_timer
->
stop
();
delete
m_timer
;
}
...
...
@@ -50,8 +48,22 @@ void OverlayController::deleteChatLine(QLabel * line)
m_msgLines
.
pop_back
();
}
void
OverlayController
::
showChat
()
{
for
(
auto
&
it
:
m_msgLines
)
it
->
show
();
}
void
OverlayController
::
hideChat
()
{
for
(
auto
&
it
:
m_msgLines
)
it
->
hide
();
}
void
OverlayController
::
addChatLine
(
QString
message
)
{
showChat
();
// generate new chatline
QLabel
*
newChatLine
=
new
QLabel
;
...
...
@@ -76,7 +88,8 @@ void OverlayController::addChatLine(QString message)
if
(
m_msgLines
.
size
()
>
MAXLINES
)
deleteChatLine
(
m_msgLines
.
last
());
//TODO: delete after time
// hide after time
m_timer
->
start
();
}
void
OverlayController
::
addSpeaker
(
QString
name
)
...
...
@@ -131,7 +144,6 @@ void OverlayController::removeSpeaker(QString name)
void
OverlayController
::
debugPrint
(
QString
text
)
{
m_debugWindow
->
setText
(
text
+
"
\n
"
+
m_debugWindow
->
text
());
m_debugWindow
->
setText
(
QString
(
"HUHU"
)
+
"
\n
"
+
m_debugWindow
->
text
());
}
void
OverlayController
::
reset
()
...
...
overlaycontroller.h
View file @
84cb4ff6
...
...
@@ -32,8 +32,12 @@ private:
QTimer
*
m_timer
;
private
slots
:
private:
void
deleteChatLine
(
QLabel
*
line
);
void
showChat
();
private
slots
:
void
hideChat
();
public:
void
addChatLine
(
QString
message
);
...
...
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