本文整理汇总了C++中IServerSPtr::name方法的典型用法代码示例。如果您正苦于以下问题:C++ IServerSPtr::name方法的具体用法?C++ IServerSPtr::name怎么用?C++ IServerSPtr::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IServerSPtr
的用法示例。
在下文中一共展示了IServerSPtr::name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openPropertyServerDialog
void ExplorerTreeView::openPropertyServerDialog()
{
QModelIndex sel = selectedIndex();
if(!sel.isValid()){
return;
}
ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
if(!node){
return;
}
IServerSPtr server = node->server();
if(!server){
return;
}
PropertyServerDialog infDialog(QString("%1 properties").arg(server->name()), server->type(), this);
VERIFY(connect(server.get(), &IServer::startedLoadServerProperty, &infDialog, &PropertyServerDialog::startServerProperty));
VERIFY(connect(server.get(), &IServer::finishedLoadServerProperty, &infDialog, &PropertyServerDialog::finishServerProperty));
VERIFY(connect(server.get(), &IServer::startedChangeServerProperty, &infDialog, &PropertyServerDialog::startServerChangeProperty));
VERIFY(connect(server.get(), &IServer::finishedChangeServerProperty, &infDialog, &PropertyServerDialog::finishServerChangeProperty));
VERIFY(connect(&infDialog, &PropertyServerDialog::changedProperty, server.get(), &IServer::changeProperty));
VERIFY(connect(&infDialog, &PropertyServerDialog::showed, server.get(), &IServer::serverProperty));
infDialog.exec();
}
示例2: openHistoryServerDialog
void ExplorerTreeView::openHistoryServerDialog()
{
QModelIndex sel = selectedIndex();
if(!sel.isValid()){
return;
}
ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
if(!node){
return;
}
IServerSPtr server = node->server();
if(!server){
return;
}
ServerHistoryDialog histDialog(QString("%1 history").arg(server->name()), server->type(), this);
VERIFY(connect(server.get(), &IServer::startedLoadServerHistoryInfo, &histDialog, &ServerHistoryDialog::startLoadServerHistoryInfo));
VERIFY(connect(server.get(), &IServer::finishedLoadServerHistoryInfo, &histDialog, &ServerHistoryDialog::finishLoadServerHistoryInfo));
VERIFY(connect(server.get(), &IServer::serverInfoSnapShoot, &histDialog, &ServerHistoryDialog::snapShotAdd));
VERIFY(connect(&histDialog, &ServerHistoryDialog::showed, server.get(), &IServer::requestHistoryInfo));
histDialog.exec();
}
示例3: shutdownServer
void ExplorerTreeView::shutdownServer()
{
QModelIndex sel = selectedIndex();
if(!sel.isValid()){
return;
}
ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
if(!node){
return;
}
IServerSPtr server = node->server();
if(server && server->isConnected()){
// Ask user
int answer = QMessageBox::question(this, "Shutdown", QString("Really shutdown \"%1\" server?").arg(server->name()), QMessageBox::Yes, QMessageBox::No, QMessageBox::NoButton);
if (answer != QMessageBox::Yes){
return;
}
server->shutDown();
}
}
示例4: openMaxClientSetDialog
void ExplorerTreeView::openMaxClientSetDialog()
{
QModelIndex sel = selectedIndex();
if(!sel.isValid()){
return;
}
ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
if(!node){
return;
}
IServerSPtr server = node->server();
if(!server){
return;
}
bool ok;
int maxcl = QInputDialog::getInt(this, tr("Set max connection on %1 server").arg(server->name()),
tr("Maximum connection:"), 10000, 1, INT32_MAX, 100, &ok);
if(ok){
server->setMaxConnection(maxcl);
}
}