本文整理汇总了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;
}
示例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;
}
示例3:
QDebug operator<<(QDebug dbg, Number n)
{
dbg.nospace() << n.toString();
return dbg.space();
}
示例4:
QDebug operator<<(QDebug debug, const VariantProperty &VariantProperty)
{
return debug.nospace() << "VariantProperty(" << VariantProperty.name() << ')';
}
示例5: printDebug
QDebug printDebug(QDebug dbg) const
{
dbg.nospace() << "KoVariable value=" << value;
return dbg.space();
}
示例6: print
void RPolylineEntity::print(QDebug dbg) const {
dbg.nospace() << "RPolylineEntity(";
REntity::print(dbg);
data.print(dbg);
dbg.nospace() << ")";
}
示例7:
QDebug operator<<(QDebug debug, const SettingsItem *setting) {
debug.nospace() << "SettingsItem (" << (void*) setting << ", key: " << setting->d_ptr->key << ")";
return debug;
}
示例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()) );
}
示例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();
//.........这里部分代码省略.........
示例10:
//! [0]
QDebug operator<<(QDebug dbg, const Coordinate &c)
{
dbg.nospace() << "(" << c.x() << ", " << c.y() << ")";
return dbg.space();
}
示例11:
QDebug operator<<(QDebug dbg, const QDispatchSemaphore& s)
{
dbg.nospace() << "QDispatchSemaphore (no info available)";
return dbg.space();
}
示例12:
QDebug operator<<(QDebug dbg, const QsVersion &version)
{
dbg.nospace() << version.toString();
return dbg.space();
}
示例13:
QDebug operator<<(QDebug s, const AppStream::Launchable& launchable)
{
s.nospace() << "AppStream::Launchable(" << launchable.entries() << ")";
return s.space();
}
示例14: print
void RCircleEntity::print(QDebug dbg) const {
dbg.nospace() << "RCircleEntity(";
REntity::print(dbg);
dbg.nospace() << ", center: " << getCenter();
// dbg.nospace() << ", radius: " << getRadius() << ")";
}
示例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) << ", ";
}
}