Changeset 5452 in ntrip for trunk/GnssCenter/main


Ignore:
Timestamp:
Sep 14, 2013, 3:28:51 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/main/main.cpp

    r5082 r5452  
    2727  app.setOrganizationName("BKG");
    2828  app.setOrganizationDomain("www.bkg.bund.de");
     29  app.setConfFileName("");
    2930
    3031  t_mainWin* mainWin = new t_mainWin();
  • trunk/GnssCenter/main/settings.cpp

    r5001 r5452  
    7373                            const QVariant& defaultValue) const {
    7474  QMutexLocker locker(&_mutex);
    75 
    76   if (_app->_settings.contains(key)) {
    77     return _app->_settings[key];
     75  QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key;
     76  if (_app->_settings.contains(fullKey)) {
     77    return _app->_settings[fullKey];
    7878  }
    7979  else {
     
    8686void t_settings::setValue(const QString &key, const QVariant& value) {
    8787  QMutexLocker locker(&_mutex);
    88   setValue_p(key, value);
    89 }
    90 
    91 //
    92 ////////////////////////////////////////////////////////////////////////////
    93 void t_settings::setValue_p(const QString &key, const QVariant& value) {
    94   _app->_settings[key] = value;
     88  QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key;
     89  _app->_settings[fullKey] = value;
    9590}
    9691
     
    9994void t_settings::remove(const QString& key ) {
    10095  QMutexLocker locker(&_mutex);
    101   _app->_settings.remove(key);
     96  QString fullKey = _groupName.isEmpty() ? key : _groupName + '/' + key;
     97  _app->_settings.remove(fullKey);
    10298}
    10399
     
    115111  settings.sync();
    116112}
     113
     114//
     115////////////////////////////////////////////////////////////////////////////
     116void t_settings::beginGroup(const QString& groupName) {
     117  QMutexLocker locker(&_mutex);
     118  _groupName = groupName;
     119}
     120
     121//
     122////////////////////////////////////////////////////////////////////////////
     123void t_settings::endGroup() {
     124  QMutexLocker locker(&_mutex);
     125  _groupName.clear();
     126}
  • trunk/GnssCenter/main/settings.h

    r5001 r5452  
    1616  void setValue(const QString &key, const QVariant& value);
    1717  void remove(const QString& key );
     18  void sync();
     19  void beginGroup(const QString& groupName);
     20  void endGroup();
     21 private:
    1822  void reRead();
    19   void sync();
    20  private:
    21   void          setValue_p(const QString &key, const QVariant& value);
    2223  t_app*        _app;
     24  QString       _groupName;
    2325  static QMutex _mutex;
    2426};
Note: See TracChangeset for help on using the changeset viewer.