当前位置: 首页>>代码示例>>C++>>正文


C++ KviTalHBox::setAlignment方法代码示例

本文整理汇总了C++中KviTalHBox::setAlignment方法的典型用法代码示例。如果您正苦于以下问题:C++ KviTalHBox::setAlignment方法的具体用法?C++ KviTalHBox::setAlignment怎么用?C++ KviTalHBox::setAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KviTalHBox的用法示例。


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

示例1: QDialog

IdentityProfileEditor::IdentityProfileEditor(QWidget * pParent)
: QDialog(pParent)
{
	setObjectName("identity_profile_editor");
	setWindowTitle(__tr2qs_ctx("Profile Editor - KVIrc","options"));

	m_szName = __tr2qs_ctx("Profile Name","options");
	m_szNetwork = __tr2qs_ctx("MyNetwork","options");
	m_szNick = __tr2qs_ctx("MyNick","options");
	m_szAltNick = __tr2qs_ctx("MyNick2","options");
	m_szUserName = __tr2qs_ctx("MyUserName","options");
	m_szRealName = __tr2qs_ctx("MyRealName","options");

	QGridLayout * pLayout = new QGridLayout(this);

	QLabel * pLabel = new QLabel(__tr2qs_ctx("Profile Name:","options"),this);
	pLayout->addWidget(pLabel,0,0);

	m_pNameEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pNameEdit,__tr2qs_ctx("Put here the name of the profile","options"));
	pLayout->addWidget(m_pNameEdit,0,1,1,2);
	connect(m_pNameEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	pLabel = new QLabel(__tr2qs_ctx("Network Name:","options"),this);
	pLayout->addWidget(pLabel,1,0);

	m_pNetworkEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pNetworkEdit,__tr2qs_ctx("Put here the name of the network","options"));
	pLayout->addWidget(m_pNetworkEdit,1,1,1,2);
	connect(m_pNetworkEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	pLabel = new QLabel(__tr2qs_ctx("Nickname:","options"),this);
	pLayout->addWidget(pLabel,2,0);

	m_pNickEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pNickEdit,__tr2qs_ctx("Put here the nickname you want to use","options"));
	pLayout->addWidget(m_pNickEdit,2,1,1,2);
	connect(m_pNickEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	pLabel = new QLabel(__tr2qs_ctx("Alternative Nickname:","options"),this);
	pLayout->addWidget(pLabel,3,0);

	m_pAltNickEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pAltNickEdit,__tr2qs_ctx("Put here the alternative nickname you want to use","options"));
	pLayout->addWidget(m_pAltNickEdit,3,1,1,2);
	connect(m_pAltNickEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	pLabel = new QLabel(__tr2qs_ctx("Username:","options"),this);
	pLayout->addWidget(pLabel,4,0);

	m_pUserNameEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pUserNameEdit,__tr2qs_ctx("Put here the username you want to use","options"));
	pLayout->addWidget(m_pUserNameEdit,4,1,1,2);
	connect(m_pUserNameEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	pLabel = new QLabel(__tr2qs_ctx("Realname:","options"),this);
	pLayout->addWidget(pLabel,5,0);

	m_pRealNameEdit = new QLineEdit(this);
	KviTalToolTip::add(m_pRealNameEdit,__tr2qs_ctx("Put here the realname you want to use","options"));
	pLayout->addWidget(m_pRealNameEdit,5,1,1,2);
	connect(m_pRealNameEdit,SIGNAL(textChanged(const QString &)),this,SLOT(toggleButton(const QString &)));

	KviTalHBox * pBox = new KviTalHBox(this);
	pBox->setAlignment(Qt::AlignRight);
	pLayout->addWidget(pBox,6,0);

	QPushButton * p = new QPushButton(__tr2qs_ctx("Cancel","options"),pBox);
	//p->setMinimumWidth(100);
	connect(p,SIGNAL(clicked()),this,SLOT(reject()));

	m_pBtnOk = new QPushButton(__tr2qs_ctx("OK","options"),pBox);
	m_pBtnOk->setEnabled(false);
	connect(m_pBtnOk,SIGNAL(clicked()),pParent,SLOT(editProfileOkPressed()));

	pLayout->setColumnStretch(1,1);

	setMinimumWidth(250);
}
开发者ID:wodim,项目名称:KVIrc,代码行数:79,代码来源:OptionsWidget_identity.cpp


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