|
|
|
@ -3,17 +3,14 @@
|
|
|
|
|
|
|
|
|
|
extern std::unique_ptr<QSettings> settings;
|
|
|
|
|
|
|
|
|
|
void MainWindow::initialiseAbout() {
|
|
|
|
|
QCoreApplication::setOrganizationName("Isabell Elise");
|
|
|
|
|
QCoreApplication::setOrganizationDomain("https://liberapay.com/isabell-elise/");
|
|
|
|
|
QCoreApplication::setApplicationName("ThinkPink");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// initialisation functions
|
|
|
|
|
void MainWindow::initialiseGameGrid() {
|
|
|
|
|
int n_rows = settings->value("size/rows", 9).toInt();
|
|
|
|
|
int n_columns = settings->value("size/columns", 9).toInt();
|
|
|
|
|
std::cout << "Number of rows: " << n_rows << std::endl;
|
|
|
|
|
std::cout << "Number of columns: " << n_columns << std::endl;
|
|
|
|
|
qDebug() << "Number of rows: " << n_rows;
|
|
|
|
|
qDebug() << "Number of columns: " << n_columns;
|
|
|
|
|
qDebug() << "Colors: ";
|
|
|
|
|
for (long long i = 0; i < colors.size(); i++) {
|
|
|
|
|
qDebug() << colors.value(i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::initialiseWindow() {
|
|
|
|
@ -30,9 +27,12 @@ void MainWindow::initialiseMenuBar() {
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
: QMainWindow(parent)
|
|
|
|
|
, ui(new Ui::MainWindow)
|
|
|
|
|
, n_rows(settings->value("size/rows", 9).toInt())
|
|
|
|
|
, n_columns(settings->value("size/columns", 9).toInt())
|
|
|
|
|
, colors(settings->value("colors/colors", QStringList() << "0xBD005E" << "0xFFC0CB" << "0xDB7093" << "0xF7A8B8" << "0x660033").toStringList())
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
initialiseAbout();
|
|
|
|
|
|
|
|
|
|
initialiseGameGrid();
|
|
|
|
|
initialiseWindow();
|
|
|
|
|
initialiseMenuBar();
|
|
|
|
|