paceholder / nodeeditor

Qt Node Editor. Dataflow programming framework
BSD 3-Clause "New" or "Revised" License
2.92k stars 795 forks source link

do you know the project QSchematic (https://github.com/simulton/QSchematic.git)? #332

Closed isteelcx closed 1 year ago

isteelcx commented 1 year ago

What do you think is NodeEditor greatest advantage over QSchematic?

paceholder commented 1 year ago

Hi @isteelcx ,

Thanks for the link. It is hard to judge after a short glance. I need to look through the code.

One of the notable differences I noticed immediately was that my project actually compiles with Qt 5.9.7 whereas QSchematic expects one of the latest versions (prob. 5.15). Besides after fixes in CMakeLists.txt I got a bunch of compilation errors:

/usr/include/qt5/QtWidgets/qgraphicsitem.h:344:18: note:    ‘virtual void QGraphicsItem::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*)’
  344 |     virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) = 0;
      |                  ^~~~~
In file included from /u/cd2zyg/projects/QSchematic/qschematic/items/wire.h:3,
                 from /u/cd2zyg/projects/QSchematic/qschematic/items/wire.cpp:1:
/u/cd2zyg/projects/QSchematic/qschematic/items/item.h:89:39: note:  ‘virtual std::shared_ptr<QSchematic::Item> QSchematic::Item::deepCopy() const’
   89 |         virtual std::shared_ptr<Item> deepCopy() const = 0;
      |                                       ^~~~~~~~
In file included from /u/cd2zyg/projects/QSchematic/qschematic/commands/commanditemadd.cpp:4:
/u/cd2zyg/projects/QSchematic/qschematic/commands/../items/wire.h:71:33: error: ISO C++ forbids declaration of ‘Q_DISABLE_COPY_MOVE’ with no type [-fpermissive]
   71 |         Q_DISABLE_COPY_MOVE(Wire)
      |                                 ^
/u/cd2zyg/projects/QSchematic/qschematic/commands/../items/wire.h:71:33: error: expected ‘;’ at end of member declaration
   71 |         Q_DISABLE_COPY_MOVE(Wire)
      |                                 ^
      |                                  ;
In file included from /u/cd2zyg/projects/QSchematic/qschematic/items/rectitem.cpp:3:
/u/cd2zyg/projects/QSchematic/qschematic/items/../scene.h:28:34: error: ISO C++ forbids declaration of ‘Q_DISABLE_COPY_MOVE’ with no type [-fpermissive]
   28 |         Q_DISABLE_COPY_MOVE(Scene)
      |                                  ^
/u/cd2zyg/projects/QSchematic/qschematic/items/../scene.h:28:34: error: expected ‘;’ at end of member declaration
   28 |         Q_DISABLE_COPY_MOVE(Scene)
      |                                  ^
      |                                   ;
make[2]: *** [qschematic/CMakeFiles/qschematic-shared.dir/items/wireroundedcorners.cpp.o] Error 1
In file included from /u/cd2zyg/projects/QSchematic/qschematic/commands/commanditemremove.cpp:4:
/u/cd2zyg/projects/QSchematic/qschematic/commands/../items/wire.h:71:33: error: ISO C++ forbids declaration of ‘Q_DISABLE_COPY_MOVE’ with no type [-fpermissive]
   71 |         Q_DISABLE_COPY_MOVE(Wire)
      |                                 ^
/u/cd2zyg/projects/QSchematic/qschematic/commands/../items/wire.h:71:33: error: expected ‘;’ at end of member declaration
   71 |         Q_DISABLE_COPY_MOVE(Wire)
paceholder commented 1 year ago
  1. QSchematics uses an external dependency for XML serialization. I use the Qt's default tools for JSON.`
  2. QSchematics source code does not generate any documentation.
  3. QSchematics (to the best of my understanding) has no semantics of "data propagation" it's a pure visualization toolkit.
  4. Again, if I understood correctly, QSchematics uses direct per-node management. (Item allocation, placing etc) and the central class to do such a job is the QGraphicsScene. In my v3alpha branch I implemented a model-view approach. User writes a model class that wraps the underlying graph structure. This model is then responsible for delivering the graph data to the scene.

Anyway, it wasn't my intention to blame QSchematics, it is a huge decent project, I do not have time to study it in details.

isteelcx commented 1 year ago

thank you for your answer!