• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ KVI_OPTION_UINT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中KVI_OPTION_UINT函数的典型用法代码示例。如果您正苦于以下问题:C++ KVI_OPTION_UINT函数的具体用法?C++ KVI_OPTION_UINT怎么用?C++ KVI_OPTION_UINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了KVI_OPTION_UINT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: KVI_OPTION_UINT

void OptionsWidget_channelAdvanced::commit()
{
	KVI_OPTION_UINT(KviOption_uintDefaultBanType) = m_pBanTypeCombo->currentIndex();
	if((KVI_OPTION_UINT(KviOption_uintDefaultBanType) > 26))
		KVI_OPTION_UINT(KviOption_uintDefaultBanType) = 7;
	KviOptionsWidget::commit();
}
开发者ID:Cizzle,项目名称:KVIrc,代码行数:7,代码来源:OptionsWidget_channel.cpp


示例2: KVI_OPTION_UINT

void OptionsWidget_userListGrid::commit()
{
	KviOptionsWidget::commit();
	KVI_OPTION_UINT(KviOption_uintUserListViewGridType) = m_pGridTypeCombo->currentIndex();
	if(KVI_OPTION_UINT(KviOption_uintUserListViewGridType) > KVI_USERLISTVIEW_GRIDTYPE_MAXIMUM)
		KVI_OPTION_UINT(KviOption_uintUserListViewGridType) = KVI_USERLISTVIEW_GRIDTYPE_DEFAULT;
}
开发者ID:Cizzle,项目名称:KVIrc,代码行数:7,代码来源:OptionsWidget_userList.cpp


示例3: KviOptionsWidget

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);
}
开发者ID:Cizzle,项目名称:KVIrc,代码行数:60,代码来源:OptionsWidget_userList.cpp


示例4: while

bool KviStupidNotifyListManager::handleIsOn(KviIrcMessage * msg)
{
	if(m_pConnection->lagMeter())
		m_pConnection->lagMeter()->lagCheckComplete("@notify_naive");

	KviCString nk;
	const char * aux = msg->trailing();
	while(*aux)
	{
		nk = "";
		aux = kvi_extractToken(nk, aux, ' ');
		if(nk.hasData())
		{
			QString nkd = m_pConnection->decodeText(nk.ptr());
			QString nksp = " " + nkd;
			m_szLastIsOnMsg.replace(nksp, "", Qt::CaseInsensitive);
			if(!(m_pConsole->notifyListView()->findEntry(nkd)))
			{
				// not yet notified
				notifyOnLine(nkd);
			}
		}
	}
	// ok...check the users that have left irc now...
	QStringList sl = m_szLastIsOnMsg.isEmpty() ? QStringList() : m_szLastIsOnMsg.split(' ', QString::SkipEmptyParts);

	for(auto & it : sl)
	{
		if(m_pConsole->notifyListView()->findEntry(it))
		{
			// has just left irc
			notifyOffLine(it);
		} // else has never been here...
	}

	if(((unsigned int)m_iNextNickToCheck) >= m_pNickList->count())
	{
		// have to restart
		unsigned int iTimeout = KVI_OPTION_UINT(KviOption_uintNotifyListCheckTimeInSecs);
		if(iTimeout < 5)
		{
			// life first of all.
			// don't allow the user to suicide
			if(_OUTPUT_VERBOSE)
				m_pConsole->output(KVI_OUT_SYSTEMWARNING,
				    __tr2qs("Notify list: Timeout (%d sec) is too short, resetting to something more reasonable (5 sec)"),
				    iTimeout);
			iTimeout = 5;
			KVI_OPTION_UINT(KviOption_uintNotifyListCheckTimeInSecs) = 5;
		}
		m_iRestartTimer = startTimer(iTimeout * 1000);
	}
	else
		sendIsOn();
	return true;
}
开发者ID:un1versal,项目名称:KVIrc,代码行数:56,代码来源:KviNotifyList.cpp


示例5: KVI_OPTION_UINT

void OptionsWidget_identService::commit()
{
	KviOptionsWidget::commit();
	if(m_pConsoleRadio->isChecked())
		KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::ToConsole;
	if(m_pActiveRadio->isChecked())
		KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::ToActiveWindow;
	if(m_pQuietRadio->isChecked())
		KVI_OPTION_UINT(KviOption_uintIdentdOutputMode)=KviIdentdOutputMode::Quiet;
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:10,代码来源:OptionsWidget_connection.cpp


示例6: KviOptionsWidget

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);
//	}
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:53,代码来源:OptionsWidget_ircOutput.cpp


示例7: QToolBar

KviToolBar::KviToolBar(const QString & szLabel, Qt::ToolBarArea type, const char * pcName)
: QToolBar(szLabel,g_pMainWindow)
{
	uToolBarInstances++;

	unsigned int uIconSize = KVI_OPTION_UINT(KviOption_uintToolBarIconSize);
	setIconSize(QSize(uIconSize,uIconSize));
	setToolButtonStyle((Qt::ToolButtonStyle) KVI_OPTION_UINT(KviOption_uintToolBarButtonStyle));

	setObjectName(pcName);
	g_pMainWindow->addToolBar(type,this);
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:12,代码来源:KviToolBar.cpp


示例8: KVI_OPTION_UINT

void OptionsWidget_ircOutput::commit()
{
	KviOptionsWidget::commit();

	int iIdx = m_pVerbosityCombo->currentIndex();
	if((iIdx < 0) || (iIdx > KVI_VERBOSITY_LEVEL_PARANOIC))
	{
		iIdx = KVI_VERBOSITY_LEVEL_NORMAL;
	}
	KVI_OPTION_UINT(KviOption_uintOutputVerbosityLevel) = iIdx;

	KVI_OPTION_UINT(KviOption_uintOutputDatetimeFormat) = m_pDatetimeCombo->currentIndex();
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:13,代码来源:OptionsWidget_ircOutput.cpp


示例9: dcc_module_check_concurrent_transfers_limit

static bool dcc_module_check_concurrent_transfers_limit(KviDccRequest * dcc)
{
	if(KVI_OPTION_UINT(KviOption_uintMaxDccSendTransfers) > 0)
	{
		unsigned int uTransfers = DccFileTransfer::runningTransfersCount();
		if(uTransfers >= KVI_OPTION_UINT(KviOption_uintMaxDccSendTransfers))
		{
			QString szError = QString(__tr2qs_ctx("Concurrent transfer limit reached (%1 of %2 transfers running)", "dcc")).arg(uTransfers).arg(KVI_OPTION_UINT(KviOption_uintMaxDccSendTransfers));
			dcc_module_request_error(dcc, szError);
			return false;
		}
	}
	return true;
}
开发者ID:Cizzle,项目名称:KVIrc,代码行数:14,代码来源:requests.cpp


示例10: KviOptionsWidget

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);
}
开发者ID:netrunner-debian-kde-extras,项目名称:kvirc,代码行数:60,代码来源:OptionsWidget_urlHandlers.cpp


示例11: QPainter

void KviThemedLineEdit::paintEvent(QPaintEvent * event)
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY
	QPainter * p = new QPainter(this);
	QPalette pal = palette();

	// In Qt5 QStyle::drawPrimitive seems to always overwrite the background, no matter what.
	qDrawShadePanel(p, 0, 0, width(), height(), palette(), true, 1, nullptr);

	QRect r(1, 1, width() - 2, height() - 2);

	if(KVI_OPTION_BOOL(KviOption_boolUseCompositingForTransparency) && g_pApp->supportsCompositing())
	{
		p->setCompositionMode(QPainter::CompositionMode_Source);
		QColor col = KVI_OPTION_COLOR(KviOption_colorGlobalTransparencyFade);
		col.setAlphaF((float)((float)KVI_OPTION_UINT(KviOption_uintGlobalTransparencyChildFadeFactor) / (float)100));
		p->fillRect(r, col);
		p->restore();
	}
	else if(g_pShadedChildGlobalDesktopBackground)
	{
		QPoint pnt;
		if(m_pKviWindow)
			pnt = m_pKviWindow->isDocked() ? mapTo(g_pMainWindow, r.topLeft()) : mapTo(m_pKviWindow, r.topLeft());
		else
			pnt = mapToGlobal(event->rect().topLeft());
		p->drawTiledPixmap(r, *(g_pShadedChildGlobalDesktopBackground), pnt);
	}
	delete p;
#endif

	QLineEdit::paintEvent(event);
}
开发者ID:CardinalSins,项目名称:KVIrc,代码行数:33,代码来源:KviThemedLineEdit.cpp


示例12: QPainter

void KviThemedLabel::paintEvent(QPaintEvent *e)
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY
	QPainter *p = new QPainter(this);

#if (QT_VERSION >= 0x050000)
	// In Qt5 QStyle::drawPrimitive seems to always overwrite the background, no matter what.
	qDrawShadePanel(p,0,0,width(),height(),palette(),true,1,NULL);

	QRect r(1,1,width()-1,height()-1);
#else
	QStyleOptionFrameV2 option;
	option.initFrom(this);

	style()->drawPrimitive(QStyle::PE_FrameLineEdit, &option, p, this);

	QRect r = style()->subElementRect(QStyle::SE_LineEditContents, &option, this);

#endif

	if(KVI_OPTION_BOOL(KviOption_boolUseCompositingForTransparency) && g_pApp->supportsCompositing())
	{
		p->setCompositionMode(QPainter::CompositionMode_Source);
		QColor col=KVI_OPTION_COLOR(KviOption_colorGlobalTransparencyFade);
		col.setAlphaF((float)((float)KVI_OPTION_UINT(KviOption_uintGlobalTransparencyChildFadeFactor) / (float)100));
		p->fillRect(r, col);
	} else if(g_pShadedChildGlobalDesktopBackground)
	{
		QPoint pnt = m_pKviWindow->isDocked() ? mapTo(g_pMainWindow, r.topLeft()) : mapTo(m_pKviWindow, r.topLeft());
		p->drawTiledPixmap(r,*(g_pShadedChildGlobalDesktopBackground), pnt);
	}
	delete p;
#endif
	QLabel::paintEvent(e);
}
开发者ID:wodim,项目名称:KVIrc,代码行数:35,代码来源:KviThemedLabel.cpp


示例13: switch

void KviInput::keyPressEvent(QKeyEvent * e)
{
	if(e->modifiers() & Qt::ControlModifier)
	{
		switch(e->key())
		{
			case Qt::Key_Enter:
			case Qt::Key_Return:
			{
				if(m_pMultiLineEditor)
				{
					QString szText;
					m_pMultiLineEditor->getText(szText);
					if(szText.isEmpty())return;
					if(KVI_OPTION_BOOL(KviOption_boolWarnAboutPastingMultipleLines))
					{
						if(szText.length() > 256)
						{
							if(szText[0] != '/')
							{
								int nLines = szText.count('\n') + 1;
								if(nLines > 15)
								{
									int nRet = QMessageBox::question(
										this,
										__tr2qs("Confirm Multi-line Message"),
										__tr2qs("You're about to send a message with %1 lines of text.<br><br>" \
											"There is nothing wrong with it, this warning is<br>" \
											"here to prevent you from accidentally sending<br>" \
											"a really large message just because you didn't edit it<br>" \
											"properly after pasting text from the clipboard.<br><br>" \
											"Do you want the message to be sent?").arg(nLines),
										__tr2qs("Yes, always"),
										__tr2qs("Yes"),
										__tr2qs("No"),
										1,2);
									switch(nRet)
									{
										case 0:
											KVI_OPTION_BOOL(KviOption_boolWarnAboutPastingMultipleLines) = false;
										break;
										case 2:
											return;
										break;
										default: // also case 1
										break;
									}
								}
							}
						}
					}
					szText.replace('\t',QString(KVI_OPTION_UINT(KviOption_uintSpacesToExpandTabulationInput),' ')); //expand tabs to spaces
					KviUserInput::parse(szText,m_pWindow,QString(),m_pCommandlineModeButton->isChecked());
					m_pMultiLineEditor->setText("");
				}
			}
			break;
		}
	}
}
开发者ID:philouvb,项目名称:KVIrc,代码行数:60,代码来源:KviInput.cpp


示例14: switch

void OptionsWidget_windowListTreeBackground::commit()
{
	KviOptionsWidget::commit();

	int iFlags = 0;
	switch(m_pHorizontalAlign->currentIndex())
	{
		case 1:
			iFlags |= Qt::AlignLeft;
			break;
		case 2:
			iFlags |= Qt::AlignRight;
			break;
		case 3:
			iFlags |= Qt::AlignHCenter;
			break;
	}
	switch(m_pVerticalAlign->currentIndex())
	{
		case 1:
			iFlags |= Qt::AlignTop;
			break;
		case 2:
			iFlags |= Qt::AlignBottom;
			break;
		case 3:
			iFlags |= Qt::AlignVCenter;
			break;
	}

	KVI_OPTION_UINT(KviOption_uintTreeWindowListPixmapAlign) = iFlags;
}
开发者ID:Dessa,项目名称:KVIrc,代码行数:32,代码来源:OptionsWidget_windowList.cpp


示例15: p

void KviIOGraphWindow::paintEvent(QPaintEvent * e)
{
	QPainter p(this);

	QRect rect = e->rect();
#ifdef COMPILE_PSEUDO_TRANSPARENCY
	if(KVI_OPTION_BOOL(KviOption_boolUseCompositingForTransparency) && g_pApp->supportsCompositing())
	{
		p.save();
		p.setCompositionMode(QPainter::CompositionMode_Source);
		QColor col = KVI_OPTION_COLOR(KviOption_colorGlobalTransparencyFade);
		col.setAlphaF((float)((float)KVI_OPTION_UINT(KviOption_uintGlobalTransparencyChildFadeFactor) / (float)100));
		p.fillRect(rect, col);
		p.restore();
	}
	else if(g_pShadedChildGlobalDesktopBackground)
	{
		QPoint pnt = isDocked() ? mapTo(g_pMainWindow, rect.topLeft()) : rect.topLeft();
		p.drawTiledPixmap(rect, *(g_pShadedChildGlobalDesktopBackground), pnt);
	}
	else
	{
#endif
		//FIXME this is not the treewindowlist
		p.fillRect(rect, KVI_OPTION_COLOR(KviOption_colorTreeWindowListBackground));
#ifdef COMPILE_PSEUDO_TRANSPARENCY
	}
#endif
}
开发者ID:IceN9ne,项目名称:KVIrc,代码行数:29,代码来源:libkviiograph.cpp


示例16: KVI_OPTION_UINT

void KviMainWindow::updatePseudoTransparency()
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY
	uint uOpacity = KVI_OPTION_UINT(KviOption_uintGlobalWindowOpacityPercent) < 50 ? 50 : KVI_OPTION_UINT(KviOption_uintGlobalWindowOpacityPercent);
	setWindowOpacity((float)uOpacity / 100);
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
#ifndef Q_WS_EX_LAYERED
#define Q_WS_EX_LAYERED WS_EX_LAYERED
#endif
	if(uOpacity < 100)
	{
		SetWindowLong(reinterpret_cast<HWND>(effectiveWinId()), GWL_EXSTYLE,
		    GetWindowLong(reinterpret_cast<HWND>(effectiveWinId()), GWL_EXSTYLE) | Q_WS_EX_LAYERED);
	}
	else
	{
		SetWindowLong(reinterpret_cast<HWND>(effectiveWinId()), GWL_EXSTYLE,
		    GetWindowLong(reinterpret_cast<HWND>(effectiveWinId()), GWL_EXSTYLE) & ~Q_WS_EX_LAYERED);
	}
#endif
	if(g_pShadedParentGlobalDesktopBackground)
		m_pWindowStack->update();

	if(g_pShadedChildGlobalDesktopBackground)
	{
		for(KviWindow * wnd = m_pWinList->first(); wnd; wnd = m_pWinList->next())
			wnd->updateBackgrounds();
		m_pWindowList->updatePseudoTransparency();
	}
#endif
}
开发者ID:un1versal,项目名称:KVIrc,代码行数:31,代码来源:KviMainWindow.cpp


示例17: it

void KviModuleManager::cleanupUnusedModules()
{
	KviPointerHashTableIterator<QString,KviModule> it(*m_pModuleDict);

	KviPointerList<KviModule> lModulesToUnload;
	lModulesToUnload.setAutoDelete(false);

	while(it.current())
	{
		if(it.current()->secondsSinceLastAccess() > KVI_OPTION_UINT(KviOption_uintModuleCleanupTimeout))
		{
			if(it.current()->moduleInfo()->can_unload)
			{
				if((it.current()->moduleInfo()->can_unload)(it.current()))
					lModulesToUnload.append(it.current());
				else {
					// the module don't want to be unloaded
					// keep it memory for a while
					it.current()->updateAccessTime();
				}
			} else {
				if(!(it.current()->isLocked()))
					lModulesToUnload.append(it.current());
			}
		}
		++it;
	}

	for(KviModule * pModule = lModulesToUnload.first();pModule;pModule = lModulesToUnload.next())
		unloadModule(pModule);
}
开发者ID:netrunner-debian-kde-extras,项目名称:kvirc,代码行数:31,代码来源:KviModuleManager.cpp


示例18: switch

void OptionsWidget_notifierLook::commit()
{
	int iFlags = 0;
	switch(m_pHorizontalAlign->currentIndex())
	{
		case 1:
			iFlags |= Qt::AlignLeft;
			break;
		case 2:
			iFlags |= Qt::AlignRight;
			break;
		case 3:
			iFlags |= Qt::AlignHCenter;
			break;
	}
	switch(m_pVerticalAlign->currentIndex())
	{
		case 1:
			iFlags |= Qt::AlignTop;
			break;
		case 2:
			iFlags |= Qt::AlignBottom;
			break;
		case 3:
			iFlags |= Qt::AlignVCenter;
			break;
	}

	KVI_OPTION_UINT(KviOption_uintNotifierPixmapAlign) = iFlags;
	KviOptionsWidget::commit();
}
开发者ID:CardinalSins,项目名称:KVIrc,代码行数:31,代码来源:OptionsWidget_notifier.cpp


示例19: switch

void KviInput::keyPressEvent(QKeyEvent * e)
{
	if(e->modifiers() & Qt::ControlModifier)
	{
		switch(e->key())
		{
			case Qt::Key_Enter:
			case Qt::Key_Return:
			{
				if(m_pMultiLineEditor)
				{
					QString szText;
					m_pMultiLineEditor->getText(szText);
					if(szText.isEmpty())
						return;
					if(KVI_OPTION_BOOL(KviOption_boolWarnAboutPastingMultipleLines))
					{
						if(szText.length() > 256)
						{
							if(szText[0] != '/')
							{
								int nLines = szText.count('\n') + 1;
								if(nLines > 15)
								{
									QMessageBox pMsgBox;
									pMsgBox.setText(__tr2qs("You're about to send a message with %1 lines of text.<br><br>"
									                        "This warning is here to prevent you from accidentally "
									                        "pasting and sending a really large, potentially unedited message from your clipboard.<br><br>"
									                        "Some IRC servers may also consider %1 lines of text a flood, "
									                        "in which case you will be disconnected from said server.<br><br>"
									                        "Do you still want the message to be sent?").arg(nLines));

									pMsgBox.setWindowTitle(__tr2qs("Confirm Sending a Large Message - KVIrc"));
									pMsgBox.setIcon(QMessageBox::Question);
									QAbstractButton * pAlwaysButton = pMsgBox.addButton(__tr2qs("Always"), QMessageBox::YesRole);
									/* QAbstractButton *pYesButton = */ pMsgBox.addButton(__tr2qs("Yes"), QMessageBox::YesRole);
									QAbstractButton * pNoButton = pMsgBox.addButton(__tr2qs("No"), QMessageBox::NoRole);
									pMsgBox.setDefaultButton(qobject_cast<QPushButton *>(pNoButton));
									pMsgBox.exec();
									if(pMsgBox.clickedButton() == pAlwaysButton)
									{
										KVI_OPTION_BOOL(KviOption_boolWarnAboutPastingMultipleLines) = false;
									}
									else if(pMsgBox.clickedButton() == pNoButton || pMsgBox.clickedButton() == nullptr)
									{
										return;
									}
								}
							}
						}
					}
					szText.replace('\t', QString(KVI_OPTION_UINT(KviOption_uintSpacesToExpandTabulationInput), ' ')); //expand tabs to spaces
					KviUserInput::parse(szText, m_pWindow, QString(), m_pCommandlineModeButton->isChecked());
					m_pMultiLineEditor->setText("");
				}
			}
			break;
		}
	}
}
开发者ID:beigexperience,项目名称:KVIrc,代码行数:60,代码来源:KviInput.cpp


示例20: QPainter

void UrlDialogTreeWidget::paintEvent(QPaintEvent * event)
{
    QPainter * p = new QPainter(viewport());
    QStyleOptionViewItem option = viewOptions();
    QRect rect = event->rect();

#ifdef COMPILE_PSEUDO_TRANSPARENCY
    if(KVI_OPTION_BOOL(KviOption_boolUseCompositingForTransparency) && g_pApp->supportsCompositing())
    {
        p->save();
        p->setCompositionMode(QPainter::CompositionMode_Source);
        QColor col = KVI_OPTION_COLOR(KviOption_colorGlobalTransparencyFade);
        col.setAlphaF((float)((float)KVI_OPTION_UINT(KviOption_uintGlobalTransparencyChildFadeFactor) / (float)100));
        p->fillRect(rect, col);
        p->restore();
    }
    else if(g_pShadedChildGlobalDesktopBackground)
    {
        QPoint pnt = ((KviWindow *)parent())->isDocked() ? viewport()->mapTo(g_pMainWindow, rect.topLeft()) : viewport()->mapTo((KviWindow *)parent(), rect.topLeft());
        p->drawTiledPixmap(rect, *(g_pShadedChildGlobalDesktopBackground), pnt);
    }
    else
    {
#endif
        //FIXME this is not the treewindowlist
        p->fillRect(rect, KVI_OPTION_COLOR(KviOption_colorTreeWindowListBackground));
#ifdef COMPILE_PSEUDO_TRANSPARENCY
    }
#endif

    delete p;

    //call paint on all children
    QTreeWidget::paintEvent(event);
}
开发者ID:un1versal,项目名称:KVIrc,代码行数:35,代码来源:libkviurl.cpp



注:本文中的KVI_OPTION_UINT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ KVS_ASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ KVI_OPTION_STRING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap