modernize: Remove old-style slot usage in NetworkModelController
[quassel.git] / src / client / backlogsettings.cpp
1 /***************************************************************************
2  *   Copyright (C) 2005-2018 by the Quassel Project                        *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) version 3.                                           *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19  ***************************************************************************/
20
21 #include "backlogsettings.h"
22
23 BacklogSettings::BacklogSettings()
24     : ClientSettings("Backlog")
25 {}
26
27
28 int BacklogSettings::requesterType() const
29 {
30     return localValue("RequesterType", BacklogRequester::PerBufferUnread).toInt();
31 }
32
33
34 void BacklogSettings::setRequesterType(int requesterType)
35 {
36     setLocalValue("RequesterType", requesterType);
37 }
38
39
40 int BacklogSettings::dynamicBacklogAmount() const
41 {
42     return localValue("DynamicBacklogAmount", 200).toInt();
43 }
44
45
46 void BacklogSettings::setDynamicBacklogAmount(int amount)
47 {
48     return setLocalValue("DynamicBacklogAmount", amount);
49 }
50
51
52 int BacklogSettings::fixedBacklogAmount() const
53 {
54     return localValue("FixedBacklogAmount", 500).toInt();
55 }
56
57
58 void BacklogSettings::setFixedBacklogAmount(int amount)
59 {
60     return setLocalValue("FixedBacklogAmount", amount);
61 }
62
63
64 int BacklogSettings::globalUnreadBacklogLimit() const
65 {
66     return localValue("GlobalUnreadBacklogLimit", 5000).toInt();
67 }
68
69
70 void BacklogSettings::setGlobalUnreadBacklogLimit(int limit)
71 {
72     return setLocalValue("GlobalUnreadBacklogLimit", limit);
73 }
74
75
76 int BacklogSettings::globalUnreadBacklogAdditional() const
77 {
78     return localValue("GlobalUnreadBacklogAdditional", 100).toInt();
79 }
80
81
82 void BacklogSettings::setGlobalUnreadBacklogAdditional(int additional)
83 {
84     return setLocalValue("GlobalUnreadBacklogAdditional", additional);
85 }
86
87
88 int BacklogSettings::perBufferUnreadBacklogLimit() const
89 {
90     return localValue("PerBufferUnreadBacklogLimit", 200).toInt();
91 }
92
93
94 void BacklogSettings::setPerBufferUnreadBacklogLimit(int limit)
95 {
96     return setLocalValue("PerBufferUnreadBacklogLimit", limit);
97 }
98
99
100 int BacklogSettings::perBufferUnreadBacklogAdditional() const
101 {
102     return localValue("PerBufferUnreadBacklogAdditional", 50).toInt();
103 }
104
105
106 void BacklogSettings::setPerBufferUnreadBacklogAdditional(int additional)
107 {
108     return setLocalValue("PerBufferUnreadBacklogAdditional", additional);
109 }