예제 #1
0
OptionsWidget_identityAdvanced::OptionsWidget_identityAdvanced(QWidget * parent)
: KviOptionsWidget(parent)
{
	m_pISelector=0;
	m_pWSelector=0;
	m_pSSelector=0;

	m_sModeStr = KVI_OPTION_STRING(KviOption_stringDefaultUserMode);
	m_bI = m_sModeStr.contains('i');
	m_bW = m_sModeStr.contains('w');
	m_bS = m_sModeStr.contains('s');

	createLayout();
	layout()->setMargin(10);

	KviTalGroupBox * gbox = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("User Mode","options"));
	m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI);
	m_pSSelector = addBoolSelector(gbox,__tr2qs_ctx("Server notices (+s)","options"),&m_bS);
	m_pWSelector = addBoolSelector(gbox,__tr2qs_ctx("Wallops (+w)","options"),&m_bW);

	gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Default Messages","options"));

	KviStringSelector * sel = addStringSelector(gbox, __tr2qs_ctx("Part message:","options"),KviOption_stringPartMessage);
	sel->setMinimumLabelWidth(120);

	mergeTip(sel,__tr2qs_ctx("<center>This is the default part message that will be used when you<br>" \
			"leave a channel by closing a channel window.</center>","options"));

	sel = addStringSelector(gbox, __tr2qs_ctx("Quit message:","options"),KviOption_stringQuitMessage);
	sel->setMinimumLabelWidth(120);
	mergeTip(sel,__tr2qs_ctx("<center>This is the default quit message that will be used when you<br>" \
			"quit your IRC session by closing the console window or disconnecting by pressing the disconnect button.</center>","options"));

	addRowSpacer(0,2,0,2);
}
OptionsWidget_urlHandlers::OptionsWidget_urlHandlers(QWidget * parent)
: KviOptionsWidget(parent)
{
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
	#define START_ROW 2
#else
	#define START_ROW 1
#endif

	setObjectName("urlhandlers_options_widget");
	createLayout();

	KviTalGroupBox * gbox = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Mouse handler","options"));

	addLabel(gbox,__tr2qs_ctx("How many click to open links?","options"));

	m_pClickRadio = new QRadioButton(__tr2qs_ctx("Single click","options"),gbox);
	m_pDoubleClickRadio = new QRadioButton(__tr2qs_ctx("Double click","options"),gbox);

	switch(KVI_OPTION_UINT(KviOption_uintUrlMouseClickNum))
	{
		case 1:
			m_pClickRadio->setChecked(true);
			break;
		case 2:
			m_pDoubleClickRadio->setChecked(true);
			break;
	}

	gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Protocol handler","options"));

#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
	KviBoolSelector *b = addBoolSelector(gbox,__tr2qs_ctx("Use system URL handlers","options"),KviOption_boolUseSystemUrlHandlers);
#endif

	m_pHttpHandler=addStringSelector(gbox,__tr2qs_ctx("<b>http://</b> handler command:","options"),KviOption_stringUrlHttpCommand);
	m_pHttpHandler->setMinimumLabelWidth(225);
	m_pHttpsHandler=addStringSelector(gbox,__tr2qs_ctx("<b>https://</b> handler command:","options"),KviOption_stringUrlHttpsCommand);
	m_pHttpsHandler->setMinimumLabelWidth(225);
	m_pFtpHandler=addStringSelector(gbox,__tr2qs_ctx("<b>ftp://</b> handler command:","options"),KviOption_stringUrlFtpCommand);
	m_pFtpHandler->setMinimumLabelWidth(225);
	m_pMailtoHandler=addStringSelector(gbox,__tr2qs_ctx("<b>mailto:</b> handler command:","options"),KviOption_stringUrlMailtoCommand);
	m_pMailtoHandler->setMinimumLabelWidth(225);
	m_pFileHandler=addStringSelector(gbox,__tr2qs_ctx("<b>file://</b> handler command:","options"),KviOption_stringUrlFileCommand);
	m_pFileHandler->setMinimumLabelWidth(225);
	m_pOtherHandler=addStringSelector(gbox,__tr2qs_ctx("Unknown protocol handler command:","options"),KviOption_stringUrlUnknownCommand);
	m_pOtherHandler->setMinimumLabelWidth(225);

#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
	m_pHttpHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	m_pHttpsHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	m_pFtpHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	m_pFileHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	m_pMailtoHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	m_pOtherHandler->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseSystemUrlHandlers));
	connect(b,SIGNAL(toggled(bool)),this,SLOT(toggleEditors(bool)));
#endif

	addRowSpacer(0,START_ROW+6,0,START_ROW+6);
}
예제 #3
0
OptionsWidget_dccSendGeneral::OptionsWidget_dccSendGeneral(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("dccsend_options_widget");
	createLayout();

	KviBoolSelector * b;

	KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Incoming File","options"));
	KviBoolSelector * b2 = addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccSend);
	KviBoolSelector * b3 = addBoolSelector(g,__tr2qs_ctx("Open transfer window as minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccSendWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccSend));
	KviBoolSelector * b4 = addBoolSelector(g,__tr2qs_ctx("Automatically resume when auto-accepted","options"),KviOption_boolAutoResumeDccSendWhenAutoAccepted,KVI_OPTION_BOOL(KviOption_boolAutoAcceptDccSend));

	g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Save Location","options"));
	addDirectorySelector(g,__tr2qs_ctx("Download folder:","options"),KviOption_stringIncomingPath);
	addBoolSelector(g,__tr2qs_ctx("Sort saved files by nicknames (create subfolders)","options"),KviOption_boolSortReceivedByDccFilesByNicks);
	addBoolSelector(g,__tr2qs_ctx("Guess save path from media type","options"),KviOption_boolUseIncomingDccMediaTypeSavePath);


	g = addGroupBox(0,2,0,2,Qt::Horizontal,__tr2qs_ctx("On Download Completion","options"));
	addBoolSelector(g,__tr2qs_ctx("Notify completion in console","options"),KviOption_boolNotifyDccSendSuccessInConsole);
	addBoolSelector(g,__tr2qs_ctx("Notify completion in notifier","options"),KviOption_boolNotifyDccSendSuccessInNotifier);
	b = addBoolSelector(g,__tr2qs_ctx("Automatically clear transfer","options"),KviOption_boolAutoCloseDccSendOnSuccess);
	mergeTip(b,
		__tr2qs_ctx("<center>This option will cause successfully terminated transfers " \
				"to be automatically removed from the transfer window.</center>","options"));


	KviBoolSelector * b1 = addBoolSelector(0,3,0,3,__tr2qs_ctx("Always open transfer window as minimized","options"),KviOption_boolCreateMinimizedDccSend);

	connect(b1,SIGNAL(toggled(bool)),b3,SLOT(setNotEnabled(bool)));
	connect(b2,SIGNAL(toggled(bool)),b4,SLOT(setEnabled(bool)));

	addRowSpacer(0,4,0,4);
}
예제 #4
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);
}
OptionsWidget_privmsg::OptionsWidget_privmsg(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("privmsg_options_widget");
	createLayout();

	KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("General","options"));

	addBoolSelector(g,__tr2qs_ctx("Show message icons","options"),KviOption_boolIrcViewShowImages);
	addBoolSelector(g,__tr2qs_ctx("Draw some emoticons (smileys) as pictures","options"),KviOption_boolDrawEmoticons);
	addBoolSelector(g,__tr2qs_ctx("Don't show colors in user messages","options"),KviOption_boolStripMircColorsInUserMessages);

	g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Nicknames","options"));

	m_pUseSmartColorSelector = addBoolSelector(g,__tr2qs_ctx("\"Smart\" nickname colors","options"),KviOption_boolColorNicks);

	KviTalHBox * hb = new KviTalHBox(g);
	hb->setSpacing(4);
	m_pSpecialSmartColorSelector = addBoolSelector(hb,__tr2qs_ctx("Use specified colors for own nick:","options"),KviOption_boolUseSpecifiedSmartColorForOwnNick,KVI_OPTION_BOOL(KviOption_boolColorNicks));

	m_pSmartColorSelector = addMircTextColorSelector(hb,"",KviOption_uintUserIrcViewOwnForeground,KviOption_uintUserIrcViewOwnBackground,KVI_OPTION_BOOL(KviOption_boolColorNicks) && KVI_OPTION_BOOL(KviOption_boolUseSpecifiedSmartColorForOwnNick));

	connect(m_pSpecialSmartColorSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableSmartColorSelector(bool)));
	connect(m_pUseSmartColorSelector,SIGNAL(toggled(bool)),m_pSpecialSmartColorSelector,SLOT(setEnabled(bool)));

	KviBoolSelector * b2 = addBoolSelector(g,__tr2qs_ctx("Use same colors as in the userlist","options"),KviOption_boolUseUserListColorsAsNickColors,!KVI_OPTION_BOOL(KviOption_boolColorNicks));
	connect(m_pUseSmartColorSelector,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool)));

	addBoolSelector(g,__tr2qs_ctx("Show nicknames in bold","options"),KviOption_boolBoldedNicks);
	addBoolSelector(g,__tr2qs_ctx("Show user and host","options"),KviOption_boolShowUserAndHostInPrivmsgView);
	addBoolSelector(g,__tr2qs_ctx("Show channel mode prefix","options"),KviOption_boolShowChannelUserFlagInPrivmsgView);
	KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("User-defined prefix and postfix","options"),KviOption_boolUseExtendedPrivmsgView);

	QLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options"));

	l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView));
	connect(b,
		SIGNAL(toggled(bool)),
		l,
		SLOT(setEnabled(bool)));

	KviTalVBox * vb = new KviTalVBox(g);
	vb->setSpacing(5);

	connect(
		b,
		SIGNAL(toggled(bool)),
		addStringSelector(vb,__tr2qs_ctx("Prefix:","options"),KviOption_stringExtendedPrivmsgPrefix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
		SLOT(setEnabled(bool)));
	connect(
		b,
		SIGNAL(toggled(bool)),
		addStringSelector(vb,__tr2qs_ctx("Postfix:","options"),KviOption_stringExtendedPrivmsgPostfix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
		SLOT(setEnabled(bool)));
	addRowSpacer(0,3,0,3);
}
OptionsWidget_highlighting::OptionsWidget_highlighting(QWidget * parent)
    : KviOptionsWidget(parent)
{
    setObjectName("highlighting_options_widget");

    createLayout();

    KviBoolSelector * b = addBoolSelector(0,0,0,0,__tr2qs_ctx("Enable word highlighting","options"),KviOption_boolUseWordHighlighting);
    KviStringListSelector * sl = addStringListSelector(0,1,0,1,__tr2qs_ctx("Words to highlight:","options"),KviOption_stringlistHighlightWords,KVI_OPTION_BOOL(KviOption_boolUseWordHighlighting));

    connect(b,SIGNAL(toggled(bool)),sl,SLOT(setEnabled(bool)));

    // This can be used even without Word highlighting
    b = addBoolSelector(0,2,0,2,__tr2qs_ctx("Highlight messages containing my nickname","options"),KviOption_boolAlwaysHighlightNick);
    mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will highlight any user message containing your current nickname</center>","options"));

    b = addBoolSelector(0,3,0,3,__tr2qs_ctx("Words/Nick matching is case sensitive ","options"),KviOption_boolCaseSensitiveHighlighting);
    mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will match your nick and/or the words you specified in a case sensitive manner</center>","options"));

    KviTalGroupBox * gbox = addGroupBox(0,4,0,4,Qt::Horizontal,__tr2qs_ctx("Highlighting Method","options"));

    // note: KviTalGroupBox automatically deletes its previous layout on setLayout()
    // note2: every QWidget will take ownership of its layout.
    QGridLayout * g = new QGridLayout();
    gbox->setLayout(g);

    m_pHighlightAllOccurencesRadioButton = new QRadioButton(__tr2qs_ctx("Highlight every occurence of a word inside text","options"),gbox);
    g->addWidget(m_pHighlightAllOccurencesRadioButton,0,0,1,2);
    m_pHighlightAllOccurencesRadioButton->setChecked(KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting));
    KviTalToolTip::add(m_pHighlightAllOccurencesRadioButton,__tr2qs_ctx("<center>This selection will cause KVIrc to search for the highlighted words or nicknames inside the whole text. This will also highlight parts of words (eg. if your nickname is Mark then Markus will be highlighted too).</center>","options"));

    m_pHighlightWholeWordsOnlyRadioButton = new QRadioButton(__tr2qs_ctx("Highlight only whole words splitting on space and on:","options"),gbox);
    g->addWidget(m_pHighlightWholeWordsOnlyRadioButton,1,0,1,1);
    m_pHighlightWholeWordsOnlyRadioButton->setChecked(!KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting));
    KviTalToolTip::add(m_pHighlightWholeWordsOnlyRadioButton,__tr2qs_ctx("<center>This selection will first split the string on the specified boundaries (including space) and then will compare all the parts with the highlighted words.</center>","options"));

    m_pWordSplitterCharactersEdit = new QLineEdit(gbox);
    m_pWordSplitterCharactersEdit->setText(KVI_OPTION_STRING(KviOption_stringWordSplitters));
    m_pWordSplitterCharactersEdit->setEnabled(!KVI_OPTION_BOOL(KviOption_boolUseFullWordHighlighting));
    g->addWidget(m_pWordSplitterCharactersEdit,1,1,1,1);

    connect(m_pHighlightWholeWordsOnlyRadioButton,SIGNAL(toggled(bool)),m_pWordSplitterCharactersEdit,SLOT(setEnabled(bool)));

    gbox = addGroupBox(0,5,0,5,Qt::Horizontal,__tr2qs_ctx("Alert Options","options"));

    b = addBoolSelector(gbox,__tr2qs_ctx("Flash the system taskbar entry on highlighted messages","options"),KviOption_boolFlashWindowOnHighlightedMessages);
    mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will (attempt to) flash the system taskbar entry when a highlighted message is printed and KVIrc is not the active window</center>","options"));
    b = addBoolSelector(gbox,__tr2qs_ctx("Popup the notifier window on highlighted messages","options"),KviOption_boolPopupNotifierOnHighlightedMessages);
    mergeTip(b,__tr2qs_ctx("<center>If this option is enabled, KVIrc will popup a little notifier window in the low right corner of your desktop when a highlighted message is printed and KVIrc is not the active window</center>","options"));

    addRowSpacer(0,6,0,6);
}
예제 #7
0
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_away::OptionsWidget_away(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("away_options_widget");

	createLayout();

	m_pEnableAwayMessage = addBoolSelector(0,0,0,0, __tr2qs_ctx("Enable default away message","options"), KviOption_boolUseAwayMessage);
	connect(m_pEnableAwayMessage,SIGNAL(toggled(bool)),this,SLOT(enableAwayMessage(bool)));
	m_pAwayMessage = addStringSelector(0,1,0,1, __tr2qs_ctx("Default away message:","options"), KviOption_stringAwayMessage, KVI_OPTION_BOOL(KviOption_boolUseAwayMessage));

	addBoolSelector(0,2,0,2, __tr2qs_ctx("User input exits away mode","options"), KviOption_boolExitAwayOnInput);

	KviTalGroupBox *g = addGroupBox(0,3,0,3,Qt::Horizontal,__tr2qs_ctx("Away Nickname","options"));
	m_pEnableAwayNick = addBoolSelector(g,__tr2qs_ctx("Change nickname on away","options"),KviOption_boolChangeNickAway);
	connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool)));

	m_pEnableCustomAwayNick = addBoolSelector(g,__tr2qs_ctx("Use automatic nickname ([5 letters]AWAY)","options"),KviOption_boolAutoGeneratedAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway));
	connect(m_pEnableAwayNick,SIGNAL(toggled(bool)),m_pEnableCustomAwayNick,SLOT(setEnabled(bool)));
	connect(m_pEnableCustomAwayNick,SIGNAL(toggled(bool)),this,SLOT(enableCustomAwayText(bool)));

	m_pCustomAwayNick = addStringSelector(g,__tr2qs_ctx("Custom nickname (%nick% means a current nick):","options"),KviOption_stringCustomAwayNick,KVI_OPTION_BOOL(KviOption_boolChangeNickAway) && !(KVI_OPTION_BOOL(KviOption_boolAutoGeneratedAwayNick)));

	addRowSpacer(0,4,0,4);
}
OptionsWidget_interfaceFeatures::OptionsWidget_interfaceFeatures(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("interfacefeatures_options_widget");
	createLayout();

	addBoolSelector(0,0,0,0,__tr2qs_ctx("Minimize on startup","options"),KviOption_boolStartupMinimized);
	addBoolSelector(0,1,0,1,__tr2qs_ctx("Confirm quit with active connections","options"),KviOption_boolConfirmCloseWhenThereAreConnections);
	addBoolSelector(0,2,0,2,__tr2qs_ctx("Remember window properties","options"),KviOption_boolWindowsRememberProperties);

	addBoolSelector(0,3,0,3,__tr2qs_ctx("Enable visual effects","options"),KviOption_boolEnableVisualEffects);
	addBoolSelector(0,4,0,4,__tr2qs_ctx("Hide channel window tool buttons by default","options"),KviOption_boolHideWindowToolButtons);
#ifdef COMPILE_ON_MAC
	addBoolSelector(0,5,0,5,__tr2qs_ctx("Require ⌘ to be held down to copy text","options"),KviOption_boolRequireControlToCopy);
#else
	addBoolSelector(0,5,0,5,__tr2qs_ctx("Require Ctrl to be held down to copy text","options"),KviOption_boolRequireControlToCopy);
#endif

	KviTalGroupBox * g = addGroupBox(0,6,0,6,Qt::Horizontal,__tr2qs_ctx("Open Dialog Window for","options"));
	addBoolSelector(g,__tr2qs_ctx("Preferences","options"),KviOption_boolShowGeneralOptionsDialogAsToplevel);
	addBoolSelector(g,__tr2qs_ctx("Registered users","options"),KviOption_boolShowRegisteredUsersDialogAsToplevel);
	addBoolSelector(g,__tr2qs_ctx("Identity","options"),KviOption_boolShowIdentityDialogAsToplevel);
	addBoolSelector(g,__tr2qs_ctx("Servers","options"),KviOption_boolShowServersConnectDialogAsToplevel);
	addBoolSelector(g,__tr2qs_ctx("Join channels","options"),KviOption_boolShowChannelsJoinDialogAsToplevel);
	addRowSpacer(0,7,0,7);
}
예제 #10
0
OptionsWidget_userListBackground::OptionsWidget_userListBackground(QWidget * parent)
    : KviOptionsWidget(parent, "userlistlook_background_options_widget")
{
	createLayout();

	KviTalGroupBox * g = addGroupBox(0, 0, 1, 0, Qt::Horizontal, __tr2qs_ctx("Background Colors", "options"));
	addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorUserListViewBackground);
	addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorUserListViewSelectionBackground);

	addPixmapSelector(0, 1, 1, 1, __tr2qs_ctx("Background image:", "options"), KviOption_pixmapUserListViewBackground);

	addLabel(0, 2, 0, 2, __tr2qs_ctx("Horizontal alignment:", "options"));
	m_pHorizontalAlign = new QComboBox(this);
	addWidgetToLayout(m_pHorizontalAlign, 1, 2, 1, 2);

	addLabel(0, 3, 0, 3, __tr2qs_ctx("Vertical alignment:", "options"));
	m_pVerticalAlign = new QComboBox(this);
	addWidgetToLayout(m_pVerticalAlign, 1, 3, 1, 3);

	m_pHorizontalAlign->addItem(__tr2qs_ctx("Tile", "options"));
	m_pHorizontalAlign->addItem(__tr2qs_ctx("Left", "options"));
	m_pHorizontalAlign->addItem(__tr2qs_ctx("Right", "options"));
	m_pHorizontalAlign->addItem(__tr2qs_ctx("Center", "options"));

	m_pVerticalAlign->addItem(__tr2qs_ctx("Tile", "options"));
	m_pVerticalAlign->addItem(__tr2qs_ctx("Top", "options"));
	m_pVerticalAlign->addItem(__tr2qs_ctx("Bottom", "options"));
	m_pVerticalAlign->addItem(__tr2qs_ctx("Center", "options"));

	switch(KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignHorizontal_Mask)
	{
		case Qt::AlignLeft:
			m_pHorizontalAlign->setCurrentIndex(1);
			break;
		case Qt::AlignRight:
			m_pHorizontalAlign->setCurrentIndex(2);
			break;
		case Qt::AlignHCenter:
			m_pHorizontalAlign->setCurrentIndex(3);
			break;
		default:
			m_pHorizontalAlign->setCurrentIndex(0);
	}

	switch(KVI_OPTION_UINT(KviOption_uintUserListPixmapAlign) & Qt::AlignVertical_Mask)
	{
		case Qt::AlignTop:
			m_pVerticalAlign->setCurrentIndex(1);
			break;
		case Qt::AlignBottom:
			m_pVerticalAlign->setCurrentIndex(2);
			break;
		case Qt::AlignVCenter:
			m_pVerticalAlign->setCurrentIndex(3);
			break;
		default:
			m_pVerticalAlign->setCurrentIndex(0);
	}
	layout()->setRowStretch(1, 1);
}
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);
}
예제 #12
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);
}
예제 #13
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);
}
예제 #14
0
OptionsWidget_dccChat::OptionsWidget_dccChat(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("dccchat_options_widget");
	createLayout();

	KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Chat Request","options"));
	addBoolSelector(g,__tr2qs_ctx("Automatically accept","options"),KviOption_boolAutoAcceptDccChat);

	KviBoolSelector * b1 = addBoolSelector(g,__tr2qs_ctx("Open minimized when auto-accepted","options"),KviOption_boolCreateMinimizedDccChatWhenAutoAccepted,!KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccChat));

	KviBoolSelector * b2 = addBoolSelector(0,1,0,1,__tr2qs_ctx("Always open as minimized","options"),KviOption_boolCreateMinimizedDccChat);

	connect(b2,SIGNAL(toggled(bool)),b1,SLOT(setNotEnabled(bool)));

#if (defined(COMPILE_ON_WINDOWS) || defined(COMPILE_KDE_SUPPORT) || defined(COMPILE_ON_MINGW))
	b2 = addBoolSelector(0,2,0,2,__tr2qs_ctx("Flash system taskbar on new DCC chat message","options"),KviOption_boolFlashDccChatWindowOnNewMessages);
		mergeTip(b2,
			__tr2qs_ctx("<center>This option causes the system taskbar entry for KVIrc to flash when a new DCC chat message " \
				"is received and the KVIrc window is not the active.</center>","options"));
#endif

	b2 = addBoolSelector(0,3,0,3, __tr2qs_ctx("Popup notifier on new DCC chat message","options"),KviOption_boolPopupNotifierOnNewDccChatMessages);
	mergeTip(b2,
		__tr2qs_ctx("<center>This option causes a small notifier window to pop up " \
			"in the low right corner of the screen when a new message is received " \
			"and the KVIrc window is not active.</center>","options"));

	addRowSpacer(0,4,0,4);
}
예제 #15
0
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);
}
예제 #16
0
OptionsWidget_connectionSsl::OptionsWidget_connectionSsl(QWidget * parent)
    : KviOptionsWidget(parent)
{
	setObjectName("ssl_options_widget");
	createLayout();

#ifdef COMPILE_SSL_SUPPORT

	KviBoolSelector * b;
	KviFileSelector * f;
	KviPasswordSelector * p;

	KviTalGroupBox * gbox = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Certificate", "options"));

	b = addBoolSelector(gbox, __tr2qs_ctx("Use SSL certificate (PEM format only)", "options"),
	    &(KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)), true);

	f = addFileSelector(gbox, __tr2qs_ctx("Certificate location:", "options"), &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePath)),
	    KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
	connect(b, SIGNAL(toggled(bool)), f, SLOT(setEnabled(bool)));

	p = new KviPasswordSelector(gbox, __tr2qs_ctx("Certificate password:"******"options"), &(KVI_OPTION_STRING(KviOption_stringSSLCertificatePass)),
	    KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
	connect(b, SIGNAL(toggled(bool)), p, SLOT(setEnabled(bool)));

	gbox = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Private Key", "options"));

	b = addBoolSelector(gbox, __tr2qs_ctx("Use SSL private key", "options"), &(KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)), true);
	f = addFileSelector(gbox, __tr2qs_ctx("Private key location:", "options"), &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPath)),
	    KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
	connect(b, SIGNAL(toggled(bool)), f, SLOT(setEnabled(bool)));

	p = addPasswordSelector(gbox, __tr2qs_ctx("Private key password:"******"options"), &(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPass)),
	    KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
	connect(b, SIGNAL(toggled(bool)), p, SLOT(setEnabled(bool)));

	addRowSpacer(0, 3, 0, 3);
#else
	addLabel(0, 0, 0, 0, __tr2qs_ctx("This executable has no SSL support.", "options"));
#endif
}
예제 #17
0
OptionsWidget_ircOutput::OptionsWidget_ircOutput(QWidget * pParent)
: KviOptionsWidget(pParent)
{
	setObjectName("ircoutput_options_widget");
	createLayout();

	QLabel * pLabel = new QLabel(__tr2qs_ctx("Output verbosity:","options"),this);
	addWidgetToLayout(pLabel,0,0,0,0);

	m_pVerbosityCombo = new QComboBox(this);
	m_pVerbosityCombo->addItem(__tr2qs_ctx("Mute","options"));
	m_pVerbosityCombo->addItem(__tr2qs_ctx("Quiet","options"));
	m_pVerbosityCombo->addItem(__tr2qs_ctx("Normal","options"));
	m_pVerbosityCombo->addItem(__tr2qs_ctx("Verbose","options"));
	m_pVerbosityCombo->addItem(__tr2qs_ctx("Paranoic","options"));
	addWidgetToLayout(m_pVerbosityCombo,1,0,1,0);

	if(KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) > KVI_VERBOSITY_LEVEL_PARANOIC)
		KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) = KVI_VERBOSITY_LEVEL_NORMAL;
	m_pVerbosityCombo->setCurrentIndex(KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel));

	pLabel = new QLabel(__tr2qs_ctx("DateTime format:","options"),this);
	addWidgetToLayout(pLabel,0,1,0,1);

	m_pDatetimeCombo = new QComboBox(this);
	m_pDatetimeCombo->addItem(__tr2qs_ctx("Classic format","options"));
	m_pDatetimeCombo->addItem(__tr2qs_ctx("ISO 8601 format","options"));
	m_pDatetimeCombo->addItem(__tr2qs_ctx("System locale format","options"));
	addWidgetToLayout(m_pDatetimeCombo,1,1,1,1);

	m_pDatetimeCombo->setCurrentIndex(KVI_OPTION_UINT(KviOption_uintOutputDatetimeFormat));

	KviTalGroupBox * pGroup = addGroupBox(0,2,1,2,Qt::Horizontal,__tr2qs_ctx("Show in Active Window","options"));
	addBoolSelector(pGroup,__tr2qs_ctx("External messages","options"),KviOption_boolExternalMessagesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("External CTCP replies","options"),KviOption_boolCtcpRepliesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("WHOIS replies","options"),KviOption_boolWhoisRepliesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("ChanServ and NickServ notices","options"),KviOption_boolServicesNoticesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("Invite messages","options"),KviOption_boolInvitesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("Server replies","options"),KviOption_boolServerRepliesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("Server notices","options"),KviOption_boolServerNoticesToActiveWindow);
	addBoolSelector(pGroup,__tr2qs_ctx("Broadcast and WALLOPS messages","options"),KviOption_boolOperatorMessagesToActiveWindow);
//	if(KVI_OPTION_UINT(KviOption_uintUserExperienceLevel)>=2)
//	{
		addBoolSelector(0,3,1,3,__tr2qs_ctx("Show extended server information","options"),KviOption_boolShowExtendedServerInfo);
		addBoolSelector(0,4,1,4,__tr2qs_ctx("Show server pings","options"),KviOption_boolShowPingPong);
		addBoolSelector(0,5,1,5,__tr2qs_ctx("Show own parts in the console","options"),KviOption_boolShowOwnParts);
		addBoolSelector(0,6,1,6,__tr2qs_ctx("Show compact mode changes","options"),KviOption_boolShowCompactModeChanges);

		addRowSpacer(0,7,1,7);
//	} else {
//		addRowSpacer(0,2,1,2);
//	}
}
예제 #18
0
OptionsWidget_channelGeneral::OptionsWidget_channelGeneral(QWidget * pParent)
: KviOptionsWidget(pParent)
{
	createLayout();

	KviTalGroupBox * g = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("On Channel Kick","options"));

 	KviBoolSelector *b = addBoolSelector(g,__tr2qs_ctx("Rejoin channel","options"),KviOption_boolRejoinChannelOnKick);
	mergeTip(b,
		__tr2qs_ctx("<center>This option will cause KVIrc to attempt " \
		"to rejoin a channel after being kicked.</center>","options"));
	b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnKick);
	mergeTip(b,
		__tr2qs_ctx("<center>This option will cause KVIrc to keep " \
			"the channel window open after being kicked.<br>" \
			"It might be a good idea to also enable the " \
			"\"Rejoin channel\" option.</center>","options"));

	g = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("On Channel Part","options"));

	b = addBoolSelector(g,__tr2qs_ctx("Keep channel open","options"),KviOption_boolKeepChannelOpenOnPart);
	mergeTip(b,
		__tr2qs_ctx("<center>This option will cause KVIrc to keep " \
			"the channel window open after leaving it.</center>","options"));

	b = addBoolSelector(0,2,0,2,__tr2qs_ctx("Automatically join channel on invite","options"),KviOption_boolAutoJoinOnInvite);
	mergeTip(b,
		__tr2qs_ctx("<center>This option will cause KVIrc to automatically " \
			"join a channel when an INVITE message for that channel is received.<br>" \
			"<b>Warning:</b> This may help spammers harass you. :)</center>","options"));

	b = addBoolSelector(0,3,0,3, __tr2qs_ctx("Always open channels as minimized","options"),KviOption_boolCreateMinimizedChannels);
	mergeTip(b,
		__tr2qs_ctx("<center>This option causes newly created " \
			"channel windows to be immediately minimized.<br>" \
			"Enable this if you don't like channels " \
			"popping up while you're typing something in a channel. :D</center>","options"));

	addRowSpacer(0,4,0,4);
}
예제 #19
0
OptionsWidget_channelGeneral::OptionsWidget_channelGeneral(QWidget * pParent)
    : KviOptionsWidget(pParent)
{
	createLayout();

	KviTalGroupBox * g;
	KviBoolSelector * b;

	g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("On Channel Kick", "options"));

	b = addBoolSelector(g, __tr2qs_ctx("Rejoin channel", "options"), KviOption_boolRejoinChannelOnKick);
	mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to attempt "
	                        "to rejoin a channel after being kicked.", "options"));

	b = addBoolSelector(g, __tr2qs_ctx("Keep channel open", "options"), KviOption_boolKeepChannelOpenOnKick);
	mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to keep "
	                        "the channel window open after being kicked. "
	                        "It might be a good idea to also enable the "
	                        "\"Rejoin channel\" option.", "options"));

	g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("On Channel Part", "options"));

	b = addBoolSelector(g, __tr2qs_ctx("Keep channel open", "options"), KviOption_boolKeepChannelOpenOnPart);
	mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to keep "
	                        "the channel window open after leaving it.", "options"));

	b = addBoolSelector(0, 2, 0, 2, __tr2qs_ctx("Automatically join channel on invite", "options"), KviOption_boolAutoJoinOnInvite);
	mergeTip(b, __tr2qs_ctx("This option will cause KVIrc to automatically "
	                        "join a channel when an INVITE message for that channel is received.<br>"
	                        "<b>Warning:</b> this may help spammers harass you.", "options"));

	b = addBoolSelector(0, 3, 0, 3, __tr2qs_ctx("Open channel windows without focus", "options"), KviOption_boolCreateMinimizedChannels);
	mergeTip(b, __tr2qs_ctx("This option prevents newly created "
	                        "channel windows from diverting application focus.<br>"
	                        "Enable this if you don't like channel windows "
	                        "popping up while you're typing something in a channel.", "options"));

	addRowSpacer(0, 4, 0, 4);
}
예제 #20
0
OptionsWidget_connectionSsl::OptionsWidget_connectionSsl(QWidget * parent)
: KviOptionsWidget(parent)
{
	setObjectName("ssl_options_widget");
	createLayout();

#ifdef COMPILE_SSL_SUPPORT
	KviTalGroupBox * gbox = addGroupBox(0,0,0,0,Qt::Horizontal,__tr2qs_ctx("Certificate","options"));

	KviBoolSelector * b = addBoolSelector(gbox,__tr2qs_ctx("Use SSL certificate (PEM format only)","options"),
		&(KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate)),true);
	KviFileSelector * f = addFileSelector(gbox,__tr2qs_ctx("Certificate location:","options"),
		&(KVI_OPTION_STRING(KviOption_stringSSLCertificatePath)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
	connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
	KviPasswordSelector * p = new KviPasswordSelector(gbox,__tr2qs_ctx("Certificate password:"******"options"),
		&(KVI_OPTION_STRING(KviOption_stringSSLCertificatePass)),KVI_OPTION_BOOL(KviOption_boolUseSSLCertificate));
	connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool)));

	gbox = addGroupBox(0,1,0,1,Qt::Horizontal,__tr2qs_ctx("Private Key","options"));
	b = addBoolSelector(gbox,__tr2qs_ctx("Use SSL private key","options"),
		&(KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey)),true);
	f = addFileSelector(gbox,__tr2qs_ctx("Private key location:","options"),
		&(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPath)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
	connect(b,SIGNAL(toggled(bool)),f,SLOT(setEnabled(bool)));
	p = addPasswordSelector(gbox,__tr2qs_ctx("Private key password:"******"options"),
		&(KVI_OPTION_STRING(KviOption_stringSSLPrivateKeyPass)),KVI_OPTION_BOOL(KviOption_boolUseSSLPrivateKey));
	connect(b,SIGNAL(toggled(bool)),p,SLOT(setEnabled(bool)));

	// This is now handled per-server.
	//b = addBoolSelector(this,__tr2qs_ctx("Use the STARTTLS security protocol if available","options"),&(KVI_OPTION_BOOL(KviOption_boolUseStartTlsIfAvailable)),true);
	//mergeTip(b,__tr2qs_ctx("This option will cause KVIrc to try to reconnect to the server using an encrypted connection","options"));
	//addWidgetToLayout(b,0,2,0,2);

	addRowSpacer(0,3,0,3);
#else
	addLabel(0,0,0,0,__tr2qs_ctx("This executable has no SSL support.","options"));
#endif
}
예제 #21
0
OptionsWidget_ignore::OptionsWidget_ignore(QWidget * parent)
    : KviOptionsWidget(parent)
{
    setObjectName("ignore_options_widget");
    createLayout();

    KviTalGroupBox * g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Enable Ignore for", "options"));
    m_pIgnorePrivmsg = addBoolSelector(g, __tr2qs_ctx("Private/Channel messages", "options"), KviOption_boolEnableIgnoreOnPrivMsg);
    m_pIgnoreNotice = addBoolSelector(g, __tr2qs_ctx("Private/Channel notices", "options"), KviOption_boolEnableIgnoreOnNotice);

    connect(m_pIgnorePrivmsg, SIGNAL(toggled(bool)), this, SLOT(enableVerbose(bool)));

    m_pVerboseIgnore = addBoolSelector(0, 1, 0, 1, __tr2qs_ctx("Use verbose ignore (show messages in console)", "options"),
                                       KviOption_boolVerboseIgnore,
                                       KVI_OPTION_BOOL(KviOption_boolEnableIgnoreOnPrivMsg) || KVI_OPTION_BOOL(KviOption_boolEnableIgnoreOnNotice));

    addRowSpacer(0, 2, 0, 2);
}
예제 #22
0
OptionsWidget_antispam::OptionsWidget_antispam(QWidget * parent)
    : KviOptionsWidget(parent)
{
	setObjectName("antispam_options_widget");
	createLayout();

	KviTalGroupBox * g = addGroupBox(0, 0, 0, 0, Qt::Horizontal, __tr2qs_ctx("Enable Anti-spam for", "options"));
	m_b1 = addBoolSelector(g, __tr2qs_ctx("Private messages", "options"), KviOption_boolUseAntiSpamOnPrivmsg);
	connect(m_b1, SIGNAL(toggled(bool)), this, SLOT(reenableStuff(bool)));
	m_b2 = addBoolSelector(g, __tr2qs_ctx("Private notices", "options"), KviOption_boolUseAntiSpamOnNotice);
	connect(m_b2, SIGNAL(toggled(bool)), this, SLOT(reenableStuff(bool)));

	m_b3 = addBoolSelector(0, 1, 0, 1, __tr2qs_ctx("Silent anti-spam (no warnings)", "options"), KviOption_boolSilentAntiSpam);
	m_sl = addStringListSelector(0, 2, 0, 2, __tr2qs_ctx("Words considered spam:", "options"), KviOption_stringlistSpamWords);

	reenableStuff(true);

	layout()->setRowStretch(2, 1);
}
예제 #23
0
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);
}
예제 #24
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);
}
예제 #25
0
OptionsWidget_windowListTreeForeground::OptionsWidget_windowListTreeForeground(QWidget * parent)
    : KviOptionsWidget(parent)
{
	setObjectName("treewindowlist_options_widget");
	createLayout();

	addFontSelector(0, 0, 0, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontTreeWindowList);

	KviTalGroupBox * g = addGroupBox(0, 1, 0, 1, Qt::Horizontal, __tr2qs_ctx("Text/Alert Colors", "options"));

	addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorTreeWindowListForeground);
	addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorTreeWindowListActiveForeground);
	addColorSelector(g, __tr2qs_ctx("Alert level 1:", "options"), KviOption_colorTreeWindowListHighlight1Foreground);
	addColorSelector(g, __tr2qs_ctx("Alert level 2:", "options"), KviOption_colorTreeWindowListHighlight2Foreground);
	addColorSelector(g, __tr2qs_ctx("Alert level 3:", "options"), KviOption_colorTreeWindowListHighlight3Foreground);
	addColorSelector(g, __tr2qs_ctx("Alert level 4:", "options"), KviOption_colorTreeWindowListHighlight4Foreground);
	addColorSelector(g, __tr2qs_ctx("Alert level 5:", "options"), KviOption_colorTreeWindowListHighlight5Foreground);

	addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Progress bar color:", "options"), KviOption_colorTreeWindowListProgress);

	addRowSpacer(0, 3, 0, 3);
}
예제 #26
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);

}
예제 #27
0
OptionsWidget_userListForeground::OptionsWidget_userListForeground(QWidget * parent)
    : KviOptionsWidget(parent, "userlistlook_foreground_options_widget")
{
	createLayout();

	addFontSelector(0, 0, 1, 0, __tr2qs_ctx("Font:", "options"), KviOption_fontUserListView);

	KviTalGroupBox * g = addGroupBox(0, 1, 1, 1, Qt::Horizontal, __tr2qs_ctx("Nickname Colors", "options"));
	addColorSelector(g, __tr2qs_ctx("Normal:", "options"), KviOption_colorUserListViewNormalForeground);
	addColorSelector(g, __tr2qs_ctx("Selected:", "options"), KviOption_colorUserListViewSelectionForeground);
	addColorSelector(g, __tr2qs_ctx("IRC Op:", "options"), KviOption_colorUserListViewIrcOpForeground);
	addColorSelector(g, __tr2qs_ctx("Channel owner:", "options"), KviOption_colorUserListViewChanOwnerForeground);
	addColorSelector(g, __tr2qs_ctx("Channel admin:", "options"), KviOption_colorUserListViewChanAdminForeground);
	addColorSelector(g, __tr2qs_ctx("Op:", "options"), KviOption_colorUserListViewOpForeground);
	addColorSelector(g, __tr2qs_ctx("Half-op:", "options"), KviOption_colorUserListViewHalfOpForeground);
	addColorSelector(g, __tr2qs_ctx("Voice:", "options"), KviOption_colorUserListViewVoiceForeground);
	addColorSelector(g, __tr2qs_ctx("User-op:", "options"), KviOption_colorUserListViewUserOpForeground);

	KviTalHBox * ahb = new KviTalHBox(g);
	ahb->setSpacing(4);
	KviBoolSelector * ab = addBoolSelector(ahb, __tr2qs_ctx("Away (blend color):", "options"), KviOption_boolUserListViewUseAwayColor);
	QString szTip = __tr2qs("The color selected, will be blended with the user rank foreground color.<br>"
	                        "You should also consider your theme's style, color and the userlist background selected color for optimum visibility.<br>"
	                        "If no color is selected respective user rank color specified will be used instead.");

	KviColorSelector * as = addColorSelector(ahb, QString(), KviOption_colorUserListViewAwayForeground);
	connect(ab, SIGNAL(toggled(bool)), as, SLOT(setEnabled(bool)));
	mergeTip(ab, szTip);

	KviTalHBox * hb = new KviTalHBox(g);
	hb->setSpacing(4);
	KviBoolSelector * b = addBoolSelector(hb, __tr2qs_ctx("Use different color for own nick:", "options"), KviOption_boolUseDifferentColorForOwnNick);
	KviColorSelector * s = addColorSelector(hb, "", KviOption_colorUserListViewOwnForeground, KVI_OPTION_BOOL(KviOption_boolUseDifferentColorForOwnNick));
	connect(b, SIGNAL(toggled(bool)), s, SLOT(setEnabled(bool)));

	addRowSpacer(0, 3, 0, 3);
}
예제 #28
0
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);
}
예제 #29
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);
}
예제 #30
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);
}