My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
18 #include "digi_sim.h"
19 #include "main.h"
20 
21 
23 {
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), QPen::darkBlue, QucsSettings.largeFontSize));
32  if (a != -1)
33  Texts.append(new Text(0, 0, s.mid(a+1), QPen::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 // -------------------------------------------------------
54 {
55 }
56 
57 // -------------------------------------------------------
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 }