qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
core
toxfilepause.h
Go to the documentation of this file.
1
/*
2
Copyright © 2018-2019 by The qTox Project Contributors
3
4
This file is part of qTox, a Qt-based graphical interface for Tox.
5
6
qTox is libre software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
qTox is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with qTox. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
class
ToxFilePause
23
{
24
public
:
25
void
localPause
()
26
{
27
localPauseState
=
true
;
28
}
29
30
void
localResume
()
31
{
32
localPauseState
=
false
;
33
}
34
35
void
localPauseToggle
()
36
{
37
localPauseState
= !
localPauseState
;
38
}
39
40
void
remotePause
()
41
{
42
remotePauseState
=
true
;
43
}
44
45
void
remoteResume
()
46
{
47
remotePauseState
=
false
;
48
}
49
50
void
remotePauseToggle
()
51
{
52
remotePauseState
= !
remotePauseState
;
53
}
54
55
bool
localPaused
()
const
56
{
57
return
localPauseState
;
58
}
59
60
bool
remotePaused
()
const
61
{
62
return
remotePauseState
;
63
}
64
65
bool
paused
()
const
66
{
67
return
localPauseState
||
remotePauseState
;
68
}
69
70
private
:
71
bool
localPauseState
=
false
;
72
bool
remotePauseState
=
false
;
73
};
ToxFilePause::localResume
void localResume()
Definition:
toxfilepause.h:30
ToxFilePause::remotePauseState
bool remotePauseState
Definition:
toxfilepause.h:72
ToxFilePause::localPauseState
bool localPauseState
Definition:
toxfilepause.h:71
ToxFilePause::remotePauseToggle
void remotePauseToggle()
Definition:
toxfilepause.h:50
ToxFilePause::remotePaused
bool remotePaused() const
Definition:
toxfilepause.h:60
ToxFilePause::paused
bool paused() const
Definition:
toxfilepause.h:65
ToxFilePause::remotePause
void remotePause()
Definition:
toxfilepause.h:40
ToxFilePause
Definition:
toxfilepause.h:22
ToxFilePause::localPauseToggle
void localPauseToggle()
Definition:
toxfilepause.h:35
ToxFilePause::remoteResume
void remoteResume()
Definition:
toxfilepause.h:45
ToxFilePause::localPaused
bool localPaused() const
Definition:
toxfilepause.h:55
ToxFilePause::localPause
void localPause()
Definition:
toxfilepause.h:25
Generated by
1.8.17