projects
/
colorflood
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fa21544
)
remove old stuff
author
Serge Ziryukin
<ftrvxmtrx@gmail.com>
Tue, 13 Apr 2010 18:29:35 +0000
(21:29 +0300)
committer
Serge Ziryukin
<ftrvxmtrx@gmail.com>
Tue, 13 Apr 2010 18:29:35 +0000
(21:29 +0300)
colorflood/src/colorflood.qm
patch
|
blob
|
history
colorflood/src/colorflood.ts
patch
|
blob
|
history
colorflood/src/window.cpp
patch
|
blob
|
history
colorflood/src/window.hpp
patch
|
blob
|
history
diff --git
a/colorflood/src/colorflood.qm
b/colorflood/src/colorflood.qm
index
4282c75
..
aa3a687
100644
(file)
Binary files a/colorflood/src/colorflood.qm and b/colorflood/src/colorflood.qm differ
diff --git
a/colorflood/src/colorflood.ts
b/colorflood/src/colorflood.ts
index
0672e6c
..
d940f0a
100644
(file)
--- a/
colorflood/src/colorflood.ts
+++ b/
colorflood/src/colorflood.ts
@@
-7,7
+7,7
@@
<location filename="field.cpp" line="262"/>
<source>You won!</source>
<extracomment>win message</extracomment>
<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"/>
</message>
<message>
<location filename="field.cpp" line="268"/>
@@
-34,21
+34,15
@@
<context>
<name>Window</name>
<message>
<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>
<source>New game</source>
- <oldsource>New Game</oldsource>
<translation type="unfinished">Новая игра</translation>
</message>
<message>
<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>
<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>
</message>
</context>
</TS>
diff --git
a/colorflood/src/window.cpp
b/colorflood/src/window.cpp
index
ef4f63d
..
e0b64ea
100644
(file)
--- a/
colorflood/src/window.cpp
+++ b/
colorflood/src/window.cpp
@@
-27,8
+27,6
@@
Window::Window ()
setWindowTitle("Color Flood");
setWindowIcon(QIcon(":/images/icon_48x48.png"));
setWindowTitle("Color Flood");
setWindowIcon(QIcon(":/images/icon_48x48.png"));
- new FullScreenExitButton(this);
-
int turns;
field = new Field(this, &turns);
colorButtons = new ColorButtons(this);
int turns;
field = new Field(this, &turns);
colorButtons = new ColorButtons(this);
@@
-48,22
+46,16
@@
Window::Window ()
updateTurns(turns);
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()));
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);
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);
QHBoxLayout *hl = new QHBoxLayout;
hl->addWidget(field);
@@
-76,25
+68,22
@@
Window::Window ()
if (settings.value("fullscreen", true).toBool())
showFullScreen();
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;
{
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())));
}
}
diff --git
a/colorflood/src/window.hpp
b/colorflood/src/window.hpp
index
dd1f4a1
..
6429eae
100644
(file)
--- a/
colorflood/src/window.hpp
+++ b/
colorflood/src/window.hpp
@@
-26,10
+26,10
@@
class Window : public QWidget
public:
Window ();
public:
Window ();
+ ~Window ();
private slots:
void updateTurns (int turns);
private slots:
void updateTurns (int turns);
- void toggleFullscreen ();
private:
ColorButtons *colorButtons;
private:
ColorButtons *colorButtons;