- Timestamp:
- Jan 25, 2009, 9:39:53 AM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNC/bncapp.cpp ¶
r1535 r1538 701 701 } 702 702 } 703 704 // 705 //////////////////////////////////////////////////////////////////////////// 706 void bncApp::setConfFileName(const QString& confFileName) { 707 if (confFileName.isEmpty()) { 708 _confFileName = "/home/mervart/bla.ini"; 709 } 710 else { 711 _confFileName = confFileName; 712 } 713 } -
TabularUnified trunk/BNC/bncapp.h ¶
r1536 r1538 43 43 void setCaster(bncCaster* caster) {_caster = caster;} 44 44 QDateTime* _currentDateAndTimeGPS; 45 void setConfFileName(const QString& confFileName); 46 QString confFileName() const {return _confFileName;} 47 45 48 public slots: 46 49 void slotMessage(QByteArray msg, bool showOnScreen); … … 96 99 long _waitCoTime; 97 100 QMultiMap<long, QString>* _corrs; 101 QString _confFileName; 98 102 }; 99 103 #endif -
TabularUnified trunk/BNC/bncmain.cpp ¶
r1537 r1538 120 120 } 121 121 122 QCoreApplication::setOrganizationName("BKG"); 123 QCoreApplication::setOrganizationDomain("www.bkg.bund.de"); 124 if (!confFileName.isEmpty()) { 125 QCoreApplication::setApplicationName(confFileName); 126 } else { 127 QCoreApplication::setApplicationName("BNC"); 128 } 122 bncApp app(argc, argv, GUIenabled); 129 123 130 bncApp app(argc, argv, GUIenabled); 124 app.setApplicationName("BNC"); 125 app.setOrganizationName("BKG"); 126 app.setOrganizationDomain("www.bkg.bund.de"); 127 app.setConfFileName( confFileName ); 131 128 132 129 bncSettings settings; -
TabularUnified trunk/BNC/bncsettings.cpp ¶
r1537 r1538 19 19 20 20 #include "bncsettings.h" 21 #include "bncapp.h" 21 22 22 23 // Constructor 23 24 //////////////////////////////////////////////////////////////////////////// 24 25 bncSettings::bncSettings() : 25 QSettings(QCoreApplication::applicationName().append(".ini"), 26 QSettings::IniFormat) { 26 QSettings(((bncApp*) qApp)->confFileName(), QSettings::IniFormat) { 27 27 28 28 if (allKeys().size() == 0) { … … 73 73 setValue("startTab", "0"); 74 74 setValue("waitTime", "5"); 75 76 sync(); 75 77 } 76 78 }
Note:
See TracChangeset
for help on using the changeset viewer.