Closed yodalee closed 9 years ago
Thank you @yodalee for organizing and looking into this!
The branch remove_Qt3PtrList
can be used as reference, but it is incomplete. It only loads schematics and the mouse interaction is limited. It is this way because I understood that mouse interactions would change significantly once we move to the QGraphicsView
and I thought it was a waste of time to fix it. My idea was to meet in the middle after the work on QGraphicsView
started. Now I believe we should do one thing at a time and try not to break master
too many times, even if it takes longer.
Since the last release 0.0.18 I started refactoring and merging the easy picks from remove_Qt3PtrList
branch into master
. In this way they get it tested as we go. See commits around 33224a1, d79db920d, fa54502 for examples.
A bit more (outdated) details can be found here (still siting on the wrong wiki): wiki remove_Qt3PtrList
Some time ago we more or less decided to use to use QList<T*>
(list of pointers) as replacement for the Qt3PtrList
.
Because of the mixed use of .next()
and .previous
along with indexing like .at()
the Qt3PtrList
replacement is annoying and error prone. Some times it will compile but them it segfaults because somewhere else the list went out of bounds...
The migration to QGraphicsView
is in a very early stage. We only did preliminary tests. I believe this should be done after the Qt3PtrList
is fixed.
You can find some more details about the QGraphics
in here: wiki QGraphicsView.
The new_GraphicsView
should be removed. It did not use inheritance properly. I will take a look.
The branch QGraphics_test
is bit more functional. The Q3ScrollView
was ported to QGraphicsView
and the Component
class inherits from QGraphicsItem
. As a demo components can be inserted from the dock into the schematic area. That is all. :)
Some serious work and will take place here as well. Perhaps it makes sense to open another checklist just for this migration...
Thanks Mr. Guitorri for explanation.
I think migration from Q3ScrollView to QGraphicsView will take first. Since this will affect implementation of component, element, node, wire and anything will be put on schematic.
I will try to figure out another checklist for this migration.
Some Q3PtrList (third section in the list) can be removed in the meanwhile, since it is ... err ... un-relative to schematic implementation. However, schematic is the first one to killed modify.
No Mr. needed ;)
As I said Q3PtrList
and QGraphicsView
are mostly independent at first. Feel free to have a look around and propose an alternative approach.
Close this, moving to more detail worklist.
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 isQ3ScrollView
. 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:new_GraphicsViewThese 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.
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:
Q3PtrList<Wire>
Q3PtrList<Node>
Q3PtrList<Diagram>
Q3PtrList<DataX>
Q3PtrList<Graph>
Diagrams/graph and Diagrams/diagramdialog:Q3PtrList<Component>
Q3PtrList<Property>
in components/component.hQ3PtrList ElementCache
Q3PtrList<Component>
.....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.
Q3PtrList<Painting> SymbolPaints
in SchematicQ3PtrList<QString> UndoStack
andUndoSymbol
in Schematic.Q3PtrList
Dialogs/sweepdialog: Though this dialog seems unused now... ?Q3PtrList<QString>
module: Categories:Q3PtrList<QString>
HierarchyHistory in qucsQ3PtrList<subparameter>
in painting/id_textQ3ValueList<DigiSignal>
in schematic_fileI 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?