diff --git a/CMakeLists.txt b/CMakeLists.txt
index 124cd4e..16fd48c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@
#############################################################################
message(STATUS "Using CMake version ${CMAKE_VERSION}")
-cmake_minimum_required(VERSION 3.1...${CMAKE_VERSION})
+cmake_minimum_required(VERSION 3.1.0)
project(libremines)
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
diff --git a/README.md b/README.md
index 9e2626f..1269801 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
The following dependencies are required for building and running LibreMines:
* [Qt5 Core](https://doc.qt.io/qt-5/qtcore-index.html) >= 5.12
* [Qt5 Widgets](https://doc.qt.io/qt-5/qtwidgets-index.html) >= 5.12
-* [CMake](https://cmake.org/)
+* [CMake](https://cmake.org/) >= 3.1
On Arch Linux and derivatives systems the dependencies can be installed with pacman:
diff --git a/src/libreminesgui.cpp b/src/libreminesgui.cpp
index b9388bc..95b58d2 100644
--- a/src/libreminesgui.cpp
+++ b/src/libreminesgui.cpp
@@ -71,6 +71,9 @@ LibreMinesGui::LibreMinesGui(QWidget *parent, const int thatWidth, const int tha
connect(preferences, &LibreMinesPreferencesDialog::SIGNAL_optionChanged,
this, &LibreMinesGui::SLOT_optionChanged);
+ connect(preferences, &LibreMinesPreferencesDialog::SIGNAL_visibilityChanged,
+ [this](const bool visible){ this->centralWidget()->setEnabled(!visible); });
+
vConfigureInterface(thatWidth, thatHeight);
qApp->installEventFilter(this);
diff --git a/src/libreminespreferencesdialog.cpp b/src/libreminespreferencesdialog.cpp
index 82dec54..4ce953c 100644
--- a/src/libreminespreferencesdialog.cpp
+++ b/src/libreminespreferencesdialog.cpp
@@ -1,3 +1,23 @@
+/*****************************************************************************
+ * LibreMines *
+ * Copyright (C) 2020 Bruno Bollos Correa *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ *****************************************************************************
+ */
+
+
#include "libreminespreferencesdialog.h"
#include "ui_libreminespreferencesdialog.h"
@@ -69,7 +89,18 @@ void LibreMinesPreferencesDialog::setOptionUsername(const QString &username)
void LibreMinesPreferencesDialog::closeEvent(QCloseEvent *e)
{
Q_UNUSED(e);
-
this->hide();
}
+void LibreMinesPreferencesDialog::hideEvent(QHideEvent *e)
+{
+ Q_UNUSED(e);
+ emit SIGNAL_visibilityChanged(false);
+}
+
+void LibreMinesPreferencesDialog::showEvent(QShowEvent *e)
+{
+ Q_UNUSED(e);
+ emit SIGNAL_visibilityChanged(true);
+}
+
diff --git a/src/libreminespreferencesdialog.h b/src/libreminespreferencesdialog.h
index 77a071b..4e85824 100644
--- a/src/libreminespreferencesdialog.h
+++ b/src/libreminespreferencesdialog.h
@@ -1,3 +1,23 @@
+/*****************************************************************************
+ * LibreMines *
+ * Copyright (C) 2020 Bruno Bollos Correa *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ *****************************************************************************
+ */
+
+
#ifndef LIBREMINESPREFERENCESDIALOG_H
#define LIBREMINESPREFERENCESDIALOG_H
@@ -27,12 +47,15 @@ class LibreMinesPreferencesDialog : public QDialog
protected:
void closeEvent(QCloseEvent* e);
+ void hideEvent(QHideEvent* e);
+ void showEvent(QShowEvent* e);
private:
Ui::LibreMinesPreferencesDialog *ui;
Q_SIGNALS:
void SIGNAL_optionChanged(const QString& name, const QString& value);
+ void SIGNAL_visibilityChanged(const bool visible);
};
#endif // LIBREMINESPREFERENCESDIALOG_H
diff --git a/src/qlabel_adapted.cpp b/src/qlabel_adapted.cpp
index b301b2f..7589219 100644
--- a/src/qlabel_adapted.cpp
+++ b/src/qlabel_adapted.cpp
@@ -1,3 +1,23 @@
+/*****************************************************************************
+ * LibreMines *
+ * Copyright (C) 2020 Bruno Bollos Correa *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ *****************************************************************************
+ */
+
+
#include "qlabel_adapted.h"
QLabel_adapted::QLabel_adapted(QWidget *parent):
diff --git a/src/qlabel_adapted.h b/src/qlabel_adapted.h
index 0e61e4f..c7ac353 100644
--- a/src/qlabel_adapted.h
+++ b/src/qlabel_adapted.h
@@ -1,3 +1,23 @@
+/*****************************************************************************
+ * LibreMines *
+ * Copyright (C) 2020 Bruno Bollos Correa *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ *****************************************************************************
+ */
+
+
#ifndef QLABEL_ADAPTED_H
#define QLABEL_ADAPTED_H