Closed yodalee closed 9 years ago
@yodalee, I did some rebase/cherry-pick on the QGraphics_test
branch, see https://github.com/guitorri/qucs/tree/QGraphics_test_rebase141123
It is a very quick and dirty exploration. All it does is draw QGraphicsItems (components) on the QGraphicsView (schematic). Lots of things are disabled (mouse, painters, ...). It might be helpful as a sandbox to test further refactoring.
@guitorri Thanks the rebase work, that is very helpful when I wanna investigate how to refactor mouse action control.
I think I will close this, and split mission into separate issues. Allow new coming easy to find what needs to do.
@yodalee rebased again in https://github.com/guitorri/qucs/tree/QGraphicView-port-exploration
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
QucsApp::printCurrentDocument
andslotSaveSchematicToGraphicsFile
should only do 1: create Printer, 2: put file into printer, 3: done. So does main.cppproject manager
and QucsApp. Currently QucsApp handle every function about project. Again not a good design. We need aproject 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 likeQucsApp::readProjectFiles
should just a function call toproject manager
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:
Remove Q3ptrlist
Not conflict with refactor work "theoretically". Usually very hard work in "reality"
Q3PtrList<Painting> SymbolPaints
in SchematicQ3PtrList<Wire>
Q3PtrList<Node>
Q3PtrList<Diagram>
Q3PtrList<DataX>
Q3PtrList<Graph>
Diagrams/graph and Diagrams/diagramdialog:Q3PtrList<Component>
Q3PtrList<Property>
in components/component.hQ3PtrList ElementCache
, #145Q3PtrList<Component>