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


C++ ContentNode::id方法代码示例

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


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

示例1: addToRecentDocuments

bool ContentManager::addToRecentDocuments(const QString &doc_path)
{
    ContentNode node;
    getContentNode(node, doc_path);

    if (node.id() == CMS_INVALID_ID)
    {
        return false;
    }

    return addToRecentDocuments(node.id());
}
开发者ID:peter-x,项目名称:booxsdk,代码行数:12,代码来源:content_manager.cpp

示例2: removeContentNode

/// Remove content metadata for given content node. Caller should no longer
/// use the content node. This function also removes the content node
/// from its parent categories.
bool ContentManager::removeContentNode(ContentNode& info)
{
    // Remove the options.
    ContentOptions::removeOptions(*database_, info.id());

    // Remove from content category table, which also removes
    // from recent document list.
    ContentCategory::removeContentCategory(*database_, info.id());

    // Remove the content itself.
    ContentNode::removeContentNode(*database_, info);
    return true;
}
开发者ID:peter-x,项目名称:booxsdk,代码行数:16,代码来源:content_manager.cpp

示例3: updateContentNode

bool ContentNode::updateContentNode(QSqlDatabase& database,
                                    const ContentNode & node)
{
    QSqlQuery query(database);
    query.prepare ("update content set "
                   " name = ?, location = ?, title = ?, authors = ?, "
                   " description = ?, last_access = ?, publisher = ?, md5 = ?, "
                   " size = ?, rating = ?, read_time = ?, read_count = ?, "
                   " progress = ?, attributes = ? "
                   " where id = ?");

    query.addBindValue(node.name());
    query.addBindValue(node.location());
    query.addBindValue(node.title());
    query.addBindValue(node.authors());
    query.addBindValue(node.description());
    query.addBindValue(node.last_access());
    query.addBindValue(node.publisher());

    query.addBindValue(node.md5());
    query.addBindValue(node.size());
    query.addBindValue(node.rating());
    query.addBindValue(node.read_time());
    query.addBindValue(node.read_count());

    query.addBindValue(node.progress());
    query.addBindValue(node.attributes());

    query.addBindValue(node.id());

    return query.exec();
}
开发者ID:qbikez,项目名称:booxsdk,代码行数:32,代码来源:content_node.cpp

示例4: removeChildContent

/// Remove child content from specified category.
bool ContentManager::removeChildContent(ContentCategory & category,
                                        const ContentNode & node)
{
    return ContentCategory::removeChildContent(*database_,
                                               category,
                                               node.id());
}
开发者ID:peter-x,项目名称:booxsdk,代码行数:8,代码来源:content_manager.cpp

示例5: getParentCategories

/// Retrieve parent category id list that contains the content.
bool ContentManager::getParentCategories(const ContentNode &node,
                                         cms_ids & categories)
{
    return ContentCategory::getContentParentCategories(*database_,
                                                       node.id(),
                                                       categories);
}
开发者ID:peter-x,项目名称:booxsdk,代码行数:8,代码来源:content_manager.cpp

示例6: removeRecentDocument

bool ContentManager::removeRecentDocument(const QString &doc_path)
{
    ContentNode node;
    getContentNode(node, doc_path);

    if (node.id() == CMS_INVALID_ID)
    {
        return false;
    }

    if (!ContentCategory::removeChildContent(*database_,
                                             node.id()))
    {
        return false;
    }
    return true;
}
开发者ID:HeryLong,项目名称:booxsdk,代码行数:17,代码来源:content_manager.cpp

示例7: removeContentNode

bool ContentNode::removeContentNode(QSqlDatabase& database,
                                    ContentNode& node)
{
    QSqlQuery query(database);
    query.prepare( "delete from content where id = ?");
    query.addBindValue(node.id());

    if (query.exec())
    {
        node.clear();
        return true;
    }
    return false;
}
开发者ID:qbikez,项目名称:booxsdk,代码行数:14,代码来源:content_node.cpp

示例8: addChildContent

/// Add child content into specified category.
bool ContentManager::addChildContent(ContentCategory & category,
                                     const ContentNode & node)
{
    // Check it's already in the category or not.
    return ContentCategory::addChildContent(*database_, category, node.id());
}
开发者ID:peter-x,项目名称:booxsdk,代码行数:7,代码来源:content_manager.cpp


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