| 516 | } |
| 517 | |
| 518 | void Analytics::DocumentReport() |
| 519 | { |
| 520 | Analytics dummyDB; |
| 521 | QVariantMap dummyMap; |
| 522 | AnalyticsSerialise(dummyDB, dummyMap, AnalyticsSerialiseType::Documenting); |
| 523 | QString reportText = dummyMap[lit("doc")].toString(); |
| 524 | |
| 525 | { |
| 526 | QDialog dialog; |
| 527 | dialog.setWindowTitle(lit("Sample Analytics Report")); |
| 528 | dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint); |
| 529 | dialog.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); |
| 530 | dialog.setFixedSize(600, 500); |
| 531 | |
| 532 | QDialogButtonBox buttons; |
| 533 | buttons.addButton(QDialogButtonBox::Ok); |
| 534 | QObject::connect(&buttons, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); |
| 535 | |
| 536 | QTextEdit report; |
| 537 | report.setReadOnly(true); |
| 538 | report.setAcceptRichText(true); |
| 539 | report.setText(reportText); |
| 540 | |
| 541 | QVBoxLayout layout; |
| 542 | |
| 543 | layout.addWidget(&report); |
| 544 | layout.addWidget(&buttons); |
| 545 | |
| 546 | dialog.setLayout(&layout); |
| 547 | |
| 548 | RDDialog::show(&dialog); |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | void Analytics::Prompt(ICaptureContext &ctx, PersistantConfig &config) |
| 553 | { |
nothing calls this directly
no test coverage detected