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


C++ SourceManager::GetUserProfile方法代码示例

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


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

示例1: toProfile

void DisplayWindow::toProfile()
{
	QPushButton *btn = qobject_cast<QPushButton*>(sender());
	SourceManager sm;
	UserPro up;
	sm.GetUserProfile(up);
	if (up.m_sUserName.c_str() == btn->text())
		emit toProfileMode("");
	else
		emit toProfileMode(btn->text());
}
开发者ID:aaronguo1996,项目名称:posture,代码行数:11,代码来源:displaywindow.cpp

示例2: InitWidgets

void ProfileEditWindow::InitWidgets()
{
	SourceManager sm;
	UserPro up;
	sm.GetUserProfile(up, g_umUserManager.GetUsername());
	m_qlName = new QLabel("Username", m_qwBottomRight);
	m_qlName->setObjectName("uploadInfo");
	m_qlName->setFixedSize(UPLOADINFO_W*xscale, UPLOADINFO_H*yscale);
	m_qleName = new QLineEdit(m_qwBottomRight);
	m_qleName->setObjectName("editProfile");
	m_qleName->setFixedSize(EDITPROFILE_W*xscale, EDITPROFILE_H*yscale);
	m_qleName->setText(up.m_sUserName.c_str());
	m_qleName->setReadOnly(true);

	m_qlPwd = new QLabel("Password", m_qwBottomRight);
	m_qlPwd->setObjectName("uploadInfo");
	m_qlPwd->setFixedSize(UPLOADINFO_W*xscale, UPLOADINFO_H*yscale);
	m_qlePwd = new QLineEdit(m_qwBottomRight);
	m_qlePwd->setEchoMode(QLineEdit::Password);
	m_qlePwd->setObjectName("editProfile");
	m_qlePwd->setFixedSize(EDITPROFILE_W*xscale, EDITPROFILE_H*yscale);

	m_qlPwdc = new QLabel("Password Confirm", m_qwBottomRight);
	m_qlPwdc->setObjectName("uploadInfo");
	m_qlPwdc->setFixedSize(UPLOADINFO_W*xscale, UPLOADINFO_H*yscale);
	m_qlePwdc = new QLineEdit(m_qwBottomRight);
	m_qlePwdc->setEchoMode(QLineEdit::Password);
	m_qlePwdc->setObjectName("editProfile");
	m_qlePwdc->setFixedSize(EDITPROFILE_W*xscale, EDITPROFILE_H*yscale);

	m_qlEmail = new QLabel("Email", m_qwBottomRight);
	m_qlEmail->setObjectName("uploadInfo");
	m_qlEmail->setFixedSize(UPLOADINFO_W*xscale, UPLOADINFO_H*yscale);
	m_qleEmail = new QLineEdit(m_qwBottomRight);
	m_qleEmail->setText(up.m_sEmail.c_str());
	m_qleEmail->setObjectName("editProfile");
	m_qleEmail->setFixedSize(EDITPROFILE_W*xscale, EDITPROFILE_H*yscale);

	m_qlError = new QLabel(m_qwBottomRight);

	m_qpbCancel = new QPushButton("Cancel", m_qwBottomRight);
	m_qpbCancel->setObjectName("detail");
	m_qpbCancel->setFixedSize(DETAIL_W*xscale, DETAIL_H*yscale);
	m_qpbSubmit = new QPushButton("Submit", m_qwBottomRight);
	m_qpbSubmit->setObjectName("detail");
	m_qpbSubmit->setFixedSize(DETAIL_W*xscale, DETAIL_H*yscale);
	connect(m_qpbCancel, SIGNAL(clicked()), this, SLOT(cancel()));
	connect(m_qpbSubmit, SIGNAL(clicked()), this, SLOT(submit()));
}
开发者ID:aaronguo1996,项目名称:posture,代码行数:49,代码来源:profileeditwindow.cpp


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