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


C++ QDebug类代码示例

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


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

示例1:

SYMBIANUTILS_EXPORT QDebug operator<<(QDebug d, const SymbianDevice &cd)
{
    d.nospace() << cd.toString();
    return d;
}
开发者ID:KDE,项目名称:android-qt,代码行数:5,代码来源:symbiandevicemanager.cpp

示例2: switch

QDebug operator<<(QDebug debug, const MessageEnvelop &messageEnvelop)
{
    debug.nospace() << "MessageEnvelop(";

    switch (messageEnvelop.messageType()) {
        case MessageType::EndMessage:
            qDebug() << "EndMessage()";
            break;
        case MessageType::RegisterTranslationUnitForEditorMessage:
            qDebug() << messageEnvelop.message<RegisterTranslationUnitForEditorMessage>();
            break;
        case MessageType::UpdateTranslationUnitsForEditorMessage:
            qDebug() << messageEnvelop.message<UpdateTranslationUnitsForEditorMessage>();
            break;
        case MessageType::UnregisterTranslationUnitsForEditorMessage:
            qDebug() << messageEnvelop.message<UnregisterTranslationUnitsForEditorMessage>();
            break;
        case MessageType::RegisterProjectPartsForEditorMessage:
            qDebug() << messageEnvelop.message<RegisterProjectPartsForEditorMessage>();
            break;
        case MessageType::UnregisterProjectPartsForEditorMessage:
            qDebug() << messageEnvelop.message<UnregisterProjectPartsForEditorMessage>();
            break;
        case MessageType::RegisterUnsavedFilesForEditorMessage:
            qDebug() << messageEnvelop.message<RegisterUnsavedFilesForEditorMessage>();
            break;
        case MessageType::UnregisterUnsavedFilesForEditorMessage:
            qDebug() << messageEnvelop.message<UnregisterUnsavedFilesForEditorMessage>();
            break;
        case MessageType::CompleteCodeMessage:
            qDebug() << messageEnvelop.message<CompleteCodeMessage>();
            break;
        case MessageType::RequestDocumentAnnotationsMessage:
            qDebug() << messageEnvelop.message<RequestDocumentAnnotationsMessage>();
            break;
        case MessageType::UpdateVisibleTranslationUnitsMessage:
            qDebug() << messageEnvelop.message<UpdateVisibleTranslationUnitsMessage>();
            break;
        case MessageType::AliveMessage:
            qDebug() << "AliveMessage()";
            break;
        case MessageType::EchoMessage:
            qDebug() << messageEnvelop.message<EchoMessage>();
            break;
        case MessageType::CodeCompletedMessage:
            qDebug() << messageEnvelop.message<CodeCompletedMessage>();
            break;
        case MessageType::TranslationUnitDoesNotExistMessage:
            qDebug() << messageEnvelop.message<TranslationUnitDoesNotExistMessage>();
            break;
        case MessageType::ProjectPartsDoNotExistMessage:
            qDebug() << messageEnvelop.message<ProjectPartsDoNotExistMessage>();
            break;
        case MessageType::DocumentAnnotationsChangedMessage:
            qDebug() << messageEnvelop.message<DocumentAnnotationsChangedMessage>();
            break;
        default:
            qWarning() << "Unknown Message";
    }

    debug.nospace() << ")";

    return debug;
}
开发者ID:C-sjia,项目名称:qt-creator,代码行数:64,代码来源:messageenvelop.cpp

示例3:

QDebug operator<<(QDebug dbg, Number n)
{
    dbg.nospace() << n.toString();

    return dbg.space();
}
开发者ID:Vourhey,项目名称:ECalc,代码行数:6,代码来源:lineedit.cpp

示例4:

QDebug operator<<(QDebug debug, const VariantProperty &VariantProperty)
{
    return debug.nospace() << "VariantProperty(" << VariantProperty.name() << ')';
}
开发者ID:CNOT,项目名称:julia-studio,代码行数:4,代码来源:variantproperty.cpp

示例5: printDebug

 QDebug printDebug(QDebug dbg) const
 {
     dbg.nospace() << "KoVariable value=" << value;
     return dbg.space();
 }
开发者ID:ChrisJong,项目名称:krita,代码行数:5,代码来源:KoVariable.cpp

示例6: print

void RPolylineEntity::print(QDebug dbg) const {
    dbg.nospace() << "RPolylineEntity(";
    REntity::print(dbg);
    data.print(dbg);
    dbg.nospace()  << ")";
}
开发者ID:,项目名称:,代码行数:6,代码来源:

示例7:

 QDebug operator<<(QDebug debug, const SettingsItem *setting) {
   debug.nospace() << "SettingsItem (" << (void*) setting << ", key: " << setting->d_ptr->key << ")";
   return debug;
 }
开发者ID:hvennekate,项目名称:Molsketch,代码行数:4,代码来源:settingsitem.cpp

示例8:

QDebug Echonest::operator<<(QDebug d, const Echonest::Artist& artist)
{
    return d.maybeSpace() << QString::fromLatin1( "Artist(%1, %2)" ).arg( artist.name() ).arg( QString::fromLatin1(artist.id()) );
}
开发者ID:ximion,项目名称:Clementine-LibDanceTag,代码行数:4,代码来源:Artist.cpp

示例9: switch

QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
{
    QString typeName;
    switch (f.pixelFormat()) {
    case QVideoFrame::Format_Invalid:
        typeName = QLatin1String("Format_Invalid");
        break;
    case QVideoFrame::Format_ARGB32:
        typeName = QLatin1String("Format_ARGB32");
        break;
    case QVideoFrame::Format_ARGB32_Premultiplied:
        typeName = QLatin1String("Format_ARGB32_Premultiplied");
        break;
    case QVideoFrame::Format_RGB32:
        typeName = QLatin1String("Format_RGB32");
        break;
    case QVideoFrame::Format_RGB24:
        typeName = QLatin1String("Format_RGB24");
        break;
    case QVideoFrame::Format_RGB565:
        typeName = QLatin1String("Format_RGB565");
        break;
    case QVideoFrame::Format_RGB555:
        typeName = QLatin1String("Format_RGB555");
        break;
    case QVideoFrame::Format_ARGB8565_Premultiplied:
        typeName = QLatin1String("Format_ARGB8565_Premultiplied");
        break;
    case QVideoFrame::Format_BGRA32:
        typeName = QLatin1String("Format_BGRA32");
        break;
    case QVideoFrame::Format_BGRA32_Premultiplied:
        typeName = QLatin1String("Format_BGRA32_Premultiplied");
        break;
    case QVideoFrame::Format_BGR32:
        typeName = QLatin1String("Format_BGR32");
        break;
    case QVideoFrame::Format_BGR24:
        typeName = QLatin1String("Format_BGR24");
        break;
    case QVideoFrame::Format_BGR565:
        typeName = QLatin1String("Format_BGR565");
        break;
    case QVideoFrame::Format_BGR555:
        typeName = QLatin1String("Format_BGR555");
        break;
    case QVideoFrame::Format_BGRA5658_Premultiplied:
        typeName = QLatin1String("Format_BGRA5658_Premultiplied");
        break;
    case QVideoFrame::Format_AYUV444:
        typeName = QLatin1String("Format_AYUV444");
        break;
    case QVideoFrame::Format_AYUV444_Premultiplied:
        typeName = QLatin1String("Format_AYUV444_Premultiplied");
        break;
    case QVideoFrame::Format_YUV444:
        typeName = QLatin1String("Format_YUV444");
        break;
    case QVideoFrame::Format_YUV420P:
        typeName = QLatin1String("Format_YUV420P");
        break;
    case QVideoFrame::Format_YV12:
        typeName = QLatin1String("Format_YV12");
        break;
    case QVideoFrame::Format_UYVY:
        typeName = QLatin1String("Format_UYVY");
        break;
    case QVideoFrame::Format_YUYV:
        typeName = QLatin1String("Format_YUYV");
        break;
    case QVideoFrame::Format_NV12:
        typeName = QLatin1String("Format_NV12");
        break;
    case QVideoFrame::Format_NV21:
        typeName = QLatin1String("Format_NV21");
        break;
    case QVideoFrame::Format_IMC1:
        typeName = QLatin1String("Format_IMC1");
        break;
    case QVideoFrame::Format_IMC2:
        typeName = QLatin1String("Format_IMC2");
        break;
    case QVideoFrame::Format_IMC3:
        typeName = QLatin1String("Format_IMC3");
        break;
    case QVideoFrame::Format_IMC4:
        typeName = QLatin1String("Format_IMC4");
        break;
    case QVideoFrame::Format_Y8:
        typeName = QLatin1String("Format_Y8");
        break;
    case QVideoFrame::Format_Y16:
        typeName = QLatin1String("Format_Y16");
    default:
        typeName = QString(QLatin1String("UserType(%1)" )).arg(int(f.pixelFormat()));
    }

    dbg.nospace() << "QVideoSurfaceFormat(" << typeName;
    dbg.nospace() << ", " << f.frameSize();
    dbg.nospace() << ", viewport=" << f.viewport();
//.........这里部分代码省略.........
开发者ID:Suneal,项目名称:qt,代码行数:101,代码来源:qvideosurfaceformat.cpp

示例10:

//! [0]
QDebug operator<<(QDebug dbg, const Coordinate &c)
{
    dbg.nospace() << "(" << c.x() << ", " << c.y() << ")";
    
    return dbg.space();
}
开发者ID:cedrus,项目名称:qt4,代码行数:7,代码来源:qdebugsnippet.cpp

示例11:

QDebug operator<<(QDebug dbg, const QDispatchSemaphore& s)
{	
	dbg.nospace() << "QDispatchSemaphore (no info available)";
	return dbg.space();
}
开发者ID:JackieXie168,项目名称:libdispatch,代码行数:5,代码来源:qdispatchsemaphore.cpp

示例12:

QDebug operator<<(QDebug dbg, const QsVersion &version)
{
    dbg.nospace() << version.toString();
    return dbg.space();
}
开发者ID:nash142857,项目名称:brain_cal_server,代码行数:5,代码来源:QsVersion.cpp

示例13:

QDebug operator<<(QDebug s, const AppStream::Launchable& launchable)
{
    s.nospace() << "AppStream::Launchable(" << launchable.entries() << ")";
    return s.space();
}
开发者ID:ximion,项目名称:appstream,代码行数:5,代码来源:launchable.cpp

示例14: print

void RCircleEntity::print(QDebug dbg) const {
    dbg.nospace() << "RCircleEntity(";
    REntity::print(dbg);
    dbg.nospace() << ", center: " << getCenter();
//  dbg.nospace() << ", radius: " << getRadius() << ")";
}
开发者ID:Jackieee,项目名称:qcad,代码行数:6,代码来源:RCircleEntity.cpp

示例15: print

void RSpline::print(QDebug dbg) const {
    dbg.nospace() << "RSpline(";
    RShape::print(dbg);

    dbg.nospace() << ", degree: " << getDegree();
    dbg.nospace() << ", order: " << getOrder();
    dbg.nospace() << ", closed: " << isClosed();
    dbg.nospace() << ", periodic: " << isPeriodic();
    dbg.nospace() << ", start point: " << getStartPoint();
    dbg.nospace() << ", end point: " << getEndPoint();

    QList<RVector> controlPoints = getControlPointsWrapped();
    dbg.nospace() << ",\ncontrolPoints (" << controlPoints.count() << "): ";
    for (int i=0; i<controlPoints.count(); ++i) {
        dbg.nospace() << i << ": " << controlPoints.at(i);
    }

    QList<RVector> fitPoints = getFitPoints();
    dbg.nospace() << ",\nfitPoints (" << fitPoints.count() << "): ";
    for (int i=0; i<fitPoints.count(); ++i) {
        dbg.nospace() << i << ": " << fitPoints.at(i) << ", ";
    }

    QList<double> knotVector = getKnotVector();
    dbg.nospace() << ",\nknots (" << knotVector.count() << "): ";
    for (int i=0; i<knotVector.count(); ++i) {
        dbg.nospace() << i << ": " << knotVector.at(i) << ", ";
    }

    knotVector = getActualKnotVector();
    dbg.nospace() << ",\ninternally used knots (" << knotVector.count() << "): ";
    for (int i=0; i<knotVector.count(); ++i) {
        dbg.nospace() << i << ": " << knotVector.at(i) << ", ";
    }
}
开发者ID:DanielJSlick,项目名称:qcad,代码行数:35,代码来源:RSpline.cpp


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