2 Copyright 2010 Serge Ziryukin <ftrvxmtrx@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
21 setWindowTitle(tr("Color flood"));
23 setWindowState(windowState() | Qt::WindowFullScreen);
25 QVector<QBrush> brushes;
28 // standart color scheme
29 brushes << QBrush(QColor(0x00, 0x00, 0xff)); // blue
30 brushes << QBrush(QColor(0xff, 0x00, 0x00)); // red
31 brushes << QBrush(QColor(0x00, 0xff, 0x00)); // green
32 brushes << QBrush(QColor(0xff, 0xff, 0x00)); // yellow
33 brushes << QBrush(QColor(0xff, 0x00, 0xff)); // magenta
34 brushes << QBrush(QColor(0x80, 0x00, 0x80)); // purple
36 // color-blind color scheme
37 brushes << QBrush(QColor(0x00, 0x00, 0x00));
38 brushes << QBrush(QColor(0x31, 0x31, 0x31), Qt::Dense1Pattern);
39 brushes << QBrush(QColor(0x62, 0x62, 0x62), Qt::Dense3Pattern);
40 brushes << QBrush(QColor(0x93, 0x93, 0x93), Qt::CrossPattern);
41 brushes << QBrush(QColor(0xc4, 0xc4, 0xc4));
42 brushes << QBrush(QColor(0xff, 0xff, 0xff));
45 field = new Field(this, brushes, Field::SIZE_LARGE);
47 QHBoxLayout *layout = new QHBoxLayout;
48 layout->addWidget(field);
49 layout->setAlignment(field, Qt::AlignRight);