Changeset View
Changeset View
Standalone View
Standalone View
src/ExportManager.cpp
Show All 26 Lines | |||||
27 | #include <QApplication> | 27 | #include <QApplication> | ||
28 | #include <QClipboard> | 28 | #include <QClipboard> | ||
29 | #include <QPainter> | 29 | #include <QPainter> | ||
30 | #include <QFileDialog> | 30 | #include <QFileDialog> | ||
31 | #include <QBuffer> | 31 | #include <QBuffer> | ||
32 | #include <QRegularExpression> | 32 | #include <QRegularExpression> | ||
33 | #include <QRegularExpressionMatch> | 33 | #include <QRegularExpressionMatch> | ||
34 | 34 | | |||
35 | #include <KLocalizedString> | | |||
36 | #include <KSharedConfig> | 35 | #include <KSharedConfig> | ||
37 | #include <KConfigGroup> | 36 | #include <KConfigGroup> | ||
38 | #include <KIO/ListJob> | 37 | #include <KIO/ListJob> | ||
39 | #include <KIO/MkpathJob> | 38 | #include <KIO/MkpathJob> | ||
40 | #include <KIO/FileCopyJob> | 39 | #include <KIO/FileCopyJob> | ||
41 | #include <KIO/StatJob> | 40 | #include <KIO/StatJob> | ||
42 | 41 | | |||
43 | #include "SpectacleConfig.h" | 42 | #include "SpectacleConfig.h" | ||
▲ Show 20 Lines • Show All 470 Lines • ▼ Show 20 Line(s) | 500 | { | |||
514 | 513 | | |||
515 | painter.drawPixmap(srcRect.topLeft(), pixmap); | 514 | painter.drawPixmap(srcRect.topLeft(), pixmap); | ||
516 | painter.end(); | 515 | painter.end(); | ||
517 | 516 | | |||
518 | delete printer; | 517 | delete printer; | ||
519 | return; | 518 | return; | ||
520 | } | 519 | } | ||
521 | 520 | | |||
522 | const QMap<QString, const char*> ExportManager::filenamePlaceholders { | 521 | const QMap<QString, KLocalizedString> ExportManager::filenamePlaceholders { | ||
523 | {QStringLiteral("%Y"), I18N_NOOP2( | 522 | {QStringLiteral("%Y"), ki18nc( | ||
524 | "A placeholder in the user configurable filename will replaced by the specified value", | 523 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
525 | "Year (4 digit)")}, | 524 | "Year (4 digit)")}, | ||
526 | {QStringLiteral("%y"), I18N_NOOP2( | 525 | {QStringLiteral("%y"), ki18nc( | ||
527 | "A placeholder in the user configurable filename will replaced by the specified value", | 526 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
528 | "Year (2 digit)")}, | 527 | "Year (2 digit)")}, | ||
529 | {QStringLiteral("%M"), I18N_NOOP2( | 528 | {QStringLiteral("%M"), ki18nc( | ||
530 | "A placeholder in the user configurable filename will replaced by the specified value", | 529 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
531 | "Month")}, | 530 | "Month")}, | ||
532 | {QStringLiteral("%D"), I18N_NOOP2( | 531 | {QStringLiteral("%D"), ki18nc( | ||
533 | "A placeholder in the user configurable filename will replaced by the specified value", | 532 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
534 | "Day")}, | 533 | "Day")}, | ||
535 | {QStringLiteral("%H"), I18N_NOOP2( | 534 | {QStringLiteral("%H"), ki18nc( | ||
536 | "A placeholder in the user configurable filename will replaced by the specified value", | 535 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
537 | "Hour")}, | 536 | "Hour")}, | ||
538 | {QStringLiteral("%m"), I18N_NOOP2( | 537 | {QStringLiteral("%m"), ki18nc( | ||
539 | "A placeholder in the user configurable filename will replaced by the specified value", | 538 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
540 | "Minute")}, | 539 | "Minute")}, | ||
541 | {QStringLiteral("%S"), I18N_NOOP2( | 540 | {QStringLiteral("%S"), ki18nc( | ||
542 | "A placeholder in the user configurable filename will replaced by the specified value", | 541 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
543 | "Second")}, | 542 | "Second")}, | ||
544 | {QStringLiteral("%T"), I18N_NOOP2( | 543 | {QStringLiteral("%T"), ki18nc( | ||
545 | "A placeholder in the user configurable filename will replaced by the specified value", | 544 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
546 | "Window Title")}, | 545 | "Window Title")}, | ||
547 | {QStringLiteral("%d"), I18N_NOOP2( | 546 | {QStringLiteral("%d"), ki18nc( | ||
548 | "A placeholder in the user configurable filename will replaced by the specified value", | 547 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
549 | "Sequential numbering")}, | 548 | "Sequential numbering")}, | ||
550 | {QStringLiteral("%Nd"), I18N_NOOP2( | 549 | {QStringLiteral("%Nd"), ki18nc( | ||
551 | "A placeholder in the user configurable filename will replaced by the specified value", | 550 | "A placeholder in the user configurable filename will replaced by the specified value", | ||
552 | "Sequential numbering, padded out to N digits")}, | 551 | "Sequential numbering, padded out to N digits")}, | ||
553 | }; | 552 | }; |