本文整理汇总了C++中CheckButton::getUserID方法的典型用法代码示例。如果您正苦于以下问题:C++ CheckButton::getUserID方法的具体用法?C++ CheckButton::getUserID怎么用?C++ CheckButton::getUserID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CheckButton
的用法示例。
在下文中一共展示了CheckButton::getUserID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleDevClusterAuthorizedInfo
void DClusterSetManagerPage::handleDevClusterAuthorizedInfo(InputPacket& inpack)
{
quint8 ansCode = inpack.getAnswerCode();
if(clusterAddManagerPage != NULL){
clusterAddManagerPage->fetchData(inpack);
if(ansCode == Mi::Success){//添加管理员成功
quint64 managerID = clusterAddManagerPage->getManagerID();
QHash<quint64, DClusterUserInfo*> infoList = userInfoList->fetchList();
QHashIterator<quint64, DClusterUserInfo*> iter(infoList);
while(iter.hasNext())
{
iter.next();
DClusterUserInfo* userInfo = dynamic_cast<DClusterUserInfo*>(iter.value());
if(managerID == userInfo->getUserID()){
userInfo->setUserRole(Mi::SeniorManager);
this->appendManagerToList(userInfo);
return;
}
}
}
return;
}
QString strText;
if(ansCode == Mi::Success){
strText = tr("取消管理员成功");
QHashIterator<quint64, CheckButton*> iter(btnCheckList);
while(iter.hasNext())
{
iter.next();
CheckButton* btn = iter.value();
if(btn->getUserID() == curCancelManagerID){
managerLayout->removeWidget(btn);
SAFE_DELETE(btn);
}
}
}
else if(ansCode == Mi::Failure)
strText = tr("取消管理员失败, 请重试");
this->handleHintInfo(strText);
}
示例2: on_btnCancelManager_clicked
void DClusterSetManagerPage::on_btnCancelManager_clicked()
{
CheckButton* btn = dynamic_cast<CheckButton*>(sender());
btn->setReviewText(tr("取消管理员"));
quint8 role = Mi::Operator;
curCancelManagerID = btn->getUserID();
AssemblyData assemblyData;
assemblyData.append(curClusterID);
assemblyData.append(role);
assemblyData.append(curCancelManagerID);
char* data = assemblyData.getAssemblyData();
quint16 dataLen = assemblyData.getAssemblyDataLen();
emit readyRead(CommandCode::DCLUSTER_SETTING_USER_AUTHORIZE, data, dataLen);
//页面加载窗口
if(loadingPage == NULL){
loadingPage = new LoadingPage(this);
loadingPage->show();
}
}