ManaPlus
src
gui
windows
killstats.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2009 The Mana World Development Team
4
* Copyright (C) 2011-2019 The ManaPlus Developers
5
* Copyright (C) 2009-2021 Andrei Karas
6
*
7
* This file is part of The ManaPlus Client.
8
*
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#ifndef GUI_WINDOWS_KILLSTATS_H
24
#define GUI_WINDOWS_KILLSTATS_H
25
26
#include "
listeners/actionlistener.h
"
27
#include "
listeners/attributelistener.h
"
28
29
#include "
gui/widgets/window.h
"
30
31
class
Label
;
32
class
Button
;
33
34
class
KillStats
final
:
public
Window
,
35
public
ActionListener
,
36
public
AttributeListener
37
{
38
public
:
42
KillStats
();
43
44
A_DELETE_COPY
(
KillStats
)
45
46
49
void
action
(
const
ActionEvent
&event)
override
final
;
50
51
void
gainXp
(int64_t Xp);
52
56
void
recalcStats
();
57
61
void
update
();
62
63
void
resetTimes
();
64
65
void
attributeChanged
(
const
AttributesT
id
,
66
const
int64_t oldVal,
67
const
int64_t newVal)
override
final
;
68
69
private
:
70
time_t
mKillTimer
;
71
Button
*
mResetButton
A_NONNULLPOINTER
;
72
Button
*
mTimerButton
A_NONNULLPOINTER
;
73
Label
*
mLine1
;
74
Label
*
mLine2
;
75
Label
*
mLine3
;
76
Label
*
mLine4
A_NONNULLPOINTER
;
77
Label
*
mLine5
A_NONNULLPOINTER
;
78
Label
*
mLine6
A_NONNULLPOINTER
;
79
Label
*
mLine7
A_NONNULLPOINTER
;
80
81
Label
*
mExpSpeed1Label
A_NONNULLPOINTER
;
82
Label
*
mExpTime1Label
A_NONNULLPOINTER
;
83
Label
*
mExpSpeed5Label
A_NONNULLPOINTER
;
84
Label
*
mExpTime5Label
A_NONNULLPOINTER
;
85
Label
*
mExpSpeed15Label
A_NONNULLPOINTER
;
86
Label
*
mExpTime15Label
A_NONNULLPOINTER
;
87
88
Label
*
mLastKillExpLabel
A_NONNULLPOINTER
;
89
90
int
mKillCounter
;
91
int64_t
mExpCounter
;
92
int
mKillTCounter
;
93
int64_t
mExpTCounter
;
95
time_t
m1minExpTime
;
96
int64_t
m1minExpNum
;
97
int
m1minSpeed
;
98
99
time_t
m5minExpTime
;
100
int64_t
m5minExpNum
;
101
int
m5minSpeed
;
102
103
time_t
m15minExpTime
;
104
int64_t
m15minExpNum
;
105
int
m15minSpeed
;
106
};
107
108
extern
KillStats
*
killStats
;
109
110
#endif
// GUI_WINDOWS_KILLSTATS_H
actionlistener.h
attributelistener.h
AttributesT
Attributes ::T AttributesT
Definition:
attributes.h:118
ActionEvent
Definition:
actionevent.h:98
ActionListener
Definition:
actionlistener.h:79
AttributeListener
Definition:
attributelistener.h:32
Button
Definition:
button.h:102
KillStats
Definition:
killstats.h:37
KillStats::mLine2
Label * mLine2
Definition:
killstats.h:74
KillStats::mLine1
Label * mLine1
Definition:
killstats.h:73
KillStats::mExpTime15Label
Label * mExpTime15Label
Definition:
killstats.h:86
KillStats::resetTimes
void resetTimes()
Definition:
killstats.cpp:201
KillStats::update
void update()
Definition:
killstats.cpp:365
KillStats::mKillTimer
time_t mKillTimer
Definition:
killstats.h:70
KillStats::m5minSpeed
int m5minSpeed
Definition:
killstats.h:101
KillStats::gainXp
void gainXp(int64_t Xp)
Definition:
killstats.cpp:214
KillStats::mLine6
Label * mLine6
Definition:
killstats.h:78
KillStats::mExpCounter
int64_t mExpCounter
Definition:
killstats.h:91
KillStats::mExpTime5Label
Label * mExpTime5Label
Definition:
killstats.h:84
KillStats::mResetButton
Button * mResetButton
Definition:
killstats.h:71
KillStats::attributeChanged
void attributeChanged(const AttributesT id, const int64_t oldVal, const int64_t newVal)
Definition:
killstats.cpp:437
KillStats::mKillTCounter
int mKillTCounter
Definition:
killstats.h:92
KillStats::m5minExpNum
int64_t m5minExpNum
Definition:
killstats.h:100
KillStats::m1minSpeed
int m1minSpeed
Definition:
killstats.h:97
KillStats::m15minExpTime
time_t m15minExpTime
Definition:
killstats.h:103
KillStats::m5minExpTime
time_t m5minExpTime
Definition:
killstats.h:99
KillStats::mLastKillExpLabel
Label * mLastKillExpLabel
Definition:
killstats.h:88
KillStats::m1minExpTime
time_t m1minExpTime
Definition:
killstats.h:95
KillStats::mTimerButton
Button * mTimerButton
Definition:
killstats.h:72
KillStats::mExpSpeed15Label
Label * mExpSpeed15Label
Definition:
killstats.h:85
KillStats::action
void action(const ActionEvent &event)
Definition:
killstats.cpp:166
KillStats::mLine4
Label * mLine4
Definition:
killstats.h:76
KillStats::mLine3
Label * mLine3
Definition:
killstats.h:75
KillStats::KillStats
KillStats()
Definition:
killstats.cpp:47
KillStats::mExpTCounter
int64_t mExpTCounter
Definition:
killstats.h:93
KillStats::recalcStats
void recalcStats()
Definition:
killstats.cpp:311
KillStats::mExpSpeed5Label
Label * mExpSpeed5Label
Definition:
killstats.h:83
KillStats::mLine7
Label * mLine7
Definition:
killstats.h:79
KillStats::mLine5
Label * mLine5
Definition:
killstats.h:77
KillStats::m15minExpNum
int64_t m15minExpNum
Definition:
killstats.h:104
KillStats::m1minExpNum
int64_t m1minExpNum
Definition:
killstats.h:96
KillStats::mExpTime1Label
Label * mExpTime1Label
Definition:
killstats.h:82
KillStats::mKillCounter
int mKillCounter
Definition:
killstats.h:90
KillStats::mExpSpeed1Label
Label * mExpSpeed1Label
Definition:
killstats.h:81
KillStats::m15minSpeed
int m15minSpeed
Definition:
killstats.h:105
Label
Definition:
label.h:91
Window
Definition:
window.h:102
killStats
KillStats * killStats
Definition:
killstats.cpp:45
A_NONNULLPOINTER
#define A_NONNULLPOINTER
Definition:
localconsts.h:266
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
window.h
Generated on Wed Mar 17 2021 19:19:07 for ManaPlus by
1.9.1