File indexing completed on 2024-12-22 04:17:22
0001 /*************************************************************************** 0002 object.cpp: abstract base class for all Kst objects 0003 ------------------- 0004 copyright : (C) 2013 The University of Toronto 0005 email : netterfield@astro.utoronto.ca 0006 ***************************************************************************/ 0007 0008 /*************************************************************************** 0009 * * 0010 * This program is free software; you can redistribute it and/or modify * 0011 * it under the terms of the GNU General Public License as published by * 0012 * the Free Software Foundation; either version 2 of the License, or * 0013 * (at your option) any later version. * 0014 * * 0015 ***************************************************************************/ 0016 0017 #include "settings.h" 0018 0019 #include <QApplication> 0020 #include <QVector> 0021 #include <QDebug> 0022 0023 static QVector<QSettings*> s_settings; 0024 0025 0026 QSettings& Kst::createSettings(const QString& scope) 0027 { 0028 const QString organization = "kst"; 0029 QSettings* setting = 0030 //new QSettings(QApplication::applicationDirPath() + "/" + organization + "-" + scope + ".ini", QSettings::IniFormat); 0031 new QSettings(organization, scope); 0032 s_settings << setting; 0033 return *setting; 0034 } 0035 0036 0037 void Kst::deleteAllSettings() 0038 { 0039 Q_FOREACH(QSettings* s, s_settings) { 0040 delete s; 0041 } 0042 } 0043 0044 0045 // vim: ts=2 sw=2 et