Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
main.h
Go to the documentation of this file.
1 /***************************************************************************
2  main.h
3  --------
4  begin : Mon May 24 2004
5  copyright : (C) 2003 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
22 #ifndef QUCS_MAIN_H
23 #define QUCS_MAIN_H
24 
25 #include <QFont>
26 #include <QColor>
27 #include <Q3PtrList>
28 #include <QStringList>
29 
30 #include "wire.h"
31 #include "node.h"
32 #include "diagrams/diagram.h"
33 #include <QSettings>
34 
35 class QucsApp;
36 class Component;
37 
38 // constants may be missing on windows systems
39 #include <math.h>
40 #ifndef M_PI
41 #define M_PI 3.1415926535897932384626433832795029
42 #endif
43 
44 struct tQucsSettings {
45  int x, y, dx, dy; // position and size of main window
46  QFont font;
48  QColor BGColor; // background color of view area
49  QString Language;
50 
51  // syntax highlighting
54 
55  unsigned int maxUndo; // size of undo stack
56  QString Editor;
57  QString BinDir;
58  QString LangDir;
59  QString LibDir;
60  QString OctaveDir; // m-files location
61  QString ExamplesDir;
62  QString DocDir;
63 
64  unsigned int NodeWiring;
67  QDir AdmsXmlBinDir; // dir of admsXml executable
68  QDir AscoBinDir; // dir of asco executable
69  QDir OctaveBinDir; // dir of octave executable
70 
71  // registered filename extensions with program to open the file
72  QStringList FileTypes;
73 
74  unsigned int numRecentDocs;
75  QStringList RecentDocs;
76 
78 
79 };
80 
81 extern tQucsSettings QucsSettings; // extern because nearly everywhere used
82 extern QucsApp *QucsMain; // the Qucs application itself
83 extern QString lastDir; // to remember last directory for several dialogs
84 extern QStringList qucsPathList;
85 
86 bool loadSettings();
88 void qucsMessageOutput(QtMsgType type, const char *msg);
89 
90 QString complexRect(double, double, int Precision=3);
91 QString complexDeg (double, double, int Precision=3);
92 QString complexRad (double, double, int Precision=3);
93 QString StringNum (double, char form='g', int Precision=3);
94 void str2num (const QString&, double&, QString&, double&);
95 QString num2str (double);
96 QString StringNiceNum(double);
97 void convert2Unicode(QString&);
98 void convert2ASCII(QString&);
99 QString properName(const QString&);
100 QString properAbsFileName(const QString&);
101 QString properFileName(const QString&);
102 bool VHDL_Time(QString&, const QString&);
103 bool VHDL_Delay(QString&, const QString&);
104 bool Verilog_Time(QString&, const QString&);
105 bool Verilog_Delay(QString&, const QString&);
106 QString Verilog_Param(const QString);
107 bool checkVersion(QString&);
108 
109 #endif // ifndef QUCS_MAIN_H
QDir AdmsXmlBinDir
Definition: main.h:67
QString OctaveDir
Definition: main.h:60
QString properName(const QString &)
Definition: main.cpp:476
QDir QucsWorkDir
Definition: main.h:65
QString LangDir
Definition: main.h:58
QString complexRect(double, double, int Precision=3)
Definition: main.cpp:224
QFont font
Definition: main.h:46
QString Verilog_Param(const QString)
Definition: main.cpp:540
QColor Real
Definition: main.h:52
QColor Directive
Definition: main.h:52
bool VHDL_Time(QString &, const QString &)
Definition: main.cpp:513
QString properAbsFileName(const QString &)
Definition: main.cpp:452
bool Verilog_Time(QString &, const QString &)
Definition: main.cpp:575
QColor Integer
Definition: main.h:52
int dy
Definition: main.h:45
QString lastDir
Definition: main.cpp:55
QColor Type
Definition: main.h:52
QColor String
Definition: main.h:52
QColor Attribute
Definition: main.h:52
unsigned int numRecentDocs
Definition: main.h:74
void convert2ASCII(QString &)
Definition: main.cpp:433
QString BinDir
Definition: main.h:57
QString Language
Definition: main.h:49
QString ExamplesDir
Definition: main.h:61
tQucsSettings QucsSettings
Definition: main.cpp:52
QDir AscoBinDir
Definition: main.h:68
QColor Comment
Definition: main.h:52
void str2num(const QString &, double &, QString &, double &)
Definition: main.cpp:328
void convert2Unicode(QString &)
Definition: main.cpp:416
unsigned int NodeWiring
Definition: main.h:64
QString num2str(double)
Definition: main.cpp:384
bool saveApplSettings(QucsApp *)
Definition: main.cpp:127
QString DocDir
Definition: main.h:62
QucsApp * QucsMain
Definition: main.cpp:54
bool VHDL_Delay(QString &, const QString &)
Definition: main.cpp:493
bool IgnoreFutureVersion
Definition: main.h:77
QStringList RecentDocs
Definition: main.h:75
QDir QucsHomeDir
Definition: main.h:66
int y
Definition: main.h:45
QColor Task
Definition: main.h:52
QColor Character
Definition: main.h:52
QString Editor
Definition: main.h:56
bool checkVersion(QString &)
Definition: main.cpp:602
QString StringNiceNum(double)
Definition: main.cpp:293
QDir OctaveBinDir
Definition: main.h:69
float largeFontSize
Definition: main.h:47
unsigned int maxUndo
Definition: main.h:55
QString StringNum(double, char form='g', int Precision=3)
Definition: main.cpp:263
QString complexDeg(double, double, int Precision=3)
Definition: main.cpp:240
QString complexRad(double, double, int Precision=3)
Definition: main.cpp:251
void qucsMessageOutput(QtMsgType type, const char *msg)
qucsMessageOutput handles qDebug, qWarning, qCritical, qFatal.
Definition: main.cpp:193
Definition: qucs.h:61
QString properFileName(const QString &)
Definition: main.cpp:468
bool Verilog_Delay(QString &, const QString &)
Definition: main.cpp:555
int dx
Definition: main.h:45
QStringList qucsPathList
Definition: main.cpp:56
QColor BGColor
Definition: main.h:48
QString LibDir
Definition: main.h:59
QStringList FileTypes
Definition: main.h:72
bool loadSettings()
Definition: main.cpp:60
int x
Definition: main.h:45