1 #ifndef _KVI_OPTIONS_H_
2 #define _KVI_OPTIONS_H_
3 //=============================================================================
4 //
5 //   File : KviOptions.h
6 //   Creation date : Tue Jun 20 2000 12:42:07 by Szymon Stefanek
7 //
8 //   This file is part of the KVIrc IRC client distribution
9 //   Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //   Copyright (C) 2014 OmegaPhil (OmegaPhil at startmail dot com)
11 //
12 //   This program is FREE software. You can redistribute it and/or
13 //   modify it under the terms of the GNU General Public License
14 //   as published by the Free Software Foundation; either version 2
15 //   of the License, or (at your option) any later version.
16 //
17 //   This program is distributed in the HOPE that it will be USEFUL,
18 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 //   See the GNU General Public License for more details.
21 //
22 //   You should have received a copy of the GNU General Public License
23 //   along with this program. If not, write to the Free Software Foundation,
24 //   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 //=============================================================================
27 
28 #include "kvi_settings.h"
29 #include "KviCString.h"
30 #include "KviPixmap.h"
31 #include "KviMessageTypeSettings.h"
32 #include "KviControlCodes.h"
33 
34 #include <QRect>
35 #include <QPixmap>
36 #include <QColor>
37 #include <QFont>
38 #include <QStringList>
39 
40 // option structures
41 #define DECLARE_OPTION_STRUCT(_cname, _type)      \
42 	class _cname                                  \
43 	{                                             \
44 	public:                                       \
45 		QString name;                             \
46 		_type option;                             \
47 		int flags;                                \
48                                                   \
49 	public:                                       \
50 		_cname(const QString & n, _type o, int f) \
51 		    : name(n), option(o), flags(f){}      \
52 		~_cname() = default;                      \
53 	};
54 
DECLARE_OPTION_STRUCT(KviBoolOption,bool)55 DECLARE_OPTION_STRUCT(KviBoolOption, bool)
56 DECLARE_OPTION_STRUCT(KviRectOption, QRect)
57 DECLARE_OPTION_STRUCT(KviStringOption, QString)
58 DECLARE_OPTION_STRUCT(KviColorOption, QColor)
59 DECLARE_OPTION_STRUCT(KviFontOption, QFont)
60 DECLARE_OPTION_STRUCT(KviPixmapOption, KviPixmap)
61 //DECLARE_OPTION_STRUCT(KviIntOption,int)
62 DECLARE_OPTION_STRUCT(KviUIntOption, unsigned int)
63 DECLARE_OPTION_STRUCT(KviMessageTypeSettingsOption, KviMessageTypeSettings)
64 DECLARE_OPTION_STRUCT(KviStringListOption, QStringList)
65 
66 #define KVI_COLOR_EXT_USER_OP 150
67 #define KVI_COLOR_EXT_USER_HALFOP 151
68 #define KVI_COLOR_EXT_USER_ADMIN 152
69 #define KVI_COLOR_EXT_USER_OWNER 153
70 #define KVI_COLOR_EXT_USER_VOICE 154
71 #define KVI_COLOR_EXT_USER_USEROP 155
72 #define KVI_COLOR_EXT_USER_NORMAL 156
73 #define KVI_COLOR_CUSTOM 255
74 #define KVI_COLOR_OWN 254
75 
76 // option entry indexes
77 #define KVI_RECT_OPTIONS_PREFIX "rect"
78 #define KVI_RECT_OPTIONS_PREFIX_LEN 4
79 
80 #define KviOption_rectFrameGeometry 0 /* internal */
81 /* FIXME: this should be in the options module (local config) ? */
82 #define KviOption_rectGeneralOptionsDialogGeometry 1 /* internal */
83 /* FIXME: this should be in the regusers module (local config) ? */
84 #define KviOption_rectRegisteredUsersDialogGeometry 2 /* internal */
85 
86 #define KVI_NUM_RECT_OPTIONS 3
87 
88 #define KVI_BOOL_OPTIONS_PREFIX "bool"
89 #define KVI_BOOL_OPTIONS_PREFIX_LEN 4
90 
91 // NOTICE: REUSE EQUIVALENT UNUSED BOOL_OPTION in KviOptions.cpp ENTRIES BEFORE ADDING NEW ENTRIES BELOW
92 
93 #define KviOption_boolWindowsRememberProperties 0                              /* interface::features::global */
94 #define KviOption_boolIrcViewShowImages 1                                      /* interface::features::components::ircview */
95 #define KviOption_boolIrcViewTimestamp 2                                       /* interface::features::components::ircview */
96 #define KviOption_boolIrcViewUrlHighlighting 3                                 /* interface::features::components::ircview */
97 #define KviOption_boolIrcViewWrapMargin 4                                      /* interface::features::components::ircview */
98 #define KviOption_boolInputHistoryCursorAtEnd 5                                /* interface::features::components::input */
99 #define KviOption_boolAvoidParserWarnings 6                                    /* ircengine::uparser */
100 #define KviOption_boolUseProxyHost 7                                           /* transport */
101 #define KviOption_boolIgnoreSpecialCharactersInNickCompletion 8                /* input */
102 #define KviOption_boolForceBrutalQuit 9                                        /* irc */
103 #define KviOption_boolShowPingPong 10                                          /* ircoutput */
104 #define KviOption_boolPopupNotifierOnNewQueryMessages 11                       /* query */
105 #define KviOption_boolShowExtendedServerInfo 12                                /* ircoutput */
106 #define KviOption_boolEchoNumericTopic 13                                      /* channel */
107 #define KviOption_boolShowOwnParts 14                                          /* ircoutput */
108 #define KviOption_boolUseAntiSpamOnPrivmsg 15                                  /* ircengine::outputcontrol::antispam */
109 #define KviOption_boolUseExtendedPrivmsgView 16                                /* ircengine::outputcontrol::privmsg */
110 #define KviOption_boolShowUserAndHostInPrivmsgView 17                          /* ircengine::outputcontrol::privmsg */
111 #define KviOption_boolUseWordHighlighting 18                                   /* ircengine::outputcontrol::highlighting */
112 #define KviOption_boolCleanupUnusedModules 19                                  /* uparser ? */
113 #define KviOption_boolIgnoreCtcpPing 20                                        /* ctcp */
114 #define KviOption_boolIgnoreCtcpVersion 21                                     /* ctcp */
115 #define KviOption_boolUseCtcpFloodProtection 22                                /* ctcp */
116 #define KviOption_boolDisableBrokenEventHandlers 23                            /* ircengine::uparser */
117 #define KviOption_boolIgnoreCtcpClientinfo 24                                  /* ctcp */
118 #define KviOption_boolIgnoreCtcpUserinfo 25                                    /* ctcp */
119 #define KviOption_boolIgnoreCtcpFinger 26                                      /* ctcp */
120 #define KviOption_boolIgnoreCtcpSource 27                                      /* ctcp */
121 #define KviOption_boolIgnoreCtcpTime 28                                        /* ctcp */
122 #define KviOption_boolRequestMissingAvatars 29                                 /* ctcp::avatar */
123 #define KviOption_boolShowCompactModeChanges 30                                /* ircoutput */
124 #define KviOption_boolIgnoreCtcpDcc 31                                         /* ctcp */
125 #define KviOption_boolAutoAcceptDccChat 32                                     /* dcc::chat */
126 #define KviOption_boolAutoAcceptDccSend 33                                     /* dcc::send */
127 #define KviOption_boolSendZeroAckInDccRecv 34                                  /* dcc::send */
128 #define KviOption_boolUseFastDccSend 35                                        /* dcc::send */
129 #define KviOption_boolUseCompositingForTransparency 36                         /* interface::look::global */
130 #define KviOption_boolUseWindowListIrcContextIndicator 37                      /* interface::features::global */
131 #define KviOption_boolUseGlobalApplicationFont 38                              /* interface::look::global */
132 #define KviOption_boolAlwaysQuitKVIrcClosingLastConsole 39                     /* internal */
133 #define KviOption_boolAlwaysDisconnectClosingConnectedConsole 40               /* internal */
134 #define KviOption_boolFlashWindowOnHighlightedMessages 41                      /* highlighting */
135 #define KviOption_boolPopupNotifierOnHighlightedMessages 42                    /* highlighting */
136 #define KviOption_boolFlashWindowOnNotifyOnLine 43                             /* notify */
137 #define KviOption_boolIrcViewTimestampUTC 44                                   /* interface::features::components::ircview */
138 #define KviOption_boolUseGlobalPseudoTransparency 45                           /* interface::look::global */
139 #define KviOption_boolUseNotifyList 46                                         /* ircengine::notifylist */
140 #define KviOption_boolNotifyListChangesToActiveWindow 47                       /* ircengine::notifylist */
141 #define KviOption_boolAutoResumeDccSendWhenAutoAccepted 48                     /* dcc::send */
142 #define KviOption_boolLimitOutgoingTraffic 49                                  /* transport */
143 #define KviOption_boolSendUnknownCommandsAsRaw 50                              /* ircengine::uparser */
144 #define KviOption_boolUserListViewDrawGrid 51                                  /* look & feel::interface look::userlist */
145 #define KviOption_boolShowChannelSyncTime 52                                   /* channel */
146 #define KviOption_boolRejoinChannelOnKick 53                                   /* channel */
147 #define KviOption_boolKeepChannelOpenOnKick 54                                 /* channel */
148 #define KviOption_boolAutoCloseDccSendOnSuccess 55                             /* dcc::send */
149 #define KviOption_boolNotifyDccSendSuccessInConsole 56                         /* dcc::send */
150 #define KviOption_boolCreateMinimizedDccSend 57                                /* dcc::send */
151 #define KviOption_boolCreateMinimizedDccChat 58                                /* dcc::chat */
152 #define KviOption_boolAutoAcceptIncomingAvatars 59                             /* irc::ctcp::avatar */
153 #define KviOption_boolUseNickCompletionPostfixForFirstWordOnly 60
154 #define KviOption_boolUseWindowListIcons 61                                    /* interface::features */
155 #define KviOption_boolCreateMinimizedDccSendWhenAutoAccepted 62                /* dcc::send */
156 #define KviOption_boolCreateMinimizedDccChatWhenAutoAccepted 63                /* dcc::chat */
157 #define KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable 64             /* dcc */
158 #define KviOption_boolColorNicksWithBackground 65                              /* interface::features::components::ircview */
159 #define KviOption_boolAutoLogQueries 66                                        /* ircengine::logging */
160 #define KviOption_boolAutoLogChannels 67                                       /* ircendine::logging */
161 #define KviOption_boolAutoLogDccChat 68                                        /* ircengine::logging */
162 #define KviOption_boolAutoLogConsole 69                                        /* ircengine::logging */
163 #define KviOption_boolSilentAntiSpam 70                                        /* ircengine::antispam */
164 #define KviOption_boolUseIncomingDccMediaTypeSavePath 71                       /* dcc::send */
165 #define KviOption_boolNotifyListSendUserhostForOnlineUsers 72                  /* ircengine::notifylist */
166 #define KviOption_boolUseIntelligentNotifyListManager 73                       /* ircengine::notifylist */
167 #define KviOption_boolUseWatchListIfAvailable 74                               /* ircengine::notifylist */
168 #define KviOption_boolUseTreeWindowList 75                                     /* interface::features::global */
169 #define KviOption_boolBindIrcIPv4ConnectionsToSpecifiedAddress 76              /* connection::transport */
170 #define KviOption_boolBindIrcIPv6ConnectionsToSpecifiedAddress 77              /* connection::transport */
171 #define KviOption_boolUseAntiSpamOnNotice 78                                   /* ircengine::antispam */
172 #define KviOption_boolSetLastAvatarAsDefaultForRegisteredUsers 79              /* irc::ctcp::avatar */
173 #define KviOption_boolCantAcceptIncomingDccConnections 80                      /* dcc::general */
174 #define KviOption_boolIgnoreCtcpAvatar 81                                      /* irc::ctcp::floodprotection */
175 #define KviOption_boolCtcpRepliesToActiveWindow 82                             /* ctcp */
176 #define KviOption_boolAutoAcceptDccCanvas 83
177 #define KviOption_boolNotifyDccSendSuccessInNotifier 84                        /* dcc::send */
178 #define KviOption_boolKillBrokenTimers 85                                      /* ircengine::uparser */
179 #define KviOption_boolDccVoiceVolumeSliderControlsPCM 86                       /* dcc::voice */
180 #define KviOption_boolDccVoiceForceHalfDuplex 87                               /* dcc::voice */
181 #define KviOption_boolAutoAcceptDccVoice 88                                    /* dcc::voice */
182 #define KviOption_boolCreateMinimizedDccVoice 89                               /* dcc::voice */
183 #define KviOption_boolCreateMinimizedDccVoiceWhenAutoAccepted 90               /* dcc::voice */
184 #define KviOption_boolUseIdentService 91                                       /* connection::ident */
185 #define KviOption_boolShowTipAtStartup 92                                      /* internal */
186 #define KviOption_boolIdentdEnableIPv6 93                                      /* connection::ident */
187 #define KviOption_boolIdentdIPv6ContainsIPv4 94                                /* connection::ident */
188 #define KviOption_boolScaleAvatars 95                                          /* ctcp::avatar */
189 #define KviOption_boolColorNicks 96                                            /* interface::features::components::ircview */
190 #define KviOption_boolBoldedNicks 97                                           /* interface::features::components::ircview */
191 #define KviOption_boolDccListenOnSpecifiedInterfaceByDefault 98                /* dcc */
192 #define KviOption_boolChangeNickAway 99                                        /* ircengine::away */
193 #define KviOption_boolAutoGeneratedAwayNick 100                                /* ircengine::away */
194 #define KviOption_boolExitAwayOnInput 101                                      /* ircengine::away */
195 #define KviOption_boolAlwaysHighlightNick 102                                  /* ircengine::outputcontrol::highlighting */
196 #define KviOption_boolShowChannelsJoinOnIrc 103                                /* internal */
197 //#define KviOption_boolShowChannelsJoinDialogAsToplevel 104                     /* FIXME: internal ??? */ //UNUSED
198 #define KviOption_boolUserDefinedPortRange 105                                 /* dcc */
199 #define KviOption_boolCreateQueryOnPrivmsg 106                                 /* query */
200 #define KviOption_boolCreateQueryOnNotice 107                                  /* query */
201 #define KviOption_boolCreateIncomingQueriesAsMinimized 108                     /* query */
202 #define KviOption_boolAutoJoinOnInvite 109                                     /* channel */
203 #define KviOption_boolShowServersConnectDialogOnStart 110                      /* connection::ircservers */
204 //#define KviOption_boolShowServersConnectDialogAsToplevel 111                   /* FIXME: internal ?? */  //UNUSED
205 #define KviOption_boolAcceptBrokenFileNameDccResumeRequests 112                /* dcc::send */
206 #define KviOption_boolAutoReconnectOnUnexpectedDisconnect 113                  /* connection */
207 #define KviOption_boolRejoinChannelsAfterReconnect 114                         /* connection */
208 #define KviOption_boolReopenQueriesAfterReconnect 115                          /* connection */
209 #define KviOption_boolEnableQueryTracing 116                                   /* query */
210 #define KviOption_boolOperatorMessagesToActiveWindow 117                       /* irc::output */
211 #define KviOption_boolInvitesToActiveWindow 118                                /* irc::output */
212 #define KviOption_boolShowChannelUserFlagInPrivmsgView 119                     /* ircengine::outputcontrol::privmsg */
213 #define KviOption_boolDccSendFakeAddressByDefault 120                          /* dcc::general */
214 #define KviOption_boolUseWindowListActivityMeter 121                           /* irc::output */
215 #define KviOption_boolCloseServerWidgetAfterConnect 122                        /* IMPLEMENTATION NEEDED !!! */
216 #define KviOption_boolPrioritizeLastActionTime 123
217 #define KviOption_boolShowUserChannelIcons 124                                 /* look & feel::interface features::userlist */
218 #define KviOption_boolShowUserChannelState 125                                 /* look & feel::interface features::userlist */
219 #define KviOption_boolEnableIgnoreOnPrivMsg 126                                /* irc::ignore */
220 #define KviOption_boolVerboseIgnore 127                                        /* irc::ignore */
221 #define KviOption_boolEnableIgnoreOnNotice 128                                 /* irc::ignore */
222 #define KviOption_boolNotifyFailedDccHandshakes 129
223 #define KviOption_boolDrawEmoticons 130                                        /* look::interface::features::output */
224 #define KviOption_boolIgnoreCtcpPage 131                                       /* irc::ctcp::floodprotection */
225 #define KviOption_boolShowDialogOnCtcpPage 132
226 #define KviOption_boolBashLikeNickCompletion 133
227 #define KviOption_boolUseSSLCertificate 134                                    /* ssl */
228 #define KviOption_boolUseSSLPrivateKey 135                                     /* ssl */
229 #define KviOption_boolWarnAboutPastingMultipleLines 136                        /* internal */
230 #define KviOption_boolKeepChannelsOpenOnUnexpectedDisconnect 137               /* connection */
231 #define KviOption_boolKeepQueriesOpenOnUnexpectedDisconnect 138                /* connection */
232 #define KviOption_boolUseLagMeterEngine 139                                    /* irc::lag */
233 #define KviOption_boolShowLagOnContextDisplay 140                              /* irc::lag */
234 #define KviOption_boolDisableBanListRequestOnJoin 141                          /* channel */
235 #define KviOption_boolDisableBanExceptionListRequestOnJoin 142                 /* channel */
236 #define KviOption_boolDisableInviteListRequestOnJoin 143                       /* channel */
237 #define KviOption_boolDisableWhoRequestOnJoin 144                              /* channel */
238 #define KviOption_boolShowDockExtension 145                                    /* internal ? */
239 #define KviOption_boolDccAddressByIrcDns 146                                   /* irc::general */
240 #define KviOption_boolHighlightOnlyNormalMsg 147                               /* irc::output::highlight */
241 #define KviOption_boolHighlightOnlyNormalMsgQueryToo 148                       /* irc::output::highlight */
242 #define KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo 149             /* irc::output::highlight */
243 #define KviOption_boolHighlightOnlyAtCostumHighlightLevel 150                  /* irc::output::highlight */
244 #define KviOption_boolDccBrokenBouncerHack 151                                 /* dcc */
245 #define KviOption_boolExternalMessagesToActiveWindow 152                       /* irc::output */
246 #define KviOption_boolIgnoreChannelAvatarRequestsWhenNoAvatarSet 153           /* ctcp */
247 #define KviOption_boolFlashQueryWindowOnNewMessages 154                        /* query */
248 #define KviOption_boolConfirmCloseWhenThereAreConnections 155                  /* interface features */
249 #define KviOption_boolUseWindowsDesktopForTransparency 156                     /* interface::features::global */
250 #define KviOption_boolCtcpRequestsToActiveWindow 157                           /* irc::output */
251 #define KviOption_boolServerRepliesToActiveWindow 158                          /* irc::output */
252 #define KviOption_boolServerNoticesToActiveWindow 159                          /* irc::output */
253 #define KviOption_boolServicesNoticesToActiveWindow 160                        /* irc::output */
254 #define KviOption_boolSortWindowListItemsByName 161                            /* interface::features::global */
255 #define KviOption_boolShowWindowListToolTips 162                               /* interface::features::global */
256 #define KviOption_boolShowUserListViewToolTips 163                             /* interface::features::global */
257 #define KviOption_boolWhoisRepliesToActiveWindow 164                           /* irc::output */
258 #define KviOption_boolPopupNotifierOnNotifyOnLine 165                          /* notify */
259 #define KviOption_boolEnableNotifier 166                                       /* notifier */
260 #define KviOption_boolDccSendForceIdleStep 167                                 /* dcc */
261 #define KviOption_boolStatusBarVisible 168                                     /* internal */
262 #define KviOption_boolTrackLastReadTextViewLine 169                            /* ircview::features */
263 #define KviOption_boolKeepChannelOpenOnPart 170                                /* channel */
264 #define KviOption_boolStripMircColorsInUserMessages 171                        /* irc::output */
265 #define KviOption_boolDoNotSuggestRestoreDefaultScript 172                     /* internal */
266 #define KviOption_boolLimitDccSendSpeed 173                                    /* dcc::file transfers */
267 #define KviOption_boolLimitDccRecvSpeed 174                                    /* dcc::file transfers */
268 #define KviOption_boolIgnoreModuleVersions 175
269 #define KviOption_boolEnableInputHistory 176                                   /* interface::input */
270 #define KviOption_boolUseSpecialColorForTimestamp 177                          /* interface::output */
271 #define KviOption_boolEnableAwayListUpdates 178                                /* channel */
272 #define KviOption_boolShowAvatarsInUserlist 179                                /* interface::userlist */
273 #define KviOption_boolShowUserListStatisticLabel 180                           /* interface::userlist */
274 #define KviOption_boolShowIconsInPopupMenus 181                                /* themes::general */
275 #define KviOption_boolScriptErrorsToDebugWindow 182                            /* parser */
276 #define KviOption_boolShowMinimizedDebugWindow 183                             /* parser */
277 #define KviOption_boolShowExtendedInfoInQueryLabel 184                         /* query */
278 #define KviOption_boolUseUserListColorsAsNickColors 185                        /* irc::usermessages */
279 #define KviOption_boolGzipLogs 186                                             /* ircengine::logging */
280 #define KviOption_boolUseFullWordHighlighting 187                              /* highlight */
281 #define KviOption_boolNotifierFlashing 188                                     /* interface::notifier */
282 #define KviOption_boolCommandlineInUserFriendlyModeByDefault 189               /* interface::input */
283 #define KviOption_boolEnableVisualEffects 190                                  /* interface */
284 #define KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores 191  /* DCC something */
285 #define KviOption_boolDoNotUpscaleAvatars 192
286 #define KviOption_boolUseDifferentColorForOwnNick 193                          /* interface */
287 #define KviOption_boolCloseInTray 194                                          /* interface */
288 #define KviOption_boolStartupMinimized 195                                     /* interface */
289 #define KviOption_boolSortReceivedByDccFilesByNicks 196                        /* dcc */
290 #define KviOption_boolLogChannelHistory 197                                    /* channel */
291 #define KviOption_boolClassicWindowListSetMaximumButtonWidth 198
292 #define KviOption_boolKeepChannelsOpenOnDisconnect 199                         /* connection */
293 #define KviOption_boolKeepQueriesOpenOnDisconnect 200                          /* connection */
294 #define KviOption_boolHideWindowToolButtons 201                                /* interface */
295 #define KviOption_boolHideInputToolButtons 202                                 /* interface */
296 #define KviOption_boolStripControlCodesInLogs 203                              /* log */
297 #define KviOption_boolEnableTrayIconFlashing 204
298 #define KviOption_boolUseFlatClassicWindowListButtons 205
299 #define KviOption_boolStripMsgTypeInLogs 206                                   /* log */
300 #define KviOption_boolUseLevelBasedTrayNotification 207
301 #define KviOption_boolMuteAllSounds 208
302 #define KviOption_boolCreateMinimizedChannels 209
303 #define KviOption_boolShowNetworkNameForConsoleWindowListEntry 210
304 #define KviOption_boolDrawGenderIcons 211
305 #define KviOption_boolPrependGenderInfoToRealname 212
306 #define KviOption_boolUseIdentServiceOnlyOnConnect 213                         /* connection::ident */
307 #define KviOption_boolUseSystemUrlHandlers 214                                 /* Windoze only*/
308 #define KviOption_boolScaleAvatarsOnLoad 215
309 #define KviOption_boolNotifierFading 216                                       /* interface::notifier */
310 #define KviOption_boolPickRandomIpAddressForRoundRobinServers 217
311 #define KviOption_boolPrependAvatarInfoToRealname 218
312 #define KviOption_boolEnableAnimatedAvatars 219
313 #define KviOption_boolEnableAnimatedSmiles 220
314 #define KviOption_boolPlaceNickWithNonAlphaCharsAtEnd 221
315 #define KviOption_boolPasteLastLogOnChannelJoin 222                            /* channel */
316 #define KviOption_boolPasteLastLogOnQueryJoin 223                              /* query */
317 #define KviOption_boolUseSpecifiedSmartColorForOwnNick 224                     /* interface::ircview */
318 #define KviOption_boolZshLikeNickCompletion 225
319 #define KviOption_boolAutoAcceptDccVideo 226                                   /* dcc::video */
320 #define KviOption_boolCreateMinimizedDccVideo 227                              /* dcc::video */
321 #define KviOption_boolCreateMinimizedDccVideoWhenAutoAccepted 228              /* dcc::video */
322 #define KviOption_boolShowTaskBarButton 229                                    /* windows only, used in KviApplication::createFrame only */
323 #define KviOption_boolFlashDccChatWindowOnNewMessages 230                      /* dcc:chat */
324 #define KviOption_boolPopupNotifierOnNewDccChatMessages 231                    /* dcc:chat */
325 #define KviOption_boolUseAwayMessage 232                                       /* away */
326 #define KviOption_boolDisableQuietBanListRequestOnJoin 233                     /* channel */
327 #define KviOption_boolUseWindowListCloseButton 234                             /* irc::output */
328 #define KviOption_boolFrameIsMaximized 235                                     /* internal */
329 #define KviOption_boolPrependNickColorInfoToRealname 236
330 #define KviOption_boolDontShowNotifierIfActiveWindowIsFullScreen 237           /* notifier */
331 #define KviOption_boolWheelScrollsWindowsList 238
332 #define KviOption_boolAcceptMismatchedPortDccResumeRequests 239                /* dcc::send */
333 #define KviOption_boolEnableUrlLinkToolTip 240                                 /* ircview output */
334 #define KviOption_boolEnableHostLinkToolTip 241                                /* ircview output */
335 #define KviOption_boolEnableServerLinkToolTip 242                              /* ircview output */
336 #define KviOption_boolEnableModeLinkToolTip 243                                /* ircview output */
337 #define KviOption_boolEnableNickLinkToolTip 244                                /* ircview output */
338 #define KviOption_boolEnableChannelLinkToolTip 245                             /* ircview output */
339 #define KviOption_boolEnableEscapeLinkToolTip 246                              /* ircview output */
340 #define KviOption_boolUseDBusNotifier 247                                      /* notifier */
341 #define KviOption_boolUseKDENotifier 248                                       /* notifier */
342 #define KviOption_boolCaseSensitiveHighlighting 249                            /* highlight */
343 #define KviOption_boolMinimizeInTray 250                                       /* interface */
344 #define KviOption_boolDisplayNotifierOnPrimaryScreen 251                       /* notifier */
345 #define KviOption_boolShowDialogOnChannelCtcpPage 252
346 #define KviOption_boolPopupNotifierOnNewNotices 253                            /* query */
347 #define KviOption_boolUserListViewUseAwayColor 254                             /* userlist */
348 #define KviOption_boolShowUserFlagForChannelsInWindowList 255
349 #define KviOption_boolEnableCustomCursorWidth 256                              /* interface */
350 #define KviOption_boolShowFavoriteServersOnly 257                              /* connection::ircservers */
351 #define KviOption_boolRequireControlToCopy 258                                 /* interface::ircview */
352 #define KviOption_boolSend64BitAckInDccRecv 259                                /* dcc::send */
353 #define KviOption_boolShowTreeWindowListHandle 260
354 #define KviOption_boolMenuBarVisible 261
355 #define KviOption_boolWarnAboutHidingMenuBar 262
356 #define KviOption_boolWhoRepliesToActiveWindow 263                             /* irc::output */
357 #define KviOption_boolDropConnectionOnSaslFailure 264                          /* connection::advanced */
358 
359 // NOTICE: REUSE EQUIVALENT UNUSED BOOL_OPTION in KviOptions.cpp ENTRIES BEFORE ADDING NEW ENTRIES ABOVE
360 
361 #define KVI_NUM_BOOL_OPTIONS 265
362 
363 #define KVI_STRING_OPTIONS_PREFIX "string"
364 #define KVI_STRING_OPTIONS_PREFIX_LEN 6
365 
366 #define KviOption_stringNickname1 0                                            /* identity */
367 #define KviOption_stringNickname2 1                                            /* identity */
368 #define KviOption_stringNickname3 2                                            /* identity */
369 #define KviOption_stringNickname4 3                                            /* identity */
370 #define KviOption_stringUsername 4                                             /* identity */
371 #define KviOption_stringRealname 5                                             /* identity */
372 #define KviOption_stringLocalHostIp 6                                          /* ?????? This is a fallback one */
373 #define KviOption_stringPartMessage 7                                          /* ircengine::defaultmessages */
374 #define KviOption_stringQuitMessage 8                                          /* ircengine::defaultmessages */
375 #define KviOption_stringUrlHttpCommand 9                                       /* urlhandlers */
376 #define KviOption_stringExtendedPrivmsgPrefix 10                               /* ircengine::outputcontrol::privmsg */
377 #define KviOption_stringExtendedPrivmsgPostfix 11                              /* ircengine::outputcontrol::privmsg */
378 #define KviOption_stringCtcpVersionPostfix 12                                  /* ircengine::ctcp::replies */
379 #define KviOption_stringCtcpUserInfoOther 13                                   /* identity */
380 #define KviOption_stringCtcpSourcePostfix 14                                   /* ircengine::ctcp::replies */
381 #define KviOption_stringUrlFtpCommand 15                                       /* urlhandlers */
382 #define KviOption_stringUrlHttpsCommand 16                                     /* urlhandlers */
383 #define KviOption_stringUrlMailtoCommand 17                                    /* urlhandlers */
384 #define KviOption_stringPreferredMediaPlayer 18                                /* still missing in options ! */
385 #define KviOption_stringUrlFileCommand 19                                      /* urlhandlers */
386 #define KviOption_stringNickCompletionPostfix 20
387 #define KviOption_stringUrlUnknownCommand 21                                   /* urlhandlers */
388 #define KviOption_stringIPv4ConnectionBindAddress 22                           /* connection::transport */
389 #define KviOption_stringIPv6ConnectionBindAddress 23                           /* connection::transport */
390 #define KviOption_stringDccVoiceSoundDevice 24                                 /* dcc::voice */
391 #define KviOption_stringDccVoiceMixerDevice 25                                 /* dcc::voice */
392 #define KviOption_stringAwayMessage 26                                         /* irc::away */
393 #define KviOption_stringIdentdUser 27                                          /* connection::ident */
394 #define KviOption_stringDccListenDefaultInterface 28                           /* dcc::general */
395 #define KviOption_stringCustomAwayNick 29                                      /* ircengine::away */
396 #define KviOption_stringDefaultDccFakeAddress 30                               /* dcc::general */
397 #define KviOption_stringCtcpPageReply 31                                       /* ircengine::ctcp::replies */
398 #define KviOption_stringSSLCertificatePath 32                                  /* ssl */
399 #define KviOption_stringSSLCertificatePass 33                                  /* ssl */
400 #define KviOption_stringSSLPrivateKeyPath 34                                   /* ssl */
401 #define KviOption_stringSSLPrivateKeyPass 35                                   /* ssl */
402 #define KviOption_stringSoundSystem 36                                         /* sound */
403 #define KviOption_stringDefaultUserMode 37
404 #define KviOption_stringLastImageDialogPath 38                                 /* internal */
405 #define KviOption_stringIconThemeSubdir 39
406 #define KviOption_stringIncomingPath 40                                        /* folders */
407 #define KviOption_stringMyAvatar 41
408 #define KviOption_stringDefaultTextEncoding 42                                 /* text encoding */ // empty string means guess from locale
409 #define KviOption_stringWinampTextEncoding 43
410 #define KviOption_stringMp3TagsEncoding 44
411 #define KviOption_stringCtcpUserInfoAge 45                                     /* identity */
412 #define KviOption_stringCtcpUserInfoGender 46                                  /* identity */
413 #define KviOption_stringCtcpUserInfoLocation 47                                /* identity */
414 #define KviOption_stringCtcpUserInfoLanguages 48                               /* identity */
415 #define KviOption_stringWordSplitters 49                                       /* highlight */
416 #define KviOption_stringOnNewQueryOpenedSound 50                               /* sounds */
417 #define KviOption_stringOnHighlightedMessageSound 51                           /* sounds */
418 #define KviOption_stringOnMeKickedSound 52                                     /* sounds */
419 #define KviOption_stringOnQueryMessageSound 53                                 /* sounds */
420 #define KviOption_stringIrcViewTimestampFormat 54
421 #define KviOption_stringPreferredTorrentClient 55                              /* still missing in options ! */
422 #define KviOption_stringDefaultSrvEncoding 56                                  /* server encoding */ // empty string means guess from locale
423 #define KviOption_stringLogsPath 57                                            /* logfolder */
424 #define KviOption_stringLogsDynamicPath 58                                     /* logfolder */
425 #define KviOption_stringLogsExportPath 59                                      /* logview module log export */
426 
427 #define KVI_NUM_STRING_OPTIONS 60
428 
429 #define KVI_STRINGLIST_OPTIONS_PREFIX "stringlist"
430 #define KVI_STRINGLIST_OPTIONS_PREFIX_LEN 10
431 
432 #define KviOption_stringlistHighlightWords 0                                   /* ircengine::outputcontrol::highlighting */
433 #define KviOption_stringlistSpamWords 1                                        /* ircengine::outputcontrol::antispam */
434 #define KviOption_stringlistRecentChannels 2                                   /* internal */
435 #define KviOption_stringlistRecentServers 3                                    /* internal */
436 #define KviOption_stringlistRecentNicknames 4                                  /* internal */
437 #define KviOption_stringlistModuleExtensionToolbars 5                          /* internal */
438 #define KviOption_stringlistImageSearchPaths 6                                 /* ??? */
439 #define KviOption_stringlistRecentIrcUrls 7                                    /* internal */
440 #define KviOption_stringlistSpellCheckerDictionaries 8                         /* spellchecker */
441 
442 #define KVI_NUM_STRINGLIST_OPTIONS 9
443 
444 #define KVI_COLOR_OPTIONS_PREFIX "color"
445 #define KVI_COLOR_OPTIONS_PREFIX_LEN 5
446 
447 #define KviOption_colorWindowListNormalText 0                                  /* look & feel::interface look::WindowList::classic WindowList */
448 #define KviOption_colorWindowListMinimizedText 1                               /* look & feel::interface look::WindowList::classic WindowList */
449 #define KviOption_colorWindowListHighlight1Text 2                              /* look & feel::interface look::WindowList::classic WindowList */
450 #define KviOption_colorWindowListHighlight2Text 3                              /* look & feel::interface look::WindowList::classic WindowList */
451 #define KviOption_colorWindowListProgressBar 4                                 /* look & feel::interface look::WindowList::classic WindowList */
452 #define KviOption_colorUserListViewAwayForeground 5                            /* look & feel::interface look::userlist */
453 #define KviOption_colorUserListViewOwnForeground 6                             /* look & feel::interface look::userlist */
454 #define KviOption_colorUserListViewIrcOpForeground 7                           /* look & feel::interface look::userlist */
455 #define KviOption_colorNotifierBackground 8                                    /* look & feel::interface look::notifier */
456 #define KviOption_colorNotifierForeground 9                                    /* look & feel::interface look::notifier */
457 #define KviOption_colorNotifierTitleForeground 10                              /* look & feel::interface look::notifier */
458 #define KviOption_colorIrcViewBackground 11                                    /* look & feel::interface look::ircview */
459 #define KviOption_colorInputBackground 12                                      /* look & feel::interface look::input */
460 #define KviOption_colorInputSelectionBackground 13                             /* look & feel::interface look::input */
461 #define KviOption_colorInputSelectionForeground 14                             /* look & feel::interface look::input */
462 #define KviOption_colorInputCursor 15                                          /* look & feel::interface look::input */
463 #define KviOption_colorInputControl 16                                         /* look & feel::interface look::input */
464 #define KviOption_colorInputForeground 17                                      /* look & feel::interface look::input */
465 #define KviOption_colorUserListViewBackground 18                               /* look & feel::interface look::userlist */
466 #define KviOption_colorUserListViewOpForeground 19                             /* look & feel::interface look::userlist */
467 #define KviOption_colorUserListViewVoiceForeground 20                          /* look & feel::interface look::userlist */
468 #define KviOption_colorUserListViewNormalForeground 21                         /* look & feel::interface look::userlist */
469 #define KviOption_colorUserListViewSelectionBackground 22                      /* look & feel::interface look::userlist */
470 #define KviOption_colorUserListViewSelectionForeground 23                      /* look & feel::interface look::userlist */
471 #define KviOption_colorLabelBackground 24                                      /* look & feel::interface look::topic label */
472 #define KviOption_colorLabelForeground 25                                      /* look & feel::interface look::topic label */
473 #define KviOption_colorGlobalTransparencyFade 26                               /* look & feel::interface look */
474 #define KviOption_colorIrcToolBarAppletBackground 27                           /* theme::tool bar applets */
475 #define KviOption_colorIrcToolBarAppletBorder 28                               /* theme::tool bar applets */
476 #define KviOption_colorIrcToolBarAppletFont 29                                 /* theme::tool bar applets */
477 #define KviOption_colorTreeWindowListBackground 30                             /* look & feel::interface look::WindowList::tree WindowList */
478 #define KviOption_colorTreeWindowListActiveBackground 31                       /* look & feel::interface look::WindowList::tree WindowList */
479 #define KviOption_colorTreeWindowListForeground 32                             /* look & feel::interface look::WindowList::tree WindowList */
480 #define KviOption_colorTreeWindowListActiveForeground 33                       /* look & feel::interface look::WindowList::tree WindowList */
481 #define KviOption_colorTreeWindowListHighlight1Foreground 34                   /* look & feel::interface look::WindowList::tree WindowList */
482 #define KviOption_colorTreeWindowListHighlight2Foreground 35                   /* look & feel::interface look::WindowList::tree WindowList */
483 #define KviOption_colorTreeWindowListProgress 36                               /* look & feel::interface look::WindowList::tree WindowList */
484 #define KviOption_colorUserListViewHalfOpForeground 37                         /* look & feel::interface look::userlist */
485 #define KviOption_colorWindowListHighlight3Text 38                             /* look & feel::interface look::WindowList::classic WindowList */
486 #define KviOption_colorWindowListHighlight4Text 39                             /* look & feel::interface look::WindowList::classic WindowList */
487 #define KviOption_colorWindowListHighlight5Text 40                             /* look & feel::interface look::WindowList::classic WindowList */
488 #define KviOption_colorTreeWindowListHighlight3Foreground 41                   /* look & feel::interface look::WindowList::tree WindowList */
489 #define KviOption_colorTreeWindowListHighlight4Foreground 42                   /* look & feel::interface look::WindowList::tree WindowList */
490 #define KviOption_colorTreeWindowListHighlight5Foreground 43                   /* look & feel::interface look::WindowList::tree WindowList */
491 #define KviOption_colorUserListViewChanAdminForeground 44                      /* look & feel::interface look::userlist */
492 #define KviOption_colorUserListViewUserOpForeground 45                         /* look & feel::interface look::userlist */
493 #define KviOption_colorUserListViewGrid 46                                     /* look & feel::interface look::userlist */
494 #define KviOption_colorUserListViewChanOwnerForeground 47                      /* look & feel::interface look::userlist */
495 #define KviOption_colorIrcViewMarkLine 48                                      /* look & feel::interface look::ircvew */
496 
497 #define KVI_NUM_COLOR_OPTIONS 49
498 
499 #define KVI_PIXMAP_OPTIONS_PREFIX "pixmap"
500 #define KVI_PIXMAP_OPTIONS_PREFIX_LEN 6
501 
502 #define KviOption_pixmapIrcViewBackground 0                                    /* interface::look::components::ircview */
503 #define KviOption_pixmapInputBackground 1                                      /* interface::look::components::input */
504 #define KviOption_pixmapUserListViewBackground 2                               /* look & feel::interface look::userlist */
505 #define KviOption_pixmapLabelBackground 3                                      /* look & feel::interface look::topic label */
506 #define KviOption_pixmapMyAvatar 4                                             /* identity */
507 #define KviOption_pixmapIrcToolBarAppletBackground 5                           /* theme::tool bar applets */
508 #define KviOption_pixmapTreeWindowListBackground 6                             /* look & feel::interface look::WindowList::tree WindowList */
509 #define KviOption_pixmapGlobalTransparencyBackground 7                         /* theme::transparency */
510 #define KviOption_pixmapNotifierBackground 8                                   /* interface::look::components::notifier */
511 
512 #define KVI_NUM_PIXMAP_OPTIONS 9
513 
514 #define KVI_UINT_OPTIONS_PREFIX "uint"
515 #define KVI_UINT_OPTIONS_PREFIX_LEN 4
516 
517 #define KviOption_uintIrcSocketTimeout 0                                       /* connection::transport */
518 #define KviOption_uintModuleCleanupTimerInterval 1
519 #define KviOption_uintModuleCleanupTimeout 2
520 #define KviOption_uintMaxCtcpRequests 3                                        /* ircengine::ctcp */
521 #define KviOption_uintCtcpFloodCheckInterval 4                                 /* ircengine::ctcp */
522 #define KviOption_uintTotalConnectionTime 5
523 #define KviOption_uintDccSocketTimeout 6                                       /* dcc::general */
524 #define KviOption_uintDccSendIdleStepInMSec 7                                  /* dcc::send */
525 #define KviOption_uintDccSendPacketSize 8                                      /* dcc::send */
526 #define KviOption_uintGlobalTransparencyParentFadeFactor 9                     /* interface::look::general */
527 #define KviOption_uintGlobalTransparencyChildFadeFactor 10                     /* interface::look::general */
528 #define KviOption_uintNotifyListCheckTimeInSecs 11                             /* notify */
529 #define KviOption_uintSocketQueueFlushTimeout 12                               /* connection::transport */
530 #define KviOption_uintOutgoingTrafficLimitUSeconds 13                          /* connection::transport */
531 #define KviOption_uintNotifyListIsOnDelayTimeInSecs 14                         /* notify */
532 #define KviOption_uintNotifyListUserhostDelayTimeInSecs 15                     /* notify */
533 #define KviOption_uintTreeWindowListMinimumWidth 16                            /* ?? interface::general ?? */
534 #define KviOption_uintAvatarOfferTimeoutInSecs 17                              /* irc::ctcp::avatar */
535 #define KviOption_uintIrcViewMaxBufferSize 18                                  /* interface::features::components::ircview */
536 #define KviOption_uintIrcViewToolTipTimeoutInMsec 19                           /* interface::features::components::ircview */
537 #define KviOption_uintIrcViewToolTipHideTimeoutInMsec 20                       /* interface::features::components::ircview */
538 #define KviOption_uintDccVoicePreBufferSize 21                                 /* dcc::voice */
539 #define KviOption_uintIdentdPort 22                                            /* connection::ident */
540 #define KviOption_uintAvatarScaleWidth 23                                      /* ctcp::avatar */
541 #define KviOption_uintAvatarScaleHeight 24                                     /* ctcp::avatar */
542 #define KviOption_uintDccMinPort 25                                            /* dcc::general */
543 #define KviOption_uintDccMaxPort 26                                            /* dcc::general */
544 #define KviOption_uintSoundOfferTimeoutInSecs 27
545 #define KviOption_uintMaximumRequestedAvatarSize 28                            /* ctcp::avatar */
546 #define KviOption_uintGlobalWindowOpacityPercent 29
547 #define KviOption_uintPasteDelay 30
548 #define KviOption_uintMaxDccSendTransfers 31                                   /* dcc transfers */ // 0 = unlimited!
549 #define KviOption_uintMaxDccSlots 32                                           /* dcc transfers */ // 0 = unlimited slots = windows
550 #define KviOption_uintTileMethod 33                                            /* internal ? */
551 #define KviOption_uintLagMeterHeartbeat 34
552 #define KviOption_uintLagAlarmTime 35
553 #define KviOption_uintWindowListButtonMinWidth 36                              /* interface::look::WindowList::classic WindowList */
554 #define KviOption_uintOutputVerbosityLevel 37                                  // follows the verbosity constants defined below
555 #define KviOption_uintIrcContextAppletWidth 38                                 /* internal */
556 #define KviOption_uintMinHighlightLevel 39                                     /* look::interface::features::output */
557 #define KviOption_uintUserListViewGridType 40                                  /* look&feel::ircview */
558 #define KviOption_uintWindowListMaximumRows 41                                 /* interface::look::WindowList::classic WindowList */
559 #define KviOption_uintMaxAutoReconnectAttempts 42                              /* connection */// 0 = unlimited attempts
560 #define KviOption_uintAutoReconnectDelay 43                                    /* connection */
561 #define KviOption_uintMaxDccSendSpeed 44                                       /* dcc::file transfers */
562 #define KviOption_uintMaxDccRecvSpeed 45                                       /* dcc::file transfers */
563 #define KviOption_uintTimeStampForeground 46
564 #define KviOption_uintTimeStampBackground 47
565 #define KviOption_uintUserExperienceLevel 48
566 #define KviOption_uintClassicWindowListMaximumButtonWidth 49
567 #define KviOption_uintDefaultBanType 50
568 #define KviOption_uintIrcViewPixmapAlign 51
569 #define KviOption_uintUserListPixmapAlign 52
570 #define KviOption_uintToolBarAppletPixmapAlign 53
571 #define KviOption_uintTreeWindowListPixmapAlign 54
572 #define KviOption_uintInputPixmapAlign 55
573 #define KviOption_uintAutoFlushLogs 56
574 #define KviOption_uintMinTrayLowLevelMessage 57
575 #define KviOption_uintMinTrayHighLevelMessage 58
576 #define KviOption_uintIdentdOutputMode 59
577 #define KviOption_uintScaleAvatarsOnLoadHeight 60
578 #define KviOption_uintScaleAvatarsOnLoadWidth 61
579 #define KviOption_uintNotifierActiveTransparency 62
580 #define KviOption_uintNotifierInactiveTransparency 63
581 #define KviOption_uintIrcViewMarkerStyle 64
582 #define KviOption_uintIrcViewMarkerSize 65
583 #define KviOption_uintUrlMouseClickNum 66
584 #define KviOption_uintNotifierAutoHideTime 67
585 #define KviOption_uintLinesToPasteOnChannelJoin 68                            /* channel */
586 #define KviOption_uintDaysIntervalToPasteOnChannelJoin 69                     /* channel */
587 #define KviOption_uintLinesToPasteOnQueryJoin 70                              /* query */
588 #define KviOption_uintDaysIntervalToPasteOnQueryJoin 71                       /* query */
589 #define KviOption_uintSpacesToExpandTabulationInput 72                        /* number of spaces used in tabulation expansion in the inputbar */
590 #define KviOption_uintUserIrcViewOwnForeground 73                             /* look & feel::ircview */
591 #define KviOption_uintUserIrcViewOwnBackground 74                             /* look & feel::ircview */
592 #define KviOption_uintNotifierPixmapAlign 75
593 #define KviOption_uintOutputDatetimeFormat 76                                 /* irc::verbosity */
594 #define KviOption_uintOnJoinRequestsDelay 77
595 #define KviOption_uintToolBarIconSize 78
596 #define KviOption_uintToolBarButtonStyle 79
597 #define KviOption_uintMaximumBlowFishKeySize 80
598 #define KviOption_uintCustomCursorWidth 81                                    /* Interface */
599 #define KviOption_uintUserListMinimumWidth 82
600 
601 #define KVI_NUM_UINT_OPTIONS 83
602 
603 namespace KviIdentdOutputMode
604 {
605 	enum Mode
606 	{
607 		Quiet = 0,
608 		ToConsole = 1,
609 		ToActiveWindow = 2
610 	};
611 }
612 
613 #define KVI_FONT_OPTIONS_PREFIX "font"
614 #define KVI_FONT_OPTIONS_PREFIX_LEN 4
615 
616 #define KviOption_fontIrcView 0                                              /* interface::look::components::ircview */
617 #define KviOption_fontInput 1                                                /* interface::look::components::input */
618 #define KviOption_fontUserListView 2                                         /* look & feel::interface look::userlist */
619 #define KviOption_fontLabel 3                                                /* look & feel::interface look::topic label */
620 #define KviOption_fontApplication 4                                          /* interface::look::global */
621 #define KviOption_fontWindowList 5                                           /* interface::look::WindowList::classic WindowList */
622 #define KviOption_fontTreeWindowList 6                                       /* interface::look::WindowList::tree WindowList */
623 #define KviOption_fontNotifier 7                                             /* interface::look::components::notifier */
624 #define KviOption_fontNotifierTitle 8                                        /* interface::look::components::notifier */
625 
626 #define KVI_NUM_FONT_OPTIONS 9
627 
628 #define KVI_ICCOLOR_OPTIONS_PREFIX "iccolor"
629 #define KVI_ICCOLOR_OPTIONS_PREFIX_LEN 7
630 
631 #define KVI_NUM_ICCOLOR_OPTIONS 8
632 
633 // indices declared in kvi_out.h
634 #define KVI_MSGTYPE_OPTIONS_PREFIX "msgtype"
635 #define KVI_MSGTYPE_OPTIONS_PREFIX_LEN 7
636 
637 #define KVI_NUM_MSGTYPE_OPTIONS 149
638 
639 #define KVI_MIRCCOLOR_OPTIONS_PREFIX "mirccolor"
640 #define KVI_MIRCCOLOR_OPTIONS_PREFIX_LEN 9
641 
642 #define KVI_NUM_MIRCCOLOR_OPTIONS (KVI_MIRCCOLOR_MAX+1)
643 
644 // external declaration of the tables
645 extern KVIRC_API KviBoolOption g_boolOptionsTable[KVI_NUM_BOOL_OPTIONS];
646 extern KVIRC_API KviRectOption g_rectOptionsTable[KVI_NUM_RECT_OPTIONS];
647 extern KVIRC_API KviStringOption g_stringOptionsTable[KVI_NUM_STRING_OPTIONS];
648 extern KVIRC_API KviColorOption g_colorOptionsTable[KVI_NUM_COLOR_OPTIONS];
649 extern KVIRC_API KviPixmapOption g_pixmapOptionsTable[KVI_NUM_PIXMAP_OPTIONS];
650 //	extern KviIntOption        g_intOptionsTable[KVI_NUM_INT_OPTIONS];
651 extern KVIRC_API KviUIntOption g_uintOptionsTable[KVI_NUM_UINT_OPTIONS];
652 extern KVIRC_API KviFontOption g_fontOptionsTable[KVI_NUM_FONT_OPTIONS];
653 extern KVIRC_API KviMessageTypeSettingsOption g_msgtypeOptionsTable[KVI_NUM_MSGTYPE_OPTIONS];
654 extern KVIRC_API KviColorOption g_mirccolorOptionsTable[KVI_NUM_MIRCCOLOR_OPTIONS];
655 extern KVIRC_API KviColorOption g_iccolorOptionsTable[KVI_NUM_ICCOLOR_OPTIONS];
656 extern KVIRC_API KviStringListOption g_stringlistOptionsTable[KVI_NUM_STRINGLIST_OPTIONS];
657 
658 // __this is how we access the options from outside
659 #define KVI_OPTION_BOOL(_idx) g_boolOptionsTable[_idx].option
660 #define KVI_OPTION_RECT(_idx) g_rectOptionsTable[_idx].option
661 #define KVI_OPTION_STRING(_idx) g_stringOptionsTable[_idx].option
662 #define KVI_OPTION_COLOR(_idx) g_colorOptionsTable[_idx].option
663 #define KVI_OPTION_PIXMAP(_idx) g_pixmapOptionsTable[_idx].option
664 #define KVI_OPTION_UINT(_idx) g_uintOptionsTable[_idx].option
665 #define KVI_OPTION_FONT(_idx) g_fontOptionsTable[_idx].option
666 #define KVI_OPTION_MSGTYPE(_idx) g_msgtypeOptionsTable[_idx].option
667 #define KVI_OPTION_MIRCCOLOR(_idx) g_mirccolorOptionsTable[_idx].option
668 #define KVI_OPTION_STRINGLIST(_idx) g_stringlistOptionsTable[_idx].option
669 #define KVI_OPTION_ICCOLOR(_idx) g_iccolorOptionsTable[_idx].option
670 
getMircColor(unsigned int index)671 inline QColor getMircColor(unsigned int index)
672 {
673 	// Use inline function (instead of macro) to avoid evaluating index more than once.
674 	if (index <= KVI_MIRCCOLOR_MAX)
675 		return KVI_OPTION_MIRCCOLOR(index);
676 	if (index <= KVI_EXTCOLOR_MAX)
677 		return KviControlCodes::getExtendedColor(index);
678 	return QColor(); // invalid color (isValid returns false)
679 }
680 
681 // Verbosity constants
682 #define KVI_VERBOSITY_LEVEL_MUTE 0
683 #define KVI_VERBOSITY_LEVEL_QUIET 1
684 #define KVI_VERBOSITY_LEVEL_NORMAL 2
685 #define KVI_VERBOSITY_LEVEL_VERBOSE 3
686 #define KVI_VERBOSITY_LEVEL_PARANOIC 4
687 
688 #define _OUTPUT_PARANOIC (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) >= KVI_VERBOSITY_LEVEL_PARANOIC)
689 #define _OUTPUT_VERBOSE (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) >= KVI_VERBOSITY_LEVEL_VERBOSE)
690 #define _OUTPUT_QUIET (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) <= KVI_VERBOSITY_LEVEL_QUIET)
691 #define _OUTPUT_MUTE (KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) <= KVI_VERBOSITY_LEVEL_MUTE)
692 
693 #define START_TABLE_BOLD_ROW "<tr><td style=\"background-color: rgb(48,48,48); font-weight: bold; color: rgb(255,255,255); padding-left: 5px; padding-right: 5px;\">"
694 #define END_TABLE_BOLD_ROW "</td></tr>"
695 #define START_TABLE_NORMAL_ROW "<tr><td>"
696 
697 #define SET_ANTI_ALIASING(p) (p).setRenderHint(QPainter::TextAntialiasing);
698 
699 #define KVI_RECENT_CHANNELS_SEPARATOR ":"
700 
701 #if defined(_KVI_OPTIONS_CPP_) || defined(_WANT_OPTION_FLAGS_)
702 // flag definitions
703 // section of the config file (rightmost 8 bits)
704 #define KviOption_sectFlagNone 0
705 #define KviOption_sectFlagFrame 1
706 #define KviOption_sectFlagMdi 2
707 #define KviOption_sectFlagWindows 3
708 #define KviOption_sectFlagWindowList 4
709 #define KviOption_sectFlagIrcView 5
710 #define KviOption_sectFlagMsgType 6
711 #define KviOption_sectFlagMircColor 7
712 #define KviOption_sectFlagInput 8
713 #define KviOption_sectFlagUserParser 9
714 #define KviOption_sectFlagConnection 10
715 #define KviOption_sectFlagIrcSocket 11
716 #define KviOption_sectFlagUser 12
717 #define KviOption_sectFlagUserListView 13
718 #define KviOption_sectFlagLabel 14
719 #define KviOption_sectFlagModules 15
720 #define KviOption_sectFlagCtcp 16
721 #define KviOption_sectFlagDcc 17
722 #define KviOption_sectFlagGui 18
723 #define KviOption_sectFlagIrcToolBar 19
724 #define KviOption_sectFlagLogging 20
725 #define KviOption_sectFlagAntiSpam 21
726 #define KviOption_sectFlagAvatar 22
727 #define KviOption_sectFlagUrl 23
728 #define KviOption_sectFlagRecent 24
729 #define KviOption_sectFlagGeometry 25
730 #define KviOption_sectFlagNotifier 26
731 
732 #define KVI_NUM_OPTION_SECT_FLAGS 27
733 
734 #define KviOption_sectMask 255
735 
736 // other logical groupings of options
737 #define KviOption_groupTheme (1 << 8)
738 
739 #define KviOption_groupMask (255 << 8)
740 
741 // actions to take when an option is set
742 #define KviOption_resetNone 0
743 #define KviOption_resetUpdateNotifier (1 << 16)
744 #define KviOption_resetUpdateGui (1 << 17)
745 #define KviOption_resetUpdateWindowList (1 << 18)
746 #define KviOption_resetUpdateAppFont (1 << 19)
747 #define KviOption_resetUpdatePseudoTransparency (1 << 20)
748 #define KviOption_resetRestartNotifyList (1 << 21)
749 #define KviOption_resetRestartIdentd (1 << 22)
750 #define KviOption_resetReloadImages (1 << 23)
751 #define KviOption_resetRestartLagMeter (1 << 24)
752 #define KviOption_resetRecentChannels (1 << 25)
753 
754 #define KviOption_resetMask (~(KviOption_sectMask | KviOption_groupMask))
755 
756 //for file paths
757 #define KviOption_encodePath (1 << 25)
758 #endif
759 
760 #endif //_KVI_OPTIONS_H_
761