-
Notifications
You must be signed in to change notification settings - Fork 2
/
lpub_preferences.h
116 lines (100 loc) · 3.43 KB
/
lpub_preferences.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/****************************************************************************
**
** Copyright (C) 2007-2009 Kevin Clague. All rights reserved.
**
** This file may be used under the terms of the GNU General Public
** License version 2.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file. Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
** http://www.trolltech.com/products/qt/opensource.html
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef LPUB_PREFERENCES_H
#define LPUB_PREFERENCES_H
#ifdef __APPLE__
#define D_LDRAW_PATH_DEFAULT "/usr/share/ldraw"
#define D_LDRAW_PATH_DEFAULT2 "/usr/local/share/ldraw"
#define D_LDGLITE_PATH_DEFAULT "/usr/bin/ldglite"
#define D_LDVIEW_PATH_DEFAULT "/usr/bin/ldview"
#define D_L3P_PATH_DEFAULT "/usr/bin/l3p"
#define D_POVRAY_PATH_DEFAULT "/usr/bin/povray"
#define D_LGEO_PATH_DEFAULT "/usr/bin/lgeo"
#endif
#ifdef __linux__
#define D_LDRAW_PATH_DEFAULT "/usr/share/ldraw"
#define D_LDRAW_PATH_DEFAULT2 "/usr/local/share/ldraw"
#define D_LDGLITE_PATH_DEFAULT "/usr/bin/ldglite"
#define D_LDVIEW_PATH_DEFAULT "/usr/bin/ldview"
#define D_L3P_PATH_DEFAULT "/usr/bin/l3p"
#define D_POVRAY_PATH_DEFAULT "/usr/bin/povray"
#define D_LGEO_PATH_DEFAULT "/usr/bin/lgeo"
#endif
#ifdef _WIN32
#define D_LDRAW_PATH_DEFAULT "c:/LDraw"
#define D_LDRAW_PATH_DEFAULT2 "c:/Program Files/LDraw"
#define D_LDGLITE_PATH_DEFAULT "c:/Program Files/ldglite"
#define D_LDVIEW_PATH_DEFAULT "c:/Program Files/ldview"
#define D_L3P_PATH_DEFAULT "c:/Program Files/l3p"
#define D_POVRAY_PATH_DEFAULT "c:/Program Files/povray"
#define D_LGEO_PATH_DEFAULT "c:/Program Files/lgeo"
#endif
#if !defined(__APPLE__) && !defined(__linux__) && !defined(_WIN32)
#define D_LDRAW_PATH_DEFAULT " "
#define D_LDRAW_PATH_DEFAULT2 " "
#define D_LDGLITE_PATH_DEFAULT " "
#define D_LDVIEW_PATH_DEFAULT " "
#define D_L3P_PATH_DEFAULT " "
#define D_POVRAY_PATH_DEFAULT " "
#define D_LGEO_PATH_DEFAULT " "
#endif
#ifndef LDRAW_PATH_DEFAULT
#define LDRAW_PATH_DEFAULT D_LDRAW_PATH_DEFAULT
#endif
#ifndef LDRAW_PATH_DEFAULT2
#define LDRAW_PATH_DEFAULT2 D_LDRAW_PATH_DEFAULT2
#endif
#ifndef LDGLITE_PATH_DEFAULT
#define LDGLITE_PATH_DEFAULT D_LDGLITE_PATH_DEFAULT
#endif
#ifndef LDVIEW_PATH_DEFAULT
#define LDVIEW_PATH_DEFAULT D_LDVIEW_PATH_DEFAULT
#endif
#ifndef L3P_PATH_DEFAULT
#define L3P_PATH_DEFAULT D_L3P_PATH_DEFAULT
#endif
#ifndef POVRAY_PATH_DEFAULT
#define POVRAY_PATH_DEFAULT D_POVRAY_PATH_DEFAULT
#endif
#ifndef LGEO_PATH_DEFAULT
#define LGEO_PATH_DEFAULT D_LGEO_PATH_DEFAULT
#endif
class QString;
class Preferences
{
public:
Preferences();
static void lpubPreferences();
static void ldrawPreferences(bool);
static void lgeoPreferences();
static void renderPreferences();
static void pliPreferences();
static void unitsPreferences();
static void getRequireds();
static bool getPreferences();
static QString ldrawPath;
static QString lgeoPath;
static QString ldgliteExe;
static QString ldviewExe;
static QString l3pExe;
static QString povrayExe;
static QString preferredRenderer;
static QString pliFile;
static QString lpubPath;
static bool preferCentimeters;
virtual ~Preferences() {}
};
#endif