s << QColor(0xff, 0xff, 0x00); // yellow
s << QColor(0xff, 0x00, 0xff); // magenta
s << QColor(0x80, 0x00, 0x80); // purple
+ /*: default color scheme name */
schemes << QPair<QString, QVector<QBrush> >(QObject::tr("Default"), s);
s.clear();
s << QBrush(QColor(0x99, 0x99, 0x99), Qt::SolidPattern);
s << QBrush(QColor(0xcc, 0xcc, 0xcc), Qt::CrossPattern);
s << QBrush(QColor(0xff, 0xff, 0xff), Qt::SolidPattern);
+ /*: black-and-white color scheme name */
schemes << QPair<QString, QVector<QBrush> >(QObject::tr("Black-and-white"), s);
QSettings settings;
*/
#include <QApplication>
+#include <QLocale>
+#include <QTranslator>
#include "window.hpp"
/*
QCoreApplication::setOrganizationName("ftrvxmtrx");
QCoreApplication::setApplicationName("Color Flood");
+ QTranslator translator;
+
+ if (QLocale::Russian == QLocale::system().language())
+ translator.load(":/colorflood.qm");
+
+ app.installTranslator(&translator);
+
Window window;
window.show();
Window::Window ()
: QWidget()
{
- setWindowTitle(tr("Color Flood"));
+ setWindowTitle("Color Flood");
setWindowState(windowState() | Qt::WindowFullScreen);
void Window::updateTurns (int turns)
{
- turnsLabel->setText(QString("%1/%2")
+ /*: number of turns */
+ turnsLabel->setText(tr("Turns: %1/%2")
.arg(turns)
.arg(field->getNumTurnsOfSize(field->getSize())));
}