Closed WandererFan closed 8 years ago
Very true - I'll look at separating the GUI bits from the QGraphicsScene.
Acceptance tests for this:
I moved one class following the pattern in my email as a test case. The diff is pretty confusing...
At some point in a change this big, we're going to have to just delete all the old stuff and replace everything. Like we did with luke's stuff and the Drawing->TechDraw conversion.
On Sun, Feb 14, 2016 at 3:40 AM, Ian notifications@github.com wrote:
I moved one class following the pattern in my email as a test case. The diff is pretty confusing...
ianrrees/FreeCAD_tinkering@e1791c0?diff=split https://github.com/ianrrees/FreeCAD_tinkering/commit/e1791c05f3599e6c2e9b0894fc5099b6b21622c7?diff=split
— Reply to this email directly or view it on GitHub https://github.com/WandererFan/FreeCAD-TechDraw/issues/23#issuecomment-183850927 .
Got to the point where we can make drawings via Python with BUILD_GUI=0 and export them to SVG. It turned out to be a bit of a pain to spin up a QGraphicsScene without the GUI going - there's an AFACT undocumented dependency on Qt's event loop, which isn't running if FreeCAD was built without GUI. See dd03d4a70f43a695fe892e1287e33126755ea564 for the workaround.
Currently, can only include templates in the drawings, but I think it shouldn't be too hard to move the other QGraphicsItems code over.
Fuzzy area for me, but isn't the event loop part of QtCore/QApplication?
On Tue, Apr 19, 2016 at 4:36 AM, Ian notifications@github.com wrote:
Got to the point where we can make drawings via Python with BUILD_GUI=0 and export them to SVG. It turned out to be a bit of a pain to spin up a QGraphicsScene without the GUI going - there's an AFACT undocumented dependency on Qt's event loop, which isn't running if FreeCAD was built without GUI. See dd03d4a https://github.com/WandererFan/FreeCAD-TechDraw/commit/dd03d4a70f43a695fe892e1287e33126755ea564 for the workaround.
Currently, can only include templates in the drawings, but I think it shouldn't be too hard to move the other QGraphicsItems code over.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/WandererFan/FreeCAD-TechDraw/issues/23#issuecomment-211797499
Yes, and I think it might be worth discussing with the main developers whether we want the FreeCAD command line application to have a Qt event loop running. Certainly would make some things easier, and I can't think of any major problems with doing that.
I'll leave that to you. I'm no expert in Qt arch.
On Tue, Apr 19, 2016 at 4:55 PM, Ian notifications@github.com wrote:
Yes, and I think it might be worth discussing with the main developers whether we want the FreeCAD command line application to have a Qt event loop running. Certainly would make some things easier, and I can't think of any major problems with doing that.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/WandererFan/FreeCAD-TechDraw/issues/23#issuecomment-212124097
Note that Clip is currently broken due to this issue. Y coordinates not updated. See GIBase::getYInClip().
This issue appears to be insurmountable at this point due to TechDraw's tight coupling with QGraphics and QtSvg modules.
On indefinite hold.
TechDraw/App will not produce a drawing on its own. TechDraw/Gui is required to provide the QGraphicsScene which contains the actual drawing. This seems in conflict with FreeCAD's principle of being able to work in a non-Gui mode.