|
|
|
|
@ -30,7 +30,10 @@ |
|
|
|
|
#include <QElapsedTimer> |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0) |
|
|
|
|
#undef I18N_NOOP2 |
|
|
|
|
#define I18N_NOOP2 kli18nc |
|
|
|
|
#endif |
|
|
|
|
namespace |
|
|
|
|
{ |
|
|
|
|
const int FGCOLOR_INDEX = 0; |
|
|
|
|
@ -119,7 +122,12 @@ const char *const ColorScheme::colorNames[TABLE_COLORS] = { |
|
|
|
|
"Color6Faint", |
|
|
|
|
"Color7Faint", |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0) |
|
|
|
|
const KLazyLocalizedString ColorScheme::translatedColorNames[TABLE_COLORS] = { |
|
|
|
|
#else |
|
|
|
|
const char *const ColorScheme::translatedColorNames[TABLE_COLORS] = { |
|
|
|
|
#endif |
|
|
|
|
I18N_NOOP2("@item:intable palette", "Foreground"), |
|
|
|
|
I18N_NOOP2("@item:intable palette", "Background"), |
|
|
|
|
I18N_NOOP2("@item:intable palette", "Color 1"), |
|
|
|
|
@ -162,8 +170,11 @@ QString ColorScheme::colorNameForIndex(int index) |
|
|
|
|
QString ColorScheme::translatedColorNameForIndex(int index) |
|
|
|
|
{ |
|
|
|
|
Q_ASSERT(index >= 0 && index < TABLE_COLORS); |
|
|
|
|
|
|
|
|
|
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0) |
|
|
|
|
return translatedColorNames[index].toString(); |
|
|
|
|
#else |
|
|
|
|
return i18nc("@item:intable palette", translatedColorNames[index]); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ColorScheme::ColorScheme() |
|
|
|
|
|