Giter VIP home page Giter VIP logo

qucs's Introduction

--
-- README
--
-- Copyright (C) 2003, 2005, 2011 Stefan Jahn <[email protected]>
--
-- This 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, or (at your option)
-- any later version.
--
-- This software is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this package; see the file COPYING.  If not, write to
-- the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
-- Boston, MA 02110-1301, USA.
--


Description
===========

Qucs is a circuit simulator with graphical user interface.  The
software aims to support all kinds of circuit simulation types,
e.g. DC, AC, S-parameter and harmonic balance analysis.  For
details see homepage:

http://qucs.sourceforge.net


Requirements
============

Qucs needs Qt version 4.6 or later. For simplicity, the Qt configuration is
currently obtained through pkg-config, which you need to install in addition
to Qt.


Installation
============

Unpack the distribution tarball:

    $ tar xvzf qucs-<version>.tar.gz               (using GNU tar)
    $ gzip -cd qucs-<version>.tar.gz | tar xvf -   (using another tar)

Change into the source directory:

    $ cd qucs-<version>

Configure the source package for your system:

    $ ./configure

Now compile the package:

    $ make

Install Qucs:

    $ make install

You must have root privileges if you want to install the package in the
standard location (/usr/local) or in any location that is only writable
by root.

For further information on installing the package, please consult the
file INSTALL included in this distribution.

Please note:  Users of the FreeBSD OS may use a GNU make (probably gmake)
to compile and install the package.

Getting the latest Git snapshot
===============================

You can always get the latest Qucs version from our Git repository.
Please use an official release if you want to work with Qucs.  The Git
version might not even compile.

    $ git clone http://git.code.sf.net/p/qucs/git qucs-git

Press 'Enter' when asked for a password.  Run `sh bootstrap' and `configure'
(see above) with the appropriate options.  Maintainance currently requires
Autoconf version 2.57 and GNU automake 1.7.0.

qucs's People

Contributors

alysogorov avatar andresmmera avatar arhiv6 avatar chgans avatar clemensfmn avatar constrictor avatar crobarcro avatar dkozel avatar eroen avatar felix-salfelder avatar fransschreuder avatar galiumnitride avatar gildias avatar guitorri avatar in3otd avatar ldpgh avatar markablov avatar mdavidsaver avatar mikebrinson avatar nvdl avatar oxmon-2500 avatar partmedia avatar ra3xdh avatar rmano avatar superman32432432 avatar survolog avatar thomaslepoix avatar vort avatar yodalee avatar yselkowitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qucs's Issues

Qucs on Windows cannot find simulation script

I just build a windows version to test issue #28 , however I ran into another problem using the full _adder.sch. https://gist.github.com/guitorri/19d27ae05dda70fd0163
Qucs cannot found simulation script, that is qucsdigi.bat, when starting simulation.


The problem is in dialogs/simmessage.cpp in the function pathName(), it return a empty string.
Here is the code and message I get in pathName();
print code:

  const char * lpath = QDir::toNativeSeparators(longpath).ascii();
  char spath[2048];
  int len = GetShortPathNameA(lpath,spath,sizeof(spath)-1);
  spath[len] = '\0';
  qDebug("pathName");
  qDebug() << "longPath: " << longpath;
  qDebug() << "Dir result " << QDir::toNativeSeparators(longpath);
  qDebug() << "lpath: " << lpath;
  qDebug() << "spath: " << spath;
  qDebug() << "len: " << len;

and here is the result:

Debug: pathName
Debug: longPath:  "c:qucs-auto/bin/qucsdigi.bat" 
Debug: Dir result  "c:qucs-auto\bin\qucsdigi.bat" 
Debug: lpath:   qD 
Debug: spath:   
Debug: len:  0 

Why the lpath cannot print out is maybe the problem of qDebug(). The true problem is that spath become a empty string so that qucs cannot find correct qucsdigi script.

Cmake build fails, some complex functions are not found

I'm trying to build qucs from git sources with cmake. But it fails when running cmake for qucs-core. Here is my log:

CMake Error at CMakeLists.txt:45 (cmake_policy):
  Policy "CMP0048" is not known to this version of CMake.


-- Configuring qucs-core: VERSION 0.0.19
-- Found Git repository, last commit hash: 6d8a7a9
-- Found flex: /usr/bin/flex / Version: 2.5.35
-- Found bison: /usr/bin/bison / Version: 2.7.12-4996
-- Found sed: /bin/sed
-- Found gperf: /usr/bin/gperf
-- Found admsXml: /home/heyyo/Working/ADMS/build/admsXml/admsXml
-- Math lib found at: /usr/lib/x86_64-linux-gnu/libm.so
-- Checking whether system has ANSI C header files
-- ANSI C header files - not found
-- using double type: double; size: 8
-- Checking HAVE_CXX_COMPLEX_ACOS
-- Checking HAVE_CXX_COMPLEX_ACOSH
-- Checking HAVE_CXX_COMPLEX_ASIN
-- Checking HAVE_CXX_COMPLEX_ASINH
-- Checking HAVE_CXX_COMPLEX_ATAN
-- Checking HAVE_CXX_COMPLEX_ATANH
-- Checking HAVE_CXX_COMPLEX_COS
-- Checking HAVE_CXX_COMPLEX_COSH
-- Checking HAVE_CXX_COMPLEX_EXP
-- Checking HAVE_CXX_COMPLEX_LOG
-- Checking HAVE_CXX_COMPLEX_LOG10
-- Checking HAVE_CXX_COMPLEX_SIN
-- Checking HAVE_CXX_COMPLEX_SINH
-- Checking HAVE_CXX_COMPLEX_SQRT
-- Checking HAVE_CXX_COMPLEX_TAN
-- Checking HAVE_CXX_COMPLEX_TANH
-- Checking HAVE_CXX_COMPLEX_LOG2
-- HAVE_CXX_COMPLEX_LOG2 failed
-- Checking HAVE_CXX_COMPLEX_NORM
-- HAVE_CXX_COMPLEX_ATAN2 failed 
-- HAVE_CXX_COMPLEX_FMOD failed 
-- HAVE_CXX_COMPLEX_POLAR_COMPLEX failed 
-- Configuring incomplete, errors occurred!
See also "/home/heyyo/Working/qucs/qucs-core/build/CMakeFiles/CMakeOutput.log".
See also "/home/heyyo/Working/qucs/qucs-core/build/CMakeFiles/CMakeError.log".

My system is Linux Mint Debian.
gcc version: gcc (Debian 4.8.2-1) 4.8.2
cmake version: 2.8.12.1

I have been following instructions from this page, except that I have downloaded the sources from this repository. By the way, I have been able to build GUI.

Crash when add sub-circuit parameters

There is a crash when attempting to add the first parameter to a new sub-circuit.

Steps to reproduce

  1. Start a new schematic
  2. Edit the circuit symbol
  3. Edit the SUB symbol
  4. Add a new parameter (can be anything I used "A", "B", "C", "D")
  5. Click Add
  6. Click OK.
  7. Segmentation fault

Building qucs-core Fails

I have cloned the qucs git repository into a directory called ~/build/qucs/
I have run the bootstrap.sh script and configure with out problems but when I run make I get the following output

make
make  all-recursive
make[1]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core'
Making all in adms
make[2]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms'
make  all-recursive
make[3]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms'
Making all in scripts
make[4]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/scripts'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/scripts'
Making all in images
make[4]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/images'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/images'
Making all in admsXml
make[4]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/admsXml'
make  all-am
make[5]: Entering directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/admsXml'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -DinsideadmstpathYacc   -g -O2 -Wall -MT libadmsAdmstpath_la-admstpathYacc.lo -MD -MP -MF .deps/libadmsAdmstpath_la-admstpathYacc.Tpo -c -o libadmsAdmstpath_la-admstpathYacc.lo `test -f 'admstpathYacc.c' || echo './'`admstpathYacc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -DinsideadmstpathYacc -g -O2 -Wall -MT libadmsAdmstpath_la-admstpathYacc.lo -MD -MP -MF .deps/libadmsAdmstpath_la-admstpathYacc.Tpo -c admstpathYacc.c  -fPIC -DPIC -o .libs/libadmsAdmstpath_la-admstpathYacc.o
y.tab.c: In function 'admstpathparse':
y.tab.c:14933:7: error: too few arguments to function 'admstpathlex'
./admstpathYacc.y:8:12: note: declared here
 static int admstpathlex (p_pparse mypparse);
            ^
./admstpathYacc.y:13643:43: error: 'mypparse' undeclared (first use in this function)
    p_text mytext=adms_text_new(((p_pparse)mypparse)->_transform,"");
                                           ^
./admstpathYacc.y:13643:43: note: each undeclared identifier is reported only once for each function it appears in
./admstpathYacc.y: In function 'pparse':
./admstpathYacc.y:14618:5: error: too many arguments to function 'admstpathparse'
     admstpathparse (mypparse);
     ^
y.tab.c:14777:1: note: declared here
./admstpathYacc.y: In function 'tparse':
./admstpathYacc.y:14651:5: error: too many arguments to function 'admstpathparse'
     admstpathparse (mypparse);
     ^
y.tab.c:14777:1: note: declared here
./admstpathYacc.y: In function 'apath_main':
./admstpathYacc.y:14690:5: error: too many arguments to function 'admstpathparse'
     admstpathparse (mypparse);
     ^
y.tab.c:14777:1: note: declared here
make[5]: *** [libadmsAdmstpath_la-admstpathYacc.lo] Error 1
make[5]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/admsXml'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms/admsXml'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core/adms'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jesse/build/Qucs_source/qucs/qucs-core'
make: *** [all] Error 2

I have installed the dependencies for qucs and ADMS. I have also run the cpan commands in the README. The problem I am having is with qucs-core, qucs compiled and installed just fine.

My system is Xubuntu 14.04 by the way. Any help would be appreciated

Thank you

Merge qucs-activefilter

@ra3xdh has contributed a new application to handle active filters.

See:

An early screenshot can be seen in the pull request #14

What remains to do is to further test it, rebase and merge.

This issue is to track the progress of the merge

@ra3xdh, it would be awesome if you could write a small tutorial (something similar to a blog post that we could add to the Qucs website later on), just to show a bit the features you implemented. Documentation and references are also very much welcome.

Edit Diagram Properties, change trace, apply, result invalid

Same ticked as in SF: https://sourceforge.net/p/qucs/bugs/157/

  1. add a trace to a diagram
  2. double click to edit the diagram
  3. add a second trace, remove the first
  4. apply or ok
  • issue: new trace shows as invalid
  • edit diagram again, there is no trace on the list, there is a empty, hidden item on the list.
  • remove the empty an add the second again works.

Seems related to slotRestToTake.

Comment this out in diagramdialog.cpp and the issue is gone. Need to find a proper fix.

connect(GraphInput, SIGNAL(textChanged(const QString&)), SLOT(slotResetToTake(const QString&)));

fix security warning

[ 81%] Building CXX object qucs-core/src/converter/CMakeFiles/qucsconv.dir/qucs_producer.cpp.o
/Users/guitorri/build/qucs-0.0.18-140820-git-df935b6/qucs-core/src/converter/qucs_producer.cpp:502:22: warning: format string is not a string literal
      (potentially insecure) [-Wformat-security]
  fprintf (qucs_out, txt);
                     ^~~

timingdiagram crash if dataset not present

Issue: crash when trying to load a schematic containing a timingdiagram for which the dataset is missing.
Reproduce: see attached files https://gist.github.com/guitorri/c204875db4ae20f89584

With 0.0.18 it loads and empty diagram. If you run with 0.0.18 it fills the diagram with data.
With master if you try to open the attached .sch (or delete the dataset vhdl_vector.dat and open) the schematic with it crashes with (OSX):

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.qucs                        0x00000001054c363c Q3GList::count() const + 12 (q3glist.h:160)
1   org.qucs                        0x000000010590e0f5 Q3PtrList<DataX>::isEmpty() const + 21 (q3ptrlist.h:88)
2   org.qucs                        0x000000010592c99a TimingDiagram::calcDiagram() + 3178 (timingdiagram.cpp:171)
3   org.qucs                        0x00000001058fb05b Diagram::updateGraphData() + 43 (diagram.cpp:809)
4   org.qucs                        0x00000001058f930a Diagram::loadGraphData(QString const&) + 986 (diagram.cpp:771)
5   org.qucs                        0x00000001054e0844 Schematic::reloadGraphs() + 212 (schematic.cpp:1275)

Qucs: add command line option input/output schematic to PNG, SVG, PDF

Enable users to print schematics to file, from the command line.
Besides other benefits, it is ideal for automating the documentation, test the rendering...

See:

Actions:

  • add options like pagesize
  • color / bw
  • orientation (portraid, landscape)
  • [ ] crop [up, down, left, righ]
  • dpi for bitmaps

Currently it does:

qucs -p -i schematic.sch -o printout.[png, svg, pdf, eps]

Current command line interface:

~/buildarea/qucs-creator $ qucs -h
Usage: qucs [-hv] 
       qucs -n -i FILENAME -o FILENAME
       qucs -p -i FILENAME -o FILENAME.[pdf|png|svg|eps] 

  -h, --help     display this help and exit
  -v, --version  display version information and exit
  -n, --netlist  convert Qucs schematic into netlist
  -p, --print    print Qucs schematic to file (eps needs inskscape)
    --page [A4|A3|B4|B5]         set print page size (default A4)
    --dpi NUMBER                 set dpi value (default 96)
    --color [RGB|RGB]            set color mode (default RGB)
    --orin [portraid|landscape]  set orientation (default portraid)
  -i FILENAME    use file as input schematic
  -o FILENAME    use file as output netlist

Compile error "g++: error: qrc_qucs.cpp: No such file or directory"

I'm trying to compile QUCS from github repository according the instructions in the README.md file.
The error that I get seems to me that qrc_qucs.cpp file is not generated accurately during the make process. I still can't understand the issue.

Here is the terminal output of the errors:

g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/qt4/Qt3Support -DQT_DEBUG -DQT3_SUPPORT -DQT_THREAD_SUPPORT -D_REENTRANT -I../qucs-lib   -g -O2 -pipe -fno-exceptions -W -Wall -O0 -MT octave_window.o -MD -MP -MF .deps/octave_window.Tpo -c -o octave_window.o octave_window.cpp
octave_window.cpp:173:41: warning: unused parameter โ€˜objโ€™ [-Wunused-parameter]
 bool OctaveWindow::eventFilter(QObject *obj, QEvent *event) {
                                         ^
mv -f .deps/octave_window.Tpo .deps/octave_window.Po
: -o qrc_qucs.cpp qucs.qrc
g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/qt4/Qt3Support -DQT_DEBUG -DQT3_SUPPORT -DQT_THREAD_SUPPORT -D_REENTRANT -I../qucs-lib   -g -O2 -pipe -fno-exceptions -W -Wall -O0 -MT qrc_qucs.o -MD -MP -MF .deps/qrc_qucs.Tpo -c -o qrc_qucs.o qrc_qucs.cpp
g++: error: qrc_qucs.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
Makefile:625: recipe for target 'qrc_qucs.o' failed
make[3]: *** [qrc_qucs.o] Error 1
make[3]: Leaving directory '/home/radoslavb/Home/git/qucs/qucs/qucs'
Makefile:876: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/radoslavb/Home/git/qucs/qucs/qucs'
Makefile:442: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/radoslavb/Home/git/qucs/qucs'
Makefile:382: recipe for target 'all' failed
make: *** [all] Error 2

Using the cmake build process I don't get any errors and QUCS builds.

Can anyone tell me where should I look for this error ?

Unable to edit port properties

When editing a circuit symbol, one may be unable to edit any port properties.

Steps to reproduce:

  • Create a new schematic
  • Add some ports
  • Switch to "Edit circuit symbol"-view
  • Right click on one of the ports and choose "Edit Port Properties"

Expected result:
A dialog pops up, alloing to edit port properties.

Actual result:
Nothing happens.

Refactor worklist

Recently I tried to do some work on QGraphicsView, I found it extremely difficult. The reason is that qucsapp, schematic, textdoc, and some dialog is linked to each other closely. Move Q3scrollview to QGraphicsView will cause many hard, inefficient work.
My suggestion is that: we first concentrate on some small part refactor, gradually split everything apart. We can create a new branch to do this and merge them into master periodically. Or just keep the master branch, and merge refactor every PR into master.


I will keep this issue to record the refactor works can be done, so anyone wanna help can leave what you are doing now in order to prevent duplicated work with other. Also, any proposal of refactor can be post below, I will add them into the checklist. Also, work already being merged will be removed.
Many work to do, any help is welcome. Instance dungeon need more player


The old issue about Qt3 remove #101 is closed. Merged with this issues:


Refactor Work

  • Refactor SearchDialog: Removing access to QucsApp in searchdialog. Replace by emit signal and connect to TextDoc slot. See PR #124
  • I'm currently doing this Refactor qucsApp printer.
    Printer function is now implemented in qucs.cpp (and main.cpp, which is I did (._.) ) Move it to a independent class printer. There should be two derived printer, one implement print to document, and another print to svg. After refactor, the QucsApp::printCurrentDocument and slotSaveSchematicToGraphicsFile should only do 1: create Printer, 2: put file into printer, 3: done. So does main.cpp
  • Move updatePortNumber into schematic. It seems this function is strongly related to schematic file (model). Try to make it a function in schematic.cpp. Remember that QucsApp shouldn't know how Schematic is implemented.
  • Split project manager and QucsApp. Currently QucsApp handle every function about project. Again not a good design. We need a project manager class and QucsApp only hold a pointer to these object. The class should have slot to create/open/delete project, also managing files in the project. Function like QucsApp::readProjectFiles should just a function call to project manager
  • Element interface need refactor, search info in qucs.cpp, you can find that is a function pointer call to get the component name and component bitmap. I think this kind implementation is not necessary, the name and bitmap can just be a property of the component class, and call a getter to get the name.

Large Goal

This is some large goal which cannot be done in one PR, just list here so everyone know what we are doing:

  • Split Schematic with Schematic file.
  • Split Textdoc with Textdoc file.
    Now these two derive from a view class and QucsDoc (schematic/Q3ScrollView, TextDoc/QPlainTextEdit), we need to separate them into view and QucsDoc. I think it will become a view class hold a pointer to a QucsDoc. View class care nothing about file. It just print out something on the screen.
  • schematic submission: dialog/settingdialog
  • textdoc submission: dialog/vasettingdialog
  • textdoc submission: dialog/digisettingidialog
    These three submissions is that, these three dialog set data in QucsDoc, which related to Schematic and TextDoc. In the end they should simply care about schematic_file and textdoc_file.

Remove Q3ptrlist

Not conflict with refactor work "theoretically". Usually very hard work in "reality"

  • Move Q3PtrList<Painting> SymbolPaints in Schematic
  • Schematic Q3PtrList<Wire>
  • Schematic Q3PtrList<Node>
  • Schematic Q3PtrList<Diagram>
  • Move Q3PtrList<DataX> Q3PtrList<Graph> Diagrams/graph and Diagrams/diagramdialog:
  • Schematic Q3PtrList<Component>
  • Move Q3PtrList<Property> in components/component.h
  • Schematic Q3PtrList ElementCache, #145
  • qucs_action Q3PtrList<Component>
  • mouseaction Some function about move elements.

Add possibility of using system adms and asco

It wold be great for linux packages maintainers to have possibility of using system adms and asco, not only build-in. And for adms it is critical, qucs with adms support has file conflicts with adms package.

Crash when Editing Component Properties

just a quick note and fix; while working on the font size stuff I saw that Qucs crashes in the Edit Component Properties dialog in some cases.
e.g. : place an AC Simulation component (Select Components -> Simulations -> ac simulation), double click it to go to 'Edit Component Properties', select the 'Properties' tab, click on calculate noise voltages to select yes, click again to select no -> Qucs crashes

The problem is in the line
https://github.com/Qucs/qucs/blob/master/qucs/qucs/components/componentdialog.cpp#L629
which should be

if ( row < (prop->rowCount() - 1)) {

Will include this with the font size stuff modifications, hopefully in a few days...

move CMake test files out of the tree

These should be on the binary directory, not source tree.

qucs-core/cmake/test_acos.cpp
qucs-core/cmake/test_acosh.cpp
qucs-core/cmake/test_asin.cpp
qucs-core/cmake/test_asinh.cpp

Space character in project name breaks table creation after digital simulation

Having a space character in the name of the project prevents digital simulation from completing.

Steps to reproduce:

  • create a project with a name containing a space e.g. Full Adder
  • create a digital circuit in the project
  • do a digital simulation of the circuit
  • attempt to show simulation results as a truth table

The last step fails. When running the created simulation, the simulator
is fine. It can be run from command line and it simulates the circuit
as expected.
Within qucs however, One can not add a truth table, one gets no choice of
signals to add to it.
No warnings or error messages are shown.
However, a file Full that contains the missing truth table will be created.


The issue seems to be fixed if the commands are quoted before calling the qucsdigi and qucsveri:

  • Fix qucsdigi, qucsveri on Linux, OSX. #64
  • Fix/Test qucsdigilib on Linux, OSX
  • Fixes on Windows

Clean include in header file

Related to issue
When I clean header files and source files, I found that most file include <QtGui>, especially that some header file like qucs.h include them. Of course this make all the files easy to compile since most files include qucs.h. Actually in most cpp source files, we don't have to include the Qt header since they are already include in QtGui in qucs.h. However, include a lot of files in header will cause compiler compile slower, which is describe in
http://qt-project.org/forums/viewthread/18766
I think this can be discuss. Should we make a comprehensive check on all the include of Qt headers?


Currently focus on qucs itself, forget other dialog like qucs-rescode.
Progress checklist, started on commit cc8e360:
priority from top to down:
Top Directory Header File (they hide undefined error most):

  • qucs.h
  • schematic.h
  • syntax.h

Subdirectory Header File:

  • dialogs/exportdialog.h
  • diagrams/marker.h
  • diagrams/diagramdialog.h
  • components/componentdialog.h
  • components/spicefile.h

Source file, I think it depends. Since some source file may use A LOT OF Qt classes, like qucs.cpp, include them one by one will create a extremely long include section. I think this case include QtGui is optional.
Top Directory Source File:

  • main.cpp
  • module.cpp
  • node.cpp
  • octave_window.cpp
  • qucs.cpp
  • qucs_actions.cpp
  • qucs_init.cpp
  • schematic.cpp
  • schematic_element.cpp
  • schematic_file.cpp
  • syntax.cpp
  • textdoc.cpp
  • viewpainter.cpp
  • wire.cpp
  • wirelabel.cpp

Subdirectory Source Files:

  • dialogs directory
  • diagrams directory
  • components directory

Qt3 components remove progress page

After many works, qucs only left some part qt3 components need to remove (about 150 lines). Most of them are Q3Ptrlist<T>, Q3ValueList<T> and one is Q3ScrollView.
There are some branches (contributed by guitorri, fransschreuder and ClemensFMN), which tried to remove them about one years ago, but didn't merge into master branch. I think it's time to take them out and merge them now.
These branches are:

  • remove_Qt3Ptrlist
  • new_GraphicsView
  • QGraphics_test

These branches are a little too old, I don't think merge them now is a good idea. I suggest that everyone can examine the commits in these branch, apply modification, make it clean, and resend pull request.
I list all the work we have to do here, so everyone can check the progress.


Tips:
Everyone can get the patches of these all branch by the following command, then using these patches as the basis to modify.

git checkout origin/branchname
git format-patch $(git merge-base HEAD master)

  • Move Q3ScrollView in schematic. Schematic should derived from another object. @guitorri can you explain which branches (new_GraphicsView, QGraphics_test) is the better choice?
  • Move Q3Icon, Q3Drag in qucs, I think this related to above closely.

These two are most important I think, since their implement will affect how wire, node, element implementation. I think this got highest priority.


Some work that might block by Schematic:

  • Schematic Q3PtrList<Wire>
  • Schematic Q3PtrList<Node>
  • Schematic Q3PtrList<Diagram>
  • Move Q3PtrList<DataX> Q3PtrList<Graph> Diagrams/graph and Diagrams/diagramdialog:
  • Schematic Q3PtrList<Component>
  • Move Q3PtrList<Property> in components/component.h
  • Schematic Q3PtrList ElementCache
  • qucs_action Q3PtrList<Component>
  • mouseaction Some function about move elements.

.....and many other, I'm not quite sure how to split them into pieces.


Some work that is not relative to schematic change, AKA, we can work on them now.

  • Move Q3PtrList<Painting> SymbolPaints in Schematic
  • Move Q3PtrList<QString> UndoStack and UndoSymbol in Schematic.
  • Move Q3PtrList Dialogs/sweepdialog: Though this dialog seems unused now... ?
  • Move Q3PtrList<QString> module: Categories:
  • Move Q3PtrList<QString> HierarchyHistory in qucs
  • Move Q3PtrList<subparameter> in painting/id_text
  • Move Q3ValueList<DigiSignal> in schematic_file

I think the alternative to Q3PtrList will be QList mostly. However, keep in mind that Q3PtrList automatically recycle dynamic allocated memory while QList doesn't.
Any suggestion?

Cannot compile qucs-core

I just rebase my master to the newest commit:
When I try to compile qucs-core, I first type
$ ./bootstrap.sh
but it shows me:
Could not locate adms autogen script in ./adms, you may use configure with --disable-adms to use installed version
Any reason why?

OSX: mouse cursor decoratrions get redraw on top of Diagram

Whenever there is a Diagram placed on the schematic, mouse actions like dragging components and insert components, the mouse cursor decoration gets drawn on top of the Diagram. Only show up on Mac, not visible on Linux, might be related to use of deprecated stuff.

It uses the transformed coordinates of the Diagram, the wrong paintis are also rotated as the code below

Bug is related to these lines of code:
https://github.com/Qucs/qucs/blob/master/qucs/qucs/diagrams/diagram.cpp#L107-119

Note that setWorldMatrix and setWorldXForm are deprecated.

simulation component paintScheme() paints wrong size

I found that if you magnify to a simulation component (dc, ac...), and moves it.
The scheme it paint will still very large.
Maybe because scheme is painted by Schematic->postpaintEvent but viewpainter?
I didn't figure out this yet.

Stylesheet pushbutton break layout

Related to #69.
To make pushbutton with background color work on Mac OS and Windows (even some Linux), I use stylesheet to fill the color in pushbutton. However, this destroy the size of pushbutton and layout, as shown in the photo below.
https://cloud.githubusercontent.com/assets/1388949/4800913/371ce0b6-5e2b-11e4-9086-0532201287d8.png


The code in #135 could be applied to:

  • Paintings
    • line
    • arrow #135
    • Text
    • filled / Ellipse
    • filled / Rectangle
    • Arc
  • Diagrams Properties
    • Data color
    • Properties, Grid color
  • File > Application Settings
    • Document Background Color

Simple LCR-circuit transient simulation fails

I am trying to simulate simple LCR-circuit. For Qucs0.0.17 all works fine. Qucs0.0.18 has very strange behavior. Schematic under simulation is here:
sch
If DC voltage is 12 V, simualtion results are incorrect. Pr1.Vt voltage always is zero. You cannot obtain voltage waveform. If transient simulation stop time is 20ms, simulation process hangs. Here is voltage waveform plot:
volatge-1
If we set less V1 voltage value (for example 5V), simulation works properly. Voltage waveform is damped oscillations. Here is circuit and waveform plot.
sch-2
volt-2
Qucs schematic file is attached:
https://gist.github.com/ra3xdh/9df9d0694d9a4ca6a954/download

So, simulation results are dependent from voltage value even for simple LCR-circuit. What reasons can cause this strange behavior?

Dragging from the library dock window make a corrupt netlist

Version: Qucs 0.0.18 official windows build.

How to reproduce:

  • create empty schematic
  • open a select a diode bridge in the dock window and drag it into the schematic
  • press simulate

Observed outcome: syntax error in netlist
line 12: checker error, subcircuit type Bridges_KBPC1005' requires 4 nodes in Sub:_net0', found 3

Netlist:

# Qucs 0.0.18  C:/Users/Gyorgy Szekely/.qucs/zxcfjksdn_prj/xdfgf.sch

.Def:Bridges_KBPC1005 _net0 _net1 _net2 _net3
      Diode:D1 _net0 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D2 _net2 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D3 _net3 _net2 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D4 _net3 _net0 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
    .Def:End


Sub: _net0 _net1 _net2 _net3 Type="Bridges_KBPC1005"

Note the missing subnet name!

Workaround:

  • click Manage Libraries in the dock window
  • locate the diode bridge in the dialog
  • drag the symbol above the ! Drag n'Drop me! label

The netlist is correct in this case:

# Qucs 0.0.18  C:/Users/Gyorgy Szekely/.qucs/zxcfjksdn_prj/xdfgf.sch

.Def:Bridges_KBPC1005 _net0 _net1 _net2 _net3
      Diode:D1 _net0 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D2 _net2 _net1 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D3 _net3 _net2 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
      Diode:D4 _net3 _net0 Is="9.2e-9" N="1.75" Rs="42e-3" Cj0="124e-12" Vj="0.75" M="0.333" Fc="0.5" Tt="4.32e-6" Bv="50" Ibv="18e-6" Af="1" Kf="0"  
    .Def:End


Sub:D1 _net0 _net1 _net2 _net3 Type="Bridges_KBPC1005"

Zoom in withing a box does not work.

Doing a zoom in by one mouse click works fine. If one tries to do a zoom in box with the mouse the zoomed region is not the same as the selected by the box.

Apply broken for Edit Component Properties dialog

Clicking Apply in the Edit Component Properties dialog for an S param. sim. (and other sims.) leads to duplication of the Type, Start, Stop, and Points parameters. If this dialog is then re-opened the Properties tab now includes Type, Start, Stop, and Count. It now omits NoiseOP, saveCVs, and saveAll. Duplicate properties appear under the symbol as well.

I had a look at componentdialog.cpp, but can't figure out where the issue is.

Steps to reproduce.

  1. Start with a new/blank schematic
  2. Place an S parameter simulation block
  3. Open the edit properties dialog for the S param. sim.
  4. Enter "1k" in the Start field
  5. Click Apply
  6. Click OK

The list of parameters under the block should now show duplicate entries.

Some qucssettings is unused, or unable to be set

I'm change QucsSettings to a singleton setting class. Here are some weird properties I found during porting:

  • largeFontSize unable to set in QucsSettingDialog
  • FileTypes is unused
  • Highlighted color is unused

to be added lol

Spice4qucs. A tool to simulate Qucs circuit with ngspice

There may be way to overcome #34 and #41.
I started implementation of spice4qucs extension. This extension allows you to switch between qucsator simulation kernel and ngspice simulation kernel. You can simulate your Qucs circuits with ngspice using this extension. I am planning to add menu entry Simulation->Simulate with spice. Spice simulation will be available after execution of this menu. Spice simulation results will be converted to Qucs simulation data and diagrams will be available from the display page. With spice4qucs you can use good old spice to simulate Qucs circuits with it.

You can see current state of work at https://github.com/ra3xdh/qucs/tree/spice4qucs

Now implemented only conversion of the Qucs circuit to Spice netlist.

Not all components conversion is implemented. The list of spice-compatible components:

  • RCL passive components
  • Sine voltage source
  • DC source
  • Pulse source
  • Relay
  • Diode
  • BJT
  • JFET
  • MOSFET
  • Voltage and current probes
  • Linear dependent current and voltage sources (VCVS,VCCS,CCCS,CCVS)

The list of supported simulations:

  • AC analysis
  • Transient analysis

Sample schematic is available here: https://gist.github.com/ra3xdh/6c554e32e531c25e6e6b

To test spice4qucs open this schematic with Qucs, then execute Simulation->Simulate with spice. Spice netlist is located at $HOME/.qucs/spice4qucs.cir. Now switch to system terminal and execute ngspice:

ngspice $HOME/.qucs/spice4qucs.cir

Then run simulation and see waveforms:

run
plot v(drain)

The simulation fails for this schematic with Qucs, but ngspice simulates it correctly.

Have you any suggestions? Should I continue work in this direction?

My current task list:

  • implement basic ngspice netlist genrartor
  • implement spice output results parser
  • add parameter sweep support
  • add nonlinear devices support
  • add subcircuits support
  • add library components support
  • add probes support
  • add qucs equations support
  • add direct import of spice components
  • add spice-specific equations support
  • add other spice-compatible backends support (for example Xyce)

improve team work on corporate projects

need to have a lock mechanism on the project when opening a project to prevent some modification by others ... I've wrote a small tool for that, but where to place it ?

Thierry.

OS X installation bugs and comments

I have installed qucs from the official site (qucs-0.0.18-OSX10.7+.pkg, using OS X 10.10.0 Yosemite). Here are the bugs and remarks of this installation:
Bugs:

  • After installation, only the qucslib.app is shown on Launchpad, but all program links shown in /Applications ( by the way, they should put in its own directory on /Applications!)
  • freehdl will not installed, via Macports failed too, bundling it? I mailed the author, no reactions until now.
  • All windows doesn't appear in front on starting, thats very annoying!

Features/Nice to have:

  • German support is bad, it looks very unserious, if some words in english and others in german!
  • Whats about predefined extension linking like .sch?
  • OS X is not Unix! The *.app's have to be in /Applications not in a /bin!! UNIX programs will not use *.app's, so there is no need to corrupt the system. The commandline tools should be in a /bin, thats ok.

Best regards!

0.0.18 build warnings openSUSE

During preparing rpm packages for openSUSE I got next errors (our build system detects this warnings as build failure):

[  944s] ... testing for serious compiler warnings
[  944s]     (using /usr/lib/build/checks-data/check_gcc_output)
[  944s]     (using //.build.log)
[  944s] 
[  944s] I: Program causes undefined operation
[  944s]    (likely same variable used twiceand post/pre incremented in the same expression).
[  944s]    e.g. x = x++; Split it in two operations.
[  944s] W: qucs sequence-point tridiag.cpp:246
[  944s] 
[  944s] I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
[  944s] W: qucs strict-aliasing-punning matlab_producer.cpp:50
[  944s] 
[  944s] I: Program returns random data in a function
[  944s] E: qucs no-return-in-nonvoid-function exportdialog.cpp:341

Components text size is (often) wrongly computed

This is related to PR #87 and bug 170 on SF.
The components text size (Name, Value, Properties, etc.) is often computed using the size of QucsSettings.font, as in https://github.com/Qucs/qucs/blob/master/qucs/qucs/components/component.cpp#L514 , but this is not necessarily (almost always not, I think) the actual font used by the painter. As an example, the QucsSettings.font on my system is Helvetica 12, but the font actually used for the components text is Nimbus Sans L 16; as far as I understood this is because

  • Helvetica is not available, so the closest equivalent is automatically chosen by Qt
  • The font size requested was 12 points (that is, 12/72 of an inch) but my display is set at 96 DPI, so to keep the same absolute font size, a size of 12*(96/72) is automatically chosen by Qt

Things seems relatively simple up to now, but if an unusual font which has not a close substitution or a weird display resolution is declared the actual absolute font size is not directly proportional to the display DPI.
The right solution will be to let the painter compute the actual font size, but to do this in a straightforward manner every component should belong to a schematic when asked to compute its text size, but this is not always the case, e.g. during the modules registration at startup, https://github.com/Qucs/qucs/blob/master/qucs/qucs/main.cpp#L639 . This can be worked around, but I wonder if there is a better way/place to compute the components text size.

Qucs GUI does not realize when qucsator crashes

I have a circuit which makes qucsator crash (with Segmentation fault (core dumped), see #133 ) but Qucs does not seem to realize that it crashed and just shows the data display page, with no errors or warnings. Even the Show last messages window does not contain any hint that qucsator crashed. On Windows7 there is a system message telling qucsator.exe has stopped working, but on Linux nothing is shown.

I am currently looking at this, it seems that exitCode from the QProcess::finished signal is always zero when its exitStatus is QProcess::CrashExit, strange...

Document `qucsconv` capabilities

Add more information to the qucsconv -h. Current output is incomplete:

$ qucsconv -h
Usage: qucsconv [OPTION]...

  -h, --help      display this help and exit
  -v, --version   display version information and exit
  -i  FILENAME    use file as input file (default stdin)
  -o  FILENAME    use file as output file (default stdout)
  -if FORMAT      input data specification (e.g. spice)
  -of FORMAT      output data specification (e.g. qucs)
  -a, --noaction  do not include netlist actions in the output
  -g  GNDNODE     replace ground node
  -d  DATANAME    data variable specification
  -c, --correct   enable node correction

See available converters:
https://github.com/Qucs/qucs/blob/master/qucs-core/src/converter/qucsconv.cpp#L76-L90

/* conversion definitions */
struct actionset_t actionset[] = {
  { "spice",      "qucs",       spice2qucs },
  { "spice",      "qucslib",    spice2qucs },
  { "vcd",        "qucsdata",   vcd2qucs   },
  { "qucsdata",   "csv",        qucs2csv   },
  { "qucsdata",   "touchstone", qucs2touch },
  { "citi",       "qucsdata",   citi2qucs  },
  { "touchstone", "qucsdata",   touch2qucs },
  { "csv",        "qucsdata",   csv2qucs   },
  { "zvr",        "qucsdata",   zvr2qucs   },
  { "mdl",        "qucsdata",   mdl2qucs   },
  { "qucsdata",   "matlab",     qucs2mat   },
  { NULL, NULL, NULL}
};

OpAmp from the Ideal library generate netlist with syntax error

There is a bug on the OpAmp from the Ideal library. See https://sourceforge.net/p/qucs/discussion/311050/thread/cccc70a5/

In the netlist line 5 it complains about the following:

R:R1 _net1 _net3 R="1E3/sqrt(2*pi*fg)" Temp="26.85" Tc1="0.0" Tc2="0.0" Tnom="26.85"
line 5: syntax error, unrecognized character: `/'
line 5: syntax error, unexpected InvalidCharacter, expecting '"'

It declares a resistor which value is defined with an expression. This does not seem to be allowed by the parser. Other devices on the library use a Equ to precompute the values of components.

Remove qt3support in qucs-filter-v2

I found there are a lot of files still using q3textstream and q3textedit inside qucs-filter-v2.
However, this dialog seems not used in qucs yet, so it may not so urgent to modify this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.