Qucs-GUI
0.0.18
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
qucs
components
digi_sim.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
digi_sim.cpp
3
--------------
4
begin : Oct 3 2005
5
copyright : (C) 2005 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
***************************************************************************/
17
#include <QtGui>
18
#include "
digi_sim.h
"
19
#include "
main.h
"
20
21
22
Digi_Sim::Digi_Sim
()
23
{
24
Type
=
isDigitalComponent
;
25
Description
= QObject::tr(
"digital simulation"
);
26
27
QString s =
Description
;
28
int
a = s.find(
" "
);
29
if
(a != -1) s[a] =
'\n'
;
// break line before the word "simulation"
30
31
Texts
.append(
new
Text
(0, 0, s.left(a), Qt::darkBlue,
QucsSettings
.
largeFontSize
));
32
if
(a != -1)
33
Texts
.append(
new
Text
(0, 0, s.mid(a+1), Qt::darkBlue,
QucsSettings
.
largeFontSize
));
34
35
x1
= -10;
y1
= -9;
36
x2
=
x1
+120;
y2
=
y1
+59;
37
38
tx
= 0;
39
ty
=
y2
+1;
40
Model
=
".Digi"
;
41
Name
=
"Digi"
;
42
43
// Property list must keeps its order !
44
Props
.append(
new
Property
(
"Type"
,
"TruthTable"
,
true
,
45
QObject::tr(
"type of simulation"
)+
" [TruthTable, TimeList]"
));
46
Props
.append(
new
Property
(
"time"
,
"10 ns"
,
false
,
47
QObject::tr(
"duration of TimeList simulation"
)));
48
Props
.append(
new
Property
(
"Model"
,
"VHDL"
,
false
,
49
QObject::tr(
"netlist format"
)+
" [VHDL, Verilog]"
));
50
}
51
52
// -------------------------------------------------------
53
Digi_Sim::~Digi_Sim
()
54
{
55
}
56
57
// -------------------------------------------------------
58
Component
*
Digi_Sim::newOne
()
59
{
60
return
new
Digi_Sim
();
61
}
62
63
// -------------------------------------------------------
64
Element
*
Digi_Sim::info
(QString& Name,
char
* &BitmapFile,
bool
getNewOne)
65
{
66
Name = QObject::tr(
"digital simulation"
);
67
BitmapFile = (
char
*)
"digi"
;
68
69
if
(getNewOne)
return
new
Digi_Sim
();
70
return
0;
71
}
Element::Type
int Type
Definition:
element.h:152
Element::y1
int y1
Definition:
element.h:153
QucsSettings
tQucsSettings QucsSettings
Definition:
main.cpp:52
Digi_Sim::info
static Element * info(QString &, char *&, bool getNewOne=false)
Definition:
digi_sim.cpp:64
Component::tx
int tx
Definition:
component.h:78
Element::y2
int y2
Definition:
element.h:153
Element::x1
int x1
Definition:
element.h:153
isDigitalComponent
#define isDigitalComponent
Definition:
element.h:113
main.h
Definitions and declarations for the main application.
Component::ty
int ty
Definition:
component.h:78
Component::Props
Q3PtrList< Property > Props
Definition:
component.h:72
Property
Definition:
element.h:94
Text
Definition:
element.h:82
Component
Definition:
component.h:33
Element
Superclass of all schematic drawing elements.
Definition:
element.h:142
Component::Name
QString Name
Definition:
component.h:80
Component::Texts
Q3PtrList< Text > Texts
Definition:
component.h:71
Digi_Sim::~Digi_Sim
~Digi_Sim()
Definition:
digi_sim.cpp:53
Component::Model
QString Model
Definition:
component.h:80
Digi_Sim::Digi_Sim
Digi_Sim()
Definition:
digi_sim.cpp:22
Component::Description
QString Description
Definition:
component.h:81
tQucsSettings::largeFontSize
float largeFontSize
Definition:
main.h:47
Element::x2
int x2
Definition:
element.h:153
digi_sim.h
Digi_Sim::newOne
Component * newOne()
Definition:
digi_sim.cpp:58
Generated on Mon Sep 1 2014 20:05:19 for Qucs-GUI by
1.8.6