OptionsWidget_connectionSocket::OptionsWidget_connectionSocket(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("transport_options_widget"); createLayout(); KviUIntSelector * u; KviTalGroupBox * g; KviBoolSelector * b; KviStringSelector * s; g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Timeout Values", "options")); u = addUIntSelector(g, __tr2qs_ctx("Connect timeout:", "options"), KviOption_uintIrcSocketTimeout, 5, 6000, 60); u->setSuffix(__tr2qs_ctx(" sec", "options")); u = addUIntSelector(g, __tr2qs_ctx("Outgoing data queue flush timeout:", "options"), KviOption_uintSocketQueueFlushTimeout, 100, 2000, 500); u->setSuffix(__tr2qs_ctx(" msec", "options")); b = addBoolSelector(0, 1, 0, 1, __tr2qs_ctx("Limit outgoing traffic per connection", "options"), KviOption_boolLimitOutgoingTraffic); u = addUIntSelector(0, 2, 0, 2, __tr2qs_ctx("Limit to 1 message every:", "options"), KviOption_uintOutgoingTrafficLimitUSeconds, 10000, 2000000, 10000001, KVI_OPTION_BOOL(KviOption_boolLimitOutgoingTraffic)); u->setSuffix(__tr2qs_ctx(" usec", "options")); mergeTip(u, __tr2qs_ctx("Minimum value: <b>10000 usec</b><br>Maximum value: <b>10000000 usec</b>", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); g = addGroupBox(0, 3, 0, 3, Qt::Horizontal, __tr2qs_ctx("Network Interfaces", "options")); b = addBoolSelector(g, __tr2qs_ctx("Bind IPv4 connections to:", "options"), KviOption_boolBindIrcIPv4ConnectionsToSpecifiedAddress); s = addStringSelector(g, "", KviOption_stringIPv4ConnectionBindAddress, KVI_OPTION_BOOL(KviOption_boolBindIrcIPv4ConnectionsToSpecifiedAddress)); connect(b, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool))); #ifdef COMPILE_IPV6_SUPPORT b = addBoolSelector(g, __tr2qs_ctx("Bind IPv6 connections to:", "options"), KviOption_boolBindIrcIPv6ConnectionsToSpecifiedAddress); s = addStringSelector(g, "", KviOption_stringIPv6ConnectionBindAddress, KVI_OPTION_BOOL(KviOption_boolBindIrcIPv6ConnectionsToSpecifiedAddress)); connect(b, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool))); #endif //!COMPILE_IPV6_SUPPORT b = addBoolSelector(0, 4, 0, 4, __tr2qs_ctx("Pick random IP address for round-robin servers", "options"), KviOption_boolPickRandomIpAddressForRoundRobinServers); mergeTip(b, __tr2qs_ctx("This option will cause the KVIrc networking stack to pick up " "a random entry when multiple IP address are retrieved for a server " "DNS lookup. This is harmless and can fix some problems with caching " "DNS servers that do not properly rotate the records as the authoritative " "ones would do. On the other hand, you might want to disable it if " "you want to rely on the DNS server to provide the best choice.", "options")); b = addBoolSelector(0, 5, 0, 5, __tr2qs_ctx("Drop connection on SASL authentication failure", "options"), KviOption_boolDropConnectionOnSaslFailure); mergeTip(b, __tr2qs_ctx("This option will close the socket if no SASL authentication or any SASL fallback had succeeded.", "options")); addRowSpacer(0, 6, 0, 6); }
OptionsWidget_windowList::OptionsWidget_windowList(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("windowlist_options_widget"); createLayout(); KviTalHBox * hbox = new KviTalHBox(this); QLabel * l = new QLabel(__tr2qs_ctx("Window list type:", "options"), hbox); m_pWindowListType = new QComboBox(hbox); m_pWindowListType->addItem(__tr2qs_ctx("Tree", "options")); m_pWindowListType->addItem(__tr2qs_ctx("Classic", "options")); m_pWindowListType->setCurrentIndex(KVI_OPTION_BOOL(KviOption_boolUseTreeWindowList) ? 0 : 1); addWidgetToLayout(hbox, 0, 0, 0, 0); addBoolSelector(0, 1, 0, 1, __tr2qs_ctx("Sort windows by name", "options"), KviOption_boolSortWindowListItemsByName); addBoolSelector(0, 2, 0, 2, __tr2qs_ctx("Show window icons in window list", "options"), KviOption_boolUseWindowListIcons); KviBoolSelector * b = addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Show activity meter in window list", "options"), KviOption_boolUseWindowListActivityMeter); mergeTip(b, __tr2qs_ctx("This option enables the usage of the window list activity meter. " "Each window entry will have a small indicator of the activity that is going on in that window. " "The indicator is a small square that changes colors, dark colors mean low activity, " "while bright colors signal high activity. KVIrc also uses some heuristics to determine " "whether the activity is somewhat \"human\" or it is generated by automated entities (such as bots " "or IRC servers). \"Human\" activity causes the indicator to be shaded red while automated " "activity causes the indicator to be shaded blue.", "options")); addBoolSelector(0, 4, 0, 4, __tr2qs_ctx("Show IRC context indicator in window list", "options"), KviOption_boolUseWindowListIrcContextIndicator); addBoolSelector(0, 5, 0, 5, __tr2qs_ctx("Enable window tooltips", "options"), KviOption_boolShowWindowListToolTips); addBoolSelector(0, 6, 0, 6, __tr2qs_ctx("Allow the window list to be moved", "options"), KviOption_boolShowTreeWindowListHandle); addBoolSelector(0, 7, 0, 7, __tr2qs_ctx("Show user flag for channels", "options"), KviOption_boolShowUserFlagForChannelsInWindowList); addRowSpacer(0, 8, 0, 8); }
OptionsWidget_dccSendGeneral::OptionsWidget_dccSendGeneral(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("dccsend_options_widget"); createLayout(); KviBoolSelector * b; KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Incoming File","options")); KviBoolSelector * b2 = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccSend); KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Open transfer window as minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccSendWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccSend)); KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Automatically resume when auto-accepted","options"),KviOption_boolAutoResumeDccSendWhenAutoAccepted,KVI_OPTION_BOOL(KviOption_boolAutoAcceptDccSend)); g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Save Location","options")); addDirectorySelector(g,__tr2qs_ctx("Download folder:","options"),KviOption_stringIncomingPath); addBoolSelector(g,__tr2qs_ctx("Sort saved files by nicknames (create subfolders)","options"),KviOption_boolSortReceivedByDccFilesByNicks); addBoolSelector(g,__tr2qs_ctx("Guess save path from media type","options"),KviOption_boolUseIncomingDccMediaTypeSavePath); g = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("On Download Completion","options")); addBoolSelector(g,__tr2qs_ctx("Notify completion in console","options"),KviOption_boolNotifyDccSendSuccessInConsole); addBoolSelector(g,__tr2qs_ctx("Notify completion in notifier","options"),KviOption_boolNotifyDccSendSuccessInNotifier); b = addBoolSelector(g,__tr2qs_ctx("Automatically clear transfer","options"),KviOption_boolAutoCloseDccSendOnSuccess); mergeTip(b, __tr2qs_ctx("<center>This option will cause successfully terminated transfers " \ "to be automatically removed from the transfer window.</center>","options")); KviBoolSelector * b1 = addBoolSelector(0,3,0,3,__tr2qs_ctx("Always open transfer window as minimized","options"),KviOption_boolCreateMinimizedDccSend); connect(b1,SIGNAL(toggled(bool)),b3,SLOT(setNotEnabled(bool))); connect(b2,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool))); addRowSpacer(0,4,0,4); }
OptionsWidget_uparser::OptionsWidget_uparser(QWidget * parent) : KviOptionsWidget(parent,"uparser_options_widget") { createLayout(); KviBoolSelector * b; addBoolSelector(0,0,0,0,__tr2qs_ctx("Disable parser warnings","options"),KviOption_boolAvoidParserWarnings); addBoolSelector(0,1,0,1,__tr2qs_ctx("Disable broken event handlers","options"),KviOption_boolDisableBrokenEventHandlers); addBoolSelector(0,2,0,2,__tr2qs_ctx("Kill broken timers","options"),KviOption_boolKillBrokenTimers); addBoolSelector(0,3,0,3,__tr2qs_ctx("Send unknown commands as /RAW","options"),KviOption_boolSendUnknownCommandsAsRaw); addSeparator(0,4,0,4); addBoolSelector(0,5,0,5,__tr2qs_ctx("Automatically unload unused modules","options"),KviOption_boolCleanupUnusedModules); addBoolSelector(0,6,0,6,__tr2qs_ctx("Ignore module versions (dangerous)","options"),KviOption_boolIgnoreModuleVersions); addSeparator(0,7,0,7); b = addBoolSelector(0,8,0,8,__tr2qs_ctx("Relay errors and warnings to debug window","options"),KviOption_boolScriptErrorsToDebugWindow); mergeTip(b, __tr2qs_ctx("<center>This option will show the script errors and warnings " \ "also in the special debug window. This makes tracking of scripts that might " \ "be running in several windows far easier. The messages in the debug window " \ "also contain a deeper call stack which will help you identifying the " \ "scripting problems.</center>","options") ); addBoolSelector(0,9,0,9,__tr2qs_ctx("Create minimized debug window","options"),KviOption_boolShowMinimizedDebugWindow); addRowSpacer(0,10,0,10); }
OptionsWidget_channelGeneral::OptionsWidget_channelGeneral(QWidget * pParent) : KviOptionsWidget(pParent) { createLayout(); KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Channel Kick","options")); KviBoolSelector *b = addBoolSelector(g,__tr2qs_ctx("Rejoin channel","options"),KviOption_boolRejoinChannelOnKick); mergeTip(b, __tr2qs_ctx("<center>This option will cause KVIrc to attempt " \ "to rejoin a channel after being kicked.</center>","options")); b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnKick); mergeTip(b, __tr2qs_ctx("<center>This option will cause KVIrc to keep " \ "the channel window open after being kicked.<br>" \ "It might be a good idea to also enable the " \ "\"Rejoin channel\" option.</center>","options")); g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("On Channel Part","options")); b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnPart); mergeTip(b, __tr2qs_ctx("<center>This option will cause KVIrc to keep " \ "the channel window open after leaving it.</center>","options")); b = addBoolSelector(0,2,0,2,__tr2qs_ctx("Automatically join channel on invite","options"),KviOption_boolAutoJoinOnInvite); mergeTip(b, __tr2qs_ctx("<center>This option will cause KVIrc to automatically " \ "join a channel when an INVITE message for that channel is received.<br>" \ "<b>Warning:</b> This may help spammers harass you. :)</center>","options")); b = addBoolSelector(0,3,0,3, __tr2qs_ctx("Always open channels as minimized","options"),KviOption_boolCreateMinimizedChannels); mergeTip(b, __tr2qs_ctx("<center>This option causes newly created " \ "channel windows to be immediately minimized.<br>" \ "Enable this if you don't like channels " \ "popping up while you're typing something in a channel. :D</center>","options")); addRowSpacer(0,4,0,4); }
OptionsWidget_channelGeneral::OptionsWidget_channelGeneral(QWidget * pParent) : KviOptionsWidget(pParent) { createLayout(); KviTalGroupBox * g; KviBoolSelector * b; g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("On Channel Kick", "options")); b = addBoolSelector(g, __tr2qs_ctx("Rejoin channel", "options"), KviOption_boolRejoinChannelOnKick); mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to attempt " "to rejoin a channel after being kicked.", "options")); b = addBoolSelector(g, __tr2qs_ctx("Keep channel open", "options"), KviOption_boolKeepChannelOpenOnKick); mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to keep " "the channel window open after being kicked. " "It might be a good idea to also enable the " "\"Rejoin channel\" option.", "options")); g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("On Channel Part", "options")); b = addBoolSelector(g, __tr2qs_ctx("Keep channel open", "options"), KviOption_boolKeepChannelOpenOnPart); mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to keep " "the channel window open after leaving it.", "options")); b = addBoolSelector(0, 2, 0, 2, __tr2qs_ctx("Automatically join channel on invite", "options"), KviOption_boolAutoJoinOnInvite); mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to automatically " "join a channel when an INVITE message for that channel is received.<br>" "<b>Warning:</b> this may help spammers harass you.", "options")); b = addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Open channel windows without focus", "options"), KviOption_boolCreateMinimizedChannels); mergeTip(b, __tr2qs_ctx("This option prevents newly created " "channel windows from diverting application focus.<br>" "Enable this if you don't like channel windows " "popping up while you're typing something in a channel.", "options")); addRowSpacer(0, 4, 0, 4); }
OptionsWidget_dccGeneral::OptionsWidget_dccGeneral(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("dccgeneral_options_widget"); createLayout(); KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Use workaround for firewall","options"),KviOption_boolCantAcceptIncomingDccConnections); mergeTip(b,__tr2qs_ctx("<center>Enable this option if you can't accept incoming connections.<br>" \ "KVIrc will try to use different methods to send and receive files.<br>" \ "Please note that these methods may NOT work when communicating with a non-KVIrc client.</center>","options")); addRowSpacer(0,1,0,1); }
OptionsWidget_lag::OptionsWidget_lag(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("lag_options_widget"); createLayout(); KviBoolSelector * pUse = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable lag meter","options"), KviOption_boolUseLagMeterEngine); mergeTip(pUse,__tr2qs_ctx("<center>This enables the lag meter engine, which checks at regular intervals how much lag (latency) the server has.</center>","options")); KviTalGroupBox *g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); KviUIntSelector * pInterval = addUIntSelector(g, __tr2qs_ctx("Lag meter heartbeat:","options"),KviOption_uintLagMeterHeartbeat,2000,10000,5000,KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); pInterval->setSuffix(__tr2qs_ctx(" msec","options")); mergeTip(pInterval, __tr2qs_ctx("<center>This option allows you to set the lag meter heartbeat interval.<br>" \ "The lower the heartbeat interval the higher will be the accuracy of the lag check " \ "but also higher cpu usage and data traffic to the server.<br>" \ "Please note that this is NOT the interval between pings sent to the server: " \ "the pings (if any) will be sent really less often. " \ "5000 is a reasonable value.</center>","options")); connect(pUse,SIGNAL(toggled(bool)),pInterval,SLOT(setEnabled(bool))); KviUIntSelector * pAlarm = addUIntSelector(g, __tr2qs_ctx("Trigger event if lag exceeds:","options"), KviOption_uintLagAlarmTime,5000,1000000,30000, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); pAlarm->setSuffix(__tr2qs_ctx(" msec","options")); mergeTip(pAlarm,__tr2qs_ctx("<center>This option controls the threshold for the " \ "OnLagAlarmTimeUp and OnLagAlarmTimeDown events. When the lag goes above " \ "the threshold OnLagAlarmTimeUp will be triggered and when the lag falls " \ "back below the threshold then OnLagAlarmTimeDown will be triggered</center>","options")); connect(pUse,SIGNAL(toggled(bool)),pAlarm,SLOT(setEnabled(bool))); KviBoolSelector * pShow = addBoolSelector(g, __tr2qs_ctx("Show lag in IRC context display","options"), KviOption_boolShowLagOnContextDisplay, KVI_OPTION_BOOL(KviOption_boolUseLagMeterEngine)); mergeTip(pShow,__tr2qs_ctx("<center>This makes the IRC context display applet show the current lag after the user's nickname (in seconds)</center>","options")); connect(pUse,SIGNAL(toggled(bool)),pShow,SLOT(setEnabled(bool))); connect(pUse,SIGNAL(toggled(bool)),g,SLOT(setEnabled(bool))); addRowSpacer(0,2,0,2); }
OptionsWidget_tray::OptionsWidget_tray(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("tray_options_widget"); createLayout(); m_pEnable = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable tray icon","options"), KviOption_boolShowDockExtension); #ifndef COMPILE_ON_MAC m_pMinimizeInTray = addBoolSelector(0,1,0,1,__tr2qs_ctx("Minimize in tray","options"),KviOption_boolMinimizeInTray); #ifdef COMPILE_KDE_SUPPORT QString szTip = "<center>"; szTip += __tr2qs_ctx("Take into account that if you're using KDE, this won't work if " \ "you've set \"Keep window thumbnails\" as \"Always\" at \"Desktop Effects\" " \ "advanced settings.","options"); szTip += "</center>"; mergeTip(m_pMinimizeInTray,szTip); #endif #endif m_pCloseInTray = addBoolSelector(0,2,0,2,__tr2qs_ctx("Close in tray","options"),KviOption_boolCloseInTray); m_pEnableFlashing = addBoolSelector(0,3,0,3,__tr2qs_ctx("Enable tray icon flashing","options"),KviOption_boolEnableTrayIconFlashing); m_pLevelBasedNotify = addBoolSelector(0,4,0,4,__tr2qs_ctx("Enable level-based message notification (not a message-type based)","options"),KviOption_boolUseLevelBasedTrayNotification); m_pLevelsGroup = addGroupBox(0,5,0,5,Qt::Horizontal,__tr2qs_ctx("Select message levels to notify","options")); addUIntSelector(m_pLevelsGroup,__tr2qs_ctx("Minimum level for low-priority messages","options"), KviOption_uintMinTrayLowLevelMessage, 1,5,1,true); addUIntSelector(m_pLevelsGroup,__tr2qs_ctx("Minimum level for high-priority message","options"), KviOption_uintMinTrayHighLevelMessage, 1,5,4,true); addRowSpacer(0,6,0,6); connect(m_pEnable,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool))); connect(m_pLevelBasedNotify,SIGNAL(toggled(bool)),this,SLOT(setEnabled(bool))); setEnabled(true); }
OptionsWidget_windowList::OptionsWidget_windowList(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("windowlist_options_widget"); createLayout(); addBoolSelector(0,0,0,0,__tr2qs_ctx("Use tree window list","options"),KviOption_boolUseTreeWindowListWindowList); addBoolSelector(0,1,0,1,__tr2qs_ctx("Sort windows by name","options"),KviOption_boolSortWindowListItemsByName); addBoolSelector(0,2,0,2,__tr2qs_ctx("Show window icons in window list","options"),KviOption_boolUseWindowListIcons); KviBoolSelector * b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Show activity meter in window list","options"),KviOption_boolUseWindowListActivityMeter); mergeTip(b,__tr2qs_ctx("<center>This option enables the usage of the window list activity meter. " \ "Each window entry will have a small indicator of the activity that is going on in that window. " \ "The indicator is a small square that changes colors, dark colors mean low activity, " \ "while bright colors signal high activity. KVIrc also uses some heuristics to determine " \ "whether the activity is somewhat \"human\" or it is generated by automated entities (such as bots " \ "or IRC servers). \"Human\" activity causes the indicator to be shaded red while automated " \ "activity causes the indicator to be shaded blue.</center>","options")); addBoolSelector(0,4,0,4,__tr2qs_ctx("Show IRC context indicator in window list","options"),KviOption_boolUseWindowListIrcContextIndicator); addBoolSelector(0,5,0,5,__tr2qs_ctx("Enable window tooltips","options"),KviOption_boolShowWindowListToolTips); addBoolSelector(0,6,0,6,__tr2qs_ctx("Show header","options"),KviOption_boolShowTreeWindowListHeader); addRowSpacer(0,7,0,7); }
OptionsWidget_userListForeground::OptionsWidget_userListForeground(QWidget * parent) : KviOptionsWidget(parent, "userlistlook_foreground_options_widget") { createLayout(); addFontSelector(0, 0, 1, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontUserListView); KviTalGroupBox * g = addGroupBox(0, 1, 1, 1, Qt::Horizontal, __tr2qs_ctx("Nickname Colors", "options")); addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorUserListViewNormalForeground); addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorUserListViewSelectionForeground); addColorSelector(g, __tr2qs_ctx("IRC Op:", "options"), KviOption_colorUserListViewIrcOpForeground); addColorSelector(g, __tr2qs_ctx("Channel owner:", "options"), KviOption_colorUserListViewChanOwnerForeground); addColorSelector(g, __tr2qs_ctx("Channel admin:", "options"), KviOption_colorUserListViewChanAdminForeground); addColorSelector(g, __tr2qs_ctx("Op:", "options"), KviOption_colorUserListViewOpForeground); addColorSelector(g, __tr2qs_ctx("Half-op:", "options"), KviOption_colorUserListViewHalfOpForeground); addColorSelector(g, __tr2qs_ctx("Voice:", "options"), KviOption_colorUserListViewVoiceForeground); addColorSelector(g, __tr2qs_ctx("User-op:", "options"), KviOption_colorUserListViewUserOpForeground); KviTalHBox * ahb = new KviTalHBox(g); ahb->setSpacing(4); KviBoolSelector * ab = addBoolSelector(ahb, __tr2qs_ctx("Away (blend color):", "options"), KviOption_boolUserListViewUseAwayColor); QString szTip = __tr2qs("The color selected, will be blended with the user rank foreground color.<br>" "You should also consider your theme's style, color and the userlist background selected color for optimum visibility.<br>" "If no color is selected respective user rank color specified will be used instead."); KviColorSelector * as = addColorSelector(ahb, QString(), KviOption_colorUserListViewAwayForeground); connect(ab, SIGNAL(toggled(bool)), as, SLOT(setEnabled(bool))); mergeTip(ab, szTip); KviTalHBox * hb = new KviTalHBox(g); hb->setSpacing(4); KviBoolSelector * b = addBoolSelector(hb, __tr2qs_ctx("Use different color for own nick:", "options"), KviOption_boolUseDifferentColorForOwnNick); KviColorSelector * s = addColorSelector(hb, "", KviOption_colorUserListViewOwnForeground, KVI_OPTION_BOOL(KviOption_boolUseDifferentColorForOwnNick)); connect(b, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool))); addRowSpacer(0, 3, 0, 3); }
OptionsWidget_notifier::OptionsWidget_notifier(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("notifier_options_widget"); createLayout(); int iRow = 0; QString szTip; KviBoolSelector * b = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Enable the notifier", "options"), KviOption_boolEnableNotifier); szTip += __tr2qs_ctx("This is an option for the impatient: it allows one to forcibly and permanently disable " "the notifier window. Please note that if this option is not activated then " "the notifier will NOT popup even if all the other options around specify " "to use it in response to particular events. Also note that this option " "will make all the /notifier.* commands fail silently.", "options"); mergeTip(b, szTip); iRow++; KviBoolSelector * b2; #ifdef COMPILE_KDE_SUPPORT m_pKdeNotifier = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Use the KDE notifier", "options"), KviOption_boolUseKDENotifier); szTip += __tr2qs_ctx("This option uses the KDE notification system instead of the KVIrc's builtin.<br>" "This is cool if you want to better integrate KVIrc inside KDE.<br>" "Note that KDE's notifier isn't as flexible or \"tabbed\" like KVIrc's", "options"); mergeTip(m_pKdeNotifier, szTip); m_pKdeNotifier->setEnabled(KVI_OPTION_BOOL(KviOption_boolEnableNotifier)); connect(b, SIGNAL(toggled(bool)), m_pKdeNotifier, SLOT(setEnabled(bool))); connect(m_pKdeNotifier, SIGNAL(toggled(bool)), this, SLOT(toggleNotifierProtocol(bool))); iRow++; #endif // COMPILE_KDE_SUPPORT #ifdef COMPILE_DBUS_SUPPORT m_pDBusNotifier = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Use the D-Bus-based notifiers", "options"), KviOption_boolUseDBusNotifier); szTip += __tr2qs_ctx("This option uses the D-Bus-based notifier instead of the KVIrc's builtin.<br>" "This is cool if you want to better integrate KVIrc inside your desktop environment.<br>" "Note that this notifier isn't as flexible or \"tabbed\" like KVIrc's is.", "options"); mergeTip(m_pDBusNotifier, szTip); m_pDBusNotifier->setEnabled(KVI_OPTION_BOOL(KviOption_boolEnableNotifier)); #ifdef COMPILE_KDE_SUPPORT m_pDBusNotifier->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseKDENotifier)); #endif // COMPILE_KDE_SUPPORT connect(b, SIGNAL(toggled(bool)), m_pDBusNotifier, SLOT(setEnabled(bool))); #ifdef COMPILE_KDE_SUPPORT connect(m_pDBusNotifier, SIGNAL(toggled(bool)), this, SLOT(toggleNotifierProtocol(bool))); #endif iRow++; #endif // COMPILE_DBUS_SUPPORT #if defined(COMPILE_KDE_SUPPORT) || defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) b2 = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Don't show notifier when there is an active fullscreen window", "options"), KviOption_boolDontShowNotifierIfActiveWindowIsFullScreen); szTip += __tr2qs_ctx("This option stops the notifier from being displayed when there is an active fullscreen window. " "This is useful for gaming sessions where you may be distracted by the notifier or it may even switch " "your game from fullscreen to window mode.", "options"); mergeTip(b2, szTip); b2->setEnabled(KVI_OPTION_BOOL(KviOption_boolEnableNotifier)); QObject::connect(b, SIGNAL(toggled(bool)), b2, SLOT(setEnabled(bool))); iRow++; #endif //COMPILE_KDE_SUPPORT || COMPILE_ON_WINDOWS || COMPILE_ON_MINGW b2 = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Enable notifier window flashing", "options"), KviOption_boolNotifierFlashing); b2->setEnabled(KVI_OPTION_BOOL(KviOption_boolEnableNotifier)); QObject::connect(b, SIGNAL(toggled(bool)), b2, SLOT(setEnabled(bool))); iRow++; b2 = addBoolSelector(0, iRow, 0, iRow, __tr2qs_ctx("Enable notifier window fade effect", "options"), KviOption_boolNotifierFading); b2->setEnabled(KVI_OPTION_BOOL(KviOption_boolEnableNotifier)); QObject::connect(b, SIGNAL(toggled(bool)), b2, SLOT(setEnabled(bool))); iRow++; KviTalGroupBox * g = addGroupBox(0, iRow, 0, iRow, Qt::Horizontal, __tr2qs_ctx("Advanced Configuration", "options")); connect(b, SIGNAL(toggled(bool)), g, SLOT(setEnabled(bool))); connect(b, SIGNAL(toggled(bool)), addUIntSelector(g, __tr2qs_ctx("Default auto hiding time for messages (0 to disable):", "options"), KviOption_uintNotifierAutoHideTime, 0, 86400, 30, KVI_OPTION_BOOL(KviOption_boolEnableNotifier)), SLOT(setEnabled(bool))); KviUIntSelector * u; u = addUIntSelector(g, __tr2qs_ctx("Notifier window opacity while active (mouseover):", "options"), KviOption_uintNotifierActiveTransparency, 0, 100, 90, KVI_OPTION_BOOL(KviOption_boolNotifierFading)); u->setSuffix("%"); connect(b2, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); u = addUIntSelector(g, __tr2qs_ctx("Notifier window opacity while inactive:", "options"), KviOption_uintNotifierInactiveTransparency, 0, 100, 40, KVI_OPTION_BOOL(KviOption_boolNotifierFading)); u->setSuffix("%"); connect(b2, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); iRow++; addRowSpacer(0, iRow, 0, iRow); }
OptionsWidget_dccAdvanced::OptionsWidget_dccAdvanced(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("dccgeneral_options_widget"); createLayout(); KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Network Properties","options")); KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Use user-defined address or network interface","options"),KviOption_boolDccListenOnSpecifiedInterfaceByDefault); mergeTip(b,__tr2qs_ctx("<center>Enable this option if you are on a multihost machine and want " \ "to force one of the available IP addresses to be used for outgoing DCCs.<br>This is especially useful " \ "when you use IPv6 and IPv4 addresses.<br>You can force KVIrc to always choose the IPv4 interface.</center>","options")); KviStringSelector * s = addStringSelector(g,__tr2qs_ctx("Listen on address/interface:","options"),KviOption_stringDccListenDefaultInterface,KVI_OPTION_BOOL(KviOption_boolDccListenOnSpecifiedInterfaceByDefault)); mergeTip(s,__tr2qs_ctx("<center>This is the IP address or name of the interface to use by default for outgoing DCC transfers.<br>" \ "On UNIX systems that support it, you can also specify IPv4 interface names (such as <b>ppp0</b>).<br>" \ "If you set it to <b>0.0.0.0</b>, KVIrc will try to use the first available IPv4 interface</center>","options")); connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); b = addBoolSelector(g,__tr2qs_ctx("Use user-defined port range","options"),KviOption_boolUserDefinedPortRange); mergeTip(b,__tr2qs_ctx("<center>Enable this option if you want specify a local port range for DCC.</center>","options")); KviTalHBox * hb = new KviTalHBox(g); hb->setSpacing(4); KviUIntSelector * u = addUIntSelector(hb,__tr2qs_ctx("Lowest port:","options"),KviOption_uintDccMinPort,1,65535,5000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange)); connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); u = addUIntSelector(hb,__tr2qs_ctx("Highest port:","options"),KviOption_uintDccMaxPort,1,65535,30000,KVI_OPTION_BOOL(KviOption_boolUserDefinedPortRange)); connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); b = addBoolSelector(g,__tr2qs_ctx("Send a fixed address in requests","options"),KviOption_boolDccSendFakeAddressByDefault); mergeTip(b,__tr2qs_ctx("<center>Enable this option if you want to always send a fake IP address in your DCC requests.<br>" \ "This might be useful if you're behind a router with a static address that does network address translation (NAT) and forwards all or a range of ports.</center>","options")); s = addStringSelector(g,__tr2qs_ctx("Send address/interface:","options"),KviOption_stringDefaultDccFakeAddress,KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault)); connect(b,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool))); mergeTip(s,__tr2qs_ctx("<center>This is the fixed address that will be sent with all DCC requests if you enable the option above.</center>","options")); KviBoolSelector * b2; b2 = addBoolSelector(g,__tr2qs_ctx("Guess address from IRC server if unroutable","options"),KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable,!KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault)); connect(b,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool))); mergeTip(b2,__tr2qs_ctx("<center>You can enable this option if you are behind a router that forwards all or a range of ports.<br>" \ "KVIrc will try to guess the IP address to use for DCC by looking up the local hostname as seen " \ "by the IRC server you're connected to.<br>This method is an exclusive alternative to the \"fixed address\" above.<br>" \ "It might guess the correct address automatically if certain conditions are met (e.g. the IRC server does not mask hostnames).</center>","options")); b = addBoolSelector(g,__tr2qs_ctx("Use \"broken bouncer hack\" to detect address","options"),KviOption_boolDccBrokenBouncerHack,KVI_OPTION_BOOL(KviOption_boolDccGuessIpFromServerWhenLocalIsUnroutable)); mergeTip(b,__tr2qs_ctx("<center>When you're behind a dialup router and also tunneling through a psyBNC bouncer, " \ "you can use a bug in the bouncer to force KVIrc to bind the DCC connections to the dialup router's address.<br>" \ "It's an ugly hack - use it only if nothing else works.</center>","options")); connect(b2,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool))); b = addBoolSelector(0,1,1,1,__tr2qs_ctx("Notify failed DCC handshakes to the remote end","options"),KviOption_boolNotifyFailedDccHandshakes); mergeTip(b,__tr2qs_ctx("<center>If you enable this option, when a DCC request from a remote " \ "user can't be satisfied KVIrc will notify him by a CTCP ERRMSG. This is " \ "a nice feature so it is a good idea to leave it on unless for some reason " \ "you have deactivated the antiflood system: in this case turning off this option " \ "might help if you often get attacked by CTCP floods.</center>","options")); u = addUIntSelector(0,2,1,2,__tr2qs_ctx("Maximum number of DCC sessions","options"),KviOption_uintMaxDccSlots,0,1000,64); mergeTip(u,__tr2qs_ctx("<center>This is the maximum number of concurrent DCC sessions " \ "and it includes all the DCC types (send,chat,recv...). " \ "KVIrc will refuse the requests when this limit is reached.</center>","options")); u = addUIntSelector(0,3,1,3,__tr2qs_ctx("DCC socket timeout:","options"),KviOption_uintDccSocketTimeout,10,65536,180); u->setSuffix(__tr2qs_ctx(" sec","options")); mergeTip(u,__tr2qs_ctx("<center>This is the amount of time that KVIrc will wait for a response before assuming that a DCC has failed " \ "because the remote client was unable to connect to our listening socket.</center>","options")); addRowSpacer(0,4,1,4); }
OptionsWidget_dccSendAdvanced::OptionsWidget_dccSendAdvanced(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("dccsend_advanced_options_widget"); createLayout(); KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Bug Compatibility","options")); KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Send ACK for byte 0","options"),KviOption_boolSendZeroAckInDccRecv); mergeTip(b, __tr2qs_ctx("<center>This option causes KVIrc to send a zero-byte acknowledge to kick-start " \ "the DCC transfer with some buggy IRC clients.<br>" \ "Use it only if your DCC transfers stall just after establishing a connection without sending any data.</center>","options")); b = addBoolSelector(g,__tr2qs_ctx("Accept RESUME requests with broken filename (mIRC file.ext)","options"),KviOption_boolAcceptBrokenFileNameDccResumeRequests); mergeTip(b, __tr2qs_ctx("<center>This option causes KVIrc to accept RESUME requests with invalid filenames.<br>" \ "Use it if KVIrc fails to accept RESUME requests from other clients (e.g. some versions of mIRC).</center>","options")); b = addBoolSelector(g,__tr2qs_ctx("Accept RESUME requests with mismatched ports","options"),KviOption_boolAcceptMismatchedPortDccResumeRequests); mergeTip(b, __tr2qs_ctx("<center>This option causes KVIrc to accept RESUME requests with mismatched ports.<br>" \ "Use it if some router on the path between you and the receiver remaps the ports in DCC SEND " \ "but not in DCC RESUME requests.<br>Please note that this option may misbehave in certain usage " \ "patterns since KVIrc must differentiate between transfers only by looking at the filename. Be careful.</center>","options")); b = addBoolSelector(g,__tr2qs_ctx("Replace spaces with underscores in outgoing filenames","options"),KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores); mergeTip(b, __tr2qs_ctx("<center>This option causes KVIrc to replace spaces with underscores in filenames " \ "for all the outgoing file transfers. This will fix filename handling with some buggy clients (e.g. some versions of mIRC).","options")); b = addBoolSelector(g,__tr2qs_ctx("Send 64-bit ACKs for files larger than 4GiB","options"),KviOption_boolSend64BitAckInDccRecv); mergeTip(b, __tr2qs_ctx("<center>This option causes KVIrc to send ACKs as 64-bit integers instead of 32-bit integers<br>" \ "Use this to fix DCC RECEIVE transfers where the other client is using the mIRC ACK standard.</center>","options")); g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Limits","options")); KviTalHBox * hb = new KviTalHBox(g); b = addBoolSelector(hb,__tr2qs_ctx("Limit upload bandwidth to","options"),KviOption_boolLimitDccSendSpeed); KviUIntSelector * u = addUIntSelector(hb,"",KviOption_uintMaxDccSendSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccSendSpeed)); u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options")); connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); hb = new KviTalHBox(g); b = addBoolSelector(hb,__tr2qs_ctx("Limit download bandwidth to","options"),KviOption_boolLimitDccRecvSpeed); u = addUIntSelector(hb,"",KviOption_uintMaxDccRecvSpeed,0,0xffffff1,1024,KVI_OPTION_BOOL(KviOption_boolLimitDccRecvSpeed)); u->setSuffix(" " + __tr2qs_ctx("bytes/sec","options")); connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); u = addUIntSelector(g,__tr2qs_ctx("Maximum number of DCC transfers","options"),KviOption_uintMaxDccSendTransfers,0,1000,10); mergeTip(u,__tr2qs_ctx("<center>This is the maximum number of concurrent DCC transfers. " \ "KVIrc will refuse the requests when this limit is reached.</center>","options")); g = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("Tweaks","options")); b = addBoolSelector(g,__tr2qs_ctx("Use fast send (send ahead)","options"),KviOption_boolUseFastDccSend); mergeTip(b, __tr2qs_ctx("<center>The \"send ahead\" DCC method allows data to be sent faster by breaking " \ "some of the rules of the original DCC SEND protocol specification.<br>" \ "Most clients can handle this kind of optimisation so disable it only if you have problems.</center>","options")); hb = new KviTalHBox(g); b = addBoolSelector(hb,__tr2qs_ctx("Force idle step","options"),KviOption_boolDccSendForceIdleStep); mergeTip(b, __tr2qs_ctx("<center>Enable this option when the dcc file transfers " \ "tend to block your computer by consuming too much CPU time. " \ "When this option is enabled the idle interval below will be " \ "forcibly inserted between each sent/received data packet.</center>","options")); u = addUIntSelector(hb,"",KviOption_uintDccSendIdleStepInMSec,1,65536,30,KVI_OPTION_BOOL(KviOption_boolDccSendForceIdleStep)); connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool))); u->setSuffix(__tr2qs_ctx(" msec","options")); mergeTip(u, __tr2qs_ctx("<center>This parameter controls the average delay between two packets sent or received.<br>" \ "A smaller interval will cause you to send data faster but will also " \ "add load to your CPU, disk and network interface.<br>" \ "Reasonable values are from 5 to 50 milliseconds.</center>","options")); u = addUIntSelector(g,__tr2qs_ctx("Packet size:","options"),KviOption_uintDccSendPacketSize,16,65536,1024); u->setSuffix(__tr2qs_ctx(" bytes","options")); mergeTip(u, __tr2qs_ctx("<center>This parameter controls the packet size used for DCC SEND.<br>" \ "With bigger packets you will be probably send data faster, but " \ "you will also saturate your bandwidth and in some cases " \ "cause more disk activity.<br>" \ "Reasonable values are from 512 to 4096 bytes.</center>","options")); addRowSpacer(0,3,0,4); }
OptionsWidget_query::OptionsWidget_query(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("query_options_widget"); createLayout(); KviBoolSelector * b; KviTalGroupBox * g; g = addGroupBox(0, 0, 1, 0, Qt::Horizontal, __tr2qs_ctx("Open Query for", "options")); b = addBoolSelector(g, __tr2qs_ctx("Private messages", "options"), KviOption_boolCreateQueryOnPrivmsg); mergeTip(b, __tr2qs_ctx("This option enables query window creation " "when a private message (PRIVMSG) is received. " "If you disable this, private messages will " "be shown in the active window or a common channel.", "options")); b = addBoolSelector(g, __tr2qs_ctx("Private notices", "options"), KviOption_boolCreateQueryOnNotice); mergeTip(b, __tr2qs_ctx("This option enables query window creation " "when a private notice (NOTICE) is received. " "If you disable this, private notices will " "be shown in the active window or a common channel.", "options")); b = addBoolSelector(0, 1, 1, 1, __tr2qs_ctx("Open incoming query windows without focus", "options"), KviOption_boolCreateIncomingQueriesAsMinimized); mergeTip(b, __tr2qs_ctx("This option prevents incoming " "query windows from diverting application focus.<br>" "Enable this if you don't like query windows " "popping up while you're typing something in a channel.", "options")); b = addBoolSelector(0, 2, 1, 2, __tr2qs_ctx("Enable target user tracking", "options"), KviOption_boolEnableQueryTracing); mergeTip(b, __tr2qs_ctx("This option will enable target user tracking. " "Some actions of the target user (e.g. joins and parts) " "will be displayed in the window.", "options")); #if(defined(COMPILE_ON_WINDOWS) || defined(COMPILE_KDE_SUPPORT) || defined(COMPILE_ON_MINGW)) b = addBoolSelector(0, 3, 1, 3, __tr2qs_ctx("Flash system taskbar on new query message", "options"), KviOption_boolFlashQueryWindowOnNewMessages); mergeTip(b, __tr2qs_ctx("This option causes the system taskbar entry for KVIrc to flash when a new query message " "is received and the KVIrc window is not the active.", "options")); #endif b = addBoolSelector(0, 4, 1, 4, __tr2qs_ctx("Popup notifier on new query message", "options"), KviOption_boolPopupNotifierOnNewQueryMessages); mergeTip(b, __tr2qs_ctx("This option causes a small notifier window to pop up " "in the lower right corner of the screen when a new message is received " "and the KVIrc window is not active.", "options")); b = addBoolSelector(0, 5, 1, 5, __tr2qs_ctx("Popup notifier on new notice", "options"), KviOption_boolPopupNotifierOnNewNotices); mergeTip(b, __tr2qs_ctx("This option causes a small notifier window to pop up " "in the lower right corner of the screen when a new notice is received " "and the KVIrc window is not active.", "options")); b = addBoolSelector(0, 6, 1, 6, __tr2qs_ctx("Show information about query target at the top of the query", "options"), KviOption_boolShowExtendedInfoInQueryLabel); mergeTip(b, __tr2qs_ctx("This option enables query window information label. " "It can show you known information about query target at the top of the window. " "Uncheck this option, if you think,that it wastes your query space.", "options")); b = addBoolSelector(0, 7, 1, 7, __tr2qs_ctx("Paste last query log", "options"), KviOption_boolPasteLastLogOnQueryJoin); KviTalHBox * box = new KviTalHBox(this); addWidgetToLayout(box, 0, 8, 1, 8); KviUIntSelector * u; u = addUIntSelector(box, __tr2qs_ctx("Paste up to:", "options"), KviOption_uintLinesToPasteOnQueryJoin, 0, 50, 10, KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnQueryJoin)); u->setSuffix(__tr2qs_ctx(" lines", "options")); mergeTip(u, __tr2qs_ctx("Minimum value: <b>0 lines</b><br>Maximum value: <b>50 lines</b>", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); u = addUIntSelector(box, __tr2qs_ctx("Interval:", "options"), KviOption_uintDaysIntervalToPasteOnQueryJoin, 1, 10, 10, KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnQueryJoin)); u->setSuffix(__tr2qs_ctx(" days", "options")); mergeTip(u, __tr2qs_ctx("Minimum value: <b>0 days</b><br>Maximum value: <b>10 days</b>", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); addRowSpacer(0, 9, 1, 9); }
OptionsWidget_channelAdvanced::OptionsWidget_channelAdvanced(QWidget * pParent) : KviOptionsWidget(pParent) { createLayout(); KviBoolSelector * b; KviTalGroupBox * g; KviUIntSelector * u; b = addBoolSelector(0, 0, 4, 0, __tr2qs_ctx("Log joined channels history", "options"), KviOption_boolLogChannelHistory); addLabel(0, 1, 0, 1, __tr2qs_ctx("Default ban mask:", "options")); m_pBanTypeCombo = new QComboBox(this); addWidgetToLayout(m_pBanTypeCombo, 1, 1, 4, 1); KviIrcMask hostmask("[email protected]"); KviIrcMask ipmask("[email protected]"); QString tmp1; QString tmp2; for(int i = 0; i <= 26; i++) { hostmask.mask(tmp1, (KviIrcMask::MaskType)i); ipmask.mask(tmp2, (KviIrcMask::MaskType)i); m_pBanTypeCombo->insertItem(m_pBanTypeCombo->count(), QString("%1 (%2)").arg(tmp1, tmp2)); } m_pBanTypeCombo->setCurrentIndex(KVI_OPTION_UINT(KviOption_uintDefaultBanType)); g = addGroupBox(0, 2, 4, 2, Qt::Horizontal, __tr2qs_ctx("On Channel Join", "options")); u = addUIntSelector(g, __tr2qs_ctx("Minimum delay between two channel requests:", "options"), KviOption_uintOnJoinRequestsDelay, 0, 10, 1); u->setSuffix(__tr2qs_ctx(" sec", "options")); mergeTip(u, __tr2qs_ctx("This is an artificial delay for the channel requests made on join.<br>" "You may increase it if your server complains about flooding when joining " "many channels at once.<br>Minimum value: <b>0 secs</b><br>Maximum value: <b>10 secs</b>", "options")); addBoolSelector(g, __tr2qs_ctx("Do not send /WHO request", "options"), KviOption_boolDisableWhoRequestOnJoin); addBoolSelector(g, __tr2qs_ctx("Do not request ban list", "options"), KviOption_boolDisableBanListRequestOnJoin); addBoolSelector(g, __tr2qs_ctx("Do not request ban exception list", "options"), KviOption_boolDisableBanExceptionListRequestOnJoin); addBoolSelector(g, __tr2qs_ctx("Do not request invite list", "options"), KviOption_boolDisableInviteListRequestOnJoin); addBoolSelector(g, __tr2qs_ctx("Do not request quiet ban list", "options"), KviOption_boolDisableQuietBanListRequestOnJoin); addBoolSelector(g, __tr2qs_ctx("Echo channel topic", "options"), KviOption_boolEchoNumericTopic); addBoolSelector(g, __tr2qs_ctx("Show channel sync time", "options"), KviOption_boolShowChannelSyncTime); b = addBoolSelector(g, __tr2qs_ctx("Paste last channel log", "options"), KviOption_boolPasteLastLogOnChannelJoin); KviTalHBox * box = new KviTalHBox(g); u = addUIntSelector(box, __tr2qs_ctx("Paste up to:", "options"), KviOption_uintLinesToPasteOnChannelJoin, 1, 32767, 10, KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnChannelJoin)); u->setSuffix(__tr2qs_ctx(" lines", "options")); mergeTip(u, __tr2qs_ctx("Minimum value: <b>1 lines</b><br>Maximum value: <b>32767 lines</b>", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); u = addUIntSelector(box, __tr2qs_ctx("Interval:", "options"), KviOption_uintDaysIntervalToPasteOnChannelJoin, 1, 3652, 10, KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnChannelJoin)); u->setSuffix(__tr2qs_ctx(" days", "options")); mergeTip(u, __tr2qs_ctx("Minimum value: <b>1 days</b><br>Maximum value: <b>3652 days</b>", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); b = addBoolSelector(0, 3, 4, 3, __tr2qs_ctx("Keep away list updated", "options"), KviOption_boolEnableAwayListUpdates); mergeTip(b, __tr2qs_ctx("KVIrc sends out a channel /WHO message every now and then to keep the channel away list in sync. " "Use this option to disable this feature (and to save your IRC bandwidth).<br>" "If the server supports IRCv3.1's away-notify extension, it will be used instead of WHO requests.", "options")); addRowSpacer(0, 5, 4, 5); }
OptionsWidget_avatar::OptionsWidget_avatar(QWidget * parent) : KviOptionsWidget(parent) { setObjectName("avatar_advanced_options_widget"); createLayout(); KviTalGroupBox * g; KviBoolSelector * b; g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Scaling in Userlist", "options")); b = addBoolSelector(g, __tr2qs_ctx("Scale avatar images in userlist (recommended)", "options"), KviOption_boolScaleAvatars); mergeTip(b, __tr2qs_ctx("This option will force KVIrc to scale avatars" " shown in the userlist.<br>" "Avatars will be scaled to fit the " "constraints set below. Better keep this option on.", "options")); addBoolSelector(g, __tr2qs_ctx("Do not scale avatar if it is less than required size", "options"), KviOption_boolDoNotUpscaleAvatars); KviUIntSelector * u = addUIntSelector(g, __tr2qs_ctx("Image width:", "options"), KviOption_uintAvatarScaleWidth, 0, 512, 80, KVI_OPTION_BOOL(KviOption_boolScaleAvatars)); u->setSuffix(__tr2qs_ctx(" pixels", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); u = addUIntSelector(g, __tr2qs_ctx("Image height:", "options"), KviOption_uintAvatarScaleHeight, 0, 512, 80, KVI_OPTION_BOOL(KviOption_boolScaleAvatars)); u->setSuffix(__tr2qs_ctx(" pixels", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Scaling on Load and in User Tooltips", "options")); b = addBoolSelector(g, __tr2qs_ctx("Scale avatar images on image load", "options"), KviOption_boolScaleAvatarsOnLoad); u = addUIntSelector(g, __tr2qs_ctx("Image width:", "options"), KviOption_uintScaleAvatarsOnLoadWidth, 0, 1280, 80, KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad)); u->setSuffix(__tr2qs_ctx(" pixels", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); u = addUIntSelector(g, __tr2qs_ctx("Image height:", "options"), KviOption_uintScaleAvatarsOnLoadHeight, 0, 1280, 80, KVI_OPTION_BOOL(KviOption_boolScaleAvatarsOnLoad)); u->setSuffix(__tr2qs_ctx(" pixels", "options")); connect(b, SIGNAL(toggled(bool)), u, SLOT(setEnabled(bool))); KviTalGroupBox * gs = addGroupBox(0, 2, 0, 2, Qt::Horizontal, __tr2qs_ctx("Request CTCP", "options")); KviBoolSelector * bs = addBoolSelector(g, __tr2qs_ctx("Request missing avatars", "options"), KviOption_boolRequestMissingAvatars); mergeTip(bs, __tr2qs_ctx("This option will cause KVIrc to send a DCC GET request " "when someone sets an avatar and there is no cached copy available.", "options")); KviUIntSelector * us = addUIntSelector(g, __tr2qs_ctx("Maximum requested file size:", "options"), KviOption_uintMaximumRequestedAvatarSize, 0, 1048576, 102400, KVI_OPTION_BOOL(KviOption_boolRequestMissingAvatars)); us->setSuffix(__tr2qs_ctx(" bytes", "options")); mergeTip(us, __tr2qs_ctx("This is the maximum size for avatar images that " "will be automatically requested.<br>" "A reasonable value might be 102400 bytes (100 K).", "options")); connect(bs, SIGNAL(toggled(bool)), us, SLOT(setEnabled(bool))); bs = addBoolSelector(gs, __tr2qs_ctx("Automatically accept incoming avatars", "options"), KviOption_boolAutoAcceptIncomingAvatars); mergeTip(bs, __tr2qs_ctx("This option will cause KVIrc to auto-accept " "DCC SEND requests for incoming avatars.<br>" "If you're using the \"Request missing avatars\" option " "above, enabling this may by useful.<br>" "Avatars will be saved in the local KVIrc directory.", "options")); bs = addBoolSelector(gs, __tr2qs_ctx("Remember avatars for registered users", "options"), KviOption_boolSetLastAvatarAsDefaultForRegisteredUsers); mergeTip(bs, __tr2qs_ctx("Use a user's last known avatar by default " "(only for users that are registered).", "options")); us = addUIntSelector(gs, __tr2qs_ctx("Avatar offer timeout:", "options"), KviOption_uintAvatarOfferTimeoutInSecs, 1, 99999, 60); us->setSuffix(__tr2qs_ctx(" sec", "options")); mergeTip(us, __tr2qs_ctx("This is the amount of time to make an avatar available for transfer when requested.<br>" "When someone sends a CTCP AVATAR request, " "KVIrc will reply with a CTCP AVATAR message containing the name and size " "of your avatar image.<br>" "A time-limited file offer is added for the image file " "to the requesting user.", "options")); bs = addBoolSelector(gs, __tr2qs_ctx("Ignore requests if no avatar is set", "options"), KviOption_boolIgnoreChannelAvatarRequestsWhenNoAvatarSet); mergeTip(bs, __tr2qs_ctx("This option will cause KVIrc to ignore channel CTCP AVATAR requests " "when you have no avatar set. This is usually a good practice since " "it helps in reducing traffic by not sending a reply that would be empty.", "options")); addRowSpacer(0, 3, 0, 3); }
KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * parent) : KviOptionsWidget(parent) { m_szAltNicknames[0] = KVI_OPTION_STRING(KviOption_stringNickname2); m_szAltNicknames[1] = KVI_OPTION_STRING(KviOption_stringNickname3); m_szAltNicknames[2] = KVI_OPTION_STRING(KviOption_stringNickname4); createLayout(); layout()->setMargin(10); KviTalGroupBox * gbox = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options")); KviTalHBox * hb = new KviTalHBox(gbox); hb->setSpacing(0); hb->setMargin(0); KviStringSelector * sel = addStringSelector(hb,__tr2qs_ctx("Nickname:","options"),KviOption_stringNickname1); sel->setMinimumLabelWidth(120); mergeTip(sel,__tr2qs_ctx("<center>Your <b>nickname</b> is your primary form of identification on IRC.<br>" \ "Since servers cannot accept multiple users sharing the same nickname " \ "(case insensitive), you can provide alternative nicknames to be used in case"\ "the server refuses to accept the default one.</center>","options")); QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),hb); sel->setValidator(v); QPushButton * pb = new QPushButton(__tr2qs_ctx("Alternatives...","options"),hb); connect(pb,SIGNAL(clicked()),this,SLOT(setNickAlternatives())); sel = addStringSelector(gbox,__tr2qs_ctx("Username:"******"options"),KviOption_stringUsername); sel->setMinimumLabelWidth(120); mergeTip(sel,__tr2qs_ctx("<center>This is the <b>username</b> that you will use to connect to the server.<br>" \ "In the past, it was used as a form of authentication, but it normally has no special use now.<br>" \ "In addition to your nickname, you are identified on IRC by your <b>username@hostname</b>.</br>" \ "Basically, you can enter any word you like here. :D</center>","options")); sel = addStringSelector(gbox,__tr2qs_ctx("Real name:","options"),KviOption_stringRealname); sel->setMinimumLabelWidth(120); mergeTip(sel,__tr2qs_ctx("<center>This text will appear when someone does a /WHOIS on you.<br>" \ "It is intended to be your real name, but people tend to put random quotes and phrases here too.</center>","options")); QString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options"); QString szCenterBegin("<center>"); QString szCenterEnd("</center>"); QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd; gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Profile","options")); hb = new KviTalHBox(gbox); hb->setSpacing(4); QLabel * l = new QLabel(__tr2qs_ctx("Age:","options"),hb); l->setMinimumWidth(120); m_pAgeCombo = new QComboBox(hb); QString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing; KviTalToolTip::add(l,szTip1); KviTalToolTip::add(m_pAgeCombo,szTip1); m_pAgeCombo->addItem(__tr2qs_ctx("Unspecified","options")); unsigned int i; for(i=1;i<120;i++) { QString tmp; tmp.setNum(i); m_pAgeCombo->insertItem(m_pAgeCombo->count(),tmp); } bool bOk; i = KVI_OPTION_STRING(KviOption_stringCtcpUserInfoAge).toUInt(&bOk); if(!bOk)i = 0; if(i > 120)i = 120; m_pAgeCombo->setCurrentIndex(i); hb->setStretchFactor(m_pAgeCombo,1); hb = new KviTalHBox(gbox); hb->setSpacing(4); l = new QLabel(__tr2qs_ctx("Gender:","options"),hb); l->setMinimumWidth(120); m_pGenderCombo = new QComboBox(hb); QString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing; KviTalToolTip::add(l,szTip2); KviTalToolTip::add(m_pGenderCombo,szTip2); m_pGenderCombo->addItem(__tr2qs_ctx("Unspecified","options")); m_pGenderCombo->addItem(__tr2qs_ctx("Female","options")); m_pGenderCombo->addItem(__tr2qs_ctx("Male","options")); if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male")) m_pGenderCombo->setCurrentIndex(2); else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female")) m_pGenderCombo->setCurrentIndex(1); else m_pGenderCombo->setCurrentIndex(0); hb->setStretchFactor(m_pGenderCombo,1); sel = addStringSelector(gbox,__tr2qs_ctx("Location:","options"),KviOption_stringCtcpUserInfoLocation); sel->setMinimumLabelWidth(120); mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can describe here your approximate physical location. " \ "Something like \"Region, Country\" will be ok. Please note that this information will be viewable " \ "by anyone so putting more data (like the exact address), generally, <b>is not a good idea</b>.","options") + szTrailing); sel = addStringSelector(gbox,__tr2qs_ctx("Languages:","options"),KviOption_stringCtcpUserInfoLanguages); sel->setMinimumLabelWidth(120); mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can put here the short names of the languages you can speak. " \ "An example might be \"EN,IT\" that would mean that you speak both Italian and English.","options") + szTrailing); sel = addStringSelector(gbox,__tr2qs_ctx("Other:","options"),KviOption_stringCtcpUserInfoOther); sel->setMinimumLabelWidth(120); mergeTip(sel,szCenterBegin + __tr2qs_ctx("You can put here some additional personal data. " \ "It might be a funny quote or your homepage url... " \ "Please note that this information will be viewable " \ "by anyone so <b>don't put any sensible data</b> (passwords, telephone or credit card numbers).","options") + szTrailing); addRowSpacer(0,2,0,2); }