]> https://gitweb.dealii.org/ - parameter_gui.git/commitdiff
Use global settings instead of settings file 18/head
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Fri, 23 Jun 2017 19:58:50 +0000 (13:58 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Fri, 23 Jun 2017 19:59:57 +0000 (13:59 -0600)
info_message.cpp
info_message.h
mainwindow.cpp

index 20ce13703b1d834279bc2a68cb0d60477f8d73ca..06e685a14d592d29593eee3c7a0c183ab3149976 100644 (file)
@@ -23,7 +23,8 @@ namespace dealii
 {
   namespace ParameterGui
   {
-    InfoMessage::InfoMessage(QWidget *parent)
+    InfoMessage::InfoMessage(QSettings *parent_settings,
+                             QWidget *parent)
                : QDialog(parent, 0)
     {
       // this variable stores, if the
@@ -72,10 +73,7 @@ namespace dealii
       grid->setColumnStretch(1, 42);
       grid->setRowStretch(0, 42);
 
-      // load settings from an ini-file
-      QString  settings_file = QDir::currentPath() + "/settings.ini";
-
-      settings = new QSettings (settings_file, QSettings::IniFormat);
+      settings = parent_settings;
 
       // we store settings of this class in the group infoMessage
       settings->beginGroup("infoMessage");
index 09a00a2e4e1d2bd72109d5b351e7175ba0402ead..aec1159e95eb1a5fe4aee6d12ee65f69f801d7de 100644 (file)
@@ -54,7 +54,8 @@ namespace dealii
       /**
        * Constructor
        */
-      InfoMessage (QWidget *parent = 0);
+      InfoMessage (QSettings *settings,
+                   QWidget *parent = 0);
 
       /**
        * With this function the @p message which will be shown in the
index 24d007765c3f81e0c672f7a71d862b365d0b519f..109e51c9925b3b8ab25f59b862d9081c69ff4544 100644 (file)
@@ -286,7 +286,7 @@ namespace dealii
     {
       QString title = "parameterGUI";
 
-      info_message = new InfoMessage(this);
+      info_message = new InfoMessage(gui_settings,this);
 
       info_message->setWindowTitle(title);
       info_message->setInfoMessage(tr("Start Editing by double-clicking on the parameter value or"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.