diff -r b0e004c8e3a4 -r c20ee66b6705 src/mainwindow.h --- a/src/mainwindow.h Thu Feb 23 19:33:56 2017 +0200 +++ b/src/mainwindow.h Thu Feb 23 19:56:21 2017 +0200 @@ -29,12 +29,8 @@ #include "doublemap.h" class MessageManager; -class MainWindow; class QToolButton; -class QDialogButtonBox; class Canvas; -class QComboBox; -class QProgressBar; class Toolset; class Configuration; class PrimitiveManager; @@ -176,46 +172,4 @@ // Get an icon by name from the resources directory. QPixmap GetIcon (QString iconName); - -// Asks the user a yes/no question with the given message and the given window title. -// Returns true if the user answered yes, false if no. -bool Confirm (const QString& title, const QString& message); // Generic confirm prompt - -// An overload of confirm(), this asks the user a yes/no question with the given message. -// Returns true if the user answered yes, false if no. -bool Confirm (const QString& message); - -// Displays an error prompt with the given message -void Critical (const QString& message); -void errorPrompt (QWidget *parent, const QString& message); - -// Takes in pairs of radio buttons and respective values and finds the first selected one. -// Returns returns the value of the first found radio button that was checked by the user. -template -T RadioSwitch (const T& defval, QList> haystack) -{ - for (Pair i : haystack) - { - if (i.first->isChecked()) - return i.second; - } - - return defval; -} - -// Takes in pairs of radio buttons and respective values and checks the first found radio button whose respsective value -// matches expr have the given value. -template -void RadioDefault (const T& expr, QList> haystack) -{ - for (Pair i : haystack) - { - if (i.second == expr) - { - i.first->setChecked (true); - return; - } - } -} - -QSettings* makeSettings (QObject* parent = nullptr); +class QSettings* makeSettings(QObject* parent = nullptr);