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


C++ ExplorerCollectionTreeItem类代码示例

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


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

示例1: ui_viewIndex

 void ExplorerCollectionDirIndexesTreeItem::ui_viewIndex()
 {
     ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
     if (par) {
         par->openCurrentCollectionShell("getIndexes()");
     }
 }
开发者ID:2812140729,项目名称:robomongo,代码行数:7,代码来源:ExplorerCollectionTreeItem.cpp

示例2: ui_itemDoubleClicked

 void ExplorerWidget::ui_itemDoubleClicked(QTreeWidgetItem *item, int column)
 {
     ExplorerCollectionTreeItem *collectionItem = dynamic_cast<ExplorerCollectionTreeItem *>(item);
     if (collectionItem) {
         AppRegistry::instance().app()->openShell(collectionItem->collection());
     }
 }
开发者ID:PixelPirate,项目名称:robomongo,代码行数:7,代码来源:ExplorerWidget.cpp

示例3: ui_refreshIndex

 void ExplorerCollectionDirIndexesTreeItem::ui_refreshIndex()
 {
     ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
     if (par) {
         par->expand();
     }
 }
开发者ID:2812140729,项目名称:robomongo,代码行数:7,代码来源:ExplorerCollectionTreeItem.cpp

示例4: ui_dropIndex

 void ExplorerCollectionDirIndexesTreeItem::ui_dropIndex()
 {
     ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
     if (par) {
         par->openCurrentCollectionShell("dropIndex({ \"<field>\" : 1 });", false);
     }
 }
开发者ID:2812140729,项目名称:robomongo,代码行数:7,代码来源:ExplorerCollectionTreeItem.cpp

示例5: selectedCollectionItem

void ExplorerTreeWidget::ui_renameCollection()
{
    ExplorerCollectionTreeItem *collectionItem = selectedCollectionItem();
    if (!collectionItem)
        return;

    MongoCollection *collection = collectionItem->collection();
    MongoDatabase *database = collection->database();
    MongoServer *server = database->server();
    ConnectionSettings *settings = server->connectionRecord();

    CreateDatabaseDialog dlg(settings->getFullAddress(),
                             database->name(),
                             collection->name());
    dlg.setWindowTitle("Rename Collection");
    dlg.setOkButtonText("&Rename");
    dlg.setInputLabelText("New Collection Name:");
    dlg.setInputText(collection->name());
    int result = dlg.exec();

    if (result == QDialog::Accepted) {
        database->renameCollection(collection->name(), dlg.databaseName());

        // refresh list of collections
        database->loadCollections();
    }
}
开发者ID:AlPatsino,项目名称:robomongo,代码行数:27,代码来源:ExplorerTreeWidget.cpp

示例6: ui_reIndex

 void ExplorerCollectionDirIndexesTreeItem::ui_reIndex()
 {
     ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
     if (par) {
         par->openCurrentCollectionShell("reIndex()", false);
     }
 }
开发者ID:2812140729,项目名称:robomongo,代码行数:7,代码来源:ExplorerCollectionTreeItem.cpp

示例7: ui_itemClicked

 void ExplorerWidget::ui_itemClicked(QTreeWidgetItem *item, int cloumn)
 {
     if (!AppRegistry::instance().settingsManager()->useTabbar()) {
         ExplorerCollectionTreeItem *collectionItem = dynamic_cast<ExplorerCollectionTreeItem *>(item);
         if (collectionItem) {
             AppRegistry::instance().app()->openShell(collectionItem->collection());
         }
     }
 }
开发者ID:PixelPirate,项目名称:robomongo,代码行数:9,代码来源:ExplorerWidget.cpp

示例8: ui_addIndex

 void ExplorerCollectionDirIndexesTreeItem::ui_addIndex()
 {
     ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *>(parent());
     if (par) {
         par->openCurrentCollectionShell(
             "ensureIndex({ \"<field>\" : 1 }); \n"
             "\n"
             "// options: \n"
             "// { unique : true }   - A unique index causes MongoDB to reject all documents that contain a duplicate value for the indexed field. \n"
             "// { sparse : true }   - Sparse indexes only contain entries for documents that have the indexed field. \n"
             "// { dropDups : true } - Sparse indexes only contain entries for documents that have the indexed field. \n"
             , false);
     }
 }
开发者ID:2812140729,项目名称:robomongo,代码行数:14,代码来源:ExplorerCollectionTreeItem.cpp

示例9: ui_addIndexGui

    void ExplorerCollectionDirIndexesTreeItem::ui_addIndexGui()
    {
        ExplorerCollectionTreeItem *par = dynamic_cast<ExplorerCollectionTreeItem *const>(parent());
        if (!par)
            return;
        EnsureIndexInfo fakeInfo(par->collection()->info(),"");
        EditIndexDialog dlg(fakeInfo , QtUtils::toQString(par->databaseItem()->database()->name()),QtUtils::toQString(par->databaseItem()->database()->server()->connectionRecord()->getFullAddress()), treeWidget());
        int result = dlg.exec();
        if (result != QDialog::Accepted)
            return;

        ExplorerDatabaseTreeItem *databaseTreeItem = static_cast<ExplorerDatabaseTreeItem *>(par->databaseItem());
        if (!databaseTreeItem)
            return;

        databaseTreeItem->enshureIndex(par,fakeInfo, dlg.info());
    }
开发者ID:2812140729,项目名称:robomongo,代码行数:17,代码来源:ExplorerCollectionTreeItem.cpp


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