本文整理汇总了C++中CGroup::resetName方法的典型用法代码示例。如果您正苦于以下问题:C++ CGroup::resetName方法的具体用法?C++ CGroup::resetName怎么用?C++ CGroup::resetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroup
的用法示例。
在下文中一共展示了CGroup::resetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: accept
void CGroupSettingsDialog::accept()
{
CGroup *group = renderer_window->getGroupManager();
QString s;
s = lineEdit_charName->text();
if (s != conf->getGroupManagerCharName() ) {
conf->setGroupManagerCharName(s.toLocal8Bit());
group->resetName();
}
if (color != conf->getGroupManagerColor()) {
conf->setGroupManagerColor(color);
group->resetColor();
}
QByteArray remoteHost = lineEdit_remoteHost->text().toLocal8Bit();
int remotePort = lineEdit_remotePort->text().toInt();
if (remotePort != conf->getGroupManagerRemotePort() ||
remoteHost != conf->getGroupManagerHost() ) {
conf->setGroupManagerHost(remoteHost);
conf->setGroupManagerRemotePort(remotePort);
if (group->isConnected())
group->reconnect();
}
int localPort = lineEdit_localPort->text().toInt();
if (localPort != conf->getGroupManagerLocalPort() ) {
conf->setGroupManagerLocalPort(localPort);
if (group->getType() == CGroupCommunicator::Server)
group->reconnect();
}
bool showSelf = checkBox_showSelf->isChecked();
if (showSelf != conf->getGroupManagerShowSelf()) {
conf->setGroupManagerShowSelf(showSelf);
if (showSelf)
group->addSelf();
else
group->hideSelf();
}
bool notifyArm = checkBox_notifyArm->isChecked();
if (notifyArm != conf->getGroupManagerNotifyArmour() ) {
conf->setGroupManagerNotifyArmour(notifyArm);
}
bool notifySanc = checkBox_notifySanc->isChecked();
if (notifySanc != conf->getGroupManagerNotifySanc() ) {
conf->setGroupManagerNotifySanc(notifySanc);
}
bool notifyBash = checkBox_notifyBash->isChecked();
if (notifyBash != conf->getGroupManagerNotifyBash() ) {
conf->setGroupManagerNotifyBash(notifyBash);
}
done(Accepted);
}