本文整理汇总了C++中IServerSPtr::type方法的典型用法代码示例。如果您正苦于以下问题:C++ IServerSPtr::type方法的具体用法?C++ IServerSPtr::type怎么用?C++ IServerSPtr::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IServerSPtr
的用法示例。
在下文中一共展示了IServerSPtr::type方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: DCHECK
IDatabase::IDatabase(IServerSPtr server, DataBaseInfoSPtr info)
: info_(info), server_(server)
{
DCHECK(server);
DCHECK(info);
DCHECK(server->type() == info->type());
}
示例3: IDatabase
SsdbDatabase::SsdbDatabase(IServerSPtr server, IDataBaseInfoSPtr info)
: IDatabase(server, info) {
DCHECK(server);
DCHECK(info);
DCHECK(server->type() == SSDB);
DCHECK(info->type() == SSDB);
}
示例4: IDatabase
MemcachedDatabase::MemcachedDatabase(IServerSPtr server, DataBaseInfoSPtr info)
: IDatabase(server, info)
{
DCHECK(server);
DCHECK(info);
DCHECK(server->type() == MEMCACHED);
DCHECK(info->type() == MEMCACHED);
}
示例5: connectionType
connectionTypes QueryWidget::connectionType() const
{
IServerSPtr ser = shellWidget_->server();
if(!ser){
return DBUNKNOWN;
}
return ser->type();
}
示例6: 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();
}