Menu

I have made a QT4 port

Frans
2012-11-01
2015-03-20
1 2 > >> (Page 1 of 2)
  • Frans

    Frans - 2012-11-01

    Hi everybody,
    While having problems running qucs on the latest linux releases, I decided to port this very nice software to QT4 (it does use Qt3Support though).
    You can find the code here:
    https://github.com/fransschreuder/qucs/tree/qucs-qt4-qt3support

    It still has a few issues (like when dragging a component it is not visible yet) but I am working on that.
    At least it is usable now with Qt4.
    When cloning the git repository, don't forget to checkout the correct branch (qucs-qt4-qt3support)

    Testing is needed!

     
  • glaif

    glaif - 2012-11-09

    Hi,

    It's very cool that you did this.  Unfortunately, I ran into an issue trying to compile on Ubuntu 12.10 (64 bit), though.  Thought you might have seen this error before and could suggest a solution.

    I did the following:
    1) Downloaded the tarball for the Qt4 port from the website (qucs-qucs_0_1_0.tar.gz).
    2) Unpacked it, ran "sh autogen.sh", ./configure", then "make".

    I received the following error, here's the abbreviated output from make:
    … <OUTPUT CUT FOR BREVITY>
    g++  -g -O2 -pipe -fno-exceptions -fno-check-new -W -Wall  -L/lib -lxml2 -lxslt   -o qucs wire.o componentssidebar.o item.o schematicscene.o sidebarmodel.o main.o mainwindowbase.o qucsmainwindow.o qucsview.o schematicview.o undocommands.o fileformathandler.o svgitem.o property.o propertyitem.o propertygroup.o component.o port.o library.o xmlformat.o mnemo.o propertydialog.o schematicscene.moc.o schematicview.moc.o mainwindowbase.moc.o qucsmainwindow.moc.o componentssidebar.moc.o svgitem.moc.o propertyitem.moc.o propertygroup.moc.o component.moc.o sidebarmodel.moc.o propertydialog.moc.o ../qucs-tools/libqucstools.a dialogs/libdialogs.a -lSM -lICE -lX11  -lQtCore -lQtGui -lQtXml -lQtSvg diagrams/libdiagrams.a paintings/libpaintings.a xmlutilities/libxmlutilities.a
    xmlutilities/libxmlutilities.a(QXmlStreamReaderExt.o): In function `Qucs::QXmlStreamReaderExt::finalize(void const*, Qucs::QRelaxNGvalidator const*, Qucs::QXsltTransformer const*)':
    QXmlStreamReaderExt.cpp:(.text+0x6d): undefined reference to `xmlDocDumpMemory'
    QXmlStreamReaderExt.cpp:(.text+0x75): undefined reference to `xmlFreeDoc'
    QXmlStreamReaderExt.cpp:(.text+0x82): undefined reference to `xmlFreeDoc'
    QXmlStreamReaderExt.cpp:(.text+0x244): undefined reference to `xmlFreeDoc'
    QXmlStreamReaderExt.cpp:(.text+0x33d): undefined reference to `xmlDocDumpMemory'
    xmlutilities/libxmlutilities.a(QXmlStreamReaderExt.o): In function `Qucs::QXmlStreamReaderExt::QXmlStreamReaderExt(QByteArray const&, Qucs::QRelaxNGvalidator const*, Qucs::QXsltTransformer const*)':
    QXmlStreamReaderExt.cpp:(.text+0x61a): undefined reference to `xmlParseMemory'
    xmlutilities/libxmlutilities.a(QXmlStreamReaderExt.o): In function `Qucs::QXmlStreamReaderExt::~QXmlStreamReaderExt()':
    QXmlStreamReaderExt.cpp:(.text+0x80a): undefined reference to `xmlFree'
    xmlutilities/libxmlutilities.a(QRelaxNGvalidator.o): In function `Qucs::QRelaxNGvalidator::finish(void const*)':
    QRelaxNGvalidator.cpp:(.text+0x27): undefined reference to `xmlRelaxNGParse'
    QRelaxNGvalidator.cpp:(.text+0x32): undefined reference to `xmlRelaxNGFreeParserCtxt'
    QRelaxNGvalidator.cpp:(.text+0x43): undefined reference to `xmlRelaxNGNewValidCtxt'
    QRelaxNGvalidator.cpp:(.text+0x63): undefined reference to `xmlRelaxNGSetValidErrors'
    QRelaxNGvalidator.cpp:(.text+0x1e4): undefined reference to `xmlRelaxNGFree'
    xmlutilities/libxmlutilities.a(QRelaxNGvalidator.o): In function `Qucs::QRelaxNGvalidator::QRelaxNGvalidator(QString const&)':
    QRelaxNGvalidator.cpp:(.text+0x50a): undefined reference to `xmlRelaxNGNewParserCtxt'
    xmlutilities/libxmlutilities.a(QRelaxNGvalidator.o): In function `Qucs::QRelaxNGvalidator::QRelaxNGvalidator(QByteArray const&)':
    QRelaxNGvalidator.cpp:(.text+0x706): undefined reference to `xmlRelaxNGNewMemParserCtxt'
    xmlutilities/libxmlutilities.a(QRelaxNGvalidator.o): In function `Qucs::QRelaxNGvalidator::validate(void const*) const':
    QRelaxNGvalidator.cpp:(.text+0x889): undefined reference to `xmlRelaxNGValidateDoc'
    xmlutilities/libxmlutilities.a(QRelaxNGvalidator.o): In function `Qucs::QRelaxNGvalidator::~QRelaxNGvalidator()':
    QRelaxNGvalidator.cpp:(.text+0x8a9): undefined reference to `xmlRelaxNGFreeValidCtxt'
    QRelaxNGvalidator.cpp:(.text+0x8b1): undefined reference to `xmlRelaxNGFree'
    xmlutilities/libxmlutilities.a(QXsltTransformer.o): In function `Qucs::QXsltTransformer::QXsltTransformer(QString const&)':
    QXsltTransformer.cpp:(.text+0xe6): undefined reference to `xsltParseStylesheetFile'
    xmlutilities/libxmlutilities.a(QXsltTransformer.o): In function `Qucs::QXsltTransformer::QXsltTransformer(QByteArray const&)':
    QXsltTransformer.cpp:(.text+0x2e6): undefined reference to `xmlParseMemory'
    QXsltTransformer.cpp:(.text+0x2f6): undefined reference to `xsltParseStylesheetDoc'
    QXsltTransformer.cpp:(.text+0x306): undefined reference to `xmlFreeDoc'
    xmlutilities/libxmlutilities.a(QXsltTransformer.o): In function `Qucs::QXsltTransformer::~QXsltTransformer()':
    QXsltTransformer.cpp:(.text+0x7f8): undefined reference to `xsltFreeStylesheet'
    xmlutilities/libxmlutilities.a(QXsltTransformer.o): In function `Qucs::QXsltTransformer::transform(void const*) const':
    QXsltTransformer.cpp:(.text+0x7e8): undefined reference to `xsltApplyStylesheet'
    collect2: error: ld returned 1 exit status

    Seems to be missing a library for linking, but I do have libxslt1 and libxml installed.  I checked. :)

    If you have a solution for me to try, I'd love to hear it.  If I figure it out before you reply, I'll post my findings.

    glaif

     
  • Frans

    Frans - 2012-11-09

    Hi,
    I also use ubuntu 12.10 and it compiles. You are probably missing some libraries indeed, did you install the -dev versions from your libraries as well?
    Anyway, I am not going to be a compile help here, just trying to get this thing to work myself.
    There is one big issue with the current version: it doesn't yet run simulations with sub-circuits yet.

     
  • Frans

    Frans - 2012-11-20

    I have fixed the multisheet schematic simulation. I need testers now!
    If you feel like you can debug this software, please do and let me know. your test results here.
    If you are unable to compile it, please don't bother me.

     
  • Rob Frohne

    Rob Frohne - 2012-11-22

    Thanks for your work on this.  Here are my bug reports….

    1)  It seems that you are missing a bunch of .cpp and .h files in qucs-core/src/components/verilog like  HBT_X.analogfunction.cpp.  I found using a hint elsewhere on sourceforge that you can copy those from version 0.16 and then it will compile in that directory at least.
    2)  There are also missing files in qucs-core/src/ for example parse_dataset.cpp and others.  I also took these from version 0.16.

    I suppose you could just use qucs-core from 0.16 too.

    I have other compile problems with qucs-core/ and qucs/ too, but no solutions yet.

    Rob

     
  • Frans

    Frans - 2012-11-22

    Dear Rob,
    first of all i didn't make changes to qucs-core, secondly  everything compiles fine (multiple people have reported that). If you don't have your system seet up right, like a missing admsxml, please seek your help elsewhere. This forum needs to be a little clean, if everybody is coming with compile problems it will be useless for the qt4 development.
    frans

     
  • Valentine Pavlyuchenko

    Fransschreuder - how about some help in development?

     
  • Frans

    Frans - 2012-11-25

    Stargazer_v: would be great! The problem i am still having is that the paint event is not processed on mousse actions (mouesactions.cpp) this results in dragging not being visible and also the selectin rectangle is invisible.

    frans

     
  • zen

    zen - 2012-11-28

    Can someone please help, the autogen step is still looking for qt3.

    What's going wrong here?

    I'm on a fresh install of ubuntu 12.10

    Thanks for any and all help.

    root@zenon-HP-ProBook-4430s:/usr/local/src/qucs/git/qucs/qucs# sh autogen.sh
    Creating aclocal.m4... configure.ac:203: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    configure.ac:203: the top level
    done.
    Creating config.h.in... configure.ac:203: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    configure.ac:203: the top level
    done.
    Creating Makefile.in(s)... configure.ac:203: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    configure.ac:203: the top level
    qucs-attenuator/Makefile.am:45: `%'-style pattern rules are a GNU make extension
    qucs-edit/Makefile.am:42: `%'-style pattern rules are a GNU make extension
    qucs-filter-v2/Makefile.am:77: `%'-style pattern rules are a GNU make extension
    qucs-filter/Makefile.am:44: `%'-style pattern rules are a GNU make extension
    qucs-help/Makefile.am:44: `%'-style pattern rules are a GNU make extension
    qucs-lib/Makefile.am:47: `%'-style pattern rules are a GNU make extension
    qucs-transcalc/Makefile.am:51: `%'-style pattern rules are a GNU make extension
    qucs/Makefile.am:66: `%'-style pattern rules are a GNU make extension
    qucs/Makefile.am:78: `%'-style pattern rules are a GNU make extension
    qucs/Makefile.am:103: `%'-style pattern rules are a GNU make extension
    qucs/components/Makefile.am:93: `%'-style pattern rules are a GNU make extension
    qucs/diagrams/Makefile.am:43: `%'-style pattern rules are a GNU make extension
    qucs/dialogs/Makefile.am:48: `%'-style pattern rules are a GNU make extension
    qucs/paintings/Makefile.am:42: `%'-style pattern rules are a GNU make extension
    done.
    Creating configure... configure.ac:203: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
    ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
    ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
    ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
    configure.ac:203: the top level
    done.
    Running './configure' '--enable-maintainer-mode' ...
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether to enable maintainer-specific portions of Makefiles... yes
    checking for g++... g++
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking for style of include used by make... GNU
    checking dependency style of g++... gcc3
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking dependency style of gcc... gcc3
    checking for ranlib... ranlib
    checking for ar... ar
    checking for lrelease-qt3... no
    checking for lrelease... /usr/bin/lrelease
    checking for lupdate-qt3... no
    checking for lupdate... /usr/bin/lupdate
    checking for moc-qt3... no
    checking for moc... /usr/bin/moc
    checking for uic-qt3... no
    checking for uic... /usr/bin/uic
    checking how to run the C preprocessor... gcc -E
    checking for X... libraries , headers 
    checking for gethostbyname... yes
    checking for connect... yes
    checking for remove... yes
    checking for shmat... yes
    checking for IceConnectionNumber in -lICE... yes
    checking for Qt headers... configure: error: not found
    root@zenon-HP-ProBook-4430s:/usr/local/src/qucs/git/qucs/qucs#
    
     
  • Valentine Pavlyuchenko

    You must be using wrong branch. After cloning git repository please ensure to switch to qucs-qt4-qt3support branch.

     
  • Rob Frohne

    Rob Frohne - 2012-12-03

    Thanks to all the hints, I have it built now.  The necessary things for me to get this far were:
    1) Install the latest release of adms (2.3)
    2) Switch to the appropriate branch.
    Thanks for all the hints.

    1)  From my quick tests it appears that the painting is not done inside the paint events. 
    2)  I can see none of the icons either.  (Do you need to do something to help them be found, or is this related to the painter event problem?)

    It appears that someone else was also working on this problem back in 2009.  See this:

    http://www.qtcentre.org/archive/index.php/t-21579.html

    This might be the person who was working on the QT4 port earlier, and if so, his code may provide some hints.

    Best regards,

    Rob

     
  • zen

    zen - 2012-12-03

    Okay, I got it!
    I did some searching and figured out what you're saying.  For everyone else out there, this is how I got it working.

    git clone -b qucs-qt4-qt3support https://github.com/fransschreuder/qucs.git
    cd qucs/qucs
    ./autogen.sh
    make
    make install
    
     
  • Rob Frohne

    Rob Frohne - 2012-12-03

    Another thing I notice is that several of the tools cannot be found, for example, filter synthesis, line calculation, and attenuator synthesis.

    I also think we need to rewrite things so that we heed this warning from the Qt Documentation.

    Warning: When the paintdevice is a widget, QPainter can only be used inside a paintEvent() function or in a function called by paintEvent(); that is unless the Qt::WA_PaintOutsidePaintEvent widget attribute is set. On Mac OS X and Windows, you can only paint in a paintEvent() function regardless of this attribute's setting.

    Rob

     
  • Rob Frohne

    Rob Frohne - 2012-12-03

    Okay, I found that you need to install the program to get the icons and tools.

    > sudo make install

    That gets me to the QPainter problem.  So I'm catching up.  :-)

    Rob

     
  • Frans

    Frans - 2012-12-05

    I have worked around the QPainter problem. All paint actions (like drawLine etc) had to be moved to the paint event, they were called from mouseactions.cpp and Qt4 doesn't allow that anymore.
    Please test today's commit!

     
  • Rob Frohne

    Rob Frohne - 2012-12-06

    Way to go!   I did a git pull and recompiled and it seems to work well!  Thanks for all the time you put in on it.  I needed this software working for a project this next quarter, and I'm thankful for your work!  Good job!

    Rob

     
  • Frans

    Frans - 2012-12-06

    Hi Rob,
    in case you find any bugs, or if it crashes, please report on this forum
    i will hopefully get write access to the svn here so that it can be returned to where it belongs

    frans

     
  • Rob Frohne

    Rob Frohne - 2012-12-06

    Thanks Frans!  I will keep you posted of any bugs.  So far everything I have tried has worked just as before in QT3.

    Rob

     
  • zen

    zen - 2012-12-07

    AWESOME!

    Graphics while dragging are working perfect.

    QT4 is working even better than QT3.
    QT3 would write blocks over windows that were dragged across qucs, that isn't happening now.

    Thank You!

     
  • Frans

    Frans - 2012-12-07

    For people who don't feel like building it, I have made a PPA (ubuntu 12.10)
    https://launchpad.net/~fransschreuder1/+archive/qucs-qt4
    The package is currently building…

     
  • Frans

    Frans - 2012-12-08

    Ok, I messed up that ppa, and it has been deleted now. The new PPA is here: (still building)
    https://launchpad.net/~fransschreuder1/+archive/qucs

     
  • Frans

    Frans - 2012-12-08

    Just some instructions on installing the package on ubuntu 12.04 or 12.10:
    sudo apt-add-repository ppa:fransschreuder1/qucs
    sudo apt-get update
    sudo apt-get install qucs

     
  • Frans

    Frans - 2012-12-10

    Help is needed for testing the Qt4 port!
    You can help here:
    -Install the Qt4 port (e.g. ubuntu via PPA) and test all functionality, different simulations, graphs, components
    -Build Windows binary (the build script might still have to be changed for that, please report changes here
    -Mac osx port (idem)

    If you don' t find bugs, also let me know that you have at least tested it, that way I know that I am on the good way
    -Building the source on different linux distributions, other than ubuntu

     
  • László Meskó

    László Meskó - 2012-12-11

    I've installed qucs on ubuntu 12.10 from your ppa. (Thank you fro your work!)

    The program started, however there are some problems:

    • On the icon bar, the "Insert ground" and "Insert port" (and Insert equation) buttons doesn't do anything (from the left "components, passive" you can add them).

    • Also from the Tools menu the Insert ground, port, name, equation functions don't work.

    • Every component is under the "passive" section including active copmponents like diode or transistor

    • I haven't found where can I add a Simulation to the circuit

    • I haven't found where can I add a Voltage or Current tester component.

    • There is a segmentation fault around copy paste. You can reproduce this way:

    • start qucs (a new empty schematic opened)

    • add an component (eg. a resistor) to the schematic, and press ESC to exit from adding component

    • click to the component (to select it) press Ctrl+X to cut to clipboard.

    • If you save or close this schematic, a segmentation fault occurs.
      I'm not sure how to add junction to the wire: If I click on an existitg wire, drag a new wire, and finishing it with right click, maybe the two wires are not connected, the round just the circle of the ending of the wire, not a junction.

    It's a bit strange when you move a component (the component drags a wire) the component is some pixels off from the grid, and when you release the component it jumps into the grid point.

     
  • Rob Frohne

    Rob Frohne - 2012-12-11

    Hi lml745,

    I installed from source (not the PPA) and everything above seems to work for me.  Are you a previous Qucs user?  It sounds like you are having problems figuring out how to use the program, that you would have had with the Qt3 verison.

    Rob

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.