示例#1
0
OptionsWidget_windowListClassic::OptionsWidget_windowListClassic(QWidget * parent)
    : KviOptionsWidget(parent)
{
	setObjectName("classicwindowlist_options_widget");
	createLayout();

	KviUIntSelector * u;

	addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontWindowList);
	KviTalGroupBox * g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Text/Alert Colors", "options"));
	addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorWindowListNormalText);
	addColorSelector(g, __tr2qs_ctx("Minimized:", "options"), KviOption_colorWindowListMinimizedText);
	addColorSelector(g, __tr2qs_ctx("Alert level 1:", "options"), KviOption_colorWindowListHighlight1Text);
	addColorSelector(g, __tr2qs_ctx("Alert level 2:", "options"), KviOption_colorWindowListHighlight2Text);
	addColorSelector(g, __tr2qs_ctx("Alert level 3:", "options"), KviOption_colorWindowListHighlight3Text);
	addColorSelector(g, __tr2qs_ctx("Alert level 4:", "options"), KviOption_colorWindowListHighlight4Text);
	addColorSelector(g, __tr2qs_ctx("Alert level 5:", "options"), KviOption_colorWindowListHighlight5Text);

	addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Progress bar color:", "options"), KviOption_colorWindowListProgressBar);
	u = addUIntSelector(0, 3, 0, 3, __tr2qs_ctx("Minimum width of buttons:", "options"), KviOption_uintWindowListButtonMinWidth, 24, 9999, 100);
	u->setSuffix(__tr2qs_ctx(" pixels", "options"));
	addBoolSelector(0, 4, 0, 4, __tr2qs_ctx("Set maximum button width", "options"), KviOption_boolClassicWindowListSetMaximumButtonWidth);
	u = addUIntSelector(0, 5, 0, 5, __tr2qs_ctx("Maximum width of buttons:", "options"), KviOption_uintClassicWindowListMaximumButtonWidth, 24, 9999, 100);
	u->setSuffix(__tr2qs_ctx(" pixels", "options"));
	addBoolSelector(0, 6, 0, 6, __tr2qs_ctx("Use flat buttons", "options"), KviOption_boolUseFlatClassicWindowListButtons);
	addBoolSelector(0, 7, 0, 7, __tr2qs_ctx("Show close button on window list items", "options"), KviOption_boolUseWindowListCloseButton);

	addRowSpacer(0, 8, 0, 8);
}
示例#2
0
OptionsWidget_inputFeatures::OptionsWidget_inputFeatures(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("ircviewfeatures_options_widget");
	createLayout();

	addBoolSelector(0,0,0,0,__tr2qs_ctx("Warp cursor at the end of line when browsing history","options"),KviOption_boolInputHistoryCursorAtEnd);
	addBoolSelector(0,1,0,1,__tr2qs_ctx("Enable the input history logging","options"),KviOption_boolEnableInputHistory); //G&N 2005
	addBoolSelector(0,2,0,2,__tr2qs_ctx("Hide input toolbuttons by default","options"),KviOption_boolHideInputToolButtons);
	addBoolSelector(0,3,0,3,__tr2qs_ctx("Commandline in user-friendly mode by default","options"),KviOption_boolCommandlineInUserFriendlyModeByDefault);
	addUIntSelector(0,4,0,4,__tr2qs_ctx("Expand tabulations in input using this amount of spaces:","options"),KviOption_uintSpacesToExpandTabulationInput,1,24,8,true);

	KviTalGroupBox * g = addGroupBox(0,5,0,5,Qt::Horizontal,__tr2qs_ctx("Nick Completion","options"));
	KviBoolSelector * b, *c;
	b = addBoolSelector(g,__tr2qs_ctx("Use bash-like nick completion","options"),KviOption_boolBashLikeNickCompletion,!KVI_OPTION_BOOL(KviOption_boolZshLikeNickCompletion));
	c = addBoolSelector(g,__tr2qs_ctx("Use zsh-like nick completion","options"),KviOption_boolZshLikeNickCompletion,!KVI_OPTION_BOOL(KviOption_boolBashLikeNickCompletion));
	connect(b,SIGNAL(toggled(bool)),c,SLOT(setDisabled(bool)));
	connect(c,SIGNAL(toggled(bool)),b,SLOT(setDisabled(bool)));

	addStringSelector(g,__tr2qs_ctx("Nick completion postfix string","options"),KviOption_stringNickCompletionPostfix);
	addBoolSelector(g,__tr2qs_ctx("Use the completion postfix string for the first word only","options"),KviOption_boolUseNickCompletionPostfixForFirstWordOnly);

	KviBoolSelector *d = addBoolSelector(0,6,0,6,__tr2qs_ctx("Use a custom cursor width","options"),KviOption_boolEnableCustomCursorWidth);
	KviUIntSelector *f = addUIntSelector(0,7,0,7,__tr2qs_ctx("Custom cursor width:","options"),KviOption_uintCustomCursorWidth,1,24,8,KVI_OPTION_BOOL(KviOption_boolEnableCustomCursorWidth));
	f->setSuffix(__tr2qs_ctx(" px","options"));
	connect(d,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
	addRowSpacer(0,8,0,8);
}
示例#3
0
OptionsWidget_connection::OptionsWidget_connection(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("connection_options_widget");
	createLayout();
	KviTalGroupBox *gbox = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Disconnect","options"));

	KviBoolSelector *b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep channels open","options"),KviOption_boolKeepChannelsOpenOnDisconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to keep channels open after disconnect.","options"));

	b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep queries open","options"),KviOption_boolKeepQueriesOpenOnDisconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to keep queries open after disconnect.","options"));

	gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("On Unexpected Disconnect","options"));

	b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep channels open","options"),KviOption_boolKeepChannelsOpenOnUnexpectedDisconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to keep channels open after an unexpected disconnect.","options"));

	b1 = addBoolSelector(gbox,__tr2qs_ctx("Keep queries open","options"),KviOption_boolKeepQueriesOpenOnUnexpectedDisconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to keep queries open after an unexpected disconnect.","options"));

	b1 = addBoolSelector(gbox,__tr2qs_ctx("Rejoin channels after reconnect","options"),KviOption_boolRejoinChannelsAfterReconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to rejoin channels after a successful reconnect attempt.","options"));

	b1 = addBoolSelector(gbox,__tr2qs_ctx("Reopen queries after reconnect","options"),KviOption_boolReopenQueriesAfterReconnect,true);
	mergeTip(b1,__tr2qs_ctx("This option will cause KVIrc to reopen query windows after a successful reconnect attempt.","options"));

//	gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("On Unexpected Disconnect","options"));
	KviBoolSelector * b = addBoolSelector(gbox,__tr2qs_ctx("Automatically reconnect","options"),KviOption_boolAutoReconnectOnUnexpectedDisconnect);
	mergeTip(b,__tr2qs_ctx("This option will enable auto-reconnecting after an unexpected disconnect. " \
		"An unexpected disconnect is the <b>termination</b> of a <b>fully connected IRC session</b> " \
		"that was <b>not requested by the user</b> by the means of the QUIT message." \
		"<p><b>Warning:</b> If you use /RAW to send a QUIT message to the server, " \
		"this option will not behave correctly, since does not detect the outgoing " \
		"QUIT message and will attempt to reconnect after the server has closed the connection. " \
		"For this reason, always use the /QUIT command to close your connections. " \
		"This option may also behave incorrectly with bouncers that support " \
		"detaching, in this case a solution could be to prepare an alias that sends the " \
		"bouncer \"detach\" command immediately before the \"quit\" command.<br>" \
		"<tt>alias(bncdetach){ raw bouncer detach; quit; }</tt></p>","options"));

	KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Maximum attempts (0: unlimited):","options"),
			KviOption_uintMaxAutoReconnectAttempts,0,100,5,
			KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
	connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));

	u = addUIntSelector(gbox,__tr2qs_ctx("Delay between attempts:","options"),
			KviOption_uintAutoReconnectDelay,0,86400,5,
			KVI_OPTION_BOOL(KviOption_boolAutoReconnectOnUnexpectedDisconnect));
	u->setSuffix(__tr2qs_ctx(" sec","options"));
	connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
	mergeTip(u,__tr2qs_ctx("Minimum value: <b>0 sec</b><br>Maximum value: <b>86400 sec</b>","options"));

	// This is now handled per-server.
	//b = addBoolSelector(this,__tr2qs_ctx("Use the SASL authentication protocol if available","options"),&(KVI_OPTION_BOOL(KviOption_boolUseSaslIfAvailable)),true);
	//mergeTip(b,__tr2qs_ctx("When available and enabled of the specific server, KVIrc will try to authenticate the user using the SASL procotol","options"));
	//addWidgetToLayout(b,0,2,0,2);

	addRowSpacer(0,3,4,3);
}
示例#4
0
OptionsWidget_userListFeatures::OptionsWidget_userListFeatures(QWidget * parent)
    : KviOptionsWidget(parent, "userlistfeatures_options_widget")
{
	createLayout();

	KviUIntSelector * u;

	u = addUIntSelector(0, 0, 0, 0, __tr2qs_ctx("Minimum width:", "options"), KviOption_uintUserListMinimumWidth, 100, 1024, 150);
	u->setSuffix(__tr2qs_ctx(" pixels", "options"));
	mergeTip(u, __tr2qs_ctx("Here you can select a desired minimum width for the userlist when visible. "
	                        "Suggested values range between 120 and 170 pixels. "
	                        "The value set here, applies to all channels in all networks. "
	                        "For specific widths for different channels, drag widget to desired width, "
	                        "right click on channel on Tree Window List and select Save Window Properties As Default.<br>"
	                        "<b>Please note</b> dragging method may not be as reliable and values set may be lost randomly, "
	                        "However values will never be less than the width you specified.", "options"));

	addBoolSelector(0, 1, 0, 1, __tr2qs_ctx("Show gender icons", "options"), KviOption_boolDrawGenderIcons);
	addBoolSelector(0, 2, 0, 2, __tr2qs_ctx("Show user rank channel icons", "options"), KviOption_boolShowUserChannelIcons);
	addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Show user channel activity indicator", "options"), KviOption_boolShowUserChannelState);
	addBoolSelector(0, 4, 0, 4, __tr2qs_ctx("Show label with userlist stats", "options"), KviOption_boolShowUserListStatisticLabel);
	addBoolSelector(0, 5, 0, 5, __tr2qs_ctx("Enable user tooltip", "options"), KviOption_boolShowUserListViewToolTips);
	addBoolSelector(0, 6, 0, 6, __tr2qs_ctx("Show avatars in userlist", "options"), KviOption_boolShowAvatarsInUserlist);
	addBoolSelector(0, 7, 0, 7, __tr2qs_ctx("Enable animated avatars", "options"), KviOption_boolEnableAnimatedAvatars);
	KviBoolSelector * b = addBoolSelector(0, 8, 0, 8, __tr2qs_ctx("Place nicks starting with non-alpha characters (such as _COOL_BOY_) last", "options"), KviOption_boolPlaceNickWithNonAlphaCharsAtEnd);
	mergeTip(b, __tr2qs_ctx("All nicknames which include characters such as [ ] ^ _ &lt; &gt; | etc. "
	                        "will be sorted last in userlist after all regular nicknames.<br>"
	                        "Select this option if you prefer to see regular nicknames sorted topmost "
	                        "on userlist.<br><br><b>Note:</b> "
	                        "Changes to this option requires KVIrc restart.", "options"));

	addRowSpacer(0, 9, 0, 9);
}
OptionsWidget_channelAdvanced::OptionsWidget_channelAdvanced(QWidget * pParent)
: KviOptionsWidget(pParent)
{
	createLayout();

	KviBoolSelector * 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));

	KviTalGroupBox * g = addGroupBox(0,2,4,2,Qt::Horizontal,__tr2qs_ctx("On Channel Join","options"));
	KviUIntSelector *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("<center>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></center>","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,0,50,10,KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnChannelJoin));
	u->setSuffix(__tr2qs_ctx(" lines","options"));
	mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>0 lines</b><br>Maximum value: <b>50 lines</b></center>","options"));
	connect(b,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
	u = addUIntSelector(box,__tr2qs_ctx("Interval:","options"),KviOption_uintDaysIntervalToPasteOnChannelJoin,1,10,10,KVI_OPTION_BOOL(KviOption_boolPasteLastLogOnChannelJoin));
	u->setSuffix(__tr2qs_ctx(" days","options"));
	mergeTip(u,__tr2qs_ctx("<center>Minimum value: <b>0 days</b><br>Maximum value: <b>10 days</b></center>","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("<center>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. If the server supports IRCv3.1's away-notify extension, it will be used instead of WHO requests.</center>","options"));

	addRowSpacer(0,5,4,5);
}
示例#6
0
OptionsWidget_windowListTreeFeatures::OptionsWidget_windowListTreeFeatures(QWidget * parent)
    : KviOptionsWidget(parent)
{
	setObjectName("treewindowlist_options_widget");
	createLayout();

	KviUIntSelector * u;

	u = addUIntSelector(0, 1, 0, 1, __tr2qs_ctx("Minimum width:", "options"), KviOption_uintTreeWindowListMinimumWidth, 24, 1024, 125);
	u->setSuffix(__tr2qs_ctx(" pixels", "options"));
	addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Mouse wheel changes the active window instead of scrolling the scrollbar", "options"), KviOption_boolWheelScrollsWindowsList);

	addRowSpacer(0, 4, 0, 4);
}
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);
}
示例#8
0
OptionsWidget_dccVoice::OptionsWidget_dccVoice(QWidget *p):KviOptionsWidget(p)
{
	createLayout();

	KviBoolSelector * b1 = addBoolSelector(0,0,0,0,__tr2qs_ctx("Open all minimized","options"),KviOption_boolCreateMinimizedDccVoice);
	KviTalGroupBox * g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("On Voice Request","options"));
	KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccVoice);

	b = addBoolSelector(g,__tr2qs_ctx("Open minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccVoiceWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccVoice));
	connect(b1,SIGNAL(toggled(bool)),b,SLOT(setNotEnabled(bool)));

	addBoolSelector(0,2,0,2,__tr2qs_ctx("Force half-duplex mode on sound device","options"), KviOption_boolDccVoiceForceHalfDuplex);
	addBoolSelector(0,3,0,3,__tr2qs_ctx("Volume slider controls PCM, not Master","options"), KviOption_boolDccVoiceVolumeSliderControlsPCM);

	addStringSelector(0,4,0,4,__tr2qs_ctx("Sound device:","options"), KviOption_stringDccVoiceSoundDevice)->setMinimumLabelWidth(150);
	addStringSelector(0,5,0,5,__tr2qs_ctx("Mixer device:","options"), KviOption_stringDccVoiceMixerDevice)->setMinimumLabelWidth(150);

	KviUIntSelector * u = addUIntSelector(0,6,0,6,__tr2qs_ctx("Pre-buffer size:","options"), KviOption_uintDccVoicePreBufferSize, 2048, 65536, 32000);
	u->setSuffix(" bytes");

	addRowSpacer(0,7,0,7);
}
示例#9
0
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_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);
}
示例#11
0
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);
}
示例#12
0
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);
}
示例#13
0
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);
}
示例#14
0
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);
}