| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/miscellaneous/textfactory.h`/ |
| 2 | |
| 3 | #ifndef TEXTFACTORY_H |
| 4 | #define TEXTFACTORY_Hcxx . . $ `src/librssguard/miscellaneous/textfactory.h:4:9`! |
| 5 | |
| 6 | #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/ |
| 7 | |
| 8 | #include <QDateTime> |
| 9 | #include <QFontMetrics> |
| 10 | |
| 11 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! TextFactorycxx . . $ TextFactory# { |
| 12 | private: |
| 13 | // Constructors and destructors. |
| 14 | TextFactorycxx . . $ TextFactory#TextFactory(49f6e7a06ebc5aa8).(); |
| 15 | |
| 16 | public: |
| 17 | static QColorcxx . . $ QColor# generateColorFromTextcxx . . $ TextFactory#generateColorFromText(9e6ac3906205eeaf).(const QStringcxx . . $ QString#& text); |
| 18 | static QColorcxx . . $ QColor# generateRandomColorcxx . . $ TextFactory#generateRandomColor(f5857e16334315e5).(); |
| 19 | |
| 20 | static QStringcxx . . $ QString# extractUsernameFromEmailcxx . . $ TextFactory#extractUsernameFromEmail(fd988a2ab94d906b).(const QStringcxx . . $ QString#& email_address); |
| 21 | static int stringHeightcxx . . $ TextFactory#stringHeight(7fa286f5963668da).(const QStringcxx . . $ QString#& string, const QFontMetricscxx . . $ QFontMetrics#& metrics); |
| 22 | static int stringWidthcxx . . $ TextFactory#stringWidth(7fa286f5963668da).(const QStringcxx . . $ QString#& string, const QFontMetricscxx . . $ QFontMetrics#& metrics); |
| 23 | |
| 24 | static bool couldBeHtmlcxx . . $ TextFactory#couldBeHtml(e1defb592416720d).(const QStringcxx . . $ QString#& string); |
| 25 | |
| 26 | // Tries to parse input textual date/time representation. |
| 27 | // Returns invalid date/time if processing fails. |
| 28 | // NOTE: This method tries to always return time in UTC. |
| 29 | static QDateTimecxx . . $ QDateTime# parseDateTimecxx . . $ TextFactory#parseDateTime(a28da78309843c43).(const QStringcxx . . $ QString#& date_time, QStringcxx . . $ QString#* used_dt_format = nullptr); |
| 30 | |
| 31 | // Converts 1970-epoch miliseconds to date/time. |
| 32 | // NOTE: This method tries to always return time in UTC. |
| 33 | static QDateTimecxx . . $ QDateTime# parseDateTimecxx . . $ TextFactory#parseDateTime(f757a3a63fdb8414).(qint64cxx . . $ qint64# milis_from_epoch); |
| 34 | static QStringListcxx . . $ QStringList# dateTimePatternscxx . . $ TextFactory#dateTimePatterns(83e97a3b04836c1e).(bool with_tzs); |
| 35 | static QStringcxx . . $ QString# encryptcxx . . $ TextFactory#encrypt(8566f3882fd92083).(const QStringcxx . . $ QString#& text, quint64cxx . . $ quint64# key = 0); |
| 36 | static QStringcxx . . $ QString# decryptcxx . . $ TextFactory#decrypt(8566f3882fd92083).(const QStringcxx . . $ QString#& text, quint64cxx . . $ quint64# key = 0); |
| 37 | static QStringcxx . . $ QString# newlinecxx . . $ TextFactory#newline(4365c3963150523e).(); |
| 38 | static QStringcxx . . $ QString# capitalizeFirstLettercxx . . $ TextFactory#capitalizeFirstLetter(fd988a2ab94d906b).(const QStringcxx . . $ QString#& sts); |
| 39 | static QStringListcxx . . $ QStringList# tokenizeProcessArgumentscxx . . $ TextFactory#tokenizeProcessArguments(8335580dfd879b35).(const QStringcxx . . $ QString#& command); |
| 40 | |
| 41 | // Shortens input string according to given length limit. |
| 42 | static QStringcxx . . $ QString# shortencxx . . $ TextFactory#shorten(28db0a4afda64396).(const QStringcxx . . $ QString#& input, int text_length_limit = TEXT_TITLE_LIMITcxx . . $ `src/librssguard/definitions/definitions.h:68:9`!); |
| 43 | |
| 44 | private: |
| 45 | static quint64cxx . . $ quint64# initializeSecretEncryptionKeycxx . . $ TextFactory#initializeSecretEncryptionKey(73266883b0c7072b).(); |
| 46 | static quint64cxx . . $ quint64# generateSecretEncryptionKeycxx . . $ TextFactory#generateSecretEncryptionKey(73266883b0c7072b).(); |
| 47 | static quint64cxx . . $ quint64# s_encryptionKeycxx . . $ TextFactory#s_encryptionKey.; |
| 48 | }; |
| 49 | |
| 50 | #endif // TEXTFACTORY_H |