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


C++ Attachment::label方法代码示例

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


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

示例1: createEmbeddedURLPages

void KOIncidenceEditor::createEmbeddedURLPages(Incidence *i)
{
    kdDebug(5850) << "KOIncidenceEditor::createEmbeddedURLPages()" << endl;

    if(!i) return;
    if(!mEmbeddedURLPages.isEmpty())
    {
        kdDebug(5850) << "mEmbeddedURLPages are not empty, clearing it!" << endl;
        mEmbeddedURLPages.setAutoDelete(true);
        mEmbeddedURLPages.clear();
        mEmbeddedURLPages.setAutoDelete(false);
    }
    if(!mAttachedDesignerFields.isEmpty())
    {
        for(QPtrList<QWidget>::Iterator it = mAttachedDesignerFields.begin();
                it != mAttachedDesignerFields.end(); ++it)
        {
            if(mDesignerFieldForWidget.contains(*it))
            {
                mDesignerFields.remove(mDesignerFieldForWidget[ *it ]);
            }
        }
        mAttachedDesignerFields.setAutoDelete(true);
        mAttachedDesignerFields.clear();
        mAttachedDesignerFields.setAutoDelete(false);
    }

    Attachment::List att = i->attachments();
    for(Attachment::List::Iterator it = att.begin(); it != att.end(); ++it)
    {
        Attachment *a = (*it);
        kdDebug(5850) << "Iterating over the attachments " << endl;
        kdDebug(5850) << "label=" << a->label() << ", url=" << a->uri() << ", mimetype=" << a->mimeType() << endl;
        if(a && a->showInline() && a->isUri())
        {
            // TODO: Allow more mime-types, but add security checks!
            /*      if ( a->mimeType() == "application/x-designer" ) {
                    QString tmpFile;
                    if ( KIO::NetAccess::download( a->uri(), tmpFile, this ) ) {
                      mAttachedDesignerFields.append( addDesignerTab( tmpFile ) );
                      KIO::NetAccess::removeTempFile( tmpFile );
                    }
                  } else*/
            // TODO: Enable that check again!
            if(a->mimeType() == "text/html")
            {
                setupEmbeddedURLPage(a->label(), a->uri(), a->mimeType());
            }
        }
    }
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:51,代码来源:koincidenceeditor.cpp

示例2: uri

bool Attachment::operator==( const Attachment &a2 ) const
{
  return uri()          == a2.uri() &&
         d->mLabel      == a2.label() &&
         d->mLocal      == a2.isLocal() &&
         d->mBinary     == a2.isBinary() &&
         d->mShowInline == a2.showInline() &&
         size()         == a2.size() &&
         decodedData()  == a2.decodedData();
}
开发者ID:lenggi,项目名称:kcalcore,代码行数:10,代码来源:attachment.cpp


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