summaryrefslogtreecommitdiff
path: root/cad/plugins/NanoVision-1/src/UserSettings.cpp
blob: 763c1b55a28dadc3359a3a60b8fc1fb1b207bddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.

#include "UserSettings.h"

UserSettings* UserSettings::ThisInstance = 0;


/* CONSTRUCTOR */
UserSettings::UserSettings()
#ifdef NX_DEBUG	
: QSettings(QSettings::IniFormat, QSettings::UserScope,
				"Nanorex", "NanoVision-1_d")
#else
: QSettings(QSettings::IniFormat, QSettings::UserScope,
            "Nanorex", "NanoVision-1")
#endif
{
}


/* DESTRUCTOR */
UserSettings::~UserSettings() {
	ThisInstance = 0;
}


/* FUNCTION: Instance */
UserSettings* UserSettings::Instance() {
	if (ThisInstance == 0)
		ThisInstance = new UserSettings();
	return ThisInstance;
}


/* FUNCTION: sync */
void UserSettings::sync() {
	QSettings::sync();
	emit updated();
}