Example #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);
}
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);
}
Example #3
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);
}
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);
}
Example #5
0
OptionsWidget_themeTransparency::OptionsWidget_themeTransparency(QWidget * parent)
: KviOptionsWidget(parent)
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY

	createLayout();

	KviUIntSelector * u = addUIntSelector(0,0,1,0,__tr2qs_ctx("Global window opacity percent:","options"),KviOption_uintGlobalWindowOpacityPercent,
			50,100,100, true);

	m_pUseTransparencyBoolSelector = addBoolSelector(0,1,1,1,__tr2qs_ctx("Enable transparency","options"),KviOption_boolUseGlobalPseudoTransparency);
	#ifdef COMPILE_X11_SUPPORT
		mergeTip(m_pUseTransparencyBoolSelector,
			__tr2qs_ctx("This option makes all KVIrc windows look " \
				"transparent.<br>You must choose a blending " \
				"background image below or check the " \
				"\"Use compositing for real transparency\" option.","options"));
	#elif defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
		mergeTip(m_pUseTransparencyBoolSelector,
			__tr2qs_ctx("This option makes all KVIrc windows look " \
				"transparent.<br>You must choose a blending " \
				"background image below or check the " \
				"\"Use desktop background for transparency\" option.","options"));
	#else
		mergeTip(m_pUseTransparencyBoolSelector,
			__tr2qs_ctx("This option makes all KVIrc windows look " \
				"like transparent.<br>You must choose a blending " \
				"background image below.","options"));
	#endif

	u = addUIntSelector(0,2,1,2,__tr2qs_ctx("Child window opacity:","options"),KviOption_uintGlobalTransparencyChildFadeFactor,
			0,100,35,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
	connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));

	u = addUIntSelector(0,3,1,3,__tr2qs_ctx("Parent window opacity:","options"),KviOption_uintGlobalTransparencyParentFadeFactor,
			0,100,10,KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
	connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));

	KviColorSelector * c = addColorSelector(0,4,1,4,__tr2qs_ctx("Blend color:","options"),KviOption_colorGlobalTransparencyFade,
			KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
	connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),c,SLOT(setEnabled(bool)));

	#ifdef COMPILE_X11_SUPPORT
		m_pUseCompositingForTransparencyBoolSelector = addBoolSelector(0,5,1,5,__tr2qs_ctx("Use compositing for real transparency","options"),KviOption_boolUseCompositingForTransparency, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));

		m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,6,1,6,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground, KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && !KVI_OPTION_BOOL(KviOption_boolUseCompositingForTransparency));
		layout()->setRowStretch(6,1);

		if(g_pApp->supportsCompositing())
		{
			connect(m_pUseTransparencyBoolSelector,SIGNAL(toggled(bool)),m_pUseCompositingForTransparencyBoolSelector,SLOT(setEnabled(bool)));
			connect(m_pUseCompositingForTransparencyBoolSelector,SIGNAL(toggled(bool)),this,SLOT(enableGlobalBackgroundPixmapSelector(bool)));
		} else {
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);
}
Example #7
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_alerts::OptionsWidget_alerts(QWidget * parent)
    : KviOptionsWidget(parent)
{
    setObjectName("highlighting_options_widget");

    createLayout();

    KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Alert Restrictions","options"));
    KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Restrict alert","options"),KviOption_boolHighlightOnlyNormalMsg);
    mergeTip(b3, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the window list only if a normal message is received in a channel.<br>Actions like joins, parts and mode changes will be ignored.<br> This is useful if you are in channels with a high rate of traffic and only want to be alerted for messages that are interesting to you.</center>","options"));

    KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Alert for highlighted words","options"),KviOption_boolHighlightOnlyNormalMsgHighlightInChanToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
    mergeTip(b4, __tr2qs_ctx("<center>If this option is enabled, the window list will also alert for messages which contain a word from the highlighted words list above.</center>","options"));

    KviBoolSelector * b5 = addBoolSelector(g,__tr2qs_ctx("Alert for query messages","options"),KviOption_boolHighlightOnlyNormalMsgQueryToo,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyNormalMsg));
    mergeTip(b5, __tr2qs_ctx("<center>If this option is enabled, the window list will also alert for messages which are shown in queries.</center>","options"));
    connect(b3,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool)));
    connect(b3,SIGNAL(toggled(bool)),b5,SLOT(setEnabled(bool)));

    KviBoolSelector * b6 = addBoolSelector(g,__tr2qs_ctx("Use custom alert level","options"),KviOption_boolHighlightOnlyAtCostumHighlightLevel);
    mergeTip(b6, __tr2qs_ctx("<center>If this option is enabled, KVIrc will alert in the window list only if the specified alert level is reached.</center>","options"));

    KviUIntSelector * b7 = addUIntSelector(g,__tr2qs_ctx("Minimum alert level:","options"),KviOption_uintMinHighlightLevel,1,KVI_MSGTYPE_MAXLEVEL,KVI_MSGTYPE_MAXLEVEL,KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
    b7->setEnabled(KVI_OPTION_BOOL(KviOption_boolHighlightOnlyAtCostumHighlightLevel));
    mergeTip(b7, __tr2qs_ctx("<center>This option sets the minimum alert level for the window list.</center>","options"));
    connect(b6,SIGNAL(toggled(bool)),b7,SLOT(setEnabled(bool)));

    addRowSpacer(0,1,0,1);
}
Example #9
0
KviUIntSelector * KviOptionsWidget::addUIntSelector(QWidget * pParent,const QString & txt,
	int optId,unsigned int uLowBound,
	unsigned int uHighBound,unsigned int uDefault,bool bEnabled)
{
	m_iResetFlags |= (g_uintOptionsTable[optId].flags & KviOption_resetMask);
	KviUIntSelector * d = addUIntSelector(pParent,txt,&(KVI_OPTION_UINT(optId)),uLowBound,uHighBound,uDefault,bEnabled);
	QString tmp = m_szBasicTipStart;
	tmp += g_uintOptionsTable[optId].name;
	tmp += m_szBasicTipEnd;
	KviTalToolTip::add(d,tmp);
	return d;
}
Example #10
0
OptionsWidget_windowListTreeFeatures::OptionsWidget_windowListTreeFeatures(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("treewindowlist_options_widget");

	createLayout();

	addUIntSelector(0,1,0,1,__tr2qs_ctx("Minimum width:","options"),KviOption_uintTreeWindowListMinimumWidth,24,1024,125);
	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_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);
}
Example #12
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);

}
Example #13
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);
}
Example #14
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);
}
Example #15
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);
}
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_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);
}
Example #18
0
OptionsWidget_identService::OptionsWidget_identService(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("ident_options_widget");
	createLayout();

#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
	m_pEnableIdent = addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable Ident service","options"),KviOption_boolUseIdentService);
#else
	m_pEnableIdent = addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable Ident service (bad practice on UNIX!)","options"),KviOption_boolUseIdentService);
#endif
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool)));

	KviTalGroupBox * gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Output Verbosity","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));

	addLabel(gbox,__tr2qs_ctx("Output Ident service messages to:","options"));

	m_pActiveRadio = new QRadioButton(__tr2qs_ctx("Active window","options"),gbox);
	m_pConsoleRadio = new QRadioButton(__tr2qs_ctx("Console","options"),gbox);
	m_pQuietRadio = new QRadioButton(__tr2qs_ctx("Do not show any Ident service messages","options"),gbox);

	switch(KVI_OPTION_UINT(KviOption_uintIdentdOutputMode))
	{
		case KviIdentdOutputMode::Quiet :
			m_pQuietRadio->setChecked(true);
			break;
		case KviIdentdOutputMode::ToConsole :
			m_pConsoleRadio->setChecked(true);
			break;
		case KviIdentdOutputMode::ToActiveWindow :
			m_pActiveRadio->setChecked(true);
			break;
	}

	gbox = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));

	KviBoolSelector *b = addBoolSelector(gbox,__tr2qs_ctx("Enable Ident service only while connecting to server","options"),KviOption_boolUseIdentServiceOnlyOnConnect);
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool)));

	KviStringSelector * s = addStringSelector(gbox,__tr2qs_ctx("Ident username:"******"options"),
		KviOption_stringIdentdUser,KVI_OPTION_BOOL(KviOption_boolUseIdentService));
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),s,SLOT(setEnabled(bool)));

	KviUIntSelector * u = addUIntSelector(gbox,__tr2qs_ctx("Service port:","options"),
		KviOption_uintIdentdPort,0,65535,113,KVI_OPTION_BOOL(KviOption_boolUseIdentService));
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),u,SLOT(setEnabled(bool)));
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));

	gbox = addGroupBox(0,3,0,3,Qt::Horizontal,__tr2qs_ctx("IPv6 Settings","options"),KVI_OPTION_BOOL(KviOption_boolUseIdentService));
	m_pEnableIpv6 = addBoolSelector(gbox,__tr2qs_ctx("Enable service for IPv6","options"),
		KviOption_boolIdentdEnableIPv6,
		KVI_OPTION_BOOL(KviOption_boolUseIdentService));
#ifdef COMPILE_IPV6_SUPPORT
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),m_pEnableIpv6,SLOT(setEnabled(bool)));
	connect(m_pEnableIpv6,SIGNAL(toggled(bool)),this,SLOT(enableIpv4InIpv6(bool)));
#else
	m_pEnableIpv6->setEnabled(false);
#endif
	m_pIpv4InIpv6 = addBoolSelector(gbox,__tr2qs_ctx("IP stack treats IPv4 as part of IPv6 namespace","options"),
		KviOption_boolIdentdIPv6ContainsIPv4,
		KVI_OPTION_BOOL(KviOption_boolUseIdentService) && KVI_OPTION_BOOL(KviOption_boolIdentdEnableIPv6));
	connect(m_pEnableIdent,SIGNAL(toggled(bool)),gbox,SLOT(setEnabled(bool)));

	addLabel(0,4,0,4,
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
			__tr2qs_ctx("<p><b>Warning:</b><br>" \
			"This is a <b>non RFC 1413 compliant</b> Ident daemon that implements " \
			"only a limited subset of the Identification Protocol specifications. If it is possible, install a " \
			"real Ident daemon.</p>","options")
#else
			__tr2qs_ctx("<p><b>Warning:</b><br>" \
			"This is a <b>non RFC 1413 compliant</b> Ident daemon that implements " \
			"only a limited subset of the <b>Identification Protocol</b> specifications.<br>" \
			"On UNIX, you may also need root privileges to bind to the auth port (113).<br>" \
			"It is <b>highly recommended</b> that a <b>real</b> system-wide Ident daemon be used instead, "\
			"or none at all if Ident is not required.</p>","options")
#endif
	);

	addRowSpacer(0,5,0,5);
}