<location filename="field.cpp" line="262"/>
<source>You won!</source>
<extracomment>win message</extracomment>
- <translation type="unfinished">Вы победили!</translation>
+ <translation type="unfinished">Вы выиграли!</translation>
</message>
<message>
<location filename="field.cpp" line="268"/>
<context>
<name>Window</name>
<message>
- <location filename="window.cpp" line="52"/>
- <source>Toggle fullscreen</source>
- <translation type="unfinished">Полноэкранный режим</translation>
- </message>
- <message>
- <location filename="window.cpp" line="54"/>
+ <location filename="window.cpp" line="49"/>
<source>New game</source>
- <oldsource>New Game</oldsource>
<translation type="unfinished">Новая игра</translation>
</message>
<message>
- <location filename="window.cpp" line="84"/>
- <source><font size="24">Turns: %1/%2</font></source>
+ <location filename="window.cpp" line="86"/>
+ <source><font size="16">Turns: %1/%2</font></source>
<extracomment>number of turns</extracomment>
- <translation type="unfinished"><font size="24">Шагов: %1/%2</font></translation>
+ <translation type="unfinished"><font size="16">Шагов: %1/%2</font></translation>
</message>
</context>
</TS>
setWindowTitle("Color Flood");
setWindowIcon(QIcon(":/images/icon_48x48.png"));
- new FullScreenExitButton(this);
-
int turns;
field = new Field(this, &turns);
colorButtons = new ColorButtons(this);
updateTurns(turns);
- QHBoxLayout *secondary = new QHBoxLayout;
- QPushButton *toggleFS = new QPushButton(QPixmap("/usr/share/icons/hicolor/64x64/hildon/general_fullsize"), tr("Toggle fullscreen"), this);
- QObject::connect(toggleFS, SIGNAL(pressed()), this, SLOT(toggleFullscreen()));
QPushButton *newGame = new QPushButton(tr("New game"), this);
QObject::connect(newGame, SIGNAL(pressed()), field, SLOT(randomize()));
- secondary->addWidget(newGame);
- secondary->addWidget(toggleFS);
-
QVBoxLayout *vl = new QVBoxLayout;
vl->addWidget(colorButtons);
vl->setAlignment(colorButtons, Qt::AlignRight | Qt::AlignTop);
vl->addWidget(turnsLabel);
- vl->setAlignment(turnsLabel, Qt::AlignRight | Qt::AlignTop);
- vl->addLayout(secondary);
- vl->setAlignment(secondary, Qt::AlignRight | Qt::AlignBottom);
+ vl->setAlignment(turnsLabel, Qt::AlignRight | Qt::AlignBottom);
+ vl->addWidget(newGame);
+ vl->setAlignment(newGame, Qt::AlignRight | Qt::AlignTop);
QHBoxLayout *hl = new QHBoxLayout;
hl->addWidget(field);
if (settings.value("fullscreen", true).toBool())
showFullScreen();
-}
-void Window::updateTurns (int turns)
-{
- /*: number of turns */
- turnsLabel->setText(tr("<font size=\"16\">Turns: %1/%2</font>")
- .arg(turns)
- .arg(field->getNumTurnsOfSize(field->getSize())));
+ new FullScreenExitButton(this);
}
-void Window::toggleFullscreen ()
+Window::~Window ()
{
bool isFullscreen = windowState() & Qt::WindowFullScreen;
QSettings settings;
- settings.setValue("fullscreen", !isFullscreen);
+ settings.setValue("fullscreen", isFullscreen);
+}
- if (isFullscreen)
- showNormal();
- else
- showFullScreen();
+void Window::updateTurns (int turns)
+{
+ /*: number of turns */
+ turnsLabel->setText(tr("<font size=\"16\">Turns: %1/%2</font>")
+ .arg(turns)
+ .arg(field->getNumTurnsOfSize(field->getSize())));
}