1 /***************************************************************************
2 * Copyright (C) 2005-2018 by the Quassel Project *
3 * devel@quassel-irc.org *
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. *
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. *
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 ***************************************************************************/
21 #include "backlogsettings.h"
23 BacklogSettings::BacklogSettings()
24 : ClientSettings("Backlog")
28 int BacklogSettings::requesterType() const
30 return localValue("RequesterType", BacklogRequester::PerBufferUnread).toInt();
34 void BacklogSettings::setRequesterType(int requesterType)
36 setLocalValue("RequesterType", requesterType);
40 int BacklogSettings::dynamicBacklogAmount() const
42 return localValue("DynamicBacklogAmount", 200).toInt();
46 void BacklogSettings::setDynamicBacklogAmount(int amount)
48 return setLocalValue("DynamicBacklogAmount", amount);
52 int BacklogSettings::fixedBacklogAmount() const
54 return localValue("FixedBacklogAmount", 500).toInt();
58 void BacklogSettings::setFixedBacklogAmount(int amount)
60 return setLocalValue("FixedBacklogAmount", amount);
64 int BacklogSettings::globalUnreadBacklogLimit() const
66 return localValue("GlobalUnreadBacklogLimit", 5000).toInt();
70 void BacklogSettings::setGlobalUnreadBacklogLimit(int limit)
72 return setLocalValue("GlobalUnreadBacklogLimit", limit);
76 int BacklogSettings::globalUnreadBacklogAdditional() const
78 return localValue("GlobalUnreadBacklogAdditional", 100).toInt();
82 void BacklogSettings::setGlobalUnreadBacklogAdditional(int additional)
84 return setLocalValue("GlobalUnreadBacklogAdditional", additional);
88 int BacklogSettings::perBufferUnreadBacklogLimit() const
90 return localValue("PerBufferUnreadBacklogLimit", 200).toInt();
94 void BacklogSettings::setPerBufferUnreadBacklogLimit(int limit)
96 return setLocalValue("PerBufferUnreadBacklogLimit", limit);
100 int BacklogSettings::perBufferUnreadBacklogAdditional() const
102 return localValue("PerBufferUnreadBacklogAdditional", 50).toInt();
106 void BacklogSettings::setPerBufferUnreadBacklogAdditional(int additional)
108 return setLocalValue("PerBufferUnreadBacklogAdditional", additional);