-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathmain.h
120 lines (98 loc) · 3.8 KB
/
main.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
117
118
119
120
/***************************************************************************
main.h
--------
begin : Mon May 24 2004
copyright : (C) 2003 by Michael Margraf
email : michael.margraf@alumni.tu-berlin.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/*!
* \file main.h
* \brief Definitions and declarations for the main application.
*/
#ifndef QUCS_MAIN_H
#define QUCS_MAIN_H
#include <QFont>
#include <QColor>
#include <QStringList>
#include <QDir>
class QucsApp;
class Component;
class VersionTriplet;
static const double pi = 3.1415926535897932384626433832795029; /* pi */
struct tQucsSettings {
int DefaultSimulator;
QFont font;
QFont appFont;
QFont textFont;
QFont sysDefaultFont;
float largeFontSize;
QColor BGColor; // background color of view area
QString Language;
// syntax highlighting
QColor Comment, String, Integer, Real, Character, Type,
Attribute, Directive, Task;
unsigned int maxUndo; // size of undo stack
QString Editor;
QString Qucsator;
QString QucsatorDir;
QString QucsatorVar;
QString Qucsconv;
QString BinDir;
QString LangDir;
QString LibDir;
QString OctaveDir; // m-files location
QString ExamplesDir;
QString DocDir;
unsigned int NodeWiring;
QDir QucsWorkDir;
// A dir for user projects and libraries. See also https://github.com/ra3xdh/qucs_s/issues/145
QDir qucsWorkspaceDir;
// This is the dir where all temporary or intermediate data should be stored.
// Consider a data "temporary" if its used only once or it makes sense only
// through out a single app run or a shorter period of time.
// Don't make any assumptions about the lifetime of contents in this dir,
// think that everything placed in here is deleted when app is terminated.
QDir tempFilesDir;
QDir projsDir; // current user projects subdirectory
QDir AdmsXmlBinDir; // dir of admsXml executable
QDir AscoBinDir; // dir of asco executable
QString OpenVAFExecutable;
QString NgspiceExecutable; // Executables of external simulators
QString XyceExecutable;
QString XyceParExecutable;
QString SpiceOpusExecutable;
QString S4Qworkdir;
unsigned int NProcs; // Number of processors for Xyce
QString OctaveExecutable; // OctaveExecutable location
QString QucsOctave; // OUCS_OCTAVE variable
QString RFLayoutExecutable;
// registered filename extensions with program to open the file
QStringList FileTypes;
// List of extensions used for spice files
QStringList spiceExtensions;
unsigned int numRecentDocs;
QStringList RecentDocs;
bool IgnoreFutureVersion;
bool GraphAntiAliasing;
bool TextAntiAliasing;
bool hasDarkTheme;
bool fullTraceName;
bool firstRun;
};
extern tQucsSettings QucsSettings; // extern because nearly everywhere used
extern QucsApp *QucsMain; // the Qucs application itself
extern QString lastDir; // to remember last directory for several dialogs
extern QStringList qucsPathList;
extern VersionTriplet QucsVersion;
bool loadSettings();
bool saveApplSettings();
void qucsMessageOutput(QtMsgType type, const char *msg);
#endif // ifndef QUCS_MAIN_H