]> Shamusworld >> Repos - architektonas/commitdiff
In the middle of major refactoring...
authorShamus Hammons <jlhamm@acm.org>
Tue, 13 Jul 2010 22:09:40 +0000 (22:09 +0000)
committerShamus Hammons <jlhamm@acm.org>
Tue, 13 Jul 2010 22:09:40 +0000 (22:09 +0000)
345 files changed:
architektonas.pro
src/actions/actionblocksadd.cpp [new file with mode: 0644]
src/actions/actionblocksadd.h [new file with mode: 0644]
src/actions/actionblocksattributes.cpp [new file with mode: 0644]
src/actions/actionblocksattributes.h [new file with mode: 0644]
src/actions/actionblockscreate.cpp [moved from src/actions/rs_actionblockscreate.cpp with 70% similarity]
src/actions/actionblockscreate.h [moved from src/actions/rs_actionblockscreate.h with 61% similarity]
src/actions/actionblocksedit.cpp [new file with mode: 0644]
src/actions/actionblocksedit.h [new file with mode: 0644]
src/actions/actionblocksexplode.cpp [new file with mode: 0644]
src/actions/actionblocksexplode.h [new file with mode: 0644]
src/actions/actionblocksfreezeall.cpp [moved from src/actions/rs_actionblocksfreezeall.cpp with 52% similarity]
src/actions/actionblocksfreezeall.h [new file with mode: 0644]
src/actions/actionblocksinsert.cpp [moved from src/actions/rs_actionblocksinsert.cpp with 65% similarity]
src/actions/actionblocksinsert.h [moved from src/actions/rs_actionblocksinsert.h with 84% similarity]
src/actions/actionblocksremove.cpp [moved from src/actions/rs_actionblocksremove.cpp with 64% similarity]
src/actions/actionblocksremove.h [new file with mode: 0644]
src/actions/actionblockstoggleview.cpp [moved from src/actions/rs_actionblockstoggleview.cpp with 57% similarity]
src/actions/actionblockstoggleview.h [new file with mode: 0644]
src/actions/actiondefault.cpp [moved from src/actions/rs_actiondefault.cpp with 55% similarity]
src/actions/actiondefault.h [moved from src/actions/rs_actiondefault.h with 72% similarity]
src/actions/actiondimaligned.cpp [moved from src/actions/rs_actiondimaligned.cpp with 76% similarity]
src/actions/actiondimaligned.h [moved from src/actions/rs_actiondimaligned.h with 77% similarity]
src/actions/actiondimangular.cpp [moved from src/actions/rs_actiondimangular.cpp with 77% similarity]
src/actions/actiondimangular.h [moved from src/actions/rs_actiondimangular.h with 79% similarity]
src/actions/actiondimdiametric.cpp [moved from src/actions/rs_actiondimdiametric.cpp with 76% similarity]
src/actions/actiondimdiametric.h [moved from src/actions/rs_actiondimdiametric.h with 77% similarity]
src/actions/actiondimension.cpp [moved from src/actions/rs_actiondimension.cpp with 60% similarity]
src/actions/actiondimension.h [moved from src/actions/rs_actiondimension.h with 72% similarity]
src/actions/actiondimleader.cpp [moved from src/actions/rs_actiondimleader.cpp with 67% similarity]
src/actions/actiondimleader.h [moved from src/actions/rs_actiondimleader.h with 69% similarity]
src/actions/actiondimlinear.cpp [moved from src/actions/rs_actiondimlinear.cpp with 77% similarity]
src/actions/actiondimlinear.h [moved from src/actions/rs_actiondimlinear.h with 75% similarity]
src/actions/actiondimradial.cpp [moved from src/actions/rs_actiondimradial.cpp with 73% similarity]
src/actions/actiondimradial.h [moved from src/actions/rs_actiondimradial.h with 78% similarity]
src/actions/actiondrawarc.cpp [moved from src/actions/rs_actiondrawarc.cpp with 80% similarity]
src/actions/actiondrawarc.h [moved from src/actions/rs_actiondrawarc.h with 73% similarity]
src/actions/actiondrawarc3p.cpp [moved from src/actions/rs_actiondrawarc3p.cpp with 71% similarity]
src/actions/actiondrawarc3p.h [moved from src/actions/rs_actiondrawarc3p.h with 78% similarity]
src/actions/actiondrawarctangential.cpp [moved from src/actions/rs_actiondrawarctangential.cpp with 70% similarity]
src/actions/actiondrawarctangential.h [moved from src/actions/rs_actiondrawarctangential.h with 78% similarity]
src/actions/actiondrawcircle.cpp [moved from src/actions/rs_actiondrawcircle.cpp with 61% similarity]
src/actions/actiondrawcircle.h [moved from src/actions/rs_actiondrawcircle.h with 76% similarity]
src/actions/actiondrawcircle2p.cpp [moved from src/actions/rs_actiondrawcircle2p.cpp with 71% similarity]
src/actions/actiondrawcircle2p.h [moved from src/actions/rs_actiondrawcircle2p.h with 76% similarity]
src/actions/actiondrawcircle3p.cpp [moved from src/actions/rs_actiondrawcircle3p.cpp with 67% similarity]
src/actions/actiondrawcircle3p.h [moved from src/actions/rs_actiondrawcircle3p.h with 71% similarity]
src/actions/actiondrawcirclecr.cpp [moved from src/actions/rs_actiondrawcirclecr.cpp with 66% similarity]
src/actions/actiondrawcirclecr.h [moved from src/actions/rs_actiondrawcirclecr.h with 67% similarity]
src/actions/actiondrawellipseaxis.cpp [moved from src/actions/rs_actiondrawellipseaxis.cpp with 78% similarity]
src/actions/actiondrawellipseaxis.h [moved from src/actions/rs_actiondrawellipseaxis.h with 70% similarity]
src/actions/actiondrawhatch.cpp [moved from src/actions/rs_actiondrawhatch.cpp with 59% similarity]
src/actions/actiondrawhatch.h [moved from src/actions/rs_actiondrawhatch.h with 66% similarity]
src/actions/actiondrawimage.cpp [moved from src/actions/rs_actiondrawimage.cpp with 63% similarity]
src/actions/actiondrawimage.h [moved from src/actions/rs_actiondrawimage.h with 83% similarity]
src/actions/actiondrawline.cpp [moved from src/actions/rs_actiondrawline.cpp with 69% similarity]
src/actions/actiondrawline.h [moved from src/actions/rs_actiondrawline.h with 80% similarity]
src/actions/actiondrawlineangle.cpp [moved from src/actions/rs_actiondrawlineangle.cpp with 68% similarity]
src/actions/actiondrawlineangle.h [moved from src/actions/rs_actiondrawlineangle.h with 75% similarity]
src/actions/actiondrawlinebisector.cpp [moved from src/actions/rs_actiondrawlinebisector.cpp with 71% similarity]
src/actions/actiondrawlinebisector.h [moved from src/actions/rs_actiondrawlinebisector.h with 81% similarity]
src/actions/actiondrawlinefree.cpp [moved from src/actions/rs_actiondrawlinefree.cpp with 62% similarity]
src/actions/actiondrawlinefree.h [moved from src/actions/rs_actiondrawlinefree.h with 61% similarity]
src/actions/actiondrawlinehorvert.cpp [moved from src/actions/rs_actiondrawlinehorvert.cpp with 64% similarity]
src/actions/actiondrawlinehorvert.h [moved from src/actions/rs_actiondrawlinehorvert.h with 73% similarity]
src/actions/actiondrawlineparallel.cpp [moved from src/actions/rs_actiondrawlineparallel.cpp with 66% similarity]
src/actions/actiondrawlineparallel.h [moved from src/actions/rs_actiondrawlineparallel.h with 74% similarity]
src/actions/actiondrawlineparallelthrough.cpp [moved from src/actions/rs_actiondrawlineparallelthrough.cpp with 61% similarity]
src/actions/actiondrawlineparallelthrough.h [moved from src/actions/rs_actiondrawlineparallelthrough.h with 71% similarity]
src/actions/actiondrawlinepolygon.cpp [moved from src/actions/rs_actiondrawlinepolygon.cpp with 70% similarity]
src/actions/actiondrawlinepolygon.h [moved from src/actions/rs_actiondrawlinepolygon.h with 75% similarity]
src/actions/actiondrawlinepolygon2.cpp [moved from src/actions/rs_actiondrawlinepolygon2.cpp with 71% similarity]
src/actions/actiondrawlinepolygon2.h [moved from src/actions/rs_actiondrawlinepolygon2.h with 75% similarity]
src/actions/actiondrawlinerectangle.cpp [moved from src/actions/rs_actiondrawlinerectangle.cpp with 66% similarity]
src/actions/actiondrawlinerectangle.h [moved from src/actions/rs_actiondrawlinerectangle.h with 67% similarity]
src/actions/actiondrawlinerelangle.cpp [moved from src/actions/rs_actiondrawlinerelangle.cpp with 52% similarity]
src/actions/actiondrawlinerelangle.h [moved from src/actions/rs_actiondrawlinerelangle.h with 77% similarity]
src/actions/actiondrawlinetangent1.cpp [moved from src/actions/rs_actiondrawlinetangent1.cpp with 63% similarity]
src/actions/actiondrawlinetangent1.h [moved from src/actions/rs_actiondrawlinetangent1.h with 71% similarity]
src/actions/actiondrawlinetangent2.cpp [moved from src/actions/rs_actiondrawlinetangent2.cpp with 70% similarity]
src/actions/actiondrawlinetangent2.h [moved from src/actions/rs_actiondrawlinetangent2.h with 71% similarity]
src/actions/actiondrawpoint.cpp [moved from src/actions/rs_actiondrawpoint.cpp with 72% similarity]
src/actions/actiondrawpoint.h [moved from src/actions/rs_actiondrawpoint.h with 64% similarity]
src/actions/actiondrawspline.cpp [moved from src/actions/rs_actiondrawspline.cpp with 57% similarity]
src/actions/actiondrawspline.h [moved from src/actions/rs_actiondrawspline.h with 75% similarity]
src/actions/actiondrawtext.cpp [moved from src/actions/rs_actiondrawtext.cpp with 70% similarity]
src/actions/actiondrawtext.h [moved from src/actions/rs_actiondrawtext.h with 78% similarity]
src/actions/actioneditcopy.cpp [moved from src/actions/rs_actioneditcopy.cpp with 66% similarity]
src/actions/actioneditcopy.h [moved from src/actions/rs_actioneditcopy.h with 70% similarity]
src/actions/actioneditpaste.cpp [moved from src/actions/rs_actioneditpaste.cpp with 68% similarity]
src/actions/actioneditpaste.h [moved from src/actions/rs_actioneditpaste.h with 69% similarity]
src/actions/actioneditundo.cpp [moved from src/actions/rs_actioneditundo.cpp with 67% similarity]
src/actions/actioneditundo.h [new file with mode: 0644]
src/actions/actionfilenew.cpp [moved from src/actions/rs_actionfilenew.cpp with 62% similarity]
src/actions/actionfilenew.h [new file with mode: 0644]
src/actions/actionfileopen.cpp [moved from src/actions/rs_actionfileopen.cpp with 61% similarity]
src/actions/actionfileopen.h [new file with mode: 0644]
src/actions/actionfilesave.cpp [moved from src/actions/rs_actionfilesave.cpp with 55% similarity]
src/actions/actionfilesave.h [new file with mode: 0644]
src/actions/actionfilesaveas.cpp [moved from src/actions/rs_actionfilesaveas.cpp with 59% similarity]
src/actions/actionfilesaveas.h [new file with mode: 0644]
src/actions/actioninfoangle.cpp [moved from src/actions/rs_actioninfoangle.cpp with 76% similarity]
src/actions/actioninfoangle.h [moved from src/actions/rs_actioninfoangle.h with 70% similarity]
src/actions/actioninfoarea.cpp [moved from src/actions/rs_actioninfoarea.cpp with 65% similarity]
src/actions/actioninfoarea.h [moved from src/actions/rs_actioninfoarea.h with 74% similarity]
src/actions/actioninfodist.cpp [moved from src/actions/rs_actioninfodist.cpp with 71% similarity]
src/actions/actioninfodist.h [moved from src/actions/rs_actioninfodist.h with 71% similarity]
src/actions/actioninfodist2.cpp [moved from src/actions/rs_actioninfodist2.cpp with 63% similarity]
src/actions/actioninfodist2.h [moved from src/actions/rs_actioninfodist2.h with 71% similarity]
src/actions/actioninfoinside.cpp [moved from src/actions/rs_actioninfoinside.cpp with 67% similarity]
src/actions/actioninfoinside.h [new file with mode: 0644]
src/actions/actioninfototallength.cpp [moved from src/actions/rs_actioninfototallength.cpp with 62% similarity]
src/actions/actioninfototallength.h [new file with mode: 0644]
src/actions/actionlayersadd.cpp [moved from src/actions/rs_actionlayersadd.cpp with 65% similarity]
src/actions/actionlayersadd.h [new file with mode: 0644]
src/actions/actionlayersedit.cpp [moved from src/actions/rs_actionlayersedit.cpp with 56% similarity]
src/actions/actionlayersedit.h [new file with mode: 0644]
src/actions/actionlayersfreezeall.cpp [new file with mode: 0644]
src/actions/actionlayersfreezeall.h [new file with mode: 0644]
src/actions/actionlayersremove.cpp [new file with mode: 0644]
src/actions/actionlayersremove.h [new file with mode: 0644]
src/actions/actionlayerstogglelock.cpp [moved from src/actions/rs_actionlayerstogglelock.cpp with 72% similarity]
src/actions/actionlayerstogglelock.h [new file with mode: 0644]
src/actions/actionlayerstoggleview.cpp [moved from src/actions/rs_actionlayerstoggleview.cpp with 60% similarity]
src/actions/actionlayerstoggleview.h [new file with mode: 0644]
src/actions/actionlibraryinsert.cpp [moved from src/actions/rs_actionlibraryinsert.cpp with 69% similarity]
src/actions/actionlibraryinsert.h [moved from src/actions/rs_actionlibraryinsert.h with 82% similarity]
src/actions/actionlockrelativezero.cpp [moved from src/actions/rs_actionlockrelativezero.cpp with 60% similarity]
src/actions/actionlockrelativezero.h [new file with mode: 0644]
src/actions/actionmodifyattributes.cpp [moved from src/actions/rs_actionmodifyattributes.cpp with 71% similarity]
src/actions/actionmodifyattributes.h [moved from src/actions/rs_actionmodifyattributes.h with 55% similarity]
src/actions/actionmodifybevel.cpp [moved from src/actions/rs_actionmodifybevel.cpp with 74% similarity]
src/actions/actionmodifybevel.h [moved from src/actions/rs_actionmodifybevel.h with 80% similarity]
src/actions/actionmodifycut.cpp [moved from src/actions/rs_actionmodifycut.cpp with 79% similarity]
src/actions/actionmodifycut.h [moved from src/actions/rs_actionmodifycut.h with 69% similarity]
src/actions/actionmodifydelete.cpp [moved from src/actions/rs_actionmodifydelete.cpp with 67% similarity]
src/actions/actionmodifydelete.h [moved from src/actions/rs_actionmodifydelete.h with 56% similarity]
src/actions/actionmodifydeletefree.cpp [moved from src/actions/rs_actionmodifydeletefree.cpp with 75% similarity]
src/actions/actionmodifydeletefree.h [moved from src/actions/rs_actionmodifydeletefree.h with 56% similarity]
src/actions/actionmodifydeletequick.cpp [moved from src/actions/rs_actionmodifydeletequick.cpp with 69% similarity]
src/actions/actionmodifydeletequick.h [moved from src/actions/rs_actionmodifydeletequick.h with 51% similarity]
src/actions/actionmodifyentity.cpp [moved from src/actions/rs_actionmodifyentity.cpp with 72% similarity]
src/actions/actionmodifyentity.h [new file with mode: 0644]
src/actions/actionmodifyexplodetext.cpp [moved from src/actions/rs_actionmodifyexplodetext.cpp with 56% similarity]
src/actions/actionmodifyexplodetext.h [new file with mode: 0644]
src/actions/actionmodifymirror.cpp [moved from src/actions/rs_actionmodifymirror.cpp with 73% similarity]
src/actions/actionmodifymirror.h [moved from src/actions/rs_actionmodifymirror.h with 71% similarity]
src/actions/actionmodifymove.cpp [moved from src/actions/rs_actionmodifymove.cpp with 73% similarity]
src/actions/actionmodifymove.h [moved from src/actions/rs_actionmodifymove.h with 72% similarity]
src/actions/actionmodifymoverotate.cpp [moved from src/actions/rs_actionmodifymoverotate.cpp with 70% similarity]
src/actions/actionmodifymoverotate.h [moved from src/actions/rs_actionmodifymoverotate.h with 78% similarity]
src/actions/actionmodifyrotate.cpp [moved from src/actions/rs_actionmodifyrotate.cpp with 66% similarity]
src/actions/actionmodifyrotate.h [moved from src/actions/rs_actionmodifyrotate.h with 70% similarity]
src/actions/actionmodifyrotate2.cpp [moved from src/actions/rs_actionmodifyrotate2.cpp with 61% similarity]
src/actions/actionmodifyrotate2.h [moved from src/actions/rs_actionmodifyrotate2.h with 72% similarity]
src/actions/actionmodifyround.cpp [moved from src/actions/rs_actionmodifyround.cpp with 71% similarity]
src/actions/actionmodifyround.h [moved from src/actions/rs_actionmodifyround.h with 79% similarity]
src/actions/actionmodifyscale.cpp [moved from src/actions/rs_actionmodifyscale.cpp with 59% similarity]
src/actions/actionmodifyscale.h [moved from src/actions/rs_actionmodifyscale.h with 69% similarity]
src/actions/actionmodifystretch.cpp [moved from src/actions/rs_actionmodifystretch.cpp with 63% similarity]
src/actions/actionmodifystretch.h [moved from src/actions/rs_actionmodifystretch.h with 72% similarity]
src/actions/actionmodifytrim.cpp [moved from src/actions/rs_actionmodifytrim.cpp with 71% similarity]
src/actions/actionmodifytrim.h [moved from src/actions/rs_actionmodifytrim.h with 69% similarity]
src/actions/actionmodifytrimamount.cpp [moved from src/actions/rs_actionmodifytrimamount.cpp with 70% similarity]
src/actions/actionmodifytrimamount.h [moved from src/actions/rs_actionmodifytrimamount.h with 72% similarity]
src/actions/actionoptionsdrawing.cpp [moved from src/actions/rs_actionoptionsdrawing.cpp with 52% similarity]
src/actions/actionoptionsdrawing.h [new file with mode: 0644]
src/actions/actionprintpreview.cpp [moved from src/actions/rs_actionprintpreview.cpp with 55% similarity]
src/actions/actionprintpreview.h [moved from src/actions/rs_actionprintpreview.h with 75% similarity]
src/actions/actionselect.cpp [moved from src/actions/rs_actionselect.cpp with 59% similarity]
src/actions/actionselect.h [new file with mode: 0644]
src/actions/actionselectall.cpp [moved from src/actions/rs_actionselectall.cpp with 64% similarity]
src/actions/actionselectall.h [new file with mode: 0644]
src/actions/actionselectbase.cpp [moved from src/actions/rs_actionselectbase.cpp with 65% similarity]
src/actions/actionselectbase.h [new file with mode: 0644]
src/actions/actionselectcontour.cpp [moved from src/actions/rs_actionselectcontour.cpp with 55% similarity]
src/actions/actionselectcontour.h [new file with mode: 0644]
src/actions/actionselectintersected.cpp [moved from src/actions/rs_actionselectintersected.cpp with 64% similarity]
src/actions/actionselectintersected.h [moved from src/actions/rs_actionselectintersected.h with 67% similarity]
src/actions/actionselectinvert.cpp [moved from src/actions/rs_actionselectinvert.cpp with 61% similarity]
src/actions/actionselectinvert.h [new file with mode: 0644]
src/actions/actionselectlayer.cpp [moved from src/actions/rs_actionselectlayer.cpp with 58% similarity]
src/actions/actionselectlayer.h [moved from src/actions/rs_actionselectlayer.h with 50% similarity]
src/actions/actionselectsingle.cpp [moved from src/actions/rs_actionselectsingle.cpp with 59% similarity]
src/actions/actionselectsingle.h [moved from src/actions/rs_actionselectsingle.h with 53% similarity]
src/actions/actionselectwindow.cpp [moved from src/actions/rs_actionselectwindow.cpp with 62% similarity]
src/actions/actionselectwindow.h [moved from src/actions/rs_actionselectwindow.h with 69% similarity]
src/actions/actionsetrelativezero.cpp [moved from src/actions/rs_actionsetrelativezero.cpp with 64% similarity]
src/actions/actionsetrelativezero.h [new file with mode: 0644]
src/actions/actionsetsnapmode.cpp [moved from src/actions/rs_actionsetsnapmode.cpp with 59% similarity]
src/actions/actionsetsnapmode.h [new file with mode: 0644]
src/actions/actionsetsnaprestriction.cpp [moved from src/actions/rs_actionsetsnaprestriction.cpp with 65% similarity]
src/actions/actionsetsnaprestriction.h [new file with mode: 0644]
src/actions/actionsnapintersectionmanual.cpp [moved from src/actions/rs_actionsnapintersectionmanual.cpp with 62% similarity]
src/actions/actionsnapintersectionmanual.h [moved from src/actions/rs_actionsnapintersectionmanual.h with 64% similarity]
src/actions/actiontoolregeneratedimensions.cpp [moved from src/actions/rs_actiontoolregeneratedimensions.cpp with 66% similarity]
src/actions/actiontoolregeneratedimensions.h [new file with mode: 0644]
src/actions/actionzoomauto.cpp [moved from src/actions/rs_actionzoomauto.cpp with 69% similarity]
src/actions/actionzoomauto.h [new file with mode: 0644]
src/actions/actionzoomautoy.cpp [moved from src/actions/rs_actionzoomautoy.cpp with 57% similarity]
src/actions/actionzoomautoy.h [new file with mode: 0644]
src/actions/actionzoomin.cpp [moved from src/actions/rs_actionzoomin.cpp with 72% similarity]
src/actions/actionzoomin.h [new file with mode: 0644]
src/actions/actionzoompan.cpp [moved from src/actions/rs_actionzoompan.cpp with 64% similarity]
src/actions/actionzoompan.h [moved from src/actions/rs_actionzoompan.h with 59% similarity]
src/actions/actionzoomprevious.cpp [moved from src/actions/rs_actionzoomprevious.cpp with 56% similarity]
src/actions/actionzoomprevious.h [new file with mode: 0644]
src/actions/actionzoomredraw.cpp [moved from src/actions/rs_actionzoomredraw.cpp with 63% similarity]
src/actions/actionzoomredraw.h [new file with mode: 0644]
src/actions/actionzoomscroll.cpp [moved from src/actions/rs_actionzoomscroll.cpp with 56% similarity]
src/actions/actionzoomscroll.h [new file with mode: 0644]
src/actions/actionzoomwindow.cpp [moved from src/actions/rs_actionzoomwindow.cpp with 65% similarity]
src/actions/actionzoomwindow.h [moved from src/actions/rs_actionzoomwindow.h with 60% similarity]
src/actions/rs_actionblocksadd.cpp [deleted file]
src/actions/rs_actionblocksadd.h [deleted file]
src/actions/rs_actionblocksattributes.cpp [deleted file]
src/actions/rs_actionblocksattributes.h [deleted file]
src/actions/rs_actionblocksedit.cpp [deleted file]
src/actions/rs_actionblocksedit.h [deleted file]
src/actions/rs_actionblocksexplode.cpp [deleted file]
src/actions/rs_actionblocksexplode.h [deleted file]
src/actions/rs_actionblocksfreezeall.h [deleted file]
src/actions/rs_actionblocksremove.h [deleted file]
src/actions/rs_actionblockstoggleview.h [deleted file]
src/actions/rs_actioneditundo.h [deleted file]
src/actions/rs_actionfilenew.h [deleted file]
src/actions/rs_actionfileopen.h [deleted file]
src/actions/rs_actionfilesave.h [deleted file]
src/actions/rs_actionfilesaveas.h [deleted file]
src/actions/rs_actioninfoinside.h [deleted file]
src/actions/rs_actioninfototallength.h [deleted file]
src/actions/rs_actionlayersadd.h [deleted file]
src/actions/rs_actionlayersedit.h [deleted file]
src/actions/rs_actionlayersfreezeall.cpp [deleted file]
src/actions/rs_actionlayersfreezeall.h [deleted file]
src/actions/rs_actionlayersremove.cpp [deleted file]
src/actions/rs_actionlayersremove.h [deleted file]
src/actions/rs_actionlayerstogglelock.h [deleted file]
src/actions/rs_actionlayerstoggleview.h [deleted file]
src/actions/rs_actionlockrelativezero.h [deleted file]
src/actions/rs_actionmodifyentity.h [deleted file]
src/actions/rs_actionmodifyexplodetext.h [deleted file]
src/actions/rs_actionoptionsdrawing.h [deleted file]
src/actions/rs_actionselect.h [deleted file]
src/actions/rs_actionselectall.h [deleted file]
src/actions/rs_actionselectbase.h [deleted file]
src/actions/rs_actionselectcontour.h [deleted file]
src/actions/rs_actionselectinvert.h [deleted file]
src/actions/rs_actionsetrelativezero.h [deleted file]
src/actions/rs_actionsetsnapmode.h [deleted file]
src/actions/rs_actionsetsnaprestriction.h [deleted file]
src/actions/rs_actiontoolregeneratedimensions.h [deleted file]
src/actions/rs_actionzoomauto.h [deleted file]
src/actions/rs_actionzoomautoy.h [deleted file]
src/actions/rs_actionzoomin.h [deleted file]
src/actions/rs_actionzoomprevious.h [deleted file]
src/actions/rs_actionzoomredraw.h [deleted file]
src/actions/rs_actionzoomscroll.h [deleted file]
src/base/actioninterface.cpp [moved from src/base/rs_actioninterface.cpp with 65% similarity]
src/base/actioninterface.h [moved from src/base/rs_actioninterface.h with 51% similarity]
src/base/paintinterface.cpp [moved from src/base/paintintf.cpp with 99% similarity]
src/base/paintinterface.h [moved from src/base/paintintf.h with 93% similarity]
src/base/rs_arc.cpp
src/base/rs_circle.cpp
src/base/rs_dialogfactory.cpp
src/base/rs_dialogfactory.h
src/base/rs_dialogfactoryadapter.h
src/base/rs_dialogfactoryinterface.h
src/base/rs_dimaligned.h
src/base/rs_ellipse.cpp
src/base/rs_entitycontainer.cpp
src/base/rs_eventhandler.cpp
src/base/rs_eventhandler.h
src/base/rs_hatch.cpp
src/base/rs_image.cpp
src/base/rs_line.cpp
src/base/rs_point.cpp
src/base/rs_polyline.cpp
src/base/rs_preview.cpp
src/base/rs_previewactioninterface.cpp [deleted file]
src/base/rs_previewactioninterface.h [deleted file]
src/base/rs_snapper.cpp
src/base/rs_solid.cpp
src/base/rs_spline.cpp
src/forms/arcoptions.cpp
src/forms/arcoptions.h
src/forms/arctangentialoptions.cpp
src/forms/arctangentialoptions.h
src/forms/beveloptions.cpp
src/forms/beveloptions.h
src/forms/cadtoolbar.cpp
src/forms/cadtoolbar.h
src/forms/cadtoolbarselect.cpp
src/forms/cadtoolbarselect.h
src/forms/circleoptions.cpp
src/forms/circleoptions.h
src/forms/dimlinearoptions.cpp
src/forms/dimlinearoptions.h
src/forms/dimoptions.cpp
src/forms/dimoptions.h
src/forms/imageoptions.cpp
src/forms/imageoptions.h
src/forms/insertoptions.cpp
src/forms/insertoptions.h
src/forms/libraryinsertoptions.cpp
src/forms/libraryinsertoptions.h
src/forms/librarywidget.cpp
src/forms/lineangleoptions.cpp
src/forms/lineangleoptions.h
src/forms/linebisectoroptions.cpp
src/forms/linebisectoroptions.h
src/forms/lineoptions.cpp
src/forms/lineoptions.h
src/forms/lineparalleloptions.cpp
src/forms/lineparalleloptions.h
src/forms/lineparallelthroughoptions.cpp
src/forms/lineparallelthroughoptions.h
src/forms/linepolygon2options.cpp
src/forms/linepolygon2options.h
src/forms/linepolygonoptions.cpp
src/forms/linepolygonoptions.h
src/forms/linerelangleoptions.cpp
src/forms/linerelangleoptions.h
src/forms/moverotateoptions.cpp
src/forms/moverotateoptions.h
src/forms/printpreviewoptions.cpp
src/forms/printpreviewoptions.h
src/forms/roundoptions.cpp
src/forms/roundoptions.h
src/forms/snapdistoptions.cpp
src/forms/splineoptions.cpp
src/forms/splineoptions.h
src/forms/textoptions.cpp
src/forms/textoptions.h
src/forms/trimamountoptions.cpp
src/forms/trimamountoptions.h
src/mainapp/applicationwindow.cpp
src/mainapp/applicationwindow.h
src/mainapp/graphicview.cpp
src/mainapp/graphicview.h
src/widgets/qg_actionhandler.cpp
src/widgets/qg_actionhandler.h
src/widgets/qg_dialogfactory.cpp
src/widgets/qg_dialogfactory.h
src/widgets/qg_graphicview.cpp

index 85fe482c95c280399166c122323dbce285af52ae..3a8b72aa566caffadfb398910bfd78874e1e65e7 100644 (file)
@@ -28,7 +28,7 @@ INCLUDEPATH += \
 
 HEADERS = \
        src/base/rs.h \
-       src/base/rs_actioninterface.h \
+       src/base/actioninterface.h \
        src/base/rs_arc.h \
        src/base/rs_atomicentity.h \
        src/base/rs_block.h \
@@ -80,14 +80,13 @@ HEADERS = \
        src/base/rs_mainwindowinterface.h \
        src/base/rs_math.h \
        src/base/rs_modification.h \
-       src/base/paintintf.h \
+       src/base/paintinterface.h \
        src/base/rs_pattern.h \
        src/base/rs_patternlist.h \
        src/base/rs_pen.h \
        src/base/rs_point.h \
        src/base/rs_polyline.h \
        src/base/rs_preview.h \
-       src/base/rs_previewactioninterface.h \
        src/base/rs_python.h \
        src/base/rs_python_wrappers.h \
        src/base/rs_script.h \
@@ -111,7 +110,7 @@ HEADERS = \
        src/base/vectorsolutions.h
 
 SOURCES = \
-       src/base/rs_actioninterface.cpp \
+       src/base/actioninterface.cpp \
        src/base/rs_arc.cpp \
        src/base/rs_atomicentity.cpp \
        src/base/rs_block.cpp \
@@ -156,13 +155,12 @@ SOURCES = \
        src/base/rs_linetypepattern.cpp \
        src/base/rs_math.cpp \
        src/base/rs_modification.cpp \
-       src/base/paintintf.cpp \
+       src/base/paintinterface.cpp \
        src/base/rs_pattern.cpp \
        src/base/rs_patternlist.cpp \
        src/base/rs_point.cpp \
        src/base/rs_polyline.cpp \
        src/base/rs_preview.cpp \
-       src/base/rs_previewactioninterface.cpp \
        src/base/rs_python.cpp \
        src/base/rs_python_wrappers.cpp \
        src/base/rs_script.cpp \
@@ -186,220 +184,220 @@ SOURCES = \
        src/base/vectorsolutions.cpp
 
 HEADERS += \
-       src/actions/rs_actionblocksadd.h \
-       src/actions/rs_actionblocksattributes.h \
-       src/actions/rs_actionblockscreate.h \
-       src/actions/rs_actionblocksedit.h \
-       src/actions/rs_actionblocksexplode.h \
-       src/actions/rs_actionblocksinsert.h \
-       src/actions/rs_actionblocksfreezeall.h \
-       src/actions/rs_actionblocksremove.h \
-       src/actions/rs_actionblockstoggleview.h \
-       src/actions/rs_actiondefault.h \
-       src/actions/rs_actiondimaligned.h \
-       src/actions/rs_actiondimangular.h \
-       src/actions/rs_actiondimdiametric.h \
-       src/actions/rs_actiondimension.h \
-       src/actions/rs_actiondimleader.h \
-       src/actions/rs_actiondimlinear.h \
-       src/actions/rs_actiondimradial.h \
-       src/actions/rs_actiondrawarc.h \
-       src/actions/rs_actiondrawarc3p.h \
-       src/actions/rs_actiondrawarctangential.h \
-       src/actions/rs_actiondrawcircle.h \
-       src/actions/rs_actiondrawcircle2p.h \
-       src/actions/rs_actiondrawcircle3p.h \
-       src/actions/rs_actiondrawcirclecr.h \
-       src/actions/rs_actiondrawellipseaxis.h \
-       src/actions/rs_actiondrawhatch.h \
-       src/actions/rs_actiondrawimage.h \
-       src/actions/rs_actiondrawline.h \
-       src/actions/rs_actiondrawlineangle.h \
-       src/actions/rs_actiondrawlinebisector.h \
-       src/actions/rs_actiondrawlinefree.h \
-       src/actions/rs_actiondrawlinehorvert.h \
-       src/actions/rs_actiondrawlineparallel.h \
-       src/actions/rs_actiondrawlineparallelthrough.h \
-       src/actions/rs_actiondrawlinepolygon.h \
-       src/actions/rs_actiondrawlinepolygon2.h \
-       src/actions/rs_actiondrawlinerectangle.h \
-       src/actions/rs_actiondrawlinerelangle.h \
-       src/actions/rs_actiondrawlinetangent1.h \
-       src/actions/rs_actiondrawlinetangent2.h \
-       src/actions/rs_actiondrawpoint.h \
-       src/actions/rs_actiondrawspline.h \
-       src/actions/rs_actiondrawtext.h \
-       src/actions/rs_actioneditcopy.h \
-       src/actions/rs_actioneditpaste.h \
-       src/actions/rs_actioneditundo.h \
-       src/actions/rs_actionfilenew.h \
-       src/actions/rs_actionfileopen.h \
-       src/actions/rs_actionfilesave.h \
-       src/actions/rs_actionfilesaveas.h \
-       src/actions/rs_actioninfoangle.h \
-       src/actions/rs_actioninfoarea.h \
-       src/actions/rs_actioninfoinside.h \
-       src/actions/rs_actioninfodist.h \
-       src/actions/rs_actioninfodist2.h \
-       src/actions/rs_actioninfototallength.h \
-       src/actions/rs_actionlayersadd.h \
-       src/actions/rs_actionlayersedit.h \
-       src/actions/rs_actionlayersfreezeall.h \
-       src/actions/rs_actionlayersremove.h \
-       src/actions/rs_actionlayerstogglelock.h \
-       src/actions/rs_actionlayerstoggleview.h \
-       src/actions/rs_actionlibraryinsert.h \
-       src/actions/rs_actionlockrelativezero.h \
-       src/actions/rs_actionmodifyattributes.h \
-       src/actions/rs_actionmodifybevel.h \
-       src/actions/rs_actionmodifycut.h \
-       src/actions/rs_actionmodifydelete.h \
-       src/actions/rs_actionmodifydeletefree.h \
-       src/actions/rs_actionmodifydeletequick.h \
-       src/actions/rs_actionmodifyentity.h \
-       src/actions/rs_actionmodifymirror.h \
-       src/actions/rs_actionmodifymove.h \
-       src/actions/rs_actionmodifymoverotate.h \
-       src/actions/rs_actionmodifyrotate.h \
-       src/actions/rs_actionmodifyrotate2.h \
-       src/actions/rs_actionmodifyround.h \
-       src/actions/rs_actionmodifyscale.h \
-       src/actions/rs_actionmodifystretch.h \
-       src/actions/rs_actionmodifytrim.h \
-       src/actions/rs_actionmodifytrimamount.h \
-       src/actions/rs_actionmodifyexplodetext.h \
-       src/actions/rs_actionoptionsdrawing.h \
-       src/actions/rs_actionprintpreview.h \
-       src/actions/rs_actionselect.h \
-       src/actions/rs_actionselectall.h \
-       src/actions/rs_actionselectbase.h \
-       src/actions/rs_actionselectcontour.h \
-       src/actions/rs_actionselectintersected.h \
-       src/actions/rs_actionselectinvert.h \
-       src/actions/rs_actionselectsingle.h \
-       src/actions/rs_actionselectwindow.h \
-       src/actions/rs_actionselectlayer.h \
-       src/actions/rs_actionsetrelativezero.h \
-       src/actions/rs_actionsetsnapmode.h \
-       src/actions/rs_actionsetsnaprestriction.h \
-       src/actions/rs_actionsnapintersectionmanual.h \
-       src/actions/rs_actiontoolregeneratedimensions.h \
-       src/actions/rs_actionzoomauto.h \
-       src/actions/rs_actionzoomautoy.h \
-       src/actions/rs_actionzoomin.h \
-       src/actions/rs_actionzoompan.h \
-       src/actions/rs_actionzoomprevious.h \
-       src/actions/rs_actionzoomredraw.h \
-       src/actions/rs_actionzoomscroll.h \
-       src/actions/rs_actionzoomwindow.h
+       src/actions/actionblocksadd.h \
+       src/actions/actionblocksattributes.h \
+       src/actions/actionblockscreate.h \
+       src/actions/actionblocksedit.h \
+       src/actions/actionblocksexplode.h \
+       src/actions/actionblocksinsert.h \
+       src/actions/actionblocksfreezeall.h \
+       src/actions/actionblocksremove.h \
+       src/actions/actionblockstoggleview.h \
+       src/actions/actiondefault.h \
+       src/actions/actiondimaligned.h \
+       src/actions/actiondimangular.h \
+       src/actions/actiondimdiametric.h \
+       src/actions/actiondimension.h \
+       src/actions/actiondimleader.h \
+       src/actions/actiondimlinear.h \
+       src/actions/actiondimradial.h \
+       src/actions/actiondrawarc.h \
+       src/actions/actiondrawarc3p.h \
+       src/actions/actiondrawarctangential.h \
+       src/actions/actiondrawcircle.h \
+       src/actions/actiondrawcircle2p.h \
+       src/actions/actiondrawcircle3p.h \
+       src/actions/actiondrawcirclecr.h \
+       src/actions/actiondrawellipseaxis.h \
+       src/actions/actiondrawhatch.h \
+       src/actions/actiondrawimage.h \
+       src/actions/actiondrawline.h \
+       src/actions/actiondrawlineangle.h \
+       src/actions/actiondrawlinebisector.h \
+       src/actions/actiondrawlinefree.h \
+       src/actions/actiondrawlinehorvert.h \
+       src/actions/actiondrawlineparallel.h \
+       src/actions/actiondrawlineparallelthrough.h \
+       src/actions/actiondrawlinepolygon.h \
+       src/actions/actiondrawlinepolygon2.h \
+       src/actions/actiondrawlinerectangle.h \
+       src/actions/actiondrawlinerelangle.h \
+       src/actions/actiondrawlinetangent1.h \
+       src/actions/actiondrawlinetangent2.h \
+       src/actions/actiondrawpoint.h \
+       src/actions/actiondrawspline.h \
+       src/actions/actiondrawtext.h \
+       src/actions/actioneditcopy.h \
+       src/actions/actioneditpaste.h \
+       src/actions/actioneditundo.h \
+       src/actions/actionfilenew.h \
+       src/actions/actionfileopen.h \
+       src/actions/actionfilesave.h \
+       src/actions/actionfilesaveas.h \
+       src/actions/actioninfoangle.h \
+       src/actions/actioninfoarea.h \
+       src/actions/actioninfoinside.h \
+       src/actions/actioninfodist.h \
+       src/actions/actioninfodist2.h \
+       src/actions/actioninfototallength.h \
+       src/actions/actionlayersadd.h \
+       src/actions/actionlayersedit.h \
+       src/actions/actionlayersfreezeall.h \
+       src/actions/actionlayersremove.h \
+       src/actions/actionlayerstogglelock.h \
+       src/actions/actionlayerstoggleview.h \
+       src/actions/actionlibraryinsert.h \
+       src/actions/actionlockrelativezero.h \
+       src/actions/actionmodifyattributes.h \
+       src/actions/actionmodifybevel.h \
+       src/actions/actionmodifycut.h \
+       src/actions/actionmodifydelete.h \
+       src/actions/actionmodifydeletefree.h \
+       src/actions/actionmodifydeletequick.h \
+       src/actions/actionmodifyentity.h \
+       src/actions/actionmodifymirror.h \
+       src/actions/actionmodifymove.h \
+       src/actions/actionmodifymoverotate.h \
+       src/actions/actionmodifyrotate.h \
+       src/actions/actionmodifyrotate2.h \
+       src/actions/actionmodifyround.h \
+       src/actions/actionmodifyscale.h \
+       src/actions/actionmodifystretch.h \
+       src/actions/actionmodifytrim.h \
+       src/actions/actionmodifytrimamount.h \
+       src/actions/actionmodifyexplodetext.h \
+       src/actions/actionoptionsdrawing.h \
+       src/actions/actionprintpreview.h \
+       src/actions/actionselect.h \
+       src/actions/actionselectall.h \
+       src/actions/actionselectbase.h \
+       src/actions/actionselectcontour.h \
+       src/actions/actionselectintersected.h \
+       src/actions/actionselectinvert.h \
+       src/actions/actionselectsingle.h \
+       src/actions/actionselectwindow.h \
+       src/actions/actionselectlayer.h \
+       src/actions/actionsetrelativezero.h \
+       src/actions/actionsetsnapmode.h \
+       src/actions/actionsetsnaprestriction.h \
+       src/actions/actionsnapintersectionmanual.h \
+       src/actions/actiontoolregeneratedimensions.h \
+       src/actions/actionzoomauto.h \
+       src/actions/actionzoomautoy.h \
+       src/actions/actionzoomin.h \
+       src/actions/actionzoompan.h \
+       src/actions/actionzoomprevious.h \
+       src/actions/actionzoomredraw.h \
+       src/actions/actionzoomscroll.h \
+       src/actions/actionzoomwindow.h
 
 SOURCES += \
-       src/actions/rs_actionblocksadd.cpp \
-       src/actions/rs_actionblocksattributes.cpp \
-       src/actions/rs_actionblockscreate.cpp \
-       src/actions/rs_actionblocksedit.cpp \
-       src/actions/rs_actionblocksexplode.cpp \
-       src/actions/rs_actionblocksinsert.cpp \
-       src/actions/rs_actionblocksfreezeall.cpp \
-       src/actions/rs_actionblocksremove.cpp \
-       src/actions/rs_actionblockstoggleview.cpp \
-       src/actions/rs_actiondefault.cpp \
-       src/actions/rs_actiondimaligned.cpp \
-       src/actions/rs_actiondimangular.cpp \
-       src/actions/rs_actiondimdiametric.cpp \
-       src/actions/rs_actiondimension.cpp \
-       src/actions/rs_actiondimleader.cpp \
-       src/actions/rs_actiondimlinear.cpp \
-       src/actions/rs_actiondimradial.cpp \
-       src/actions/rs_actiondrawarc.cpp \
-       src/actions/rs_actiondrawarc3p.cpp \
-       src/actions/rs_actiondrawarctangential.cpp \
-       src/actions/rs_actiondrawcircle.cpp \
-       src/actions/rs_actiondrawcircle2p.cpp \
-       src/actions/rs_actiondrawcircle3p.cpp \
-       src/actions/rs_actiondrawcirclecr.cpp \
-       src/actions/rs_actiondrawellipseaxis.cpp \
-       src/actions/rs_actiondrawhatch.cpp \
-       src/actions/rs_actiondrawimage.cpp \
-       src/actions/rs_actiondrawline.cpp \
-       src/actions/rs_actiondrawlineangle.cpp \
-       src/actions/rs_actiondrawlinebisector.cpp \
-       src/actions/rs_actiondrawlinefree.cpp \
-       src/actions/rs_actiondrawlinehorvert.cpp \
-       src/actions/rs_actiondrawlineparallel.cpp \
-       src/actions/rs_actiondrawlineparallelthrough.cpp \
-       src/actions/rs_actiondrawlinepolygon.cpp \
-       src/actions/rs_actiondrawlinepolygon2.cpp \
-       src/actions/rs_actiondrawlinerectangle.cpp \
-       src/actions/rs_actiondrawlinerelangle.cpp \
-       src/actions/rs_actiondrawlinetangent1.cpp \
-       src/actions/rs_actiondrawlinetangent2.cpp \
-       src/actions/rs_actiondrawpoint.cpp \
-       src/actions/rs_actiondrawspline.cpp \
-       src/actions/rs_actiondrawtext.cpp \
-       src/actions/rs_actioneditcopy.cpp \
-       src/actions/rs_actioneditpaste.cpp \
-       src/actions/rs_actioneditundo.cpp \
-       src/actions/rs_actionfilenew.cpp \
-       src/actions/rs_actionfileopen.cpp \
-       src/actions/rs_actionfilesave.cpp \
-       src/actions/rs_actionfilesaveas.cpp \
-       src/actions/rs_actioninfoangle.cpp \
-       src/actions/rs_actioninfoarea.cpp \
-       src/actions/rs_actioninfoinside.cpp \
-       src/actions/rs_actioninfodist.cpp \
-       src/actions/rs_actioninfodist2.cpp \
-       src/actions/rs_actioninfototallength.cpp \
-       src/actions/rs_actionlayersadd.cpp \
-       src/actions/rs_actionlayersedit.cpp \
-       src/actions/rs_actionlayersfreezeall.cpp \
-       src/actions/rs_actionlayersremove.cpp \
-       src/actions/rs_actionlayerstogglelock.cpp \
-       src/actions/rs_actionlayerstoggleview.cpp \
-       src/actions/rs_actionlibraryinsert.cpp \
-       src/actions/rs_actionlockrelativezero.cpp \
-       src/actions/rs_actionmodifyattributes.cpp \
-       src/actions/rs_actionmodifybevel.cpp \
-       src/actions/rs_actionmodifycut.cpp \
-       src/actions/rs_actionmodifydelete.cpp \
-       src/actions/rs_actionmodifydeletefree.cpp \
-       src/actions/rs_actionmodifydeletequick.cpp \
-       src/actions/rs_actionmodifyentity.cpp \
-       src/actions/rs_actionmodifymirror.cpp \
-       src/actions/rs_actionmodifymove.cpp \
-       src/actions/rs_actionmodifymoverotate.cpp \
-       src/actions/rs_actionmodifyrotate.cpp \
-       src/actions/rs_actionmodifyrotate2.cpp \
-       src/actions/rs_actionmodifyround.cpp \
-       src/actions/rs_actionmodifyscale.cpp \
-       src/actions/rs_actionmodifystretch.cpp \
-       src/actions/rs_actionmodifytrim.cpp \
-       src/actions/rs_actionmodifytrimamount.cpp \
-       src/actions/rs_actionmodifyexplodetext.cpp \
-       src/actions/rs_actionoptionsdrawing.cpp \
-       src/actions/rs_actionprintpreview.cpp \
-       src/actions/rs_actionselect.cpp \
-       src/actions/rs_actionselectall.cpp \
-       src/actions/rs_actionselectbase.cpp \
-       src/actions/rs_actionselectcontour.cpp \
-       src/actions/rs_actionselectintersected.cpp \
-       src/actions/rs_actionselectinvert.cpp \
-       src/actions/rs_actionselectsingle.cpp \
-       src/actions/rs_actionselectwindow.cpp \
-       src/actions/rs_actionselectlayer.cpp \
-       src/actions/rs_actionsetrelativezero.cpp \
-       src/actions/rs_actionsetsnapmode.cpp \
-       src/actions/rs_actionsetsnaprestriction.cpp \
-       src/actions/rs_actionsnapintersectionmanual.cpp \
-       src/actions/rs_actiontoolregeneratedimensions.cpp \
-       src/actions/rs_actionzoomauto.cpp \
-       src/actions/rs_actionzoomautoy.cpp \
-       src/actions/rs_actionzoomin.cpp \
-       src/actions/rs_actionzoompan.cpp \
-       src/actions/rs_actionzoomprevious.cpp \
-       src/actions/rs_actionzoomredraw.cpp \
-       src/actions/rs_actionzoomscroll.cpp \
-       src/actions/rs_actionzoomwindow.cpp
+       src/actions/actionblocksadd.cpp \
+       src/actions/actionblocksattributes.cpp \
+       src/actions/actionblockscreate.cpp \
+       src/actions/actionblocksedit.cpp \
+       src/actions/actionblocksexplode.cpp \
+       src/actions/actionblocksinsert.cpp \
+       src/actions/actionblocksfreezeall.cpp \
+       src/actions/actionblocksremove.cpp \
+       src/actions/actionblockstoggleview.cpp \
+       src/actions/actiondefault.cpp \
+       src/actions/actiondimaligned.cpp \
+       src/actions/actiondimangular.cpp \
+       src/actions/actiondimdiametric.cpp \
+       src/actions/actiondimension.cpp \
+       src/actions/actiondimleader.cpp \
+       src/actions/actiondimlinear.cpp \
+       src/actions/actiondimradial.cpp \
+       src/actions/actiondrawarc.cpp \
+       src/actions/actiondrawarc3p.cpp \
+       src/actions/actiondrawarctangential.cpp \
+       src/actions/actiondrawcircle.cpp \
+       src/actions/actiondrawcircle2p.cpp \
+       src/actions/actiondrawcircle3p.cpp \
+       src/actions/actiondrawcirclecr.cpp \
+       src/actions/actiondrawellipseaxis.cpp \
+       src/actions/actiondrawhatch.cpp \
+       src/actions/actiondrawimage.cpp \
+       src/actions/actiondrawline.cpp \
+       src/actions/actiondrawlineangle.cpp \
+       src/actions/actiondrawlinebisector.cpp \
+       src/actions/actiondrawlinefree.cpp \
+       src/actions/actiondrawlinehorvert.cpp \
+       src/actions/actiondrawlineparallel.cpp \
+       src/actions/actiondrawlineparallelthrough.cpp \
+       src/actions/actiondrawlinepolygon.cpp \
+       src/actions/actiondrawlinepolygon2.cpp \
+       src/actions/actiondrawlinerectangle.cpp \
+       src/actions/actiondrawlinerelangle.cpp \
+       src/actions/actiondrawlinetangent1.cpp \
+       src/actions/actiondrawlinetangent2.cpp \
+       src/actions/actiondrawpoint.cpp \
+       src/actions/actiondrawspline.cpp \
+       src/actions/actiondrawtext.cpp \
+       src/actions/actioneditcopy.cpp \
+       src/actions/actioneditpaste.cpp \
+       src/actions/actioneditundo.cpp \
+       src/actions/actionfilenew.cpp \
+       src/actions/actionfileopen.cpp \
+       src/actions/actionfilesave.cpp \
+       src/actions/actionfilesaveas.cpp \
+       src/actions/actioninfoangle.cpp \
+       src/actions/actioninfoarea.cpp \
+       src/actions/actioninfoinside.cpp \
+       src/actions/actioninfodist.cpp \
+       src/actions/actioninfodist2.cpp \
+       src/actions/actioninfototallength.cpp \
+       src/actions/actionlayersadd.cpp \
+       src/actions/actionlayersedit.cpp \
+       src/actions/actionlayersfreezeall.cpp \
+       src/actions/actionlayersremove.cpp \
+       src/actions/actionlayerstogglelock.cpp \
+       src/actions/actionlayerstoggleview.cpp \
+       src/actions/actionlibraryinsert.cpp \
+       src/actions/actionlockrelativezero.cpp \
+       src/actions/actionmodifyattributes.cpp \
+       src/actions/actionmodifybevel.cpp \
+       src/actions/actionmodifycut.cpp \
+       src/actions/actionmodifydelete.cpp \
+       src/actions/actionmodifydeletefree.cpp \
+       src/actions/actionmodifydeletequick.cpp \
+       src/actions/actionmodifyentity.cpp \
+       src/actions/actionmodifymirror.cpp \
+       src/actions/actionmodifymove.cpp \
+       src/actions/actionmodifymoverotate.cpp \
+       src/actions/actionmodifyrotate.cpp \
+       src/actions/actionmodifyrotate2.cpp \
+       src/actions/actionmodifyround.cpp \
+       src/actions/actionmodifyscale.cpp \
+       src/actions/actionmodifystretch.cpp \
+       src/actions/actionmodifytrim.cpp \
+       src/actions/actionmodifytrimamount.cpp \
+       src/actions/actionmodifyexplodetext.cpp \
+       src/actions/actionoptionsdrawing.cpp \
+       src/actions/actionprintpreview.cpp \
+       src/actions/actionselect.cpp \
+       src/actions/actionselectall.cpp \
+       src/actions/actionselectbase.cpp \
+       src/actions/actionselectcontour.cpp \
+       src/actions/actionselectintersected.cpp \
+       src/actions/actionselectinvert.cpp \
+       src/actions/actionselectsingle.cpp \
+       src/actions/actionselectwindow.cpp \
+       src/actions/actionselectlayer.cpp \
+       src/actions/actionsetrelativezero.cpp \
+       src/actions/actionsetsnapmode.cpp \
+       src/actions/actionsetsnaprestriction.cpp \
+       src/actions/actionsnapintersectionmanual.cpp \
+       src/actions/actiontoolregeneratedimensions.cpp \
+       src/actions/actionzoomauto.cpp \
+       src/actions/actionzoomautoy.cpp \
+       src/actions/actionzoomin.cpp \
+       src/actions/actionzoompan.cpp \
+       src/actions/actionzoomprevious.cpp \
+       src/actions/actionzoomredraw.cpp \
+       src/actions/actionzoomscroll.cpp \
+       src/actions/actionzoomwindow.cpp
 
 HEADERS += \
        src/forms/arcoptions.h \
diff --git a/src/actions/actionblocksadd.cpp b/src/actions/actionblocksadd.cpp
new file mode 100644 (file)
index 0000000..c187c0e
--- /dev/null
@@ -0,0 +1,53 @@
+// actionblocksadd.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  07/12/2010  Added this text. :-)
+//
+
+#include "actionblocksadd.h"
+
+#include "drawing.h"
+#include "rs_dialogfactory.h"
+
+ActionBlocksAdd::ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Add Block", container, graphicView)
+{
+}
+
+ActionBlocksAdd::~ActionBlocksAdd()
+{
+}
+
+void ActionBlocksAdd::trigger()
+{
+       RS_DEBUG->print("adding block");
+
+       if (graphic)
+       {
+               RS_BlockList * blockList = graphic->getBlockList();
+
+               if (blockList)
+               {
+                       RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
+
+                       if (d.isValid())
+                               graphic->addBlock(new RS_Block(container, d));
+               }
+       }
+
+       finish();
+}
+
+void ActionBlocksAdd::init(int status)
+{
+       ActionInterface::init(status);
+       trigger();
+}
diff --git a/src/actions/actionblocksadd.h b/src/actions/actionblocksadd.h
new file mode 100644 (file)
index 0000000..491f469
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONBLOCKSADD_H__
+#define __ACTIONBLOCKSADD_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit blocks.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksAdd: public ActionInterface
+{
+       public:
+               ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksAdd();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSADD_H__
diff --git a/src/actions/actionblocksattributes.cpp b/src/actions/actionblocksattributes.cpp
new file mode 100644 (file)
index 0000000..7e6d09d
--- /dev/null
@@ -0,0 +1,63 @@
+// actionblocksattributes.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  07/12/2010  Added this text. :-)
+//
+
+#include "actionblocksattributes.h"
+
+#include "drawing.h"
+#include "rs_dialogfactory.h"
+
+ActionBlocksAttributes::ActionBlocksAttributes(
+       RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Edit Block Attributes", container, graphicView)
+{
+}
+
+ActionBlocksAttributes::~ActionBlocksAttributes()
+{
+}
+
+void ActionBlocksAttributes::trigger()
+{
+       RS_DEBUG->print("editing block attributes");
+
+       if (graphic && RS_DIALOGFACTORY)
+       {
+               RS_Block * block = graphic->getActiveBlock();
+               RS_BlockList * blockList = graphic->getBlockList();
+
+               if (blockList && block)
+               {
+                       QString oldName = block->getName();
+                       RS_BlockData d = RS_DIALOGFACTORY->requestBlockAttributesDialog(blockList);
+
+                       if (d.isValid())
+                       {
+                               QString newName = d.name;
+                               blockList->rename(block, newName);
+
+                               // update the name of all inserts:
+                               graphic->renameInserts(oldName, newName);
+                               graphic->addBlockNotification();
+                       }
+               }
+       }
+
+       finish();
+}
+
+void ActionBlocksAttributes::init(int status)
+{
+       ActionInterface::init(status);
+       trigger();
+}
diff --git a/src/actions/actionblocksattributes.h b/src/actions/actionblocksattributes.h
new file mode 100644 (file)
index 0000000..c825ad1
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONBLOCKSATTRIBUTES_H__
+#define __ACTIONBLOCKSATTRIBUTES_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit block attributes.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksAttributes: public ActionInterface
+{
+       public:
+               ActionBlocksAttributes(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksAttributes();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSATTRIBUTES_H__
similarity index 70%
rename from src/actions/rs_actionblockscreate.cpp
rename to src/actions/actionblockscreate.cpp
index 30e7a397c7abdfc82c94992e64ea174ff844329d..7b57aa7115324f89284fa4638e083fea38b19374 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionblockscreate.cpp
+// actionblockscreate.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -13,7 +13,7 @@
 // JLH  06/03/2010  Scrubbed out all occurances of RS_CoordinateEvent
 //
 
-#include "rs_actionblockscreate.h"
+#include "actionblockscreate.h"
 
 #include "rs_creation.h"
 #include "rs_dialogfactory.h"
 /**
  * Constructor.
  */
-RS_ActionBlocksCreate::RS_ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Blocks Create", container, graphicView)
+ActionBlocksCreate::ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Blocks Create", container, graphicView)
 {
        referencePoint = Vector(false);
 }
 
-RS_ActionBlocksCreate::~RS_ActionBlocksCreate()
+ActionBlocksCreate::~ActionBlocksCreate()
 {
 }
 
 #if 0
-QAction * RS_ActionBlocksCreate::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
+QAction * ActionBlocksCreate::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
 {
        QAction * action = new QAction(tr("&Create Block"), 0);
 //    QAction* action = new QAction(tr("Create Block"),
@@ -47,19 +47,19 @@ QAction * RS_ActionBlocksCreate::createGUIAction(RS2::ActionType /*type*/, QObje
 
 #endif
 
-/*virtual*/ RS2::ActionType RS_ActionBlocksCreate::rtti()
+/*virtual*/ RS2::ActionType ActionBlocksCreate::rtti()
 {
        return RS2::ActionBlocksCreate;
 }
 
-void RS_ActionBlocksCreate::init(int status)
+void ActionBlocksCreate::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionBlocksCreate::trigger()
+void ActionBlocksCreate::trigger()
 {
-       deleteSnapper();
+//     deleteSnapper();
        //deletePreview();
        //clearPreview();
 
@@ -91,9 +91,10 @@ void RS_ActionBlocksCreate::trigger()
        graphicView->killSelectActions();
 }
 
-void RS_ActionBlocksCreate::mouseMoveEvent(QMouseEvent * e)
+void ActionBlocksCreate::mouseMoveEvent(QMouseEvent * e)
 {
-       snapPoint(e);
+//     snapPoint(e);
+       graphicView->snapper.snapPoint(e);
 
        switch (getStatus())
        {
@@ -116,34 +117,29 @@ void RS_ActionBlocksCreate::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionBlocksCreate::mouseReleaseEvent(QMouseEvent * e)
+void ActionBlocksCreate::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (e->button() == Qt::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
 //             Vector ce(snapPoint(e));
-//             coordinateEvent(&ce);
-               Vector ce(snapPoint(e));
+               Vector ce(graphicView->snapper.snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (e->button() == Qt::RightButton)
        else if (e->button() == Qt::RightButton)
        {
-               deleteSnapper();
+//             deleteSnapper();
                init(getStatus() - 1);
        }
 }
 
-//void RS_ActionBlocksCreate::coordinateEvent(Vector * e)
-void RS_ActionBlocksCreate::coordinateEvent(Vector * e)
+void ActionBlocksCreate::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        switch (getStatus())
        {
        case SetReferencePoint:
-//             referencePoint = e->getCoordinate();
                referencePoint = *e;
                trigger();
                break;
@@ -153,7 +149,7 @@ void RS_ActionBlocksCreate::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionBlocksCreate::updateMouseButtonHints()
+void ActionBlocksCreate::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -167,12 +163,12 @@ void RS_ActionBlocksCreate::updateMouseButtonHints()
        }
 }
 
-void RS_ActionBlocksCreate::updateMouseCursor()
+void ActionBlocksCreate::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionBlocksCreate::updateToolBar()
+void ActionBlocksCreate::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
similarity index 61%
rename from src/actions/rs_actionblockscreate.h
rename to src/actions/actionblockscreate.h
index dacd03c2d541a133ad762ef4823761c2e02d0be0..27a462a3cc079dc3b197a9f00dab913d7e54e3b3 100644 (file)
@@ -1,15 +1,17 @@
-#ifndef RS_ACTIONBLOCKSCREATE_H
-#define RS_ACTIONBLOCKSCREATE_H
+#ifndef __ACTIONBLOCKSCREATE_H__
+#define __ACTIONBLOCKSCREATE_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
+#include "vector.h"
 
 /**
  * This action class can handle user events for creating blocks from
  * existing entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionBlocksCreate: public RS_PreviewActionInterface
+class ActionBlocksCreate: public ActionInterface
 {
        public:
                /**
@@ -21,8 +23,8 @@ class RS_ActionBlocksCreate: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksCreate();
+               ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksCreate();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -30,10 +32,6 @@ class RS_ActionBlocksCreate: public RS_PreviewActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               //virtual void commandEvent(RS_CommandEvent * e);
-               //virtual QStringList getAvailableCommands();
-               //virtual void showOptions();
-               //virtual void hideOptions();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
                virtual void updateToolBar();
@@ -42,4 +40,4 @@ class RS_ActionBlocksCreate: public RS_PreviewActionInterface
                Vector referencePoint;
 };
 
-#endif
+#endif // __ACTIONBLOCKSCREATE_H__
diff --git a/src/actions/actionblocksedit.cpp b/src/actions/actionblocksedit.cpp
new file mode 100644 (file)
index 0000000..548e4ce
--- /dev/null
@@ -0,0 +1,45 @@
+// actionblocksedit.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  07/12/2010  Added this text. :-)
+//
+
+#include "actionblocksedit.h"
+
+#include "drawing.h"
+#include "rs_dialogfactory.h"
+
+ActionBlocksEdit::ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Edit Block", container, graphicView)
+{
+}
+
+ActionBlocksEdit::~ActionBlocksEdit()
+{
+}
+
+void ActionBlocksEdit::trigger()
+{
+       RS_DEBUG->print("edit block");
+
+       if (graphic && RS_DIALOGFACTORY)
+               RS_DIALOGFACTORY->requestEditBlockWindow(graphic->getBlockList());
+       else
+               RS_DEBUG->print(RS_Debug::D_WARNING, "ActionBlocksEdit::trigger(): graphic is NULL");
+
+       finish();
+}
+
+void ActionBlocksEdit::init(int status)
+{
+       ActionInterface::init(status);
+       trigger();
+}
diff --git a/src/actions/actionblocksedit.h b/src/actions/actionblocksedit.h
new file mode 100644 (file)
index 0000000..eab3610
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONBLOCKSEDIT_H__
+#define __ACTIONBLOCKSEDIT_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit blocks.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksEdit: public ActionInterface
+{
+       public:
+               ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksEdit();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSEDIT_H__
diff --git a/src/actions/actionblocksexplode.cpp b/src/actions/actionblocksexplode.cpp
new file mode 100644 (file)
index 0000000..4024148
--- /dev/null
@@ -0,0 +1,48 @@
+// actionblocksexplode.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  07/12/2010  Added this text. :-)
+//
+
+#include "actionblocksexplode.h"
+
+#include "rs_modification.h"
+
+/**
+ * Constructor.
+ */
+ActionBlocksExplode::ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Blocks Explode", container, graphicView)
+{
+}
+
+ActionBlocksExplode::~ActionBlocksExplode()
+{
+}
+
+/*virtual*/ RS2::ActionType ActionBlocksExplode::rtti()
+{
+       return RS2::ActionBlocksExplode;
+}
+
+void ActionBlocksExplode::init(int status)
+{
+       ActionInterface::init(status);
+
+       trigger();
+       finish();
+}
+
+void ActionBlocksExplode::trigger()
+{
+       RS_Modification m(*container, graphicView);
+       m.explode();
+}
diff --git a/src/actions/actionblocksexplode.h b/src/actions/actionblocksexplode.h
new file mode 100644 (file)
index 0000000..f28603e
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __ACTIONBLOCKSEXPLODE_H__
+#define __ACTIONBLOCKSEXPLODE_H__
+
+#include "actioninterface.h"
+#include "rs_insert.h"
+
+/**
+ * This action class can handle user events for exploding blocks and
+ * other entity containers into single entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksExplode: public ActionInterface
+{
+       public:
+               ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksExplode();
+
+               virtual RS2::ActionType rtti();
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSEXPLODE_H__
similarity index 52%
rename from src/actions/rs_actionblocksfreezeall.cpp
rename to src/actions/actionblocksfreezeall.cpp
index ef5f7793e2693e8a97b2914dfdcc042da1ee5489..86321ee7ff3fd97085a7edbbf8bf5f41bf54621a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionblocksfreezeall.cpp
+// actionblocksfreezeall.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actionblocksfreezeall.h"
+#include "actionblocksfreezeall.h"
 
 #include "drawing.h"
 #include "graphicview.h"
 
-RS_ActionBlocksFreezeAll::RS_ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Freeze all Blocks",
-               container, graphicView)
+ActionBlocksFreezeAll::ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Freeze all Blocks", container, graphicView)
 {
        this->freeze = freeze;
 }
 
-RS_ActionBlocksFreezeAll::~RS_ActionBlocksFreezeAll()
+ActionBlocksFreezeAll::~ActionBlocksFreezeAll()
 {
 }
 
-void RS_ActionBlocksFreezeAll::trigger()
+void ActionBlocksFreezeAll::trigger()
 {
-       RS_DEBUG->print("RS_ActionBlocksFreezeAll::trigger");
+       RS_DEBUG->print("ActionBlocksFreezeAll::trigger");
 
-       if (graphic != NULL)
+       if (graphic)
                graphic->freezeAllBlocks(freeze);
 
        graphicView->redraw();
        finish();
 }
 
-void RS_ActionBlocksFreezeAll::init(int status)
+void ActionBlocksFreezeAll::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionblocksfreezeall.h b/src/actions/actionblocksfreezeall.h
new file mode 100644 (file)
index 0000000..31c359a
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __ACTIONBLOCKSFREEZEALL_H__
+#define __ACTIONBLOCKSFREEZEALL_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksFreezeAll: public ActionInterface
+{
+       public:
+               ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksFreezeAll();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       private:
+               bool freeze;
+};
+
+#endif // __ACTIONBLOCKSFREEZEALL_H__
similarity index 65%
rename from src/actions/rs_actionblocksinsert.cpp
rename to src/actions/actionblocksinsert.cpp
index 8e70dfba8bb5c036865feab7132fee7b6e134ff7..4f2ccc9592f9c3d60a81605a079c9889662ff7e3 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionblocksinsert.cpp
+// actionblocksinsert.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -13,7 +13,7 @@
 // JLH  06/03/2010  Scrubbed out all occurances of RS_CoordinateEvent
 //
 
-#include "rs_actionblocksinsert.h"
+#include "actionblocksinsert.h"
 
 #include "commands.h"
 #include "rs_commandevent.h"
 /**
  * Constructor.
  */
-RS_ActionBlocksInsert::RS_ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Blocks Insert",
-               container, graphicView)
+ActionBlocksInsert::ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Blocks Insert", container, graphicView)
 {
 }
 
-RS_ActionBlocksInsert::~RS_ActionBlocksInsert()
+ActionBlocksInsert::~ActionBlocksInsert()
 {
 }
 
-#if 0
-QAction * RS_ActionBlocksInsert::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
-{
-       QAction * action = new QAction(tr("&Insert Block"), 0);
-//    QAction* action = new QAction(tr("Insert Block"), tr("&Insert Block"),
-//                                  QKeySequence(), NULL);
-       action->setStatusTip(tr("Insert Block"));
-
-       return action;
-}
-
-#endif
-
-/*virtual*/ RS2::ActionType RS_ActionBlocksInsert::rtti()
+/*virtual*/ RS2::ActionType ActionBlocksInsert::rtti()
 {
        return RS2::ActionBlocksInsert;
 }
 
-void RS_ActionBlocksInsert::init(int status /*= 0*/)
+void ActionBlocksInsert::init(int status /*= 0*/)
 {
-       RS_PreviewActionInterface::init(status);
-
+       ActionInterface::init(status);
        reset();
 
-       if (graphic != NULL)
+       if (graphic)
        {
                block = graphic->getActiveBlock();
 
-               if (block != NULL)
+               if (block)
                        data.name = block->getName();
                else
                        finish();
        }
 }
 
-void RS_ActionBlocksInsert::reset()
+void ActionBlocksInsert::reset()
 {
-       data = RS_InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0,
-                       1, 1, Vector(1.0, 1.0), NULL, RS2::Update);
+       data = RS_InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1,
+               Vector(1.0, 1.0), NULL, RS2::Update);
 }
 
-void RS_ActionBlocksInsert::trigger()
+void ActionBlocksInsert::trigger()
 {
-       deleteSnapper();
-       deletePreview();
-       clearPreview();
+//     deleteSnapper();
+//     deletePreview();
+//     clearPreview();
 
        //RS_Modification m(*container, graphicView);
        //m.paste(data.insertionPoint);
        //std::cout << *RS_Clipboard::instance();
 
-       if (block != NULL)
+       if (block)
        {
                RS_Creation creation(container, graphicView);
                data.updateMode = RS2::Update;
@@ -93,27 +79,28 @@ void RS_ActionBlocksInsert::trigger()
        }
 
        graphicView->redraw();
-       //finish();
 }
 
-void RS_ActionBlocksInsert::mouseMoveEvent(QMouseEvent * e)
+void ActionBlocksInsert::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
        case SetTargetPoint:
-               data.insertionPoint = snapPoint(e);
+//             data.insertionPoint = snapPoint(e);
+               data.insertionPoint = graphicView->snapper.snapPoint(e);
 
                if (block != NULL)
                {
-                       deletePreview();
-                       clearPreview();
+//                     deletePreview();
+//                     clearPreview();
                        //preview->addAllFrom(*block);
                        //preview->move(data.insertionPoint);
-                       RS_Creation creation(preview, NULL, false);
+//                     RS_Creation creation(preview, NULL, false);
+                       RS_Creation creation(&(graphicView->preview), NULL, false);
                        // Create insert as preview only
                        data.updateMode = RS2::PreviewUpdate;
                        creation.createInsert(data);
-                       drawPreview();
+//                     drawPreview();
                }
                break;
 
@@ -122,33 +109,31 @@ void RS_ActionBlocksInsert::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionBlocksInsert::mouseReleaseEvent(QMouseEvent * e)
+void ActionBlocksInsert::mouseReleaseEvent(QMouseEvent * e)
 {
-//    if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
-               Vector ce(snapPoint(e));
+//             Vector ce(snapPoint(e));
+               Vector ce(graphicView->snapper.snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
-               deleteSnapper();
+//             deleteSnapper();
                init(getStatus() - 1);
        }
 }
 
-void RS_ActionBlocksInsert::coordinateEvent(Vector * e)
+void ActionBlocksInsert::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
-//     data.insertionPoint = e->getCoordinate();
        data.insertionPoint = *e;
        trigger();
 }
 
-void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
+void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -165,49 +150,49 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
 
                if (checkCommand("angle", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetAngle);
                }
                else if (checkCommand("factor", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetFactor);
                }
                else if (checkCommand("columns", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetColumns);
                }
                else if (checkCommand("rows", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetRows);
                }
                else if (checkCommand("columnspacing", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetColumnSpacing);
                }
                else if (checkCommand("rowspacing", c))
                {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        lastStatus = (Status)getStatus();
                        setStatus(SetRowSpacing);
                }
@@ -218,10 +203,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                double a = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.angle = RS_Math::deg2rad(a);
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -232,10 +218,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                double f = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        setFactor(f);
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -246,10 +233,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                int cols = (int)RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.cols = cols;
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -260,10 +248,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                int rows = (int)RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.rows = rows;
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -274,10 +263,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                double cs = (int)RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.spacing.x = cs;
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -288,10 +278,11 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
                bool ok;
                int rs = (int)RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.spacing.y = rs;
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -302,7 +293,7 @@ void RS_ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionBlocksInsert::getAvailableCommands()
+QStringList ActionBlocksInsert::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -324,19 +315,19 @@ QStringList RS_ActionBlocksInsert::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionBlocksInsert::showOptions()
+void ActionBlocksInsert::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionBlocksInsert::hideOptions()
+void ActionBlocksInsert::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionBlocksInsert::updateMouseButtonHints()
+void ActionBlocksInsert::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -374,12 +365,12 @@ void RS_ActionBlocksInsert::updateMouseButtonHints()
        }
 }
 
-void RS_ActionBlocksInsert::updateMouseCursor()
+void ActionBlocksInsert::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionBlocksInsert::updateToolBar()
+void ActionBlocksInsert::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -387,63 +378,62 @@ void RS_ActionBlocksInsert::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
-double RS_ActionBlocksInsert::getAngle()
+double ActionBlocksInsert::getAngle()
 {
        return data.angle;
 }
 
-void RS_ActionBlocksInsert::setAngle(double a)
+void ActionBlocksInsert::setAngle(double a)
 {
        data.angle = a;
 }
 
-double RS_ActionBlocksInsert::getFactor()
+double ActionBlocksInsert::getFactor()
 {
        return data.scaleFactor.x;
 }
 
-void RS_ActionBlocksInsert::setFactor(double f)
+void ActionBlocksInsert::setFactor(double f)
 {
        data.scaleFactor = Vector(f, f);
 }
 
-int RS_ActionBlocksInsert::getColumns()
+int ActionBlocksInsert::getColumns()
 {
        return data.cols;
 }
 
-void RS_ActionBlocksInsert::setColumns(int c)
+void ActionBlocksInsert::setColumns(int c)
 {
        data.cols = c;
 }
 
-int RS_ActionBlocksInsert::getRows()
+int ActionBlocksInsert::getRows()
 {
        return data.rows;
 }
 
-void RS_ActionBlocksInsert::setRows(int r)
+void ActionBlocksInsert::setRows(int r)
 {
        data.rows = r;
 }
 
-double RS_ActionBlocksInsert::getColumnSpacing()
+double ActionBlocksInsert::getColumnSpacing()
 {
        return data.spacing.x;
 }
 
-void RS_ActionBlocksInsert::setColumnSpacing(double cs)
+void ActionBlocksInsert::setColumnSpacing(double cs)
 {
        data.spacing.x = cs;
 }
 
-double RS_ActionBlocksInsert::getRowSpacing()
+double ActionBlocksInsert::getRowSpacing()
 {
        return data.spacing.y;
 }
 
-void RS_ActionBlocksInsert::setRowSpacing(double rs)
+void ActionBlocksInsert::setRowSpacing(double rs)
 {
        data.spacing.y = rs;
 }
-
similarity index 84%
rename from src/actions/rs_actionblocksinsert.h
rename to src/actions/actionblocksinsert.h
index 7e3fb94967d0511762ae07de89e76baff3c45b93..1bdf49d0cf99ba93403fea707d3c40ec7ed9c3ed 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONBLOCKSINSERT_H
-#define RS_ACTIONBLOCKSINSERT_H
+#ifndef __ACTIONBLOCKSINSERT_H__
+#define __ACTIONBLOCKSINSERT_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_insert.h"
 
 /**
  * This action class can handle user events for inserting blocks into the
  * current drawing.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionBlocksInsert: public RS_PreviewActionInterface
+class ActionBlocksInsert: public ActionInterface
 {
        public:
                /**
@@ -27,8 +28,8 @@ class RS_ActionBlocksInsert: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksInsert();
+               ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksInsert();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -66,4 +67,4 @@ class RS_ActionBlocksInsert: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONBLOCKSINSERT_H__
similarity index 64%
rename from src/actions/rs_actionblocksremove.cpp
rename to src/actions/actionblocksremove.cpp
index f1aa15b5d71f11d31b92ca2f7e5c76fac0437737..9e9ffc2432c1aeaf1103e488000f38311aa08d2c 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionblocksremove.cpp
+// actionblocksremove.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actionblocksremove.h"
+#include "actionblocksremove.h"
 
 #include "rs_block.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_insert.h"
 
-RS_ActionBlocksRemove::RS_ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Remove Block", container, graphicView)
+ActionBlocksRemove::ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Remove Block", container, graphicView)
 {
 }
 
-RS_ActionBlocksRemove::~RS_ActionBlocksRemove()
+ActionBlocksRemove::~ActionBlocksRemove()
 {
 }
 
-void RS_ActionBlocksRemove::trigger()
+void ActionBlocksRemove::trigger()
 {
-       RS_DEBUG->print("RS_ActionBlocksRemove::trigger");
+       RS_DEBUG->print("ActionBlocksRemove::trigger");
 
-       if (graphic != NULL)
+       if (graphic)
        {
                RS_Block * block = RS_DIALOGFACTORY->requestBlockRemovalDialog(graphic->getBlockList());
 
                // list of containers that might refer to the block via inserts:
-//        Q3PtrList<RS_EntityContainer> containerList;
                QList<RS_EntityContainer *> containerList;
                containerList.append(graphic);
                RS_BlockList * blkLst = graphic->getBlockList();
 
-               for (uint bi = 0; bi < blkLst->count(); bi++)
+               for(uint bi=0; bi<blkLst->count(); bi++)
                        containerList.append(blkLst->at(bi));
 
-               if (block != NULL)
+               if (block)
                {
-//                     for (RS_EntityContainer * cont=containerList.first(); cont!=NULL;
-//                             cont=containerList.next())
-                       for (int i = 0; i < containerList.size(); i++)
+                       for(int i=0; i<containerList.size(); i++)
                        {
                                RS_EntityContainer * cont = containerList[i];
                                // remove all inserts from the graphic:
@@ -60,8 +57,9 @@ void RS_ActionBlocksRemove::trigger()
                                {
                                        done = true;
 
-                                       for (RS_Entity * e = cont->firstEntity(RS2::ResolveNone); e != NULL;
-                                            e = cont->nextEntity(RS2::ResolveNone))
+                                       for(RS_Entity * e=cont->firstEntity(RS2::ResolveNone); e!=NULL;
+                                            e=cont->nextEntity(RS2::ResolveNone))
+                                       {
                                                if (e->rtti() == RS2::EntityInsert)
                                                {
                                                        RS_Insert * ins = (RS_Insert *)e;
@@ -73,12 +71,13 @@ void RS_ActionBlocksRemove::trigger()
                                                                break;
                                                        }
                                                }
+                                       }
                                }
                                while (!done);
                        }
 
                        // close all windows that are editing this block:
-                       if (RS_DIALOGFACTORY != NULL)
+                       if (RS_DIALOGFACTORY)
                                RS_DIALOGFACTORY->closeEditBlockWindow(block);
 
                        // Now remove the block from the block list:
@@ -92,9 +91,8 @@ void RS_ActionBlocksRemove::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionBlocksRemove::init(int status)
+void ActionBlocksRemove::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionblocksremove.h b/src/actions/actionblocksremove.h
new file mode 100644 (file)
index 0000000..85c9267
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONBLOCKSREMOVE_H__
+#define __ACTIONBLOCKSREMOVE_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to remove blocks.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksRemove: public ActionInterface
+{
+       public:
+               ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksRemove();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSREMOVE_H__
similarity index 57%
rename from src/actions/rs_actionblockstoggleview.cpp
rename to src/actions/actionblockstoggleview.cpp
index 3b8c84d459dfdfc06e4c23a2430cd281ef4acffc..75087d151f734039fc2dc49a398100b1cd20150e 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionblockstoggleview.cpp
+// actionblockstoggleview.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actionblockstoggleview.h"
+#include "actionblockstoggleview.h"
 
 #include "drawing.h"
 #include "graphicview.h"
 
-RS_ActionBlocksToggleView::RS_ActionBlocksToggleView(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Toggle Block Visibility",
-               container, graphicView)
+ActionBlocksToggleView::ActionBlocksToggleView(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Toggle Block Visibility",
+       container, graphicView)
 {
 }
 
-RS_ActionBlocksToggleView::~RS_ActionBlocksToggleView()
+ActionBlocksToggleView::~ActionBlocksToggleView()
 {
 }
 
-void RS_ActionBlocksToggleView::trigger()
+void ActionBlocksToggleView::trigger()
 {
        RS_DEBUG->print("toggle block");
 
-       if (graphic != NULL)
+       if (graphic)
        {
                RS_Block * block = graphic->getActiveBlock();
                graphic->toggleBlock(block);
@@ -40,9 +41,8 @@ void RS_ActionBlocksToggleView::trigger()
        finish();
 }
 
-void RS_ActionBlocksToggleView::init(int status)
+void ActionBlocksToggleView::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionblockstoggleview.h b/src/actions/actionblockstoggleview.h
new file mode 100644 (file)
index 0000000..b890342
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONBLOCKSTOGGLEVIEW_H__
+#define __ACTIONBLOCKSTOGGLEVIEW_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionBlocksToggleView: public ActionInterface
+{
+       public:
+               ActionBlocksToggleView(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionBlocksToggleView();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONBLOCKSTOGGLEVIEW_H__
similarity index 55%
rename from src/actions/rs_actiondefault.cpp
rename to src/actions/actiondefault.cpp
index e49edd8f877c09da642442a17cedaf8789d34b4b..4385c7c0dd9f775551ff4613dbbe9e612ece7b03 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondefault.cpp
+// actiondefault.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondefault.h"
+#include "actiondefault.h"
 
 #include "rs.h"
 #include "rs_commandevent.h"
 /**
  * Constructor.
  */
-RS_ActionDefault::RS_ActionDefault(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Default",
-               container, graphicView)
+ActionDefault::ActionDefault(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Default",
+       container, graphicView)
 {
-       RS_DEBUG->print("RS_ActionDefault::RS_ActionDefault");
-       RS_DEBUG->print("RS_ActionDefault::RS_ActionDefault: OK");
+       RS_DEBUG->print("ActionDefault::ActionDefault");
+       RS_DEBUG->print("ActionDefault::ActionDefault: OK");
 }
 
-RS_ActionDefault::~RS_ActionDefault()
+ActionDefault::~ActionDefault()
 {
 }
 
-void RS_ActionDefault::init(int status)
+/*virtual*/ RS2::ActionType ActionDefault::rtti()
 {
-       RS_DEBUG->print("RS_ActionDefault::init");
+       return RS2::ActionDefault;
+}
+
+void ActionDefault::init(int status /*= 0*/)
+{
+       RS_DEBUG->print("ActionDefault::init");
 
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        v1 = v2 = Vector(false);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+//     snapMode = RS2::SnapFree;
+//     snapRes = RS2::RestrictNothing;
        restrBak = RS2::RestrictNothing;
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 
-       RS_DEBUG->print("RS_ActionDefault::init: OK");
+       RS_DEBUG->print("ActionDefault::init: OK");
 }
 
-void RS_ActionDefault::trigger()
+void ActionDefault::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 }
 
-void RS_ActionDefault::keyPressEvent(QKeyEvent * e)
+void ActionDefault::keyPressEvent(QKeyEvent * e)
 {
        if (e->key() == Qt::Key_Shift)
        {
-               restrBak = snapRes;
-               setSnapRestriction(RS2::RestrictOrthogonal);
+//             restrBak = snapRes;
+//             setSnapRestriction(RS2::RestrictOrthogonal);
        }
 }
 
-void RS_ActionDefault::keyReleaseEvent(QKeyEvent * e)
+void ActionDefault::keyReleaseEvent(QKeyEvent * e)
 {
-       if (e->key() == Qt::Key_Shift)
-               setSnapRestriction(restrBak);
+//     if (e->key() == Qt::Key_Shift)
+//             setSnapRestriction(restrBak);
 }
 
-void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
+void ActionDefault::mouseMoveEvent(QMouseEvent * e)
 {
        Vector mouse = graphicView->toGraph(Vector(e->x(), e->y()));
        Vector relMouse = mouse - graphicView->getRelativeZero();
@@ -81,7 +87,6 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
        switch (getStatus())
        {
        case Dragging:
-               //v2 = graphicView->toGraph(e->x(), e->y());
                v2 = mouse;
 
                if (graphicView->toGuiDX(v1.distanceTo(v2)) > 10)
@@ -90,9 +95,9 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
                        double dist;
                        Vector ref = container->getNearestSelectedRef(v1, &dist);
 
-                       if (ref.valid == true && graphicView->toGuiDX(dist) < 8)
+                       if (ref.valid && graphicView->toGuiDX(dist) < 8)
                        {
-                               RS_DEBUG->print("RS_ActionDefault::mouseMoveEvent: "
+                               RS_DEBUG->print("ActionDefault::mouseMoveEvent: "
                                        "moving reference point");
                                setStatus(MovingRef);
                                v1 = ref;
@@ -101,11 +106,11 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
                        else
                        {
                                // test for an entity to drag:
-                               RS_Entity * en = catchEntity(v1);
+                               RS_Entity * en = graphicView->snapper.catchEntity(v1);
 
-                               if (en != NULL && en->isSelected())
+                               if (en && en->isSelected())
                                {
-                                       RS_DEBUG->print("RS_ActionDefault::mouseMoveEvent: "
+                                       RS_DEBUG->print("ActionDefault::mouseMoveEvent: "
                                                "moving entity");
                                        setStatus(Moving);
                                        v1 = en->getNearestRef(v1);
@@ -116,48 +121,46 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
                                        setStatus(SetCorner2);
                        }
                }
+
                break;
 
        case MovingRef:
                v2 = snapPoint(e);
 
-               deletePreview();
-               clearPreview();
-               preview->addSelectionFrom(*container);
-               preview->moveRef(v1, v2 - v1);
-               drawPreview();
+//             deletePreview();
+//             clearPreview();
+//             preview->addSelectionFrom(*container);
+//             preview->moveRef(v1, v2 - v1);
+//             drawPreview();
                break;
 
        case Moving:
                v2 = snapPoint(e);
 
-               deletePreview();
-               clearPreview();
-               preview->addSelectionFrom(*container);
-               preview->move(v2 - v1);
-               drawPreview();
+//             deletePreview();
+//             clearPreview();
+//             preview->addSelectionFrom(*container);
+//             preview->move(v2 - v1);
+//             drawPreview();
                break;
 
        case SetCorner2:
-
                if (v1.valid)
                {
-                       //v2 = snapPoint(e);
                        v2 = mouse;
 
-                       //deleteSnapper();
-                       deletePreview();
-                       clearPreview();
-
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
-                       drawPreview();
+//                     deletePreview();
+//                     clearPreview();
+
+//                     preview->addEntity(new RS_Line(preview,
+//                             RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+//                     preview->addEntity(new RS_Line(preview,
+//                             RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+//                     preview->addEntity(new RS_Line(preview,
+//                             RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+//                     preview->addEntity(new RS_Line(preview,
+//                             RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
+//                     drawPreview();
                }
 
        default:
@@ -165,7 +168,7 @@ void RS_ActionDefault::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDefault::mousePressEvent(QMouseEvent * e)
+void ActionDefault::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -179,9 +182,9 @@ void RS_ActionDefault::mousePressEvent(QMouseEvent * e)
                case Moving:
                {
                        v2 = snapPoint(e);
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        RS_Modification m(*container, graphicView);
                        RS_MoveData data;
                        data.number = 0;
@@ -198,15 +201,14 @@ void RS_ActionDefault::mousePressEvent(QMouseEvent * e)
                case MovingRef:
                {
                        v2 = snapPoint(e);
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
                        RS_Modification m(*container, graphicView);
                        RS_MoveRefData data;
                        data.ref = v1;
                        data.offset = v2 - v1;
                        m.moveRef(data);
-                       //container->moveSelectedRef(v1, v2-v2);
                        setStatus(Neutral);
                        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
@@ -219,9 +221,9 @@ void RS_ActionDefault::mousePressEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
+void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDefault::mouseReleaseEvent()");
+       RS_DEBUG->print("ActionDefault::mouseReleaseEvent()");
 
        if (e->button() == Qt::LeftButton)
        {
@@ -232,20 +234,19 @@ void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
                case Dragging:
                {
                        // select single entity:
-                       RS_Entity * en = catchEntity(e);
+                       RS_Entity * en = graphicView->snapper.catchEntity(e);
 
-                       if (en != NULL)
+                       if (en)
                        {
-                               deleteSnapper();
-                               deletePreview();
-                               clearPreview();
+//                             deleteSnapper();
+//                             deletePreview();
+//                             clearPreview();
 
                                RS_Selection s(*container, graphicView);
                                s.selectSingle(en);
 
                                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 
-                               //deleteSnapper();
                                e->accept();
                                setStatus(Neutral);
                        }
@@ -256,14 +257,12 @@ void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 
                case SetCorner2:
                {
-                       //v2 = snapPoint(e);
                        v2 = graphicView->toGraph(e->x(), e->y());
 
                        // select window:
-                       //if (graphicView->toGuiDX(v1.distanceTo(v2))>20) {
-                       deleteSnapper();
-                       deletePreview();
-                       clearPreview();
+//                     deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
 
                        bool cross = (v2.y > v1.y);
                        RS_Selection s(*container, graphicView);
@@ -273,7 +272,6 @@ void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 
                        setStatus(Neutral);
                        e->accept();
-                       //}
                }
                break;
 
@@ -288,16 +286,17 @@ void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
                case SetCorner2:
                case Moving:
                case MovingRef:
-                       deletePreview();
-                       clearPreview();
-                       deleteSnapper();
+//                     deletePreview();
+//                     clearPreview();
+//                     deleteSnapper();
                        setStatus(Neutral);
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                        e->accept();
                        break;
 
                default:
-                       deleteSnapper();
+                       graphicView->snapper.SetVisible(false);
+                       graphicView->preview.SetVisible(false);
                        RS_DIALOGFACTORY->requestPreviousMenu();
                        e->accept();
                        break;
@@ -305,33 +304,19 @@ void RS_ActionDefault::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDefault::commandEvent(RS_CommandEvent * e)
+void ActionDefault::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
-
-       // if the current action can't deal with the command,
-       //   it might be intended to launch a new command
-       //if (!e.isAccepted()) {
-       // command for new action:
-       //RS2::ActionType type = RS_COMMANDS->cmdToAction(c);
-       //if (type!=RS2::ActionNone) {
-       //graphicView->setCurrentAction(type);
-       //return true;
-       //}
-       //}
 }
 
-QStringList RS_ActionDefault::getAvailableCommands()
+QStringList ActionDefault::getAvailableCommands()
 {
        QStringList cmd;
 
-       //cmd += "line";
-       //cmd += "rectangle";
-
        return cmd;
 }
 
-void RS_ActionDefault::updateMouseButtonHints()
+void ActionDefault::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -340,7 +325,7 @@ void RS_ActionDefault::updateMouseButtonHints()
                break;
 
        case SetCorner2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Choose second edge"), tr("Back"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Drag to second point"), tr("Back"));
                break;
 
        default:
@@ -349,7 +334,7 @@ void RS_ActionDefault::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDefault::updateMouseCursor()
+void ActionDefault::updateMouseCursor()
 {
        switch (getStatus())
        {
@@ -367,14 +352,11 @@ void RS_ActionDefault::updateMouseCursor()
        }
 }
 
-void RS_ActionDefault::updateToolBar()
+void ActionDefault::updateToolBar()
 {
-       //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        switch (getStatus())
        {
        case Neutral:
-               // would switch back to main in edit / measure / .. modes
-               //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                break;
 
        case Moving:
@@ -386,4 +368,3 @@ void RS_ActionDefault::updateToolBar()
                break;
        }
 }
-
similarity index 72%
rename from src/actions/rs_actiondefault.h
rename to src/actions/actiondefault.h
index a3290986ceabb48876f81b04307c71ebcad98d35..c02bfe09a60598ca8dd2ff69f9c71e93f2515c44 100644 (file)
@@ -1,17 +1,17 @@
-#ifndef RS_ACTIONSELECTWINDOW_H
-#define RS_ACTIONSELECTWINDOW_H
+#ifndef __ACTIONDEFAULT_H__
+#define __ACTIONDEFAULT_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to select all entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDefault: public RS_PreviewActionInterface
+class ActionDefault: public ActionInterface
 {
-       //Q_OBJECT
        public:
                /**
                 * Action States.
@@ -27,30 +27,19 @@ class RS_ActionDefault: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDefault(RS_EntityContainer & container, GraphicView & graphicView);
-               virtual ~RS_ActionDefault();
-
-               static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
-
-               virtual RS2::ActionType rtti()
-               {
-                       return RS2::ActionDefault;
-               }
+               ActionDefault(RS_EntityContainer & container, GraphicView & graphicView);
+               virtual ~ActionDefault();
 
+               virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
-
                virtual void trigger();
-
                virtual void keyPressEvent(QKeyEvent * e);
                virtual void keyReleaseEvent(QKeyEvent * e);
-
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mousePressEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-
                virtual void commandEvent(RS_CommandEvent * e);
                virtual QStringList getAvailableCommands();
-
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
                virtual void updateToolBar();
@@ -61,4 +50,4 @@ class RS_ActionDefault: public RS_PreviewActionInterface
                RS2::SnapRestriction restrBak;
 };
 
-#endif
+#endif // __ACTIONDEFAULT_H__
similarity index 76%
rename from src/actions/rs_actiondimaligned.cpp
rename to src/actions/actiondimaligned.cpp
index 02be819c23e0b10621900138cb5ed20a91ba597e..464d63a803ed8b9ad4e740c310626d349070949a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimaligned.cpp
+// actiondimaligned.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimaligned.h"
+#include "actiondimaligned.h"
 
 #include "rs_commandevent.h"
 #include "rs_constructionline.h"
 #include "rs_preview.h"
 #include "rs_snapper.h"
 
-RS_ActionDimAligned::RS_ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw aligned dimensions",
+ActionDimAligned::ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimAligned::~RS_ActionDimAligned()
+ActionDimAligned::~ActionDimAligned()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimAligned::rtti()
+/*virtual*/ RS2::ActionType ActionDimAligned::rtti()
 {
        return RS2::ActionDimAligned;
 }
 
-void RS_ActionDimAligned::reset()
+void ActionDimAligned::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
        edata = RS_DimAlignedData(Vector(false), Vector(false));
        lastStatus = SetExtPoint1;
 
@@ -46,9 +46,9 @@ void RS_ActionDimAligned::reset()
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimAligned::trigger()
+void ActionDimAligned::trigger()
 {
-       RS_ActionDimension::trigger();
+       ActionDimension::trigger();
        preparePreview();
        graphicView->moveRelativeZero(data.definitionPoint);
 
@@ -74,21 +74,21 @@ void RS_ActionDimAligned::trigger()
        graphicView->moveRelativeZero(rz);
        drawSnapper();
 
-       RS_DEBUG->print("RS_ActionDimAligned::trigger(): dim added: %d", dim->getId());
+       RS_DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
 }
 
-void RS_ActionDimAligned::preparePreview()
+void ActionDimAligned::preparePreview()
 {
        Vector dirV;
        dirV.setPolar(100.0, edata.extensionPoint1.angleTo(edata.extensionPoint2) + M_PI / 2.0);
        RS_ConstructionLine cl(NULL, RS_ConstructionLineData(edata.extensionPoint2,
-                       edata.extensionPoint2 + dirV));
+               edata.extensionPoint2 + dirV));
        data.definitionPoint = cl.getNearestPointOnEntity(data.definitionPoint);
 }
 
-void RS_ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
+void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimAligned::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -102,8 +102,7 @@ void RS_ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(edata.extensionPoint1, mouse)));
+//                     preview->addEntity(new RS_Line(preview, RS_LineData(edata.extensionPoint1, mouse)));
                        drawPreview();
                }
                break;
@@ -119,9 +118,9 @@ void RS_ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                        preparePreview();
 
                        //data.text = getText();
-                       RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
-                       dim->update();
-                       preview->addEntity(dim);
+//                     RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
+//                     dim->update();
+//                     preview->addEntity(dim);
                        drawPreview();
                }
                break;
@@ -130,10 +129,10 @@ void RS_ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimAligned::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent end");
 }
 
-void RS_ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
 {
 //     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
@@ -150,7 +149,7 @@ void RS_ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimAligned::coordinateEvent(Vector * e)
+void ActionDimAligned::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -183,7 +182,7 @@ void RS_ActionDimAligned::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimAligned::commandEvent(RS_CommandEvent * e)
+void ActionDimAligned::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -220,7 +219,7 @@ void RS_ActionDimAligned::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimAligned::getAvailableCommands()
+QStringList ActionDimAligned::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -239,7 +238,7 @@ QStringList RS_ActionDimAligned::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimAligned::updateMouseButtonHints()
+void ActionDimAligned::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -268,17 +267,17 @@ void RS_ActionDimAligned::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDimAligned::hideOptions()
+void ActionDimAligned::hideOptions()
 {
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 
-       RS_ActionDimension::hideOptions();
+       ActionDimension::hideOptions();
 }
 
-void RS_ActionDimAligned::showOptions()
+void ActionDimAligned::showOptions()
 {
-       RS_ActionDimension::showOptions();
+       ActionDimension::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
similarity index 77%
rename from src/actions/rs_actiondimaligned.h
rename to src/actions/actiondimaligned.h
index b7bf152dbc1a886aa7373e8af115ddff5c865140..731aab1d61c3b4f5acdb122a8d5085625a66884e 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDIMALIGNED_H
-#define RS_ACTIONDIMALIGNED_H
+#ifndef __ACTIONDIMALIGNED_H__
+#define __ACTIONDIMALIGNED_H__
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 #include "rs_dimaligned.h"
 
 /**
  * This action class can handle user events to draw
  * aligned dimensions.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimAligned: public RS_ActionDimension
+class ActionDimAligned: public ActionDimension
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionDimAligned: public RS_ActionDimension
                };
 
        public:
-               RS_ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimAligned();
+               ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimAligned();
 
                virtual RS2::ActionType rtti();
                virtual void reset();
@@ -50,4 +51,4 @@ class RS_ActionDimAligned: public RS_ActionDimension
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDIMALIGNED_H__
similarity index 77%
rename from src/actions/rs_actiondimangular.cpp
rename to src/actions/actiondimangular.cpp
index 3442ad73702331508bb1896cc533bf7293dcdd6a..e41561d94e296be32d3e3c33a774171e1427cfea 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimangular.cpp
+// actiondimangular.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimangular.h"
+#include "actiondimangular.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_information.h"
 #include "rs_preview.h"
 
-RS_ActionDimAngular::RS_ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw Angular Dimensions",
+ActionDimAngular::ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimAngular::~RS_ActionDimAngular()
+ActionDimAngular::~ActionDimAngular()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimAngular::rtti()
+/*virtual*/ RS2::ActionType ActionDimAngular::rtti()
 {
        return RS2::ActionDimAngular;
 }
 
-void RS_ActionDimAngular::reset()
+void ActionDimAngular::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
        edata = RS_DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
        line1 = NULL;
        line2 = NULL;
@@ -45,9 +45,9 @@ void RS_ActionDimAngular::reset()
        RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimAngular::trigger()
+void ActionDimAngular::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (line1 != NULL && line2 != NULL)
        {
@@ -76,13 +76,13 @@ void RS_ActionDimAngular::trigger()
                graphicView->moveRelativeZero(rz);
        }
        else
-               RS_DEBUG->print("RS_ActionDimAngular::trigger:"
+               RS_DEBUG->print("ActionDimAngular::trigger:"
                        " Entity is NULL\n");
 }
 
-void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
+void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimAngular::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -96,18 +96,18 @@ void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
 
        case SetPos:
 
-               if (line1 != NULL && line2 != NULL && center.valid)
+               if (line1 && line2 && center.valid)
                {
                        Vector mouse = snapPoint(e);
                        edata.definitionPoint4 = mouse;
 
-                       RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
-                       d->update();
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(d);
-                       drawPreview();
+//                     RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
+//                     d->update();
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(d);
+//                     drawPreview();
                }
                break;
 
@@ -115,16 +115,17 @@ void RS_ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimAngular::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent end");
 }
 
-void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
                switch (getStatus())
                {
-               case SetLine1: {
+               case SetLine1:
+               {
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
@@ -136,7 +137,8 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
                }
                break;
 
-               case SetLine2: {
+               case SetLine2:
+               {
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
@@ -181,7 +183,8 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
                }
                break;
 
-               case SetPos: {
+               case SetPos:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
@@ -197,9 +200,9 @@ void RS_ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimAngular::coordinateEvent(Vector * e)
+void ActionDimAngular::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        switch (getStatus())
@@ -216,7 +219,7 @@ void RS_ActionDimAngular::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimAngular::commandEvent(RS_CommandEvent * e)
+void ActionDimAngular::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -246,7 +249,7 @@ void RS_ActionDimAngular::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimAngular::getAvailableCommands()
+QStringList ActionDimAngular::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -265,21 +268,21 @@ QStringList RS_ActionDimAngular::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimAngular::showOptions()
+void ActionDimAngular::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDimAngular::hideOptions()
+void ActionDimAngular::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDimAngular::updateMouseButtonHints()
+void ActionDimAngular::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -307,5 +310,3 @@ void RS_ActionDimAngular::updateMouseButtonHints()
                break;
        }
 }
-
-// EOF
similarity index 79%
rename from src/actions/rs_actiondimangular.h
rename to src/actions/actiondimangular.h
index 5f02dbaa8896cd6d7f996d362a1113e6e59b66bb..fa3643f87bc1466442e1ff1f2837a49049aa2d81 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONDIMANGULAR_H
-#define RS_ACTIONDIMANGULAR_H
+#ifndef __ACTIONDIMANGULAR_H__
+#define __ACTIONDIMANGULAR_H__
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 #include "rs_dimangular.h"
 #include "vector.h"
 
@@ -12,7 +12,7 @@ class RS_Line;
  *
  * @author Andrew Mustun
  */
-class RS_ActionDimAngular: public RS_ActionDimension
+class ActionDimAngular: public ActionDimension
 {
        private:
                enum Status {
@@ -23,8 +23,8 @@ class RS_ActionDimAngular: public RS_ActionDimension
                };
 
        public:
-               RS_ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimAngular();
+               ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimAngular();
 
                virtual RS2::ActionType rtti();
                virtual void reset();
@@ -51,4 +51,4 @@ class RS_ActionDimAngular: public RS_ActionDimension
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDIMANGULAR_H__
similarity index 76%
rename from src/actions/rs_actiondimdiametric.cpp
rename to src/actions/actiondimdiametric.cpp
index 80264c5439740745c36942a8352ee2f668886090..2403f9663fd6cbf4344651e6961950426ca48611 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimdiametric.cpp
+// actiondimdiametric.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimdiametric.h"
+#include "actiondimdiametric.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDimDiametric::RS_ActionDimDiametric(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw Diametric Dimensions",
-               container, graphicView)
+ActionDimDiametric::ActionDimDiametric(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionDimension("Draw Diametric Dimensions",
+       container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimDiametric::~RS_ActionDimDiametric()
+ActionDimDiametric::~ActionDimDiametric()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimDiametric::rtti()
+/*virtual*/ RS2::ActionType ActionDimDiametric::rtti()
 {
        return RS2::ActionDimDiametric;
 }
 
-void RS_ActionDimDiametric::reset()
+void ActionDimDiametric::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
        edata = RS_DimDiametricData(Vector(false), 0.0);
        entity = NULL;
        pos = Vector(false);
        RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimDiametric::trigger()
+void ActionDimDiametric::trigger()
 {
-       RS_PreviewActionInterface::trigger();
-
+       ActionInterface::trigger();
        preparePreview();
 
-       if (entity != NULL)
+       if (entity)
        {
                RS_DimDiametric * newEntity = NULL;
 
@@ -63,12 +63,13 @@ void RS_ActionDimDiametric::trigger()
                container->addEntity(newEntity);
 
                // upd. undo list:
-               if (document != NULL)
+               if (document)
                {
                        document->startUndoCycle();
                        document->addUndoable(newEntity);
                        document->endUndoCycle();
                }
+
                deleteSnapper();
                Vector rz = graphicView->getRelativeZero();
                graphicView->moveRelativeZero(Vector(0.0, 0.0));
@@ -76,13 +77,12 @@ void RS_ActionDimDiametric::trigger()
                graphicView->moveRelativeZero(rz);
        }
        else
-               RS_DEBUG->print("RS_ActionDimDiametric::trigger:"
-                       " Entity is NULL\n");
+               RS_DEBUG->print("ActionDimDiametric::trigger: Entity is NULL\n");
 }
 
-void RS_ActionDimDiametric::preparePreview()
+void ActionDimDiametric::preparePreview()
 {
-       if (entity != NULL)
+       if (entity)
        {
                double radius = 0.0;
                Vector center = Vector(false);
@@ -107,9 +107,9 @@ void RS_ActionDimDiametric::preparePreview()
        }
 }
 
-void RS_ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
+void ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimDiametric::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimDiametric::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -126,13 +126,13 @@ void RS_ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
                        pos = snapPoint(e);
 
                        preparePreview();
-                       RS_DimDiametric * d = new RS_DimDiametric(preview, data, edata);
-                       d->update();
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(d);
-                       drawPreview();
+//                     RS_DimDiametric * d = new RS_DimDiametric(preview, data, edata);
+//                     d->update();
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(d);
+//                     drawPreview();
                }
                break;
 
@@ -140,10 +140,10 @@ void RS_ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimDiametric::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimDiametric::mouseMoveEvent end");
 }
 
-void RS_ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -195,7 +195,7 @@ void RS_ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimDiametric::coordinateEvent(Vector * e)
+void ActionDimDiametric::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -214,7 +214,7 @@ void RS_ActionDimDiametric::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimDiametric::commandEvent(RS_CommandEvent * e)
+void ActionDimDiametric::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -263,7 +263,7 @@ void RS_ActionDimDiametric::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimDiametric::getAvailableCommands()
+QStringList ActionDimDiametric::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -281,7 +281,7 @@ QStringList RS_ActionDimDiametric::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimDiametric::updateMouseButtonHints()
+void ActionDimDiametric::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -305,19 +305,17 @@ void RS_ActionDimDiametric::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDimDiametric::showOptions()
+void ActionDimDiametric::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDimDiametric::hideOptions()
+void ActionDimDiametric::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        //RS_DIALOGFACTORY->requestDimDiametricOptions(edata, false);
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
-
-// EOF
similarity index 77%
rename from src/actions/rs_actiondimdiametric.h
rename to src/actions/actiondimdiametric.h
index e4b37c17d32c1c693aada48f1c8432d7ec413716..43859d17539bd866cf030d0e35d4f77e1ab8f81d 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONDIMDIAMETRIC_H
-#define RS_ACTIONDIMDIAMETRIC_H
+#ifndef __ACTIONDIMDIAMETRIC_H__
+#define __ACTIONDIMDIAMETRIC_H__
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 #include "rs_dimdiametric.h"
 #include "vector.h"
 
@@ -10,9 +10,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to draw diametric dimensions.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimDiametric: public RS_ActionDimension
+class ActionDimDiametric: public ActionDimension
 {
        private:
                enum Status {
@@ -22,8 +23,8 @@ class RS_ActionDimDiametric: public RS_ActionDimension
                };
 
        public:
-               RS_ActionDimDiametric(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimDiametric();
+               ActionDimDiametric(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimDiametric();
 
                virtual RS2::ActionType rtti();
                virtual void reset();
@@ -49,4 +50,4 @@ class RS_ActionDimDiametric: public RS_ActionDimension
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDIMDIAMETRIC_H__
similarity index 60%
rename from src/actions/rs_actiondimension.cpp
rename to src/actions/actiondimension.cpp
index 864b771065123aeeda2e805def4154259dfe87e5..d4d3c66aa5c72f48b567bd336a2b150fc73e41f9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimension.cpp
+// actiondimension.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionDimension::RS_ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface(name, container, graphicView)
+ActionDimension::ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface(name, container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimension::~RS_ActionDimension()
+ActionDimension::~ActionDimension()
 {
 }
 
-void RS_ActionDimension::reset()
+void ActionDimension::reset()
 {
        data = RS_DimensionData(Vector(false), Vector(false), RS2::VAlignMiddle,
                        RS2::HAlignCenter, RS2::Exact, 1.0, "", "Standard", 0.0);
        diameter = false;
 }
 
-void RS_ActionDimension::init(int status)
+void ActionDimension::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionDimension::hideOptions()
+void ActionDimension::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDimension::showOptions()
+void ActionDimension::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimension::updateMouseCursor()
+void ActionDimension::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDimension::updateToolBar()
+void ActionDimension::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -71,7 +71,7 @@ void RS_ActionDimension::updateToolBar()
        }
 }
 
-QString RS_ActionDimension::getText()
+QString ActionDimension::getText()
 {
        if (!data.text.isEmpty())
                return data.text;
@@ -90,52 +90,52 @@ QString RS_ActionDimension::getText()
        return l;
 }
 
-void RS_ActionDimension::setText(const QString & t)
+void ActionDimension::setText(const QString & t)
 {
        data.text = t;
 }
 
-QString RS_ActionDimension::getLabel()
+QString ActionDimension::getLabel()
 {
        return label;
 }
 
-void RS_ActionDimension::setLabel(const QString & t)
+void ActionDimension::setLabel(const QString & t)
 {
        label = t;
 }
 
-QString RS_ActionDimension::getTol1()
+QString ActionDimension::getTol1()
 {
        return tol1;
 }
 
-void RS_ActionDimension::setTol1(const QString & t)
+void ActionDimension::setTol1(const QString & t)
 {
        tol1 = t;
 }
 
-QString RS_ActionDimension::getTol2()
+QString ActionDimension::getTol2()
 {
        return tol2;
 }
 
-void RS_ActionDimension::setTol2(const QString & t)
+void ActionDimension::setTol2(const QString & t)
 {
        tol2 = t;
 }
 
-bool RS_ActionDimension::getDiameter()
+bool ActionDimension::getDiameter()
 {
        return diameter;
 }
 
-void RS_ActionDimension::setDiameter(bool d)
+void ActionDimension::setDiameter(bool d)
 {
        diameter = d;
 }
 
-/*static*/ bool RS_ActionDimension::isDimensionAction(RS2::ActionType type)
+/*static*/ bool ActionDimension::isDimensionAction(RS2::ActionType type)
 {
        return (type == RS2::ActionDimAligned
                || type == RS2::ActionDimLinear
similarity index 72%
rename from src/actions/rs_actiondimension.h
rename to src/actions/actiondimension.h
index 910bfc0a7a491ae5602b5aed26e5167ed54ddf9d..e8f3b9d1faa71a8412b99f44e3ccb95b7a4053b8 100644 (file)
@@ -1,20 +1,21 @@
-#ifndef RS_ACTIONDIMENSION_H
-#define RS_ACTIONDIMENSION_H
+#ifndef __ACTIONDIMENSION_H__
+#define __ACTIONDIMENSION_H__
 
 #include <QtCore>
 #include "rs_dimension.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * Base class for dimension actions.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimension: public RS_PreviewActionInterface
+class ActionDimension: public ActionInterface
 {
        public:
-               RS_ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimension();
+               ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimension();
 
                virtual void reset();
                virtual void init(int status = 0);
@@ -46,4 +47,4 @@ class RS_ActionDimension: public RS_PreviewActionInterface
                bool diameter;
 };
 
-#endif
+#endif // __ACTIONDIMENSION_H__
similarity index 67%
rename from src/actions/rs_actiondimleader.cpp
rename to src/actions/actiondimleader.cpp
index 31d2995557b451ae39faee5b8506189cadfff457..4f06589fe5d7de3f81db7ce5e8f363c676778016 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimleader.cpp
+// actiondimleader.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimleader.h"
+#include "actiondimleader.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDimLeader::RS_ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw leaders", container, graphicView)
+ActionDimLeader::ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw leaders", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimLeader::~RS_ActionDimLeader()
+ActionDimLeader::~ActionDimLeader()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimLeader::rtti()
+/*virtual*/ RS2::ActionType ActionDimLeader::rtti()
 {
        return RS2::ActionDimLeader;
 }
 
-void RS_ActionDimLeader::reset()
+void ActionDimLeader::reset()
 {
        //data = RS_LineData(Vector(false), Vector(false));
        //start = Vector(false);
@@ -42,16 +42,16 @@ void RS_ActionDimLeader::reset()
        points.clear();
 }
 
-void RS_ActionDimLeader::init(int status)
+void ActionDimLeader::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDimLeader::trigger()
+void ActionDimLeader::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (points.count() > 0)
        {
@@ -83,13 +83,13 @@ void RS_ActionDimLeader::trigger()
                graphicView->moveRelativeZero(rz);
                //drawSnapper();
 
-               RS_DEBUG->print("RS_ActionDimLeader::trigger(): leader added: %d", leader->getId());
+               RS_DEBUG->print("ActionDimLeader::trigger(): leader added: %d", leader->getId());
        }
 }
 
-void RS_ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
+void ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimLeader::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimLeader::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -101,26 +101,25 @@ void RS_ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
                // fill in lines that were already set:
                Vector last(false);
 
-//             for(Vector * v=points.first(); v!=NULL; v=points.next())
-               for (int i = 0; i < points.size(); i++)
+               for(int i=0; i<points.size(); i++)
                {
                        Vector * v = points[i];
 
-                       if (last.valid)
-                               preview->addEntity(new RS_Line(preview, RS_LineData(last, *v)));
+//                     if (last.valid)
+//                             preview->addEntity(new RS_Line(preview, RS_LineData(last, *v)));
 
                        last = *v;
                }
 
                Vector p = *points.last();
-               preview->addEntity(new RS_Line(preview, RS_LineData(p, mouse)));
+//             preview->addEntity(new RS_Line(preview, RS_LineData(p, mouse)));
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDimLeader::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimLeader::mouseMoveEvent end");
 }
 
-void RS_ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -144,7 +143,7 @@ void RS_ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimLeader::keyPressEvent(QKeyEvent * e)
+void ActionDimLeader::keyPressEvent(QKeyEvent * e)
 {
        if (getStatus() == SetEndpoint && e->key() == Qt::Key_Enter)
        {
@@ -154,7 +153,7 @@ void RS_ActionDimLeader::keyPressEvent(QKeyEvent * e)
        }
 }
 
-void RS_ActionDimLeader::coordinateEvent(Vector * e)
+void ActionDimLeader::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -185,7 +184,7 @@ void RS_ActionDimLeader::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimLeader::commandEvent(RS_CommandEvent * e)
+void ActionDimLeader::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -208,14 +207,14 @@ void RS_ActionDimLeader::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimLeader::getAvailableCommands()
+QStringList ActionDimLeader::getAvailableCommands()
 {
        QStringList cmd;
 
        return cmd;
 }
 
-void RS_ActionDimLeader::updateMouseButtonHints()
+void ActionDimLeader::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -236,28 +235,24 @@ void RS_ActionDimLeader::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDimLeader::showOptions()
+void ActionDimLeader::showOptions()
 {
-       RS_ActionInterface::showOptions();
-
-       //RS_DIALOGFACTORY->requestOptions(this, true);
+       ActionInterface::showOptions();
 }
 
-void RS_ActionDimLeader::hideOptions()
+void ActionDimLeader::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
-
-       //RS_DIALOGFACTORY->requestOptions(this, false);
+       ActionInterface::hideOptions();
 }
 
-void RS_ActionDimLeader::updateMouseCursor()
+void ActionDimLeader::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDimLeader::updateToolBar()
+void ActionDimLeader::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                if (!isFinished())
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -265,4 +260,3 @@ void RS_ActionDimLeader::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
        }
 }
-
similarity index 69%
rename from src/actions/rs_actiondimleader.h
rename to src/actions/actiondimleader.h
index 91f5e3e1926f18eef837ff1079c2e3aeda9a0ef0..d014628fd2236f9df287802580ce31e89bc57236 100644 (file)
@@ -1,19 +1,19 @@
-#ifndef RS_ACTIONDIMLEADER_H
-#define RS_ACTIONDIMLEADER_H
+#ifndef __ACTIONDIMLEADER_H__
+#define __ACTIONDIMLEADER_H__
 
 #include <QtCore>
+#include "actioninterface.h"
 #include "rs_leader.h"
-#include "rs_previewactioninterface.h"
 
 class Vector;
 
 /**
- * This action class can handle user events to draw
- * leaders (arrows).
+ * This action class can handle user events to draw leaders (arrows).
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimLeader: public RS_PreviewActionInterface
+class ActionDimLeader: public ActionInterface
 {
        public:
                /**
@@ -25,10 +25,8 @@ class RS_ActionDimLeader: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimLeader();
-
-               //static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
+               ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimLeader();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -58,4 +56,4 @@ class RS_ActionDimLeader: public RS_PreviewActionInterface
                QList<Vector *> points;
 };
 
-#endif
+#endif // __ACTIONDIMLEADER_H__
similarity index 77%
rename from src/actions/rs_actiondimlinear.cpp
rename to src/actions/actiondimlinear.cpp
index 9fe8faba15d3830c5cfb54c1634b4d92515d5b9a..fd3583534466fed3e950aea874cecc54ed6e2f49 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimlinear.cpp
+// actiondimlinear.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondimlinear.h"
+#include "actiondimlinear.h"
 
 #include "rs_commandevent.h"
 #include "rs_constructionline.h"
@@ -27,8 +27,8 @@
  * @param fixedAngle true: The user can't change the angle.
  *                   false: The user can change the angle in a option widget.
  */
-RS_ActionDimLinear::RS_ActionDimLinear(RS_EntityContainer & container, GraphicView & graphicView, double angle, bool fixedAngle):
-       RS_ActionDimension("Draw linear dimensions", container, graphicView)
+ActionDimLinear::ActionDimLinear(RS_EntityContainer & container, GraphicView & graphicView, double angle, bool fixedAngle):
+       ActionDimension("Draw linear dimensions", container, graphicView)
 {
        edata.angle = angle;
        this->fixedAngle = fixedAngle;
@@ -36,27 +36,27 @@ RS_ActionDimLinear::RS_ActionDimLinear(RS_EntityContainer & container, GraphicVi
        reset();
 }
 
-RS_ActionDimLinear::~RS_ActionDimLinear()
+ActionDimLinear::~ActionDimLinear()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimLinear::rtti()
+/*virtual*/ RS2::ActionType ActionDimLinear::rtti()
 {
        return RS2::ActionDimLinear;
 }
 
-void RS_ActionDimLinear::reset()
+void ActionDimLinear::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
        edata = RS_DimLinearData(Vector(false), Vector(false), (fixedAngle ? edata.angle : 0.0), 0.0);
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimLinear::trigger()
+void ActionDimLinear::trigger()
 {
-       RS_ActionDimension::trigger();
+       ActionDimension::trigger();
        preparePreview();
        RS_DimLinear * dim = new RS_DimLinear(container, data, edata);
        dim->setLayerToActive();
@@ -79,10 +79,10 @@ void RS_ActionDimLinear::trigger()
        graphicView->moveRelativeZero(rz);
        drawSnapper();
 
-       RS_DEBUG->print("RS_ActionDimLinear::trigger(): dim added: %d", dim->getId());
+       RS_DEBUG->print("ActionDimLinear::trigger(): dim added: %d", dim->getId());
 }
 
-void RS_ActionDimLinear::preparePreview()
+void ActionDimLinear::preparePreview()
 {
        Vector dirV;
        dirV.setPolar(100.0, edata.angle + M_PI / 2.0);
@@ -96,9 +96,9 @@ void RS_ActionDimLinear::preparePreview()
                cl.getNearestPointOnEntity(data.definitionPoint);
 }
 
-void RS_ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
+void ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimLinear::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDimLinear::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -113,9 +113,8 @@ void RS_ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(new RS_Line(preview,
-                                       RS_LineData(edata.extensionPoint1,
-                                               mouse)));
+//                     preview->addEntity(new RS_Line(preview,
+//                             RS_LineData(edata.extensionPoint1, mouse)));
                        drawPreview();
                }
                break;
@@ -130,18 +129,18 @@ void RS_ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
 
                        preparePreview();
 
-                       RS_DimLinear * dim = new RS_DimLinear(preview, data, edata);
-                       dim->update();
-                       preview->addEntity(dim);
+//                     RS_DimLinear * dim = new RS_DimLinear(preview, data, edata);
+//                     dim->update();
+//                     preview->addEntity(dim);
                        drawPreview();
                }
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimLinear::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimLinear::mouseMoveEvent end");
 }
 
-void RS_ActionDimLinear::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimLinear::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -156,7 +155,7 @@ void RS_ActionDimLinear::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimLinear::coordinateEvent(Vector * e)
+void ActionDimLinear::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -189,7 +188,7 @@ void RS_ActionDimLinear::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimLinear::commandEvent(RS_CommandEvent * e)
+void ActionDimLinear::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -245,7 +244,7 @@ void RS_ActionDimLinear::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimLinear::getAvailableCommands()
+QStringList ActionDimLinear::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -267,7 +266,7 @@ QStringList RS_ActionDimLinear::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimLinear::updateMouseButtonHints()
+void ActionDimLinear::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -303,34 +302,33 @@ void RS_ActionDimLinear::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDimLinear::showOptions()
+void ActionDimLinear::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimLinear::hideOptions()
+void ActionDimLinear::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-double RS_ActionDimLinear::getAngle()
+double ActionDimLinear::getAngle()
 {
        return edata.angle;
 }
 
-void RS_ActionDimLinear::setAngle(double a)
+void ActionDimLinear::setAngle(double a)
 {
        edata.angle = a;
 }
 
-bool RS_ActionDimLinear::hasFixedAngle()
+bool ActionDimLinear::hasFixedAngle()
 {
        return fixedAngle;
 }
-
similarity index 75%
rename from src/actions/rs_actiondimlinear.h
rename to src/actions/actiondimlinear.h
index 289d2430948a99b8ec64ce455f6d464e46ae6468..60113664c4defd1f917b714933ef95c98263fbb7 100644 (file)
@@ -1,16 +1,16 @@
-#ifndef RS_ACTIONDIMLINEAR_H
-#define RS_ACTIONDIMLINEAR_H
+#ifndef __ACTIONDIMLINEAR_H__
+#define __ACTIONDIMLINEAR_H__
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 #include "rs_dimlinear.h"
 
 /**
- * This action class can handle user events to draw
- * aligned dimensions.
+ * This action class can handle user events to draw aligned dimensions.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimLinear: public RS_ActionDimension
+class ActionDimLinear: public ActionDimension
 {
        public:
                /**
@@ -34,8 +34,8 @@ class RS_ActionDimLinear: public RS_ActionDimension
                };
 
        public:
-               RS_ActionDimLinear(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
-               ~RS_ActionDimLinear();
+               ActionDimLinear(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
+               ~ActionDimLinear();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -67,4 +67,4 @@ class RS_ActionDimLinear: public RS_ActionDimension
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDIMLINEAR_H__
similarity index 73%
rename from src/actions/rs_actiondimradial.cpp
rename to src/actions/actiondimradial.cpp
index 6248e5b33c3f1875a908c9e0caf2bac6b7868012..22cda34a3a08df8631fcd7a40530c35399e343a9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondimradial.cpp
+// actiondimradial.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondimradial.h"
+#include "actiondimradial.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDimRadial::RS_ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw Radial Dimensions",
-               container, graphicView)
+ActionDimRadial::ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionDimension("Draw Radial Dimensions", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDimRadial::~RS_ActionDimRadial()
+ActionDimRadial::~ActionDimRadial()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDimRadial::rtti()
+/*virtual*/ RS2::ActionType ActionDimRadial::rtti()
 {
        return RS2::ActionDimRadial;
 }
 
-void RS_ActionDimRadial::reset()
+void ActionDimRadial::reset()
 {
-       RS_ActionDimension::reset();
+       ActionDimension::reset();
 
-       edata = RS_DimRadialData(Vector(false),
-                       0.0);
+       edata = RS_DimRadialData(Vector(false), 0.0);
        entity = NULL;
        pos = Vector(false);
        RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDimRadial::trigger()
+void ActionDimRadial::trigger()
 {
-       RS_ActionDimension::trigger();
+       ActionDimension::trigger();
 
        preparePreview();
 
-       if (entity != NULL)
+       if (entity)
        {
-               RS_DimRadial * newEntity = NULL;
-
-               newEntity = new RS_DimRadial(container,
-                               data,
-                               edata);
-
+               RS_DimRadial * newEntity = new RS_DimRadial(container, data, edata);
                newEntity->setLayerToActive();
                newEntity->setPenToActive();
                newEntity->update();
                container->addEntity(newEntity);
 
                // upd. undo list:
-               if (document != NULL)
+               if (document)
                {
                        document->startUndoCycle();
                        document->addUndoable(newEntity);
                        document->endUndoCycle();
                }
+
                deleteSnapper();
                Vector rz = graphicView->getRelativeZero();
                graphicView->moveRelativeZero(Vector(0.0, 0.0));
@@ -79,11 +74,10 @@ void RS_ActionDimRadial::trigger()
                //drawSnapper();
        }
        else
-               RS_DEBUG->print("RS_ActionDimRadial::trigger:"
-                       " Entity is NULL\n");
+               RS_DEBUG->print("ActionDimRadial::trigger: Entity is NULL\n");
 }
 
-void RS_ActionDimRadial::preparePreview()
+void ActionDimRadial::preparePreview()
 {
        if (entity != NULL)
        {
@@ -100,12 +94,9 @@ void RS_ActionDimRadial::preparePreview()
        }
 }
 
-void RS_ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
+void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDimRadial::mouseMoveEvent begin");
-
-       //Vector mouse(graphicView->toGraphX(e->x()),
-       //                graphicView->toGraphY(e->y()));
+       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -115,19 +106,19 @@ void RS_ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 
        case SetPos:
 
-               if (entity != NULL)
+               if (entity)
                {
                        pos = snapPoint(e);
 
                        preparePreview();
 
-                       RS_DimRadial * d = new RS_DimRadial(preview, data, edata);
-                       d->update();
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(d);
-                       drawPreview();
+//                     RS_DimRadial * d = new RS_DimRadial(preview, data, edata);
+//                     d->update();
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(d);
+//                     drawPreview();
                }
                break;
 
@@ -135,10 +126,10 @@ void RS_ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDimRadial::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent end");
 }
 
-void RS_ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -189,7 +180,7 @@ void RS_ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDimRadial::coordinateEvent(Vector * e)
+void ActionDimRadial::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -208,7 +199,7 @@ void RS_ActionDimRadial::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDimRadial::commandEvent(RS_CommandEvent * e)
+void ActionDimRadial::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -258,7 +249,7 @@ void RS_ActionDimRadial::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDimRadial::getAvailableCommands()
+QStringList ActionDimRadial::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -276,7 +267,7 @@ QStringList RS_ActionDimRadial::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDimRadial::updateMouseButtonHints()
+void ActionDimRadial::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -301,20 +292,20 @@ void RS_ActionDimRadial::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDimRadial::showOptions()
+void ActionDimRadial::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
        //RS_DIALOGFACTORY->requestDimRadialOptions(edata, true);
 }
 
-void RS_ActionDimRadial::hideOptions()
+void ActionDimRadial::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        //RS_DIALOGFACTORY->requestDimRadialOptions(edata, false);
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-// EOF
+
similarity index 78%
rename from src/actions/rs_actiondimradial.h
rename to src/actions/actiondimradial.h
index 04ff60fa6d5faab4e893db2b789aa987057337e6..e928f3a5e92036b491ad46df02ff8f4d256ff815 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONDIMRADIAL_H
-#define RS_ACTIONDIMRADIAL_H
+#ifndef __ACTIONDIMRADIAL_H__
+#define __ACTIONDIMRADIAL_H__
 
-#include "rs_actiondimension.h"
+#include "actiondimension.h"
 #include "rs_dimradial.h"
 #include "vector.h"
 
@@ -10,9 +10,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to draw radial dimensions.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDimRadial: public RS_ActionDimension
+class ActionDimRadial: public ActionDimension
 {
        private:
                enum Status {
@@ -22,8 +23,8 @@ class RS_ActionDimRadial: public RS_ActionDimension
                };
 
        public:
-               RS_ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDimRadial();
+               ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDimRadial();
 
                virtual RS2::ActionType rtti();
                virtual void reset();
@@ -49,4 +50,4 @@ class RS_ActionDimRadial: public RS_ActionDimension
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDIMRADIAL_H__
similarity index 80%
rename from src/actions/rs_actiondrawarc.cpp
rename to src/actions/actiondrawarc.cpp
index e47f1bd23e526d803acd9e4ba67f125cefa03c1e..16f43f44fecfdb2dc9f3ca9452518e973b1867dc 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawarc.cpp
+// actiondrawarc.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawarc.h"
+#include "actiondrawarc.h"
 
 #include "rs_commandevent.h"
 #include "commands.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawArc::RS_ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw arcs", container, graphicView)
+ActionDrawArc::ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw arcs", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawArc::~RS_ActionDrawArc()
+ActionDrawArc::~ActionDrawArc()
 {
 }
 
-RS2::ActionType RS_ActionDrawArc::rtti()
+RS2::ActionType ActionDrawArc::rtti()
 {
        return RS2::ActionDrawArc;
 }
 
-void RS_ActionDrawArc::reset()
+void ActionDrawArc::reset()
 {
-       //bool rev = data.reversed;
-
        if (data.reversed)
                data = RS_ArcData(Vector(false), 0.0, 2 * M_PI, 0.0, true);
        else
                data = RS_ArcData(Vector(false), 0.0, 0.0, 2 * M_PI, false);
 }
 
-void RS_ActionDrawArc::init(int status)
+void ActionDrawArc::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        reset();
 }
 
-void RS_ActionDrawArc::trigger()
+void ActionDrawArc::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Arc * arc = new RS_Arc(container, data);
        arc->setLayerToActive();
@@ -77,12 +75,12 @@ void RS_ActionDrawArc::trigger()
        setStatus(SetCenter);
        reset();
 
-       RS_DEBUG->print("RS_ActionDrawArc::trigger(): arc added: %d", arc->getId());
+       RS_DEBUG->print("ActionDrawArc::trigger(): arc added: %d", arc->getId());
 }
 
-void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawArc::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawArc::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -98,7 +96,7 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                        data.radius = data.center.distanceTo(mouse);
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(new RS_Circle(preview, RS_CircleData(data.center, data.radius)));
+//                     preview->addEntity(new RS_Circle(preview, RS_CircleData(data.center, data.radius)));
                        drawPreview();
                }
                break;
@@ -113,7 +111,7 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
 
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new RS_Arc(preview, data));
                drawPreview();
                break;
 
@@ -121,7 +119,7 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                data.angle2 = data.center.angleTo(mouse);
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new RS_Arc(preview, data));
                drawPreview();
                break;
 
@@ -129,7 +127,7 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                data.angle2 = data.angle1 + data.center.angleTo(mouse);
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new RS_Arc(preview, data));
                drawPreview();
                break;
 
@@ -142,7 +140,7 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                        data.angle2 = data.angle1 + asin(x / (2 * data.radius)) * 2;
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(new RS_Arc(preview, data));
+//                     preview->addEntity(new RS_Arc(preview, data));
                        drawPreview();
                }
        }
@@ -152,10 +150,10 @@ void RS_ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawArc::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawArc::mouseMoveEvent end");
 }
 
-void RS_ActionDrawArc::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawArc::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -170,7 +168,7 @@ void RS_ActionDrawArc::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawArc::coordinateEvent(Vector * e)
+void ActionDrawArc::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -226,7 +224,7 @@ void RS_ActionDrawArc::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawArc::commandEvent(RS_CommandEvent * e)
+void ActionDrawArc::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -344,14 +342,14 @@ void RS_ActionDrawArc::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawArc::getAvailableCommands()
+QStringList ActionDrawArc::getAvailableCommands()
 {
        QStringList cmd;
        cmd += RS_COMMANDS->command("reversed");
        return cmd;
 }
 
-void RS_ActionDrawArc::updateMouseButtonHints()
+void ActionDrawArc::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -393,30 +391,30 @@ void RS_ActionDrawArc::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawArc::showOptions()
+void ActionDrawArc::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawArc::hideOptions()
+void ActionDrawArc::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawArc::updateMouseCursor()
+void ActionDrawArc::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawArc::updateToolBar()
+void ActionDrawArc::updateToolBar()
 {
-       if (RS_DIALOGFACTORY == NULL)
+       if (!RS_DIALOGFACTORY)
                return;
 
        if (!isFinished())
@@ -425,13 +423,12 @@ void RS_ActionDrawArc::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
 }
 
-bool RS_ActionDrawArc::isReversed()
+bool ActionDrawArc::isReversed()
 {
        return data.reversed;
 }
 
-void RS_ActionDrawArc::setReversed(bool r)
+void ActionDrawArc::setReversed(bool r)
 {
        data.reversed = r;
 }
-
similarity index 73%
rename from src/actions/rs_actiondrawarc.h
rename to src/actions/actiondrawarc.h
index 90fec85d52f96351a74c0c5da956f3618d802b44..a834a3a267f62b44ac2cac0b0a28901cfac6e0df 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDRAWARC_H
-#define RS_ACTIONDRAWARC_H
+#ifndef __ACTIONDRAWARC_H__
+#define __ACTIONDRAWARC_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_arc.h"
 
 /**
- * This action class can handle user events to draw
- * simple arcs with the center, radius, start- and endangle given.
+ * This action class can handle user events to draw simple arcs with the
+ * center, radius, start- and endangle given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawArc: public RS_PreviewActionInterface
+class ActionDrawArc: public ActionInterface
 {
        public:
                /**
@@ -26,8 +27,8 @@ class RS_ActionDrawArc: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawArc();
+               ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawArc();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -53,4 +54,4 @@ class RS_ActionDrawArc: public RS_PreviewActionInterface
                RS_ArcData data;
 };
 
-#endif
+#endif // __ACTIONDRAWARC_H__
similarity index 71%
rename from src/actions/rs_actiondrawarc3p.cpp
rename to src/actions/actiondrawarc3p.cpp
index 2450e76dbf7798829e4c3a79b92ac111b336569f..9cd7bbd7ef2e179d53dd27333279c62f064473c1 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawarc3p.cpp
+// actiondrawarc3p.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawarc3p.h"
+#include "actiondrawarc3p.h"
 
-#include "rs_actiondrawarc.h"
+#include "actiondrawarc.h"
 #include "rs_commandevent.h"
 #include "commands.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawArc3P::RS_ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw arcs 3P", container, graphicView)
+ActionDrawArc3P::ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw arcs 3P", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawArc3P::~RS_ActionDrawArc3P()
+ActionDrawArc3P::~ActionDrawArc3P()
 {
 }
 
-void RS_ActionDrawArc3P::reset()
+void ActionDrawArc3P::reset()
 {
        data.reset();
        point1 = Vector(false);
@@ -39,16 +39,16 @@ void RS_ActionDrawArc3P::reset()
        point3 = Vector(false);
 }
 
-void RS_ActionDrawArc3P::init(int status)
+void ActionDrawArc3P::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        //reset();
 }
 
-void RS_ActionDrawArc3P::trigger()
+void ActionDrawArc3P::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
        preparePreview();
 
        if (data.isValid())
@@ -79,7 +79,7 @@ void RS_ActionDrawArc3P::trigger()
                RS_DIALOGFACTORY->commandMessage(tr("Invalid arc data."));
 }
 
-void RS_ActionDrawArc3P::preparePreview()
+void ActionDrawArc3P::preparePreview()
 {
        data.reset();
 
@@ -93,7 +93,7 @@ void RS_ActionDrawArc3P::preparePreview()
        }
 }
 
-void RS_ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
 {
        Vector mouse = snapPoint(e);
 
@@ -108,12 +108,12 @@ void RS_ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
 
                if (point1.valid)
                {
-                       RS_Line * line = new RS_Line(preview, RS_LineData(point1, point2));
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(line);
-                       drawPreview();
+//                     RS_Line * line = new RS_Line(preview, RS_LineData(point1, point2));
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(line);
+//                     drawPreview();
                }
                break;
 
@@ -123,12 +123,12 @@ void RS_ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-                       RS_Arc * arc = new RS_Arc(preview, data);
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(arc);
-                       drawPreview();
+//                     RS_Arc * arc = new RS_Arc(preview, data);
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(arc);
+//                     drawPreview();
                }
                break;
 
@@ -137,7 +137,7 @@ void RS_ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawArc3P::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawArc3P::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -152,7 +152,7 @@ void RS_ActionDrawArc3P::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawArc3P::coordinateEvent(Vector * e)
+void ActionDrawArc3P::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -183,7 +183,7 @@ void RS_ActionDrawArc3P::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawArc3P::commandEvent(RS_CommandEvent * e)
+void ActionDrawArc3P::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -197,17 +197,17 @@ void RS_ActionDrawArc3P::commandEvent(RS_CommandEvent * e)
        if (RS_COMMANDS->checkCommand("center", c, rtti()))
        {
                finish();
-               graphicView->setCurrentAction(new RS_ActionDrawArc(*container, *graphicView));
+               graphicView->setCurrentAction(new ActionDrawArc(*container, *graphicView));
        }
 }
 
-QStringList RS_ActionDrawArc3P::getAvailableCommands()
+QStringList ActionDrawArc3P::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawArc3P::updateMouseButtonHints()
+void ActionDrawArc3P::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -229,12 +229,12 @@ void RS_ActionDrawArc3P::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawArc3P::updateMouseCursor()
+void ActionDrawArc3P::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawArc3P::updateToolBar()
+void ActionDrawArc3P::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
similarity index 78%
rename from src/actions/rs_actiondrawarc3p.h
rename to src/actions/actiondrawarc3p.h
index 54026318f7012e2cafec5fcc6b3d341e642591dd..ffca07fa3d8bd7aa4eb31d5ab4662c96ecbe4780 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWARC3P_H
-#define RS_ACTIONDRAWARC3P_H
+#ifndef __ACTIONDRAWARC3P_H__
+#define __ACTIONDRAWARC3P_H__
 
 #include "rs_arc.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to draw
  * arcs with three points given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawArc3P: public RS_PreviewActionInterface
+class ActionDrawArc3P: public ActionInterface
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionDrawArc3P: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawArc3P();
+               ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawArc3P();
 
                void reset();
                virtual void init(int status = 0);
@@ -59,4 +60,4 @@ class RS_ActionDrawArc3P: public RS_PreviewActionInterface
                Vector point3;
 };
 
-#endif
+#endif // __ACTIONDRAWARC3P_H__
similarity index 70%
rename from src/actions/rs_actiondrawarctangential.cpp
rename to src/actions/actiondrawarctangential.cpp
index 1bdc1350e51a0f41310145ee70aff16650c72101..6f7fa4f7addc4b17f3feaf63a5aa81e96944e352 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawarctangential.cpp
+// actiondrawarctangential.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawarctangential.h"
+#include "actiondrawarctangential.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawArcTangential::RS_ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw arcs tangential",
+ActionDrawArcTangential::ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw arcs tangential",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawArcTangential::~RS_ActionDrawArcTangential()
+ActionDrawArcTangential::~ActionDrawArcTangential()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawArcTangential::rtti()
+/*virtual*/ RS2::ActionType ActionDrawArcTangential::rtti()
 {
        return RS2::ActionDrawArcTangential;
 }
 
-void RS_ActionDrawArcTangential::reset()
+void ActionDrawArcTangential::reset()
 {
        baseEntity = NULL;
        isStartPoint = false;
        point = Vector(false);
 }
 
-void RS_ActionDrawArcTangential::init(int status)
+void ActionDrawArcTangential::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        //reset();
 }
 
-void RS_ActionDrawArcTangential::trigger()
+void ActionDrawArcTangential::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (point.valid == false || baseEntity == NULL)
        {
-               RS_DEBUG->print("RS_ActionDrawArcTangential::trigger: "
+               RS_DEBUG->print("ActionDrawArcTangential::trigger: "
                        "conditions not met");
                return;
        }
@@ -82,7 +82,7 @@ void RS_ActionDrawArcTangential::trigger()
        reset();
 }
 
-void RS_ActionDrawArcTangential::preparePreview()
+void ActionDrawArcTangential::preparePreview()
 {
        if (baseEntity != NULL && point.valid)
        {
@@ -108,7 +108,7 @@ void RS_ActionDrawArcTangential::preparePreview()
        }
 }
 
-void RS_ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
@@ -121,11 +121,11 @@ void RS_ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-                       RS_Arc * arc = new RS_Arc(preview, data);
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(arc);
-                       drawPreview();
+//                     RS_Arc * arc = new RS_Arc(preview, data);
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(arc);
+//                     drawPreview();
                }
                break;
 
@@ -134,14 +134,15 @@ void RS_ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
                switch (getStatus())
                {
                // set base entity:
-               case SetBaseEntity: {
+               case SetBaseEntity:
+               {
                        Vector coord = graphicView->toGraph(e->x(), e->y());
                        RS_Entity * entity = catchEntity(coord, RS2::ResolveAll);
 
@@ -167,14 +168,15 @@ void RS_ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e)
                        else
                                deleteSnapper();
                }
-               break;
+                       break;
 
                // set angle (point that defines the angle)
-               case SetEndAngle: {
+               case SetEndAngle:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
-               break;
+                       break;
                }
        }
        else if (e->button() == Qt::RightButton)
@@ -185,9 +187,9 @@ void RS_ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawArcTangential::coordinateEvent(Vector * e)
+void ActionDrawArcTangential::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        Vector mouse = *e;
@@ -207,7 +209,7 @@ void RS_ActionDrawArcTangential::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawArcTangential::commandEvent(RS_CommandEvent * e)
+void ActionDrawArcTangential::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -219,30 +221,30 @@ void RS_ActionDrawArcTangential::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawArcTangential::getAvailableCommands()
+QStringList ActionDrawArcTangential::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawArcTangential::showOptions()
+void ActionDrawArcTangential::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
        updateMouseButtonHints();
 }
 
-void RS_ActionDrawArcTangential::hideOptions()
+void ActionDrawArcTangential::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawArcTangential::updateMouseButtonHints()
+void ActionDrawArcTangential::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -263,12 +265,12 @@ void RS_ActionDrawArcTangential::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawArcTangential::updateMouseCursor()
+void ActionDrawArcTangential::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawArcTangential::updateToolBar()
+void ActionDrawArcTangential::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -276,13 +278,12 @@ void RS_ActionDrawArcTangential::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
 }
 
-void RS_ActionDrawArcTangential::setRadius(double r)
+void ActionDrawArcTangential::setRadius(double r)
 {
        data.radius = r;
 }
 
-double RS_ActionDrawArcTangential::getRadius()
+double ActionDrawArcTangential::getRadius()
 {
        return data.radius;
 }
-
similarity index 78%
rename from src/actions/rs_actiondrawarctangential.h
rename to src/actions/actiondrawarctangential.h
index 1d56f14495409fbd826dde6f2ff232f54bc1c6f2..d1f3ac23c26d0d8f52395bb4a9a3106408f1aae0 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONDRAWARCTANGENTIAL_H
-#define RS_ACTIONDRAWARCTANGENTIAL_H
+#ifndef __ACTIONDRAWARCTANGENTIAL_H__
+#define __ACTIONDRAWARCTANGENTIAL_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_arc.h"
 #include "vector.h"
 
@@ -11,9 +11,10 @@ class RS_AtomicEntity;
  * This action class can handle user events to draw
  * arcs with three points given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawArcTangential: public RS_PreviewActionInterface
+class ActionDrawArcTangential: public ActionInterface
 {
        public:
                /**
@@ -25,8 +26,8 @@ class RS_ActionDrawArcTangential: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawArcTangential();
+               ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawArcTangential();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -65,4 +66,4 @@ class RS_ActionDrawArcTangential: public RS_PreviewActionInterface
                RS_ArcData data;
 };
 
-#endif
+#endif // __ACTIONDRAWARCTANGENTIAL_H__
similarity index 61%
rename from src/actions/rs_actiondrawcircle.cpp
rename to src/actions/actiondrawcircle.cpp
index cf20b47424cdb33ef05256e876e4f4a6b5b6ca72..a6ddd14ba35b8bc8e870d969cf0b7a7521b1d05c 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawcircle.cpp
+// actiondrawcircle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawcircle.h"
+#include "actiondrawcircle.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawCircle::RS_ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw circles", container, graphicView)
+ActionDrawCircle::ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw circles", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawCircle::~RS_ActionDrawCircle()
+ActionDrawCircle::~ActionDrawCircle()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawCircle::rtti()
+/*virtual*/ RS2::ActionType ActionDrawCircle::rtti()
 {
        return RS2::ActionDrawCircle;
 }
 
-void RS_ActionDrawCircle::reset()
+void ActionDrawCircle::reset()
 {
        data = RS_CircleData(Vector(false), 0.0);
 }
 
-void RS_ActionDrawCircle::init(int status)
+void ActionDrawCircle::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDrawCircle::trigger()
+void ActionDrawCircle::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Circle * circle = new RS_Circle(container, data);
        circle->setLayerToActive();
@@ -73,12 +73,12 @@ void RS_ActionDrawCircle::trigger()
        setStatus(SetCenter);
        reset();
 
-       RS_DEBUG->print("RS_ActionDrawCircle::trigger(): circle added: %d", circle->getId());
+       RS_DEBUG->print("ActionDrawCircle::trigger(): circle added: %d", circle->getId());
 }
 
-void RS_ActionDrawCircle::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawCircle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawCircle::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawCircle::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -95,17 +95,16 @@ void RS_ActionDrawCircle::mouseMoveEvent(QMouseEvent * e)
                        data.radius = data.center.distanceTo(mouse);
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(new RS_Circle(preview,
-                                       data));
+//                     preview->addEntity(new RS_Circle(preview, data));
                        drawPreview();
                }
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawCircle::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawCircle::mouseMoveEvent end");
 }
 
-void RS_ActionDrawCircle::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawCircle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -120,9 +119,9 @@ void RS_ActionDrawCircle::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawCircle::coordinateEvent(Vector * e)
+void ActionDrawCircle::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        Vector mouse = *e;
@@ -151,13 +150,13 @@ void RS_ActionDrawCircle::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawCircle::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
@@ -165,83 +164,76 @@ void RS_ActionDrawCircle::commandEvent(RS_CommandEvent * e)
 
        switch (getStatus())
        {
-       case SetRadius: {
+       case SetRadius:
+       {
                bool ok;
                double r = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        data.radius = r;
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(
-                               tr("Not a valid expression"));
+               else if (RS_DIALOGFACTORY)
+                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
                trigger();
                //setStatus(SetCenter);
        }
-       break;
+               break;
 
        default:
                break;
        }
 }
 
-QStringList RS_ActionDrawCircle::getAvailableCommands()
+QStringList ActionDrawCircle::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawCircle::updateMouseButtonHints()
+void ActionDrawCircle::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case SetCenter:
-
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->updateMouseWidget(
-                               tr("Specify center"), tr("Cancel"));
+               if (RS_DIALOGFACTORY)
+                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify center"), tr("Cancel"));
                break;
 
        case SetRadius:
-
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->updateMouseWidget(tr("Specify radius"), tr("Back"));
                break;
 
        default:
-
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
 
-void RS_ActionDrawCircle::showOptions()
+void ActionDrawCircle::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 }
 
-void RS_ActionDrawCircle::hideOptions()
+void ActionDrawCircle::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 }
 
-void RS_ActionDrawCircle::updateMouseCursor()
+void ActionDrawCircle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawCircle::updateToolBar()
+void ActionDrawCircle::updateToolBar()
 {
        if (!isFinished())
        {
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        }
-       else if (RS_DIALOGFACTORY != NULL)
+       else if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 
 }
-
-// EOF
-
similarity index 76%
rename from src/actions/rs_actiondrawcircle.h
rename to src/actions/actiondrawcircle.h
index c5ca1fdd1621c05a567e4c981ad52c1ef8d4a195..763d184c0f8f13b65510f2eae63aab13235c252b 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDRAWCIRCLE_H
-#define RS_ACTIONDRAWCIRCLE_H
+#ifndef __ACTIONDRAWCIRCLE_H__
+#define __ACTIONDRAWCIRCLE_H__
 
 #include "rs_circle.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to draw
  * circles with a given center and a point on the circle line.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawCircle: public RS_PreviewActionInterface
+class ActionDrawCircle: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionDrawCircle: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawCircle();
+               ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawCircle();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -47,4 +48,4 @@ class RS_ActionDrawCircle: public RS_PreviewActionInterface
                RS_CircleData data;
 };
 
-#endif
+#endif // __ACTIONDRAWCIRCLE_H__
similarity index 71%
rename from src/actions/rs_actiondrawcircle2p.cpp
rename to src/actions/actiondrawcircle2p.cpp
index d9425550c8c0ab2dada58c3ebf4a384f2ee18ee9..43e3003b6e40774d754d5354cc534cfc94b955dd 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawcircle2p.cpp
+// actiondrawcircle2p.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawcircle2p.h"
+#include "actiondrawcircle2p.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawCircle2P::RS_ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw circles",
+ActionDrawCircle2P::ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawCircle2P::~RS_ActionDrawCircle2P()
+ActionDrawCircle2P::~ActionDrawCircle2P()
 {
 }
 
-void RS_ActionDrawCircle2P::reset()
+void ActionDrawCircle2P::reset()
 {
        data.reset();
        point1 = Vector(false);
        point2 = Vector(false);
 }
 
-void RS_ActionDrawCircle2P::init(int status)
+void ActionDrawCircle2P::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDrawCircle2P::trigger()
+void ActionDrawCircle2P::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        preparePreview();
 
@@ -78,7 +78,7 @@ void RS_ActionDrawCircle2P::trigger()
                RS_DIALOGFACTORY->requestWarningDialog(tr("Invalid Circle data."));
 }
 
-void RS_ActionDrawCircle2P::preparePreview()
+void ActionDrawCircle2P::preparePreview()
 {
        data.reset();
 
@@ -92,7 +92,7 @@ void RS_ActionDrawCircle2P::preparePreview()
        }
 }
 
-void RS_ActionDrawCircle2P::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawCircle2P::mouseMoveEvent(QMouseEvent * e)
 {
        Vector mouse = snapPoint(e);
 
@@ -108,11 +108,11 @@ void RS_ActionDrawCircle2P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-                       RS_Circle * circle = new RS_Circle(preview, data);
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(circle);
-                       drawPreview();
+//                     RS_Circle * circle = new RS_Circle(preview, data);
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(circle);
+//                     drawPreview();
                }
                break;
 
@@ -121,15 +121,13 @@ void RS_ActionDrawCircle2P::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawCircle2P::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawCircle2P::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector ce(snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
@@ -138,7 +136,7 @@ void RS_ActionDrawCircle2P::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawCircle2P::coordinateEvent(Vector * e)
+void ActionDrawCircle2P::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -164,7 +162,7 @@ void RS_ActionDrawCircle2P::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawCircle2P::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle2P::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -177,13 +175,13 @@ void RS_ActionDrawCircle2P::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawCircle2P::getAvailableCommands()
+QStringList ActionDrawCircle2P::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawCircle2P::updateMouseButtonHints()
+void ActionDrawCircle2P::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -206,14 +204,14 @@ void RS_ActionDrawCircle2P::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawCircle2P::updateMouseCursor()
+void ActionDrawCircle2P::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawCircle2P::updateToolBar()
+void ActionDrawCircle2P::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                if (!isFinished())
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -221,6 +219,3 @@ void RS_ActionDrawCircle2P::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
        }
 }
-
-// EOF
-
similarity index 76%
rename from src/actions/rs_actiondrawcircle2p.h
rename to src/actions/actiondrawcircle2p.h
index aebbbae912844d64e61cbd8d22058afaf555c6fd..8f47cb734e0d4febf02841651be647f2e91fbb79 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWCIRCLE2P_H
-#define RS_ACTIONDRAWCIRCLE2P_H
+#ifndef __ACTIONDRAWCIRCLE2P_H__
+#define __ACTIONDRAWCIRCLE2P_H__
 
 #include "rs_circle.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to draw
  * simple arcs with the center, radius, start- and endangle given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawCircle2P: public RS_PreviewActionInterface
+class ActionDrawCircle2P: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionDrawCircle2P: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawCircle2P();
+               ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawCircle2P();
 
                void reset();
                virtual void init(int status = 0);
@@ -54,4 +55,4 @@ class RS_ActionDrawCircle2P: public RS_PreviewActionInterface
                Vector point2;
 };
 
-#endif
+#endif // __ACTIONDRAWCIRCLE2P_H__
similarity index 67%
rename from src/actions/rs_actiondrawcircle3p.cpp
rename to src/actions/actiondrawcircle3p.cpp
index 1d01eff928040b31520eb4d585aaddc4acc9652c..7985bb5ebdb96d6f49028bbd6a82296644c94b7e 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawcircle3p.cpp
+// actiondrawcircle3p.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawcircle3p.h"
+#include "actiondrawcircle3p.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawCircle3P::RS_ActionDrawCircle3P(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw circles",
-               container, graphicView)
+ActionDrawCircle3P::ActionDrawCircle3P(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Draw circles",
+       container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawCircle3P::~RS_ActionDrawCircle3P()
+ActionDrawCircle3P::~ActionDrawCircle3P()
 {
 }
 
-void RS_ActionDrawCircle3P::reset()
+void ActionDrawCircle3P::reset()
 {
        data.reset();
        point1 = Vector(false);
@@ -37,34 +38,34 @@ void RS_ActionDrawCircle3P::reset()
        point3 = Vector(false);
 }
 
-void RS_ActionDrawCircle3P::init(int status)
+void ActionDrawCircle3P::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDrawCircle3P::trigger()
+void ActionDrawCircle3P::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        preparePreview();
 
        if (data.isValid())
        {
-               RS_Circle * circle = new RS_Circle(container,
-                               data);
+               RS_Circle * circle = new RS_Circle(container, data);
                circle->setLayerToActive();
                circle->setPenToActive();
                container->addEntity(circle);
 
                // upd. undo list:
-               if (document != NULL)
+               if (document)
                {
                        document->startUndoCycle();
                        document->addUndoable(circle);
                        document->endUndoCycle();
                }
+
                deleteSnapper();
                Vector rz = graphicView->getRelativeZero();
                graphicView->moveRelativeZero(Vector(0.0, 0.0));
@@ -79,21 +80,21 @@ void RS_ActionDrawCircle3P::trigger()
                RS_DIALOGFACTORY->requestWarningDialog(tr("Invalid circle data."));
 }
 
-void RS_ActionDrawCircle3P::preparePreview()
+void ActionDrawCircle3P::preparePreview()
 {
        data.reset();
 
        if (point1.valid && point2.valid && point3.valid)
        {
                RS_Circle circle(NULL, data);
-               bool suc = circle.createFrom3P(point1, point2, point3);
+               bool success = circle.createFrom3P(point1, point2, point3);
 
-               if (suc)
+               if (success)
                        data = circle.getData();
        }
 }
 
-void RS_ActionDrawCircle3P::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawCircle3P::mouseMoveEvent(QMouseEvent * e)
 {
        Vector mouse = snapPoint(e);
 
@@ -113,26 +114,24 @@ void RS_ActionDrawCircle3P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-                       RS_Circle * circle = new RS_Circle(preview, data);
-
-                       deletePreview();
-                       clearPreview();
-                       preview->addEntity(circle);
-                       drawPreview();
+//                     RS_Circle * circle = new RS_Circle(preview, data);
+//
+//                     deletePreview();
+//                     clearPreview();
+//                     preview->addEntity(circle);
+//                     drawPreview();
                }
                break;
        }
 }
 
-void RS_ActionDrawCircle3P::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawCircle3P::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector ce(snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
@@ -141,7 +140,7 @@ void RS_ActionDrawCircle3P::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawCircle3P::coordinateEvent(Vector * e)
+void ActionDrawCircle3P::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -172,7 +171,7 @@ void RS_ActionDrawCircle3P::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawCircle3P::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle3P::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -184,29 +183,26 @@ void RS_ActionDrawCircle3P::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawCircle3P::getAvailableCommands()
+QStringList ActionDrawCircle3P::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawCircle3P::updateMouseButtonHints()
+void ActionDrawCircle3P::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case SetPoint1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first point"),
-                       tr("Cancel"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
                break;
 
        case SetPoint2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second point"),
-                       tr("Back"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
                break;
 
        case SetPoint3:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify third point"),
-                       tr("Back"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify third point"), tr("Back"));
                break;
 
        default:
@@ -215,18 +211,15 @@ void RS_ActionDrawCircle3P::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawCircle3P::updateMouseCursor()
+void ActionDrawCircle3P::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawCircle3P::updateToolBar()
+void ActionDrawCircle3P::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 }
-
-// EOF
-
similarity index 71%
rename from src/actions/rs_actiondrawcircle3p.h
rename to src/actions/actiondrawcircle3p.h
index a00e04b87c3fd3f62e8367285980b9be057ed663..d2d64b47e6a77999ae42970f6a3e73c8910c1230 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWCIRCLE3P_H
-#define RS_ACTIONDRAWCIRCLE3P_H
+#ifndef __ACTIONDRAWCIRCLE3P_H__
+#define __ACTIONDRAWCIRCLE3P_H__
 
 #include "rs_circle.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
- * This action class can handle user events to draw
- * circles with three points given.
+ * This action class can handle user events to draw circles with three points
+ * given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawCircle3P: public RS_PreviewActionInterface
+class ActionDrawCircle3P: public ActionInterface
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionDrawCircle3P: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawCircle3P(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawCircle3P();
+               ActionDrawCircle3P(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawCircle3P();
 
                void reset();
                virtual void init(int status = 0);
@@ -59,4 +60,4 @@ class RS_ActionDrawCircle3P: public RS_PreviewActionInterface
                Vector point3;
 };
 
-#endif
+#endif // __ACTIONDRAWCIRCLE3P_H__
similarity index 66%
rename from src/actions/rs_actiondrawcirclecr.cpp
rename to src/actions/actiondrawcirclecr.cpp
index 9e9d49a2b00cfb1f89708d5344cb2fa12c9a2c34..34af3c9ac80e57eb4858f18333e5880d7c0f20bf 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawcirclecr.cpp
+// actiondrawcirclecr.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawcirclecr.h"
+#include "actiondrawcirclecr.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 /**
  * Constructor.
  */
-RS_ActionDrawCircleCR::RS_ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw circles CR",
+ActionDrawCircleCR::ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles CR",
                container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawCircleCR::~RS_ActionDrawCircleCR()
+ActionDrawCircleCR::~ActionDrawCircleCR()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawCircleCR::rtti()
+/*virtual*/ RS2::ActionType ActionDrawCircleCR::rtti()
 {
        return RS2::ActionDrawCircleCR;
 }
 
-void RS_ActionDrawCircleCR::reset()
+void ActionDrawCircleCR::reset()
 {
        data = RS_CircleData(Vector(false), 0.0);
 }
 
-void RS_ActionDrawCircleCR::init(int status)
+void ActionDrawCircleCR::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionDrawCircleCR::trigger()
+void ActionDrawCircleCR::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Circle * circle = new RS_Circle(container, data);
        circle->setLayerToActive();
@@ -73,12 +73,12 @@ void RS_ActionDrawCircleCR::trigger()
 
        setStatus(SetCenter);
 
-       RS_DEBUG->print("RS_ActionDrawCircleCR::trigger(): circle added: %d", circle->getId());
+       RS_DEBUG->print("ActionDrawCircleCR::trigger(): circle added: %d", circle->getId());
 }
 
-void RS_ActionDrawCircleCR::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawCircleCR::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawCircleCR::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawCircleCR::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -87,23 +87,21 @@ void RS_ActionDrawCircleCR::mouseMoveEvent(QMouseEvent * e)
                data.center = mouse;
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Circle(preview, data));
+//             preview->addEntity(new RS_Circle(preview, data));
                drawPreview();
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawCircleCR::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawCircleCR::mouseMoveEvent end");
 }
 
-void RS_ActionDrawCircleCR::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawCircleCR::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector ce(snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
@@ -112,7 +110,7 @@ void RS_ActionDrawCircleCR::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawCircleCR::coordinateEvent(Vector * e)
+void ActionDrawCircleCR::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -131,7 +129,7 @@ void RS_ActionDrawCircleCR::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawCircleCR::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircleCR::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -175,7 +173,7 @@ void RS_ActionDrawCircleCR::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawCircleCR::getAvailableCommands()
+QStringList ActionDrawCircleCR::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -192,7 +190,7 @@ QStringList RS_ActionDrawCircleCR::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawCircleCR::updateMouseButtonHints()
+void ActionDrawCircleCR::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -210,26 +208,26 @@ void RS_ActionDrawCircleCR::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawCircleCR::showOptions()
+void ActionDrawCircleCR::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawCircleCR::hideOptions()
+void ActionDrawCircleCR::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawCircleCR::updateMouseCursor()
+void ActionDrawCircleCR::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawCircleCR::updateToolBar()
+void ActionDrawCircleCR::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -237,13 +235,12 @@ void RS_ActionDrawCircleCR::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 }
 
-double RS_ActionDrawCircleCR::getRadius()
+double ActionDrawCircleCR::getRadius()
 {
        return data.radius;
 }
 
-void RS_ActionDrawCircleCR::setRadius(double r)
+void ActionDrawCircleCR::setRadius(double r)
 {
        data.radius = r;
 }
-
similarity index 67%
rename from src/actions/rs_actiondrawcirclecr.h
rename to src/actions/actiondrawcirclecr.h
index 8bd35ec25a069d2d6df99878263839b7eccddade..6e50f446a50251ad7600c917a03aa84d60ec37b7 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDRAWCIRCLECR_H
-#define RS_ACTIONDRAWCIRCLECR_H
+#ifndef __ACTIONDRAWCIRCLECR_H__
+#define __ACTIONDRAWCIRCLECR_H__
 
 #include "rs_circle.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
- * This action class can handle user events to draw
- * simple arcs with the center, radius, start- and endangle given.
+ * This action class can handle user events to draw simple arcs with the
+ * center, radius, start and end angle given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawCircleCR: public RS_PreviewActionInterface
+class ActionDrawCircleCR: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionDrawCircleCR: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawCircleCR();
+               ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawCircleCR();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -49,4 +50,4 @@ class RS_ActionDrawCircleCR: public RS_PreviewActionInterface
                RS_CircleData data;
 };
 
-#endif
+#endif // __ACTIONDRAWCIRCLECR_H__
similarity index 78%
rename from src/actions/rs_actiondrawellipseaxis.cpp
rename to src/actions/actiondrawellipseaxis.cpp
index f1c72616d015acefefbf5b9d444c07497a747fd0..6f6a7f66a7169698fc0c6cef5e7b4574b6c87931 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawellipseaxis.cpp
+// actiondrawellipseaxis.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawellipseaxis.h"
+#include "actiondrawellipseaxis.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
@@ -25,7 +25,7 @@
  * @param isArc true if this action will produce an ellipse arc.
  *              false if it will produce a full ellipse.
  */
-RS_ActionDrawEllipseAxis::RS_ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc): RS_PreviewActionInterface("Draw ellipse with axis",
+ActionDrawEllipseAxis::ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc): ActionInterface("Draw ellipse with axis",
                container, graphicView)
 {
        this->isArc = isArc;
@@ -36,13 +36,13 @@ RS_ActionDrawEllipseAxis::RS_ActionDrawEllipseAxis(RS_EntityContainer & containe
        angle2 = 2 * M_PI;
 }
 
-RS_ActionDrawEllipseAxis::~RS_ActionDrawEllipseAxis()
+ActionDrawEllipseAxis::~ActionDrawEllipseAxis()
 {
 }
 
-void RS_ActionDrawEllipseAxis::init(int status)
+void ActionDrawEllipseAxis::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        if (status == SetCenter)
                center = Vector(false);
@@ -60,9 +60,9 @@ void RS_ActionDrawEllipseAxis::init(int status)
                angle2 = 2 * M_PI;
 }
 
-void RS_ActionDrawEllipseAxis::trigger()
+void ActionDrawEllipseAxis::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_EllipseData ellipseData(center, major, ratio, angle1, angle2, false);
        RS_Ellipse * ellipse = new RS_Ellipse(container, ellipseData);
@@ -88,13 +88,13 @@ void RS_ActionDrawEllipseAxis::trigger()
 
        setStatus(SetCenter);
 
-       RS_DEBUG->print("RS_ActionDrawEllipseAxis::trigger():"
+       RS_DEBUG->print("ActionDrawEllipseAxis::trigger():"
                " entity added: %d", ellipse->getId());
 }
 
-void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawEllipseAxis::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -110,7 +110,7 @@ void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
                        RS_EllipseData ed(center, mouse - center, 0.5, 0.0, 2 * M_PI, false);
-                       preview->addEntity(new RS_Ellipse(preview, ed));
+//                     preview->addEntity(new RS_Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -125,7 +125,7 @@ void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        double d = line.getDistanceToPoint(mouse);
                        ratio = d / (line.getLength() / 2);
                        RS_EllipseData ed(center, major, ratio, 0.0, 2 * M_PI, false);
-                       preview->addEntity(new RS_Ellipse(preview, ed));
+//                     preview->addEntity(new RS_Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -145,10 +145,10 @@ void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        v.scale(Vector(1.0, 1.0 / ratio));
                        angle1 = v.angle(); // + major.angle();
 
-                       preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
+//                     preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
 
                        RS_EllipseData ed(center, major, ratio, angle1, angle1 + 1.0, false);
-                       preview->addEntity(new RS_Ellipse(preview, ed));
+//                     preview->addEntity(new RS_Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -167,11 +167,10 @@ void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        v.scale(Vector(1.0, 1.0 / ratio));
                        angle2 = v.angle(); // + major.angle();
 
-                       preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
+//                     preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
 
-                       RS_EllipseData ed(
-                               center, major, ratio, angle1, angle2, false);
-                       preview->addEntity(new RS_Ellipse(preview, ed));
+                       RS_EllipseData ed(center, major, ratio, angle1, angle2, false);
+//                     preview->addEntity(new RS_Ellipse(preview, ed));
                        drawPreview();
                }
 
@@ -179,20 +178,18 @@ void RS_ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawEllipseAxis::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent end");
 }
 
-void RS_ActionDrawEllipseAxis::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawEllipseAxis::mouseReleaseEvent(QMouseEvent * e)
 {
        // Proceed to next status
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector ce(snapPoint(e));
                coordinateEvent(&ce);
        }
        // Return to last status:
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
@@ -201,7 +198,7 @@ void RS_ActionDrawEllipseAxis::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawEllipseAxis::coordinateEvent(Vector * e)
+void ActionDrawEllipseAxis::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -266,7 +263,7 @@ void RS_ActionDrawEllipseAxis::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
+void ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -334,13 +331,13 @@ void RS_ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawEllipseAxis::getAvailableCommands()
+QStringList ActionDrawEllipseAxis::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawEllipseAxis::updateMouseButtonHints()
+void ActionDrawEllipseAxis::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -379,14 +376,14 @@ void RS_ActionDrawEllipseAxis::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawEllipseAxis::updateMouseCursor()
+void ActionDrawEllipseAxis::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawEllipseAxis::updateToolBar()
+void ActionDrawEllipseAxis::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                if (!isFinished())
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -394,5 +391,3 @@ void RS_ActionDrawEllipseAxis::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarEllipses);
        }
 }
-
-// EOF
similarity index 70%
rename from src/actions/rs_actiondrawellipseaxis.h
rename to src/actions/actiondrawellipseaxis.h
index 2aacd5006b07ebb7c18d8eda7b8888c554d72ee4..31e54e3300d98debc745fc11d1f2a874d6289fb4 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDRAWELLIPSEAXIS_H
-#define RS_ACTIONDRAWELLIPSEAXIS_H
+#ifndef __ACTIONDRAWELLIPSEAXIS_H__
+#define __ACTIONDRAWELLIPSEAXIS_H__
 
 #include "rs_ellipse.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
- * This action class can handle user events to draw ellipses
- * with a center point and the endpoints of minor and major axis.
+ * This action class can handle user events to draw ellipses with a center
+ * point and the endpoints of minor and major axis.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawEllipseAxis: public RS_PreviewActionInterface
+class ActionDrawEllipseAxis: public ActionInterface
 {
        public:
                /**
@@ -25,8 +26,8 @@ class RS_ActionDrawEllipseAxis: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc);
-               ~RS_ActionDrawEllipseAxis();
+               ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc);
+               ~ActionDrawEllipseAxis();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -54,4 +55,4 @@ class RS_ActionDrawEllipseAxis: public RS_PreviewActionInterface
                bool isArc;
 };
 
-#endif
+#endif // __ACTIONDRAWELLIPSEAXIS_H__
similarity index 59%
rename from src/actions/rs_actiondrawhatch.cpp
rename to src/actions/actiondrawhatch.cpp
index 0fd90c2240533db7378a4a070d169cc8611091cd..b5255894171bd4d8496030eb580cbbb1b6a6b5ae 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawhatch.cpp
+// actiondrawhatch.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawhatch.h"
+#include "actiondrawhatch.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_information.h"
 
-RS_ActionDrawHatch::RS_ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw Hatch", container, graphicView)
+ActionDrawHatch::ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw Hatch", container, graphicView)
 {
        hatch = NULL;
 }
 
-RS_ActionDrawHatch::~RS_ActionDrawHatch()
+ActionDrawHatch::~ActionDrawHatch()
 {
 }
 
-void RS_ActionDrawHatch::init(int status)
+void ActionDrawHatch::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        clearPreview();
 
        RS_Hatch tmp(container, data);
@@ -48,40 +48,41 @@ void RS_ActionDrawHatch::init(int status)
                finish();
 }
 
-void RS_ActionDrawHatch::trigger()
+void ActionDrawHatch::trigger()
 {
-       RS_DEBUG->print("RS_ActionDrawHatch::trigger()");
+       RS_DEBUG->print("ActionDrawHatch::trigger()");
 
-       //if (pos.valid) {
-       //deletePreview();
        deleteSnapper();
        RS_Entity * e;
 
        // deselect unhatchable entities:
-       for (e = container->firstEntity(RS2::ResolveNone); e != NULL;
-            e = container->nextEntity(RS2::ResolveNone))
+       for(e=container->firstEntity(RS2::ResolveNone); e!=NULL;
+               e=container->nextEntity(RS2::ResolveNone))
+       {
                if (e->isSelected()
                    && (e->rtti() == RS2::EntityHatch
-                       || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
-                       || e->rtti() == RS2::EntityText
-                       || RS_Information::isDimension(e->rtti())))
+                       || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
+                       || e->rtti() == RS2::EntityText
+                       || RS_Information::isDimension(e->rtti())))
                        e->setSelected(false);
+       }
 
-
-       for (e = container->firstEntity(RS2::ResolveAll); e != NULL;
-            e = container->nextEntity(RS2::ResolveAll))
+       for(e=container->firstEntity(RS2::ResolveAll); e!=NULL;
+               e=container->nextEntity(RS2::ResolveAll))
+       {
                if (e->isSelected()
-                   && (e->rtti() == RS2::EntityHatch
-                       || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
-                       || e->rtti() == RS2::EntityText
-                       || RS_Information::isDimension(e->rtti())))
+                       && (e->rtti() == RS2::EntityHatch
+                       || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
+                       || e->rtti() == RS2::EntityText
+                       || RS_Information::isDimension(e->rtti())))
                        e->setSelected(false);
+       }
 
        // look for selected contours:
        bool haveContour = false;
 
-       for (e = container->firstEntity(RS2::ResolveAll); e != NULL;
-            e = container->nextEntity(RS2::ResolveAll))
+       for(e=container->firstEntity(RS2::ResolveAll); e!=NULL;
+               e=container->nextEntity(RS2::ResolveAll))
                if (e->isSelected())
                        haveContour = true;
 
@@ -98,23 +99,25 @@ void RS_ActionDrawHatch::trigger()
        loop->setPen(RS_Pen(RS2::FlagInvalid));
 
        // add selected contour:
-       for (RS_Entity * e = container->firstEntity(RS2::ResolveAll); e != NULL;
-            e = container->nextEntity(RS2::ResolveAll))
-
+       for(RS_Entity * e=container->firstEntity(RS2::ResolveAll); e!=NULL;
+            e=container->nextEntity(RS2::ResolveAll))
+       {
                if (e->isSelected())
                {
                        e->setSelected(false);
 
                        // entity is part of a complex entity (spline, polyline, ..):
                        if (e->getParent() != NULL
-                           && (e->getParent()->rtti() == RS2::EntitySpline
-                               || e->getParent()->rtti() == RS2::EntityPolyline))
+                               && (e->getParent()->rtti() == RS2::EntitySpline
+                               || e->getParent()->rtti() == RS2::EntityPolyline))
                                e->getParent()->setSelected(false);
+
                        RS_Entity * cp = e->clone();
                        cp->setPen(RS_Pen(RS2::FlagInvalid));
                        cp->reparent(loop);
                        loop->addEntity(cp);
                }
+       }
 
        hatch->addEntity(loop);
 
@@ -128,10 +131,9 @@ void RS_ActionDrawHatch::trigger()
                        document->addUndoable(hatch);
                        document->endUndoCycle();
                }
-               hatch->update();
 
+               hatch->update();
                graphicView->drawEntity(hatch);
-
                RS_DIALOGFACTORY->commandMessage(tr("Hatch created successfully."));
        }
        else
@@ -139,14 +141,13 @@ void RS_ActionDrawHatch::trigger()
                delete hatch;
                hatch = NULL;
                RS_DIALOGFACTORY->commandMessage(tr("Invalid hatch area. Please check that "
-                               "the entities chosen form one or more closed contours."));
+                       "the entities chosen form one or more closed contours."));
        }
-       //}
 }
 
-void RS_ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
+void ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
 {
-       RS_DEBUG->print("RS_ActionDrawHatch::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawHatch::mouseMoveEvent begin");
 
        /*if (getStatus()==SetPos) {
            Vector mouse = snapPoint(e);
@@ -162,12 +163,11 @@ void RS_ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
            drawPreview();
           }*/
 
-       RS_DEBUG->print("RS_ActionDrawHatch::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawHatch::mouseMoveEvent end");
 }
 
-void RS_ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector mouse = snapPoint(e);
@@ -181,7 +181,6 @@ void RS_ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
                        break;
                }
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                //deletePreview();
@@ -190,18 +189,17 @@ void RS_ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawHatch::updateMouseButtonHints()
+void ActionDrawHatch::updateMouseButtonHints()
 {
        RS_DIALOGFACTORY->updateMouseWidget("", "");
 }
 
-void RS_ActionDrawHatch::updateMouseCursor()
+void ActionDrawHatch::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawHatch::updateToolBar()
+void ActionDrawHatch::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
-
similarity index 66%
rename from src/actions/rs_actiondrawhatch.h
rename to src/actions/actiondrawhatch.h
index 295456464dfedd426201a96a44f55a5d0df933a8..20c2a0a4cf79861a54a29240e9c665cd371f4a6a 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONDRAWHATCH_H
-#define RS_ACTIONDRAWHATCH_H
+#ifndef __ACTIONDRAWHATCH_H__
+#define __ACTIONDRAWHATCH_H__
 
 #include "rs_hatch.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to draw hatches.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawHatch: public RS_PreviewActionInterface
+class ActionDrawHatch: public ActionInterface
 {
        public:
                /**
@@ -20,8 +21,8 @@ class RS_ActionDrawHatch: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawHatch();
+               ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawHatch();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -36,4 +37,4 @@ class RS_ActionDrawHatch: public RS_PreviewActionInterface
                RS_Hatch * hatch;
 };
 
-#endif
+#endif // __ACTIONDRAWHATCH_H__
similarity index 63%
rename from src/actions/rs_actiondrawimage.cpp
rename to src/actions/actiondrawimage.cpp
index b80cfd574e0b89c16768c8fa643b9583ba4985d1..b30d98e0d85f8e09d3dcddf6129d2ee9304a225e 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawimage.cpp
+// actiondrawimage.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawimage.h"
+#include "actiondrawimage.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
 /**
  * Constructor.
  */
-RS_ActionDrawImage::RS_ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Image", container, graphicView)
+ActionDrawImage::ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Image", container, graphicView)
 {
 }
 
-RS_ActionDrawImage::~RS_ActionDrawImage()
+ActionDrawImage::~ActionDrawImage()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawImage::rtti()
+/*virtual*/ RS2::ActionType ActionDrawImage::rtti()
 {
        return RS2::ActionDrawImage;
 }
 
-void RS_ActionDrawImage::init(int status)
+void ActionDrawImage::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 
@@ -61,7 +61,7 @@ void RS_ActionDrawImage::init(int status)
        }
 }
 
-void RS_ActionDrawImage::reset()
+void ActionDrawImage::reset()
 {
        data = RS_ImageData(0,
                        Vector(0.0, 0.0),
@@ -72,7 +72,7 @@ void RS_ActionDrawImage::reset()
                        50, 50, 0);
 }
 
-void RS_ActionDrawImage::trigger()
+void ActionDrawImage::trigger()
 {
        deleteSnapper();
        deletePreview();
@@ -85,38 +85,35 @@ void RS_ActionDrawImage::trigger()
        }
 
        graphicView->redraw();
-       //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        finish();
        updateToolBar();
 }
 
-void RS_ActionDrawImage::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawImage::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
        case SetTargetPoint:
                data.insertionPoint = snapPoint(e);
 
-               deletePreview();
-               clearPreview();
-               //RS_Creation creation(preview, NULL, false);
-               //creation.createInsert(data);
-               RS_Line * line;
-               line = new RS_Line(preview, RS_LineData(Vector(0, 0), Vector(img.width(), 0)));
-               preview->addEntity(line);
-               line = new RS_Line(preview,
-                               RS_LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
-               preview->addEntity(line);
-               line = new RS_Line(preview,
-                               RS_LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
-               preview->addEntity(line);
-               line = new RS_Line(preview, RS_LineData(Vector(0, img.height()), Vector(0, 0)));
-               preview->addEntity(line);
-               preview->scale(Vector(0, 0), Vector(data.uVector.magnitude(), data.uVector.magnitude()));
-               preview->rotate(Vector(0, 0), data.uVector.angle());
-               preview->move(data.insertionPoint);
-
-               drawPreview();
+//             deletePreview();
+//             clearPreview();
+//             RS_Line * line;
+//             line = new RS_Line(preview, RS_LineData(Vector(0, 0), Vector(img.width(), 0)));
+//             preview->addEntity(line);
+//             line = new RS_Line(preview,
+//                     RS_LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
+//             preview->addEntity(line);
+//             line = new RS_Line(preview,
+//                     RS_LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
+//             preview->addEntity(line);
+//             line = new RS_Line(preview, RS_LineData(Vector(0, img.height()), Vector(0, 0)));
+//             preview->addEntity(line);
+//             preview->scale(Vector(0, 0), Vector(data.uVector.magnitude(), data.uVector.magnitude()));
+//             preview->rotate(Vector(0, 0), data.uVector.angle());
+//             preview->move(data.insertionPoint);
+//
+//             drawPreview();
                break;
 
        default:
@@ -124,33 +121,30 @@ void RS_ActionDrawImage::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawImage::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawImage::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (e->button() == Qt::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector ce(snapPoint(e));
                coordinateEvent(&ce);
        }
-//     else if (e->button() == Qt::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deleteSnapper();
-               //init(getStatus()-1);
                finish();
        }
 }
 
-void RS_ActionDrawImage::coordinateEvent(Vector * e)
+void ActionDrawImage::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        data.insertionPoint = *e;
        trigger();
 }
 
-void RS_ActionDrawImage::commandEvent(RS_CommandEvent * e)
+void ActionDrawImage::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -188,10 +182,11 @@ void RS_ActionDrawImage::commandEvent(RS_CommandEvent * e)
                bool ok;
                double a = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        setAngle(RS_Math::deg2rad(a));
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -202,10 +197,11 @@ void RS_ActionDrawImage::commandEvent(RS_CommandEvent * e)
                bool ok;
                double f = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        setFactor(f);
                else
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
@@ -216,7 +212,7 @@ void RS_ActionDrawImage::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawImage::getAvailableCommands()
+QStringList ActionDrawImage::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -234,21 +230,21 @@ QStringList RS_ActionDrawImage::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawImage::showOptions()
+void ActionDrawImage::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawImage::hideOptions()
+void ActionDrawImage::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawImage::updateMouseButtonHints()
+void ActionDrawImage::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -270,12 +266,12 @@ void RS_ActionDrawImage::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawImage::updateMouseCursor()
+void ActionDrawImage::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawImage::updateToolBar()
+void ActionDrawImage::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -283,24 +279,24 @@ void RS_ActionDrawImage::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
-double RS_ActionDrawImage::getAngle()
+double ActionDrawImage::getAngle()
 {
        return data.uVector.angle();
 }
 
-void RS_ActionDrawImage::setAngle(double a)
+void ActionDrawImage::setAngle(double a)
 {
        double l = data.uVector.magnitude();
        data.uVector.setPolar(l, a);
        data.vVector.setPolar(l, a + M_PI / 2);
 }
 
-double RS_ActionDrawImage::getFactor()
+double ActionDrawImage::getFactor()
 {
        return data.uVector.magnitude();
 }
 
-void RS_ActionDrawImage::setFactor(double f)
+void ActionDrawImage::setFactor(double f)
 {
        double a = data.uVector.angle();
        data.uVector.setPolar(f, a);
similarity index 83%
rename from src/actions/rs_actiondrawimage.h
rename to src/actions/actiondrawimage.h
index 47a330714c8cd2809a85ae002208b3f76d8cc628..79b3e8f874bedd1062d70d7cf12a16a00f5b06f0 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWIMAGE_H
-#define RS_ACTIONDRAWIMAGE_H
+#ifndef __ACTIONDRAWIMAGE_H__
+#define __ACTIONDRAWIMAGE_H__
 
 #include <QtGui>
 #include "rs_image.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events for inserting bitmaps into the
  * current drawing.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawImage: public RS_PreviewActionInterface
+class ActionDrawImage: public ActionInterface
 {
        public:
                /**
@@ -29,8 +30,8 @@ class RS_ActionDrawImage: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawImage();
+               ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawImage();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -59,4 +60,4 @@ class RS_ActionDrawImage: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDRAWIMAGE_H__
similarity index 69%
rename from src/actions/rs_actiondrawline.cpp
rename to src/actions/actiondrawline.cpp
index d3fad7284b9939c27f3deda7411751eb78d12b24..e6ae87a68b0807ef233e398c7b6b3b84e82b6345 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawline.cpp
+// actiondrawline.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  05/19/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawline.h"
+#include "actiondrawline.h"
 
-#include "rs_actioneditundo.h"
+#include "actioneditundo.h"
 #include "rs_commandevent.h"
 #include "commands.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLine::RS_ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw lines", container, graphicView)
+ActionDrawLine::ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw lines", container, graphicView)
 {
-       RS_DEBUG->print("RS_ActionDrawLine::RS_ActionDrawLine");
+       RS_DEBUG->print("ActionDrawLine::ActionDrawLine");
        reset();
        //hm.
        graphicView.snapper.SetContainer(&container);
        graphicView.snapper.SetGraphicView(&graphicView);
        graphicView.snapper.SetVisible();
        graphicView.preview.SetVisible();
-       RS_DEBUG->print("RS_ActionDrawLine::RS_ActionDrawLine: OK");
+       RS_DEBUG->print("ActionDrawLine::ActionDrawLine: OK");
 }
 
-RS_ActionDrawLine::~RS_ActionDrawLine()
+ActionDrawLine::~ActionDrawLine()
 {
        ClearHistory();
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLine::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLine::rtti()
 {
        return RS2::ActionDrawLine;
 }
 
-void RS_ActionDrawLine::reset()
+void ActionDrawLine::reset()
 {
-       RS_DEBUG->print("RS_ActionDrawLine::reset");
+       RS_DEBUG->print("ActionDrawLine::reset");
        data = RS_LineData(Vector(false), Vector(false));
        start = Vector(false);
        ClearHistory();
-       RS_DEBUG->print("RS_ActionDrawLine::reset: OK");
+       RS_DEBUG->print("ActionDrawLine::reset: OK");
 }
 
-void RS_ActionDrawLine::init(int status)
+void ActionDrawLine::init(int status)
 {
-       RS_DEBUG->print("RS_ActionDrawLine::init");
-//     RS_PreviewActionInterface::init(status);
-       RS_ActionInterface::init(status);
+       RS_DEBUG->print("ActionDrawLine::init");
+//     ActionInterface::init(status);
+       ActionInterface::init(status);
        reset();
-       RS_DEBUG->print("RS_ActionDrawLine::init: OK");
+       RS_DEBUG->print("ActionDrawLine::init: OK");
 }
 
-void RS_ActionDrawLine::trigger()
+void ActionDrawLine::trigger()
 {
        graphicView->preview.clear();
 
@@ -71,7 +71,7 @@ void RS_ActionDrawLine::trigger()
        line->setPenToActive();
        container->addEntity(line);
 //std::cout << container;
-//printf("RS_ActionDrawLine::trigger(): new line is %f,%f to %f,%f\n", data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
+//printf("ActionDrawLine::trigger(): new line is %f,%f to %f,%f\n", data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
 //This makes it come back as "Unknown Entity"
 //std::cout << *((RS_Entity *)container);
 //std::cout << *container;
@@ -87,20 +87,20 @@ void RS_ActionDrawLine::trigger()
        graphicView->moveRelativeZero(line->getEndpoint());
        //hm. [OK, it just moves the relative zero tho. Overkill. And remove preview, so OK.]
        graphicView->redraw();
-       RS_DEBUG->print("RS_ActionDrawLine::trigger(): line added: %d", line->getId());
+       RS_DEBUG->print("ActionDrawLine::trigger(): line added: %d", line->getId());
 }
 
-void RS_ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLine::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent begin");
 
-       RS_DEBUG->print("RS_ActionDrawLine::mouseMoveEvent: snap point");
+       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point");
        Vector mouse = graphicView->snapper.snapPoint(e);
-       RS_DEBUG->print("RS_ActionDrawLine::mouseMoveEvent: snap point: OK");
+       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point: OK");
 
        if (getStatus() == SetEndpoint && data.startpoint.valid)
        {
-               RS_DEBUG->print("RS_ActionDrawLine::mouseMoveEvent: update preview");
+               RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: update preview");
                // This is lame. Creating a new Line every time the endpoint moves.
                // Surely we can alter the line entity inside the preview, no?
 #if 0
@@ -125,10 +125,10 @@ void RS_ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
 
        //hm. [ok, this works. :-D]
        graphicView->redraw();
-       RS_DEBUG->print("RS_ActionDrawLine::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLine::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLine::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -151,13 +151,13 @@ void RS_ActionDrawLine::mouseReleaseEvent(QMouseEvent * e)
        graphicView->redraw();
 }
 
-void RS_ActionDrawLine::coordinateEvent(Vector * e)
+void ActionDrawLine::coordinateEvent(Vector * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent");
+       RS_DEBUG->print("ActionDrawLine::coordinateEvent");
 
        if (!e)
        {
-               RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent: event was NULL");
+               RS_DEBUG->print("ActionDrawLine::coordinateEvent: event was NULL");
                return;
        }
 
@@ -187,12 +187,12 @@ void RS_ActionDrawLine::coordinateEvent(Vector * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLine::coordinateEvent: OK");
+       RS_DEBUG->print("ActionDrawLine::coordinateEvent: OK");
 }
 
-void RS_ActionDrawLine::commandEvent(RS_CommandEvent * e)
+void ActionDrawLine::commandEvent(RS_CommandEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLine::commandEvent");
+       RS_DEBUG->print("ActionDrawLine::commandEvent");
        QString c = e->getCommand().toLower();
 
        switch (getStatus())
@@ -228,10 +228,10 @@ void RS_ActionDrawLine::commandEvent(RS_CommandEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLine::commandEvent: OK");
+       RS_DEBUG->print("ActionDrawLine::commandEvent: OK");
 }
 
-QStringList RS_ActionDrawLine::getAvailableCommands()
+QStringList ActionDrawLine::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -257,7 +257,7 @@ QStringList RS_ActionDrawLine::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLine::updateMouseButtonHints()
+void ActionDrawLine::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -291,26 +291,28 @@ void RS_ActionDrawLine::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLine::showOptions()
+void ActionDrawLine::showOptions()
 {
-       RS_DEBUG->print("RS_ActionDrawLine::showOptions");
-       RS_ActionInterface::showOptions();
+       RS_DEBUG->print("ActionDrawLine::showOptions");
+//     ActionInterface::showOptions();
+       ActionInterface::showOptions();
        RS_DIALOGFACTORY->requestOptions(this, true);
-       RS_DEBUG->print("RS_ActionDrawLine::showOptions: OK");
+       RS_DEBUG->print("ActionDrawLine::showOptions: OK");
 }
 
-void RS_ActionDrawLine::hideOptions()
+void ActionDrawLine::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+//     ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLine::updateMouseCursor()
+void ActionDrawLine::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLine::updateToolBar()
+void ActionDrawLine::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -318,7 +320,7 @@ void RS_ActionDrawLine::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
-void RS_ActionDrawLine::close()
+void ActionDrawLine::close()
 {
 //NOTE: We should grey out the "close" button until the conditions for its use are satisfied.
 //      Though I can see how this would be called via cmd line... So I guess it's OK
@@ -333,13 +335,13 @@ void RS_ActionDrawLine::close()
                RS_DIALOGFACTORY->commandMessage(tr("Cannot close sequence of lines: Not enough entities defined yet."));
 }
 
-void RS_ActionDrawLine::undo()
+void ActionDrawLine::undo()
 {
 //NOTE: We should grey out the "undo" button until the conditions for its use are satisfied.
        if (history.count() > 1)
        {
                history.removeLast();
-               graphicView->setCurrentAction(new RS_ActionEditUndo(true, *container, *graphicView));
+               graphicView->setCurrentAction(new ActionEditUndo(true, *container, *graphicView));
                data.startpoint = *history.last();
                graphicView->moveRelativeZero(data.startpoint);
                graphicView->preview.clear();
@@ -349,7 +351,7 @@ void RS_ActionDrawLine::undo()
                RS_DIALOGFACTORY->commandMessage(tr("Cannot undo: Not enough entities defined yet."));
 }
 
-void RS_ActionDrawLine::ClearHistory(void)
+void ActionDrawLine::ClearHistory(void)
 {
        while (!history.isEmpty())
                delete history.takeFirst();
similarity index 80%
rename from src/actions/rs_actiondrawline.h
rename to src/actions/actiondrawline.h
index b059d6e583a87c33bcd804236bedb5155dbf454b..fde8b4f448cf1a0854ef36d3acf2b29235bc2acd 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWLINE_H
-#define RS_ACTIONDRAWLINE_H
+#ifndef __ACTIONDRAWLINE_H__
+#define __ACTIONDRAWLINE_H__
 
 #include <QtCore>
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_line.h"
 
 /**
  * This action class can handle user events to draw
  * simple lines with the start- and endpoint given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLine: public RS_PreviewActionInterface
+class ActionDrawLine: public ActionInterface
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionDrawLine: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView);
-               virtual ~RS_ActionDrawLine();
+               ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView);
+               virtual ~ActionDrawLine();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -62,4 +63,4 @@ class RS_ActionDrawLine: public RS_PreviewActionInterface
                QList<Vector *> history;
 };
 
-#endif
+#endif // __ACTIONDRAWLINE_H__
similarity index 68%
rename from src/actions/rs_actiondrawlineangle.cpp
rename to src/actions/actiondrawlineangle.cpp
index a71dbe8fb9797dace278e341d0abacab411cc1e5..53edc1fa723185942d31a0b61dce46ae9f5397b0 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlineangle.cpp
+// actiondrawlineangle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/03/2010  Moved implementation from header to this file
 //
 
-#include "rs_actiondrawlineangle.h"
+#include "actiondrawlineangle.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineAngle::RS_ActionDrawLineAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle, bool fixedAngle):
-       RS_PreviewActionInterface("Draw lines with given angle",
+ActionDrawLineAngle::ActionDrawLineAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle, bool fixedAngle):
+       ActionInterface("Draw lines with given angle",
                container, graphicView)
 {
        this->angle = angle;
@@ -32,56 +32,56 @@ RS_ActionDrawLineAngle::RS_ActionDrawLineAngle(RS_EntityContainer & container, G
        reset();
 }
 
-RS_ActionDrawLineAngle::~RS_ActionDrawLineAngle()
+ActionDrawLineAngle::~ActionDrawLineAngle()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLineAngle::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLineAngle::rtti()
 {
        return RS2::ActionDrawLineAngle;
 }
 
-void RS_ActionDrawLineAngle::reset()
+void ActionDrawLineAngle::reset()
 {
        data = RS_LineData(Vector(false), Vector(false));
 }
 
-void RS_ActionDrawLineAngle::init(int status)
+void ActionDrawLineAngle::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDrawLineAngle::trigger()
+void ActionDrawLineAngle::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        preparePreview();
-       RS_Line * line = new RS_Line(container,
-                       data);
+       RS_Line * line = new RS_Line(container, data);
        line->setLayerToActive();
        line->setPenToActive();
        container->addEntity(line);
 
        // upd. undo list:
-       if (document != NULL)
+       if (document)
        {
                document->startUndoCycle();
                document->addUndoable(line);
                document->endUndoCycle();
        }
+
        deleteSnapper();
        graphicView->moveRelativeZero(Vector(0.0, 0.0));
        graphicView->drawEntity(line);
        graphicView->moveRelativeZero(data.startpoint);
-       RS_DEBUG->print("RS_ActionDrawLineAngle::trigger(): line added: %d",
+       RS_DEBUG->print("ActionDrawLineAngle::trigger(): line added: %d",
                line->getId());
 }
 
-void RS_ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineAngle::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineAngle::mouseMoveEvent begin");
 
        if (getStatus() == SetPos)
        {
@@ -89,15 +89,14 @@ void RS_ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
                preparePreview();
-               preview->addEntity(new RS_Line(preview,
-                               data));
+//             preview->addEntity(new RS_Line(preview, data));
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineAngle::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineAngle::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -115,7 +114,7 @@ void RS_ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineAngle::preparePreview()
+void ActionDrawLineAngle::preparePreview()
 {
        Vector p1, p2;
 
@@ -135,7 +134,7 @@ void RS_ActionDrawLineAngle::preparePreview()
        data = RS_LineData(p1, p2);
 }
 
-void RS_ActionDrawLineAngle::coordinateEvent(Vector * e)
+void ActionDrawLineAngle::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -152,7 +151,7 @@ void RS_ActionDrawLineAngle::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -214,7 +213,7 @@ void RS_ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLineAngle::getAvailableCommands()
+QStringList ActionDrawLineAngle::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -234,7 +233,7 @@ QStringList RS_ActionDrawLineAngle::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLineAngle::updateMouseButtonHints()
+void ActionDrawLineAngle::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -256,26 +255,26 @@ void RS_ActionDrawLineAngle::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineAngle::showOptions()
+void ActionDrawLineAngle::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawLineAngle::hideOptions()
+void ActionDrawLineAngle::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLineAngle::updateMouseCursor()
+void ActionDrawLineAngle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineAngle::updateToolBar()
+void ActionDrawLineAngle::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -283,38 +282,37 @@ void RS_ActionDrawLineAngle::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
-void RS_ActionDrawLineAngle::setSnapPoint(int sp)
+void ActionDrawLineAngle::setSnapPoint(int sp)
 {
        snpPoint = sp;
 }
 
-int RS_ActionDrawLineAngle::getSnapPoint()
+int ActionDrawLineAngle::getSnapPoint()
 {
        return snpPoint;
 }
 
-void RS_ActionDrawLineAngle::setAngle(double a)
+void ActionDrawLineAngle::setAngle(double a)
 {
        angle = a;
 }
 
-double RS_ActionDrawLineAngle::getAngle()
+double ActionDrawLineAngle::getAngle()
 {
        return angle;
 }
 
-void RS_ActionDrawLineAngle::setLength(double l)
+void ActionDrawLineAngle::setLength(double l)
 {
        length = l;
 }
 
-double RS_ActionDrawLineAngle::getLength()
+double ActionDrawLineAngle::getLength()
 {
        return length;
 }
 
-bool RS_ActionDrawLineAngle::hasFixedAngle()
+bool ActionDrawLineAngle::hasFixedAngle()
 {
        return fixedAngle;
 }
-
similarity index 75%
rename from src/actions/rs_actiondrawlineangle.h
rename to src/actions/actiondrawlineangle.h
index 49b1c3cdbd9b46986611152d9a29ad28c28367aa..5282c6600238cb207776bee133dcc8e55f6e89ae 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWLINEANGLE_H
-#define RS_ACTIONDRAWLINEANGLE_H
+#ifndef __ACTIONDRAWLINEANGLE_H__
+#define __ACTIONDRAWLINEANGLE_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
- * This action class can handle user events to draw
- * simple lines at a gien angle.
+ * This action class can handle user events to draw simple lines at a given
+ * angle.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineAngle: public RS_PreviewActionInterface
+class ActionDrawLineAngle: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionDrawLineAngle: public RS_PreviewActionInterface
                        SetLength     /**< Setting length in the command line. */
                };
 
-               RS_ActionDrawLineAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
-               ~RS_ActionDrawLineAngle();
+               ActionDrawLineAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
+               ~ActionDrawLineAngle();
 
                virtual RS2::ActionType rtti();
                void reset();
@@ -76,5 +77,4 @@ class RS_ActionDrawLineAngle: public RS_PreviewActionInterface
                int snpPoint;
 };
 
-#endif
-
+#endif // __ACTIONDRAWLINEANGLE_H__
similarity index 71%
rename from src/actions/rs_actiondrawlinebisector.cpp
rename to src/actions/actiondrawlinebisector.cpp
index 285be69174dac58fa36b60c4b3bcb6f5056c33d1..23b4107356e7a00d6e452b89dcfa7e528dac1762 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinebisector.cpp
+// actiondrawlinebisector.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/03/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinebisector.h"
+#include "actiondrawlinebisector.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
@@ -20,8 +20,8 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineBisector::RS_ActionDrawLineBisector(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw Bisectors", container, graphicView)
+ActionDrawLineBisector::ActionDrawLineBisector(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw Bisectors", container, graphicView)
 {
        bisector = NULL;
        length = 10.0;
@@ -33,18 +33,18 @@ RS_ActionDrawLineBisector::RS_ActionDrawLineBisector(RS_EntityContainer & contai
        lastStatus = SetLine1;
 }
 
-RS_ActionDrawLineBisector::~RS_ActionDrawLineBisector()
+ActionDrawLineBisector::~ActionDrawLineBisector()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLineBisector::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLineBisector::rtti()
 {
        return RS2::ActionDrawLineBisector;
 }
 
-void RS_ActionDrawLineBisector::trigger()
+void ActionDrawLineBisector::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        //if (bisector!=NULL) {
        RS_Creation creation(container, graphicView);
@@ -78,14 +78,14 @@ void RS_ActionDrawLineBisector::trigger()
           bisector = NULL;
         */
        /*} else {
-           RS_DEBUG->print("RS_ActionDrawLineBisector::trigger:"
+           RS_DEBUG->print("ActionDrawLineBisector::trigger:"
                            " Entity is NULL\n");
           }*/
 }
 
-void RS_ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineBisector::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent begin");
 
        Vector mouse = Vector(graphicView->toGraphX(e->x()),
                        graphicView->toGraphY(e->y()));
@@ -95,37 +95,33 @@ void RS_ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
        case SetLine1:
                break;
 
-       case SetLine2: {
+       case SetLine2:
+       {
                coord2 = mouse;
                RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
-               if (en != NULL && en->rtti() == RS2::EntityLine)
+               if (en && en->rtti() == RS2::EntityLine)
                {
-                       line2 = (RS_Line *)en;
-
-                       deletePreview();
-                       clearPreview();
-
-                       RS_Creation creation(preview, NULL, false);
-                       creation.createBisector(coord1,
-                               coord2,
-                               length,
-                               number,
-                               line1,
-                               line2);
-                       drawPreview();
+//                     line2 = (RS_Line *)en;
+//
+//                     deletePreview();
+//                     clearPreview();
+//
+//                     RS_Creation creation(preview, NULL, false);
+//                     creation.createBisector(coord1, coord2, length, number, line1, line2);
+//                     drawPreview();
                }
        }
-       break;
+               break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineBisector::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
        {
@@ -136,11 +132,12 @@ void RS_ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
        else
        {
                Vector mouse = Vector(graphicView->toGraphX(e->x()),
-                               graphicView->toGraphY(e->y()));
+                       graphicView->toGraphY(e->y()));
 
                switch (getStatus())
                {
-               case SetLine1: {
+               case SetLine1:
+               {
                        coord1 = mouse;
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
@@ -159,7 +156,7 @@ void RS_ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -223,7 +220,7 @@ void RS_ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLineBisector::getAvailableCommands()
+QStringList ActionDrawLineBisector::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -242,7 +239,7 @@ QStringList RS_ActionDrawLineBisector::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLineBisector::updateMouseButtonHints()
+void ActionDrawLineBisector::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -272,47 +269,46 @@ void RS_ActionDrawLineBisector::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineBisector::showOptions()
+void ActionDrawLineBisector::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawLineBisector::hideOptions()
+void ActionDrawLineBisector::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLineBisector::updateMouseCursor()
+void ActionDrawLineBisector::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineBisector::updateToolBar()
+void ActionDrawLineBisector::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
-void RS_ActionDrawLineBisector::setLength(double l)
+void ActionDrawLineBisector::setLength(double l)
 {
        length = l;
 }
 
-double RS_ActionDrawLineBisector::getLength()
+double ActionDrawLineBisector::getLength()
 {
        return length;
 }
 
-void RS_ActionDrawLineBisector::setNumber(int n)
+void ActionDrawLineBisector::setNumber(int n)
 {
        number = n;
 }
 
-int RS_ActionDrawLineBisector::getNumber()
+int ActionDrawLineBisector::getNumber()
 {
        return number;
 }
-
similarity index 81%
rename from src/actions/rs_actiondrawlinebisector.h
rename to src/actions/actiondrawlinebisector.h
index d524b2d410fc8742ec4a5cea3ed9feb87635c447..b0b9b0496ee4d961b689a89b36cf7bb03405fe49 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONDRAWLINEBISECTOR_H
-#define RS_ACTIONDRAWLINEBISECTOR_H
+#ifndef __ACTIONDRAWLINEBISECTOR_H__
+#define __ACTIONDRAWLINEBISECTOR_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Line;
@@ -10,9 +10,10 @@ class RS_Line;
 /**
  * This action class can handle user events to draw bisectors.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineBisector: public RS_PreviewActionInterface
+class ActionDrawLineBisector: public ActionInterface
 {
        private:
                enum Status {
@@ -23,8 +24,8 @@ class RS_ActionDrawLineBisector: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineBisector(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineBisector();
+               ActionDrawLineBisector(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineBisector();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -63,4 +64,4 @@ class RS_ActionDrawLineBisector: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEBISECTOR_H__
similarity index 62%
rename from src/actions/rs_actiondrawlinefree.cpp
rename to src/actions/actiondrawlinefree.cpp
index 8c36b103afd9297d0a903e292f713eab1d7e85b4..464813a1a1f6b934783a10536b5373f0ace4fcc3 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinefree.cpp
+// actiondrawlinefree.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinefree.h"
+#include "actiondrawlinefree.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_polyline.h"
 
-RS_ActionDrawLineFree::RS_ActionDrawLineFree(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Draw freehand lines",
-               container, graphicView)
+ActionDrawLineFree::ActionDrawLineFree(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Draw freehand lines",
+       container, graphicView)
 {
        vertex = Vector(false);
        polyline = NULL;
 }
 
-RS_ActionDrawLineFree::~RS_ActionDrawLineFree()
+ActionDrawLineFree::~ActionDrawLineFree()
 {
-       if (polyline != NULL)
+       if (polyline)
                delete polyline;
 }
 
-void RS_ActionDrawLineFree::trigger()
+void ActionDrawLineFree::trigger()
 {
-       if (polyline != NULL)
+       if (polyline)
        {
                container->addEntity(polyline);
                deleteSnapper();
@@ -45,15 +46,15 @@ void RS_ActionDrawLineFree::trigger()
                        document->endUndoCycle();
                }
 
-               RS_DEBUG->print("RS_ActionDrawLineFree::trigger():"
+               RS_DEBUG->print("ActionDrawLineFree::trigger():"
                        " polyline added: %d", polyline->getId());
                polyline = NULL;
        }
 }
 
-void RS_ActionDrawLineFree::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineFree::mouseMoveEvent(QMouseEvent * e)
 {
-       if (vertex.valid && polyline != NULL)
+       if (vertex.valid && polyline)
        {
                Vector v = snapPoint(e);
                RS_Entity * ent = polyline->addVertex(v);
@@ -66,14 +67,13 @@ void RS_ActionDrawLineFree::mouseMoveEvent(QMouseEvent * e)
 
                vertex = v;
 
-               RS_DEBUG->print("RS_ActionDrawLineFree::mouseMoveEvent():"
+               RS_DEBUG->print("ActionDrawLineFree::mouseMoveEvent():"
                        " line added: %d", ent->getId());
        }
 }
 
-void RS_ActionDrawLineFree::mousePressEvent(QMouseEvent * e)
+void ActionDrawLineFree::mousePressEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                vertex = snapPoint(e);
@@ -81,22 +81,18 @@ void RS_ActionDrawLineFree::mousePressEvent(QMouseEvent * e)
                polyline->setLayerToActive();
                polyline->setPenToActive();
        }
-       //else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton && !vertex.valid) {
-       //}
 }
 
-void RS_ActionDrawLineFree::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineFree::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                vertex = Vector(false);
                trigger();
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
-               if (polyline != NULL)
+               if (polyline)
                {
                        delete polyline;
                        polyline = NULL;
@@ -107,7 +103,7 @@ void RS_ActionDrawLineFree::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineFree::updateMouseButtonHints()
+void ActionDrawLineFree::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -121,16 +117,15 @@ void RS_ActionDrawLineFree::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineFree::updateMouseCursor()
+void ActionDrawLineFree::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineFree::updateToolBar()
+void ActionDrawLineFree::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
-
similarity index 61%
rename from src/actions/rs_actiondrawlinefree.h
rename to src/actions/actiondrawlinefree.h
index 97c781c16f07fcfba75bb3535acdd0266b4e0c19..2aabde6422a3edeac750e856cbc0c0d8fa64f96f 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONDRAWLINEFREE_H
-#define RS_ACTIONDRAWLINEFREE_H
+#ifndef __ACTIONDRAWLINEFREE_H__
+#define __ACTIONDRAWLINEFREE_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Polyline;
@@ -9,13 +9,14 @@ class RS_Polyline;
 /**
  * This action class can handle user events to draw freehand lines.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineFree: public RS_ActionInterface
+class ActionDrawLineFree: public ActionInterface
 {
        public:
-               RS_ActionDrawLineFree(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineFree();
+               ActionDrawLineFree(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineFree();
 
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
@@ -30,4 +31,4 @@ class RS_ActionDrawLineFree: public RS_ActionInterface
                RS_Polyline * polyline;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEFREE_H__
similarity index 64%
rename from src/actions/rs_actiondrawlinehorvert.cpp
rename to src/actions/actiondrawlinehorvert.cpp
index 71f650f2d899cb5b96e7baaa6e7eead239934af2..b8bf5b7e7656f564ca16dd5a2d508c2a4495c2e3 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinehorvert.cpp
+// actiondrawlinehorvert.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinehorvert.h"
+#include "actiondrawlinehorvert.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineHorVert::RS_ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw horizontal/vertical lines",
+ActionDrawLineHorVert::ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw horizontal/vertical lines",
                container, graphicView)
 {
        reset();
-       RS_DEBUG->print("RS_ActionDrawLineHorVert::constructor");
+       RS_DEBUG->print("ActionDrawLineHorVert::constructor");
 }
 
-RS_ActionDrawLineHorVert::~RS_ActionDrawLineHorVert()
+ActionDrawLineHorVert::~ActionDrawLineHorVert()
 {
 }
 
-void RS_ActionDrawLineHorVert::reset()
+void ActionDrawLineHorVert::reset()
 {
        data = RS_LineData(Vector(false), Vector(false));
 }
 
-void RS_ActionDrawLineHorVert::init(int status)
+void ActionDrawLineHorVert::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        reset();
-       RS_DEBUG->print("RS_ActionDrawLineHorVert::init");
+       RS_DEBUG->print("ActionDrawLineHorVert::init");
 }
 
-void RS_ActionDrawLineHorVert::trigger()
+void ActionDrawLineHorVert::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Line * line = new RS_Line(container, data);
        line->setLayerToActive();
@@ -62,13 +62,13 @@ void RS_ActionDrawLineHorVert::trigger()
        graphicView->moveRelativeZero(Vector(0.0, 0.0));
        graphicView->drawEntity(line);
        graphicView->moveRelativeZero(line->getMiddlepoint());
-       RS_DEBUG->print("RS_ActionDrawLineHorVert::trigger():"
+       RS_DEBUG->print("ActionDrawLineHorVert::trigger():"
                " line added: %d", line->getId());
 }
 
-void RS_ActionDrawLineHorVert::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineHorVert::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineHorVert::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -85,16 +85,15 @@ void RS_ActionDrawLineHorVert::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
                data = RS_LineData(p1, p2);
-               preview->addEntity(new RS_Line(preview, data));
+//             preview->addEntity(new RS_Line(preview, data));
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineHorVert::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                Vector mouse = snapPoint(e);
@@ -116,7 +115,6 @@ void RS_ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent * e)
                        break;
                }
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
@@ -125,7 +123,7 @@ void RS_ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineHorVert::updateMouseButtonHints()
+void ActionDrawLineHorVert::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -143,16 +141,15 @@ void RS_ActionDrawLineHorVert::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineHorVert::updateMouseCursor()
+void ActionDrawLineHorVert::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineHorVert::updateToolBar()
+void ActionDrawLineHorVert::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
-
similarity index 73%
rename from src/actions/rs_actiondrawlinehorvert.h
rename to src/actions/actiondrawlinehorvert.h
index 5a88b906ae6141d91c44c5b39520f0f3b78b0ffe..8c0fb451d5617ea5962cf9e480ca9faea3d4b3e8 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONDRAWLINEHORVERT_H
-#define RS_ACTIONDRAWLINEHORVERT_H
+#ifndef __ACTIONDRAWLINEHORVERT_H__
+#define __ACTIONDRAWLINEHORVERT_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
@@ -13,7 +13,7 @@
  *
  * @author Ulf Lehnert
  */
-class RS_ActionDrawLineHorVert: public RS_PreviewActionInterface
+class ActionDrawLineHorVert: public ActionInterface
 {
        public:
                /**
@@ -25,8 +25,8 @@ class RS_ActionDrawLineHorVert: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineHorVert();
+               ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineHorVert();
 
                void reset();
                virtual void init(int status = 0);
@@ -49,4 +49,4 @@ class RS_ActionDrawLineHorVert: public RS_PreviewActionInterface
                Vector p2;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEHORVERT_H__
similarity index 66%
rename from src/actions/rs_actiondrawlineparallel.cpp
rename to src/actions/actiondrawlineparallel.cpp
index a9e687ce2441f7692564a337b652313e93dd94b6..979df054280596e406be64339bd94463159ce121 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlineparallel.cpp
+// actiondrawlineparallel.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,9 +12,9 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlineparallel.h"
+#include "actiondrawlineparallel.h"
 
-#include "rs_actiondrawlineparallelthrough.h"
+#include "actiondrawlineparallelthrough.h"
 #include "rs_commandevent.h"
 #include "commands.h"
 #include "rs_creation.h"
@@ -22,8 +22,9 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineParallel::RS_ActionDrawLineParallel(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Parallels",
-               container, graphicView)
+ActionDrawLineParallel::ActionDrawLineParallel(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Draw Parallels",
+       container, graphicView)
 {
        parallel = NULL;
        entity = NULL;
@@ -32,29 +33,29 @@ RS_ActionDrawLineParallel::RS_ActionDrawLineParallel(RS_EntityContainer & contai
        coord = Vector(false);
 }
 
-RS_ActionDrawLineParallel::~RS_ActionDrawLineParallel()
+ActionDrawLineParallel::~ActionDrawLineParallel()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLineParallel::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLineParallel::rtti()
 {
        return RS2::ActionDrawLineParallel;
 }
 
-void RS_ActionDrawLineParallel::trigger()
+void ActionDrawLineParallel::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Creation creation(container, graphicView);
        RS_Entity * e = creation.createParallel(coord, distance, number, entity);
 
-       if (e == NULL)
-               RS_DEBUG->print("RS_ActionDrawLineParallel::trigger: No parallels added\n");
+       if (!e)
+               RS_DEBUG->print("ActionDrawLineParallel::trigger: No parallels added\n");
 }
 
-void RS_ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineParallel::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent begin");
        coord = Vector(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
        entity = catchEntity(e, RS2::ResolveAll);
 
@@ -64,8 +65,8 @@ void RS_ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
        {
                deletePreview();
                clearPreview();
-               RS_Creation creation(preview, NULL, false);
-               creation.createParallel(coord, distance, number, entity);
+//             RS_Creation creation(preview, NULL, false);
+//             creation.createParallel(coord, distance, number, entity);
                drawPreview();
        }
        break;
@@ -74,19 +75,18 @@ void RS_ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineParallel::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
        else
                trigger();
 }
 
-void RS_ActionDrawLineParallel::updateMouseButtonHints()
+void ActionDrawLineParallel::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -110,9 +110,9 @@ void RS_ActionDrawLineParallel::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineParallel::showOptions()
+void ActionDrawLineParallel::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
@@ -120,15 +120,15 @@ void RS_ActionDrawLineParallel::showOptions()
        updateMouseButtonHints();
 }
 
-void RS_ActionDrawLineParallel::hideOptions()
+void ActionDrawLineParallel::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -147,7 +147,7 @@ void RS_ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
                if (checkCommand("through", c))
                {
                        finish();
-                       graphicView->setCurrentAction(new RS_ActionDrawLineParallelThrough(*container,
+                       graphicView->setCurrentAction(new ActionDrawLineParallelThrough(*container,
                                        *graphicView));
                }
                else if (checkCommand("number", c))
@@ -205,7 +205,7 @@ void RS_ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLineParallel::getAvailableCommands()
+QStringList ActionDrawLineParallel::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -223,34 +223,33 @@ QStringList RS_ActionDrawLineParallel::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLineParallel::updateMouseCursor()
+void ActionDrawLineParallel::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineParallel::updateToolBar()
+void ActionDrawLineParallel::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
-double RS_ActionDrawLineParallel::getDistance()
+double ActionDrawLineParallel::getDistance()
 {
        return distance;
 }
 
-void RS_ActionDrawLineParallel::setDistance(double d)
+void ActionDrawLineParallel::setDistance(double d)
 {
        distance = d;
 }
 
-int RS_ActionDrawLineParallel::getNumber()
+int ActionDrawLineParallel::getNumber()
 {
        return number;
 }
 
-void RS_ActionDrawLineParallel::setNumber(int n)
+void ActionDrawLineParallel::setNumber(int n)
 {
        number = n;
 }
-
similarity index 74%
rename from src/actions/rs_actiondrawlineparallel.h
rename to src/actions/actiondrawlineparallel.h
index f3666cdaf37898321d78041c06a1906766fe9de9..cabe41f161a6c3ca2ae8a645a45d4cca1cb855b8 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef RS_ACTIONDRAWLINEPARALLEL_H
-#define RS_ACTIONDRAWLINEPARALLEL_H
+#ifndef __ACTIONDRAWLINEPARALLEL_H__
+#define __ACTIONDRAWLINEPARALLEL_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
 
 /**
- * This action class can handle user events to draw parallel
- * lines, arcs and circles.
+ * This action class can handle user events to draw parallel lines, arcs and
+ * circles.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineParallel: public RS_PreviewActionInterface
+class ActionDrawLineParallel: public ActionInterface
 {
        private:
                enum Status {
@@ -24,8 +25,8 @@ class RS_ActionDrawLineParallel: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineParallel(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineParallel();
+               ActionDrawLineParallel(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineParallel();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -58,4 +59,4 @@ class RS_ActionDrawLineParallel: public RS_PreviewActionInterface
                RS_Entity * entity;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEPARALLEL_H__
similarity index 61%
rename from src/actions/rs_actiondrawlineparallelthrough.cpp
rename to src/actions/actiondrawlineparallelthrough.cpp
index 81a9bcec053d6f30e415f3a0a0f69fe24871872f..902e8b18105cc62c37829fd5ea7fcba97ea1c46b 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlineparallelthrough.cpp
+// actiondrawlineparallelthrough.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlineparallelthrough.h"
+#include "actiondrawlineparallelthrough.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineParallelThrough::RS_ActionDrawLineParallelThrough(
+ActionDrawLineParallelThrough::ActionDrawLineParallelThrough(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw Parallels", container, graphicView)
+       ActionInterface("Draw Parallels", container, graphicView)
 {
        parallel = NULL;
        entity = NULL;
-       distance = 1.0;
+//???  distance = 1.0;
        number = 1;
        coord = Vector(false);
 }
 
-RS_ActionDrawLineParallelThrough::~RS_ActionDrawLineParallelThrough()
+ActionDrawLineParallelThrough::~ActionDrawLineParallelThrough()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLineParallelThrough::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLineParallelThrough::rtti()
 {
        return RS2::ActionDrawLineParallelThrough;
 }
 
-void RS_ActionDrawLineParallelThrough::trigger()
+void ActionDrawLineParallelThrough::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
        deleteSnapper();
 
-       if (entity != NULL)
+       if (entity)
        {
                RS_Creation creation(container, graphicView);
                RS_Entity * e = creation.createParallelThrough(coord, number, entity);
 
-               if (e == NULL)
-                       RS_DEBUG->print("RS_ActionDrawLineParallelThrough::trigger:"
+               if (!e)
+                       RS_DEBUG->print("ActionDrawLineParallelThrough::trigger:"
                                " No parallels added\n");
        }
 }
 
-void RS_ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineParallelThrough::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent begin");
 
        switch (getStatus())
        {
        case SetEntity:
                entity = catchEntity(e, RS2::ResolveAll);
-               /*deletePreview();
-                  clearPreview();
-
-                  RS_Creation creation(preview, NULL, false);
-                  creation.createParallelThrough(coord,
-                                                                               number,
-                                                                               entity);
-
-                  drawPreview();*/
                break;
 
        case SetPos:
        {
                coord = snapPoint(e);
-               //Vector(graphicView->toGraphX(e->x()),
-               //                  graphicView->toGraphY(e->y()));
                deletePreview();
                clearPreview();
 
-               RS_Creation creation(preview, NULL, false);
-               creation.createParallelThrough(coord,
-                       number,
-                       entity);
+//             RS_Creation creation(preview, NULL, false);
+//             creation.createParallelThrough(coord, number, entity);
 
                drawPreview();
        }
@@ -96,12 +83,11 @@ void RS_ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineParallelThrough::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
 {
-//     if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
        if (e->button() == Qt::LeftButton)
        {
                switch (getStatus())
@@ -109,7 +95,7 @@ void RS_ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
                case SetEntity:
                        entity = catchEntity(e, RS2::ResolveAll);
 
-                       if (entity != NULL)
+                       if (entity)
                        {
                                entity->setHighlighted(true);
                                graphicView->drawEntity(entity);
@@ -129,13 +115,12 @@ void RS_ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
                        break;
                }
        }
-//     else if (RS2::qtToRsButtonState(e->button())==RS2::RightButton)
        else if (e->button() == Qt::RightButton)
        {
                deletePreview();
                deleteSnapper();
 
-               if (entity != NULL)
+               if (entity)
                {
                        entity->setHighlighted(false);
                        graphicView->drawEntity(entity);
@@ -146,7 +131,7 @@ void RS_ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineParallelThrough::coordinateEvent(Vector * e)
+void ActionDrawLineParallelThrough::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -165,7 +150,7 @@ void RS_ActionDrawLineParallelThrough::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLineParallelThrough::updateMouseButtonHints()
+void ActionDrawLineParallelThrough::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -187,22 +172,20 @@ void RS_ActionDrawLineParallelThrough::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineParallelThrough::showOptions()
+void ActionDrawLineParallelThrough::showOptions()
 {
-       RS_ActionInterface::showOptions();
-
+       ActionInterface::showOptions();
        RS_DIALOGFACTORY->requestOptions(this, true);
        updateMouseButtonHints();
 }
 
-void RS_ActionDrawLineParallelThrough::hideOptions()
+void ActionDrawLineParallelThrough::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
-
+       ActionInterface::hideOptions();
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -228,7 +211,8 @@ void RS_ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
                }
                break;
 
-       case SetNumber: {
+       case SetNumber:
+       {
                bool ok;
                int n = c.toInt(&ok);
 
@@ -245,14 +229,14 @@ void RS_ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
-       break;
+               break;
 
        default:
                break;
        }
 }
 
-QStringList RS_ActionDrawLineParallelThrough::getAvailableCommands()
+QStringList ActionDrawLineParallelThrough::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -269,12 +253,12 @@ QStringList RS_ActionDrawLineParallelThrough::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLineParallelThrough::updateMouseCursor()
+void ActionDrawLineParallelThrough::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineParallelThrough::updateToolBar()
+void ActionDrawLineParallelThrough::updateToolBar()
 {
        if (getStatus() == SetPos && !isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -282,13 +266,12 @@ void RS_ActionDrawLineParallelThrough::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
-int RS_ActionDrawLineParallelThrough::getNumber()
+int ActionDrawLineParallelThrough::getNumber()
 {
        return number;
 }
 
-void RS_ActionDrawLineParallelThrough::setNumber(int n)
+void ActionDrawLineParallelThrough::setNumber(int n)
 {
        number = n;
 }
-
similarity index 71%
rename from src/actions/rs_actiondrawlineparallelthrough.h
rename to src/actions/actiondrawlineparallelthrough.h
index 8a6acd3a07611867e32d058199e0777614899b15..ddf54923573dc4b1def4322622c71f43a655c79f 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef RS_ACTIONDRAWLINEPARALLELTHROUGH_H
-#define RS_ACTIONDRAWLINEPARALLELTHROUGH_H
+#ifndef __ACTIONDRAWLINEPARALLELTHROUGH_H__
+#define __ACTIONDRAWLINEPARALLELTHROUGH_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
 
 /**
- * This action class can handle user events to draw parallel
- * lines, arcs and circles.
+ * This action class can handle user events to draw parallel lines, arcs and
+ * circles.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineParallelThrough: public RS_PreviewActionInterface
+class ActionDrawLineParallelThrough: public ActionInterface
 {
        private:
                enum Status {
@@ -23,8 +24,8 @@ class RS_ActionDrawLineParallelThrough: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineParallelThrough(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineParallelThrough();
+               ActionDrawLineParallelThrough(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineParallelThrough();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -56,4 +57,4 @@ class RS_ActionDrawLineParallelThrough: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEPARALLELTHROUGH_H__
similarity index 70%
rename from src/actions/rs_actiondrawlinepolygon.cpp
rename to src/actions/actiondrawlinepolygon.cpp
index 7bfe2bc810885467f64107630bd796a7866172e3..dc0a2e0d48bf4a8ae933ee14b055ff982dd805a9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinepolygon.cpp
+// actiondrawlinepolygon.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinepolygon.h"
+#include "actiondrawlinepolygon.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
@@ -20,8 +20,9 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLinePolygon::RS_ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons",
-               container, graphicView)
+ActionDrawLinePolygon::ActionDrawLinePolygon(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Draw Polygons",
+       container, graphicView)
 {
        center = Vector(false);
        corner = Vector(false);
@@ -29,33 +30,33 @@ RS_ActionDrawLinePolygon::RS_ActionDrawLinePolygon(RS_EntityContainer & containe
        number = 3;
 }
 
-RS_ActionDrawLinePolygon::~RS_ActionDrawLinePolygon()
+ActionDrawLinePolygon::~ActionDrawLinePolygon()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLinePolygon::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLinePolygon::rtti()
 {
        return RS2::ActionDrawLinePolygon;
 }
 
-void RS_ActionDrawLinePolygon::trigger()
+void ActionDrawLinePolygon::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
-       deleteSnapper();
-       deletePreview();
-       clearPreview();
+//     deleteSnapper();
+//     deletePreview();
+//     clearPreview();
 
        RS_Creation creation(container, graphicView);
        bool ok = creation.createPolygon(center, corner, number);
 
        if (!ok)
-               RS_DEBUG->print("RS_ActionDrawLinePolygon::trigger: No polygon added\n");
+               RS_DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n");
 }
 
-void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLinePolygon::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -72,8 +73,8 @@ void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
 
-                       RS_Creation creation(preview, NULL, false);
-                       creation.createPolygon(center, corner, number);
+//                     RS_Creation creation(preview, NULL, false);
+//                     creation.createPolygon(center, corner, number);
 
                        drawPreview();
                }
@@ -84,7 +85,7 @@ void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -100,7 +101,7 @@ void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLinePolygon::coordinateEvent(Vector * e)
+void ActionDrawLinePolygon::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -125,7 +126,7 @@ void RS_ActionDrawLinePolygon::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLinePolygon::updateMouseButtonHints()
+void ActionDrawLinePolygon::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -151,23 +152,23 @@ void RS_ActionDrawLinePolygon::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLinePolygon::showOptions()
+void ActionDrawLinePolygon::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawLinePolygon::hideOptions()
+void ActionDrawLinePolygon::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
+void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -221,7 +222,7 @@ void RS_ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLinePolygon::getAvailableCommands()
+QStringList ActionDrawLinePolygon::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -239,12 +240,12 @@ QStringList RS_ActionDrawLinePolygon::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLinePolygon::updateMouseCursor()
+void ActionDrawLinePolygon::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLinePolygon::updateToolBar()
+void ActionDrawLinePolygon::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -255,13 +256,12 @@ void RS_ActionDrawLinePolygon::updateToolBar()
        }
 }
 
-int RS_ActionDrawLinePolygon::getNumber()
+int ActionDrawLinePolygon::getNumber()
 {
        return number;
 }
 
-void RS_ActionDrawLinePolygon::setNumber(int n)
+void ActionDrawLinePolygon::setNumber(int n)
 {
        number = n;
 }
-
similarity index 75%
rename from src/actions/rs_actiondrawlinepolygon.h
rename to src/actions/actiondrawlinepolygon.h
index 8f787a6e6e1f374face1329fcb51df34b8df313d..60150f4f8eac1c4732fe394177926869e4a774a7 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONDRAWLINEPOLYGON_H
-#define RS_ACTIONDRAWLINEPOLYGON_H
+#ifndef __ACTIONDRAWLINEPOLYGON_H__
+#define __ACTIONDRAWLINEPOLYGON_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to draw polygons.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLinePolygon: public RS_PreviewActionInterface
+class ActionDrawLinePolygon: public ActionInterface
 {
        private:
                enum Status {
@@ -19,8 +20,8 @@ class RS_ActionDrawLinePolygon: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLinePolygon();
+               ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLinePolygon();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -48,4 +49,4 @@ class RS_ActionDrawLinePolygon: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEPOLYGON_H__
similarity index 71%
rename from src/actions/rs_actiondrawlinepolygon2.cpp
rename to src/actions/actiondrawlinepolygon2.cpp
index fb783d61f98746b37c4151a6708c295a6e8372dd..d1d1f8fb466e6de06942323b9d59210039d984c8 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinepolygon2.cpp
+// actiondrawlinepolygon2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinepolygon2.h"
+#include "actiondrawlinepolygon2.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
@@ -20,7 +20,7 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons",
+ActionDrawLinePolygon2::ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Polygons",
                container, graphicView)
 {
        corner1 = Vector(false);
@@ -29,18 +29,18 @@ RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & contai
        number = 3;
 }
 
-RS_ActionDrawLinePolygon2::~RS_ActionDrawLinePolygon2()
+ActionDrawLinePolygon2::~ActionDrawLinePolygon2()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLinePolygon2::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLinePolygon2::rtti()
 {
        return RS2::ActionDrawLinePolygon2;
 }
 
-void RS_ActionDrawLinePolygon2::trigger()
+void ActionDrawLinePolygon2::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        deleteSnapper();
        deletePreview();
@@ -50,12 +50,12 @@ void RS_ActionDrawLinePolygon2::trigger()
        bool ok = creation.createPolygon2(corner1, corner2, number);
 
        if (!ok)
-               RS_DEBUG->print("RS_ActionDrawLinePolygon2::trigger: No polygon added\n");
+               RS_DEBUG->print("ActionDrawLinePolygon2::trigger: No polygon added\n");
 }
 
-void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLinePolygon2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLinePolygon2::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -72,8 +72,8 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
 
-                       RS_Creation creation(preview, NULL, false);
-                       creation.createPolygon2(corner1, corner2, number);
+//                     RS_Creation creation(preview, NULL, false);
+//                     creation.createPolygon2(corner1, corner2, number);
 
                        drawPreview();
                }
@@ -84,7 +84,7 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -100,9 +100,9 @@ void RS_ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLinePolygon2::coordinateEvent(Vector * e)
+void ActionDrawLinePolygon2::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        Vector mouse = *e;
@@ -125,7 +125,7 @@ void RS_ActionDrawLinePolygon2::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLinePolygon2::updateMouseButtonHints()
+void ActionDrawLinePolygon2::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -152,23 +152,23 @@ void RS_ActionDrawLinePolygon2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLinePolygon2::showOptions()
+void ActionDrawLinePolygon2::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawLinePolygon2::hideOptions()
+void ActionDrawLinePolygon2::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e)
+void ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -222,7 +222,7 @@ void RS_ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLinePolygon2::getAvailableCommands()
+QStringList ActionDrawLinePolygon2::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -240,12 +240,12 @@ QStringList RS_ActionDrawLinePolygon2::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLinePolygon2::updateMouseCursor()
+void ActionDrawLinePolygon2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLinePolygon2::updateToolBar()
+void ActionDrawLinePolygon2::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -256,13 +256,12 @@ void RS_ActionDrawLinePolygon2::updateToolBar()
        }
 }
 
-int RS_ActionDrawLinePolygon2::getNumber()
+int ActionDrawLinePolygon2::getNumber()
 {
        return number;
 }
 
-void RS_ActionDrawLinePolygon2::setNumber(int n)
+void ActionDrawLinePolygon2::setNumber(int n)
 {
        number = n;
 }
-
similarity index 75%
rename from src/actions/rs_actiondrawlinepolygon2.h
rename to src/actions/actiondrawlinepolygon2.h
index 243a56f027dc845acfd133740312c67341c8fb5f..8355f1b43d239469c5c01282a1ca31281e7767ea 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONDRAWLINEPOLYGON2_H
-#define RS_ACTIONDRAWLINEPOLYGON2_H
+#ifndef __ACTIONDRAWLINEPOLYGON2_H__
+#define __ACTIONDRAWLINEPOLYGON2_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to draw polygons.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLinePolygon2: public RS_PreviewActionInterface
+class ActionDrawLinePolygon2: public ActionInterface
 {
        private:
                enum Status {
@@ -19,8 +20,8 @@ class RS_ActionDrawLinePolygon2: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLinePolygon2();
+               ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLinePolygon2();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -48,4 +49,4 @@ class RS_ActionDrawLinePolygon2: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONDRAWLINEPOLYGON2_H__
similarity index 66%
rename from src/actions/rs_actiondrawlinerectangle.cpp
rename to src/actions/actiondrawlinerectangle.cpp
index db82d0188dcc004b3ff31c1400a41f27b655d25f..9882256c29a1b8670352fc70917c6880d05d9784 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinerectangle.cpp
+// actiondrawlinerectangle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinerectangle.h"
+#include "actiondrawlinerectangle.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineRectangle::RS_ActionDrawLineRectangle(
+ActionDrawLineRectangle::ActionDrawLineRectangle(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw rectangles", container, graphicView)
+       ActionInterface("Draw rectangles", container, graphicView)
 {
        reset();
 }
 
-RS_ActionDrawLineRectangle::~RS_ActionDrawLineRectangle()
+ActionDrawLineRectangle::~ActionDrawLineRectangle()
 {
 }
 
-void RS_ActionDrawLineRectangle::reset()
+void ActionDrawLineRectangle::reset()
 {
-       for (int i = 0; i < 4; ++i)
+       for(int i=0; i<4; i++)
                data[i] = RS_LineData(Vector(false), Vector(false));
 }
 
-void RS_ActionDrawLineRectangle::init(int status)
+void ActionDrawLineRectangle::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        reset();
 }
 
-void RS_ActionDrawLineRectangle::trigger()
+void ActionDrawLineRectangle::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        RS_Line * line[4];
        preparePreview();
 
        // create and add rectangle:
-       for (int i = 0; i < 4; ++i)
+       for(int i=0; i<4; i++)
        {
-               line[i] = new RS_Line(container,
-                               data[i]);
+               line[i] = new RS_Line(container, data[i]);
                line[i]->setLayerToActive();
                line[i]->setPenToActive();
                container->addEntity(line[i]);
        }
 
        // upd. undo list:
-       if (document != NULL)
+       if (document)
        {
                document->startUndoCycle();
 
-               for (int i = 0; i < 4; ++i)
+               for(int i=0; i<4; i++)
                        document->addUndoable(line[i]);
+
                document->endUndoCycle();
        }
 
@@ -73,19 +73,18 @@ void RS_ActionDrawLineRectangle::trigger()
        deleteSnapper();
        graphicView->moveRelativeZero(Vector(0.0, 0.0));
 
-       for (int i = 0; i < 4; ++i)
+       for(int i=0; i<4; i++)
        {
                graphicView->drawEntity(line[i]);
-               RS_DEBUG->print("RS_ActionDrawLineRectangle::trigger():"
-                       " line added: %d",
+               RS_DEBUG->print("ActionDrawLineRectangle::trigger(): line added: %d",
                        line[i]->getId());
        }
        graphicView->moveRelativeZero(corner2);
 }
 
-void RS_ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineRectangle::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -97,15 +96,16 @@ void RS_ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e)
 
                preparePreview();
 
-               for (int i = 0; i < 4; ++i)
-                       preview->addEntity(new RS_Line(preview, data[i]));
+//             for(int i=0; i<4; i++)
+//                     preview->addEntity(new RS_Line(preview, data[i]));
+
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineRectangle::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -120,7 +120,7 @@ void RS_ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineRectangle::preparePreview()
+void ActionDrawLineRectangle::preparePreview()
 {
        data[0] = RS_LineData(corner1, Vector(corner2.x, corner1.y));
        data[1] = RS_LineData(Vector(corner2.x, corner1.y), corner2);
@@ -128,7 +128,7 @@ void RS_ActionDrawLineRectangle::preparePreview()
        data[3] = RS_LineData(Vector(corner1.x, corner2.y), corner1);
 }
 
-void RS_ActionDrawLineRectangle::coordinateEvent(Vector * e)
+void ActionDrawLineRectangle::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -154,7 +154,7 @@ void RS_ActionDrawLineRectangle::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLineRectangle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineRectangle::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -167,13 +167,13 @@ void RS_ActionDrawLineRectangle::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawLineRectangle::getAvailableCommands()
+QStringList ActionDrawLineRectangle::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawLineRectangle::updateMouseButtonHints()
+void ActionDrawLineRectangle::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -196,12 +196,12 @@ void RS_ActionDrawLineRectangle::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineRectangle::updateMouseCursor()
+void ActionDrawLineRectangle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineRectangle::updateToolBar()
+void ActionDrawLineRectangle::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -212,4 +212,4 @@ void RS_ActionDrawLineRectangle::updateToolBar()
        }
 }
 
-// EOF
+
similarity index 67%
rename from src/actions/rs_actiondrawlinerectangle.h
rename to src/actions/actiondrawlinerectangle.h
index 2bf88a007a77ece19ccf1bde43e5e760e531f3b7..829ea2e579b648a206f67e62ae9329ca1f6295ed 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWLINERECTANGLE_H
-#define RS_ACTIONDRAWLINERECTANGLE_H
+#ifndef __ACTIONDRAWLINERECTANGLE_H__
+#define __ACTIONDRAWLINERECTANGLE_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
- * This action class can handle user events to draw
- * rectangles with two corners given.
+ * This action class can handle user events to draw rectangles with two corners
+ * given.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineRectangle: public RS_PreviewActionInterface
+class ActionDrawLineRectangle: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionDrawLineRectangle: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineRectangle(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineRectangle();
+               ActionDrawLineRectangle(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineRectangle();
 
                void reset();
                virtual void init(int status = 0);
@@ -54,4 +55,4 @@ class RS_ActionDrawLineRectangle: public RS_PreviewActionInterface
                Vector corner2;
 };
 
-#endif
+#endif // __ACTIONDRAWLINERECTANGLE_H__
similarity index 52%
rename from src/actions/rs_actiondrawlinerelangle.cpp
rename to src/actions/actiondrawlinerelangle.cpp
index 911a16510e7f60ef290697d60c264f70485244d1..6385a8165a060cdfc1e5379bf94c9330e4798b5d 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinerelangle.cpp
+// actiondrawlinerelangle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinerelangle.h"
+#include "actiondrawlinerelangle.h"
 
 #include "rs_commandevent.h"
 #include "rs_creation.h"
@@ -20,9 +20,9 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineRelAngle::RS_ActionDrawLineRelAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle, bool fixedAngle):
-       RS_PreviewActionInterface("Draw Lines with relative angles",
-               container, graphicView)
+ActionDrawLineRelAngle::ActionDrawLineRelAngle(RS_EntityContainer & container,
+       GraphicView & graphicView, double angle, bool fixedAngle):
+       ActionInterface("Draw Lines with relative angles", container, graphicView)
 {
        entity = NULL;
        this->angle = angle;
@@ -31,65 +31,30 @@ RS_ActionDrawLineRelAngle::RS_ActionDrawLineRelAngle(RS_EntityContainer & contai
        pos = Vector(false);
 }
 
-RS_ActionDrawLineRelAngle::~RS_ActionDrawLineRelAngle()
+ActionDrawLineRelAngle::~ActionDrawLineRelAngle()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawLineRelAngle::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLineRelAngle::rtti()
 {
        return RS2::ActionDrawLineRelAngle;
 }
 
-void RS_ActionDrawLineRelAngle::trigger()
+void ActionDrawLineRelAngle::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        deleteSnapper();
        deletePreview();
        clearPreview();
 
        RS_Creation creation(container, graphicView);
-       creation.createLineRelAngle(pos,
-               entity,
-               angle,
-               length);
-
-       /*
-          if (line!=NULL) {
-              RS_Entity* newEntity = NULL;
-
-              newEntity = new RS_Line(container,
-                                      line->getData());
-
-              if (newEntity!=NULL) {
-                  newEntity->setLayerToActive();
-                  newEntity->setPenToActive();
-                  container->addEntity(newEntity);
-
-                  // upd. undo list:
-                  if (document!=NULL) {
-                      document->startUndoCycle();
-                      document->addUndoable(newEntity);
-                      document->endUndoCycle();
-                  }
-                  deleteSnapper();
-                  graphicView->drawEntity(newEntity);
-                  setStatus(SetEntity);
-              }
-              //reset();
-              delete line;
-              line = NULL;
-          } else {
-              RS_DEBUG->print("RS_ActionDrawLineRelAngle::trigger:"
-                              " Line is NULL\n");
-          }
-        */
+       creation.createLineRelAngle(pos, entity, angle, length);
 }
 
-void RS_ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineRelAngle::mouseMoveEvent begin");
-
+       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent begin");
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
@@ -98,56 +63,35 @@ void RS_ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
                entity = catchEntity(e, RS2::ResolveAll);
                break;
 
-       case SetPos: {
-               //length = graphicView->toGraphDX(graphicView->getWidth());
-               //Vector mouse = snapPoint(e);
+       case SetPos:
+       {
                pos = snapPoint(e);
 
-               /*RS_Creation creation(NULL, NULL);
-                  RS_Line* l = creation.createLineRelAngle(mouse,
-                            entity,
-                            angle,
-                            length);*/
-
                deletePreview();
                clearPreview();
 
-               RS_Creation creation(preview, NULL, false);
-               creation.createLineRelAngle(pos,
-                       entity,
-                       angle,
-                       length);
+//             RS_Creation creation(preview, NULL, false);
+//             creation.createLineRelAngle(pos, entity, angle, length);
 
                drawPreview();
-
-               /*if (l!=NULL) {
-                   if (line!=NULL) {
-                       delete line;
-                   }
-                   line = (RS_Line*)l->clone();
-
-                   deletePreview();
-                   clearPreview();
-                   preview->addEntity(l);
-                   drawPreview();
-                  }*/
        }
-       break;
+               break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineRelAngle::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
                switch (getStatus())
                {
-               case SetEntity: {
+               case SetEntity:
+               {
                        RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
@@ -163,13 +107,14 @@ void RS_ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
                                setStatus(SetPos);
                        }
                }
-               break;
+                       break;
 
-               case SetPos: {
+               case SetPos:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
-               break;
+                       break;
 
                default:
                        break;
@@ -181,16 +126,17 @@ void RS_ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
                deleteSnapper();
                clearPreview();
 
-               if (entity != NULL)
+               if (entity)
                {
                        entity->setHighlighted(false);
                        graphicView->drawEntity(entity);
                }
+
                init(getStatus() - 1);
        }
 }
 
-void RS_ActionDrawLineRelAngle::coordinateEvent(Vector * e)
+void ActionDrawLineRelAngle::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -207,7 +153,7 @@ void RS_ActionDrawLineRelAngle::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -223,7 +169,6 @@ void RS_ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
        {
        case SetEntity:
        case SetPos:
-
                if (!fixedAngle && checkCommand("angle", c))
                {
                        deleteSnapper();
@@ -240,42 +185,46 @@ void RS_ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
                }
                break;
 
-       case SetAngle: {
+       case SetAngle:
+       {
                bool ok;
                double a = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        angle = RS_Math::deg2rad(a);
-               else if (RS_DIALOGFACTORY != NULL)
+               else if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->requestOptions(this, true, true);
+
                setStatus(SetPos);
        }
-       break;
+               break;
 
-       case SetLength: {
+       case SetLength:
+       {
                bool ok;
                double l = RS_Math::eval(c, &ok);
 
-               if (ok == true)
+               if (ok)
                        length = l;
-               else if (RS_DIALOGFACTORY != NULL)
+               else if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->requestOptions(this, true, true);
+
                setStatus(SetPos);
        }
-       break;
+               break;
 
        default:
                break;
        }
 }
 
-QStringList RS_ActionDrawLineRelAngle::getAvailableCommands()
+QStringList ActionDrawLineRelAngle::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -283,7 +232,6 @@ QStringList RS_ActionDrawLineRelAngle::getAvailableCommands()
        {
        case SetPos:
        case SetLength:
-
                if (!fixedAngle)
                        cmd += command("angle");
                cmd += command("length");
@@ -296,9 +244,9 @@ QStringList RS_ActionDrawLineRelAngle::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawLineRelAngle::updateMouseButtonHints()
+void ActionDrawLineRelAngle::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                switch (getStatus())
                {
@@ -319,30 +267,30 @@ void RS_ActionDrawLineRelAngle::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineRelAngle::showOptions()
+void ActionDrawLineRelAngle::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawLineRelAngle::hideOptions()
+void ActionDrawLineRelAngle::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawLineRelAngle::updateMouseCursor()
+void ActionDrawLineRelAngle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineRelAngle::updateToolBar()
+void ActionDrawLineRelAngle::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                if (!isFinished())
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -351,28 +299,27 @@ void RS_ActionDrawLineRelAngle::updateToolBar()
        }
 }
 
-void RS_ActionDrawLineRelAngle::setAngle(double a)
+void ActionDrawLineRelAngle::setAngle(double a)
 {
        angle = a;
 }
 
-double RS_ActionDrawLineRelAngle::getAngle()
+double ActionDrawLineRelAngle::getAngle()
 {
        return angle;
 }
 
-void RS_ActionDrawLineRelAngle::setLength(double l)
+void ActionDrawLineRelAngle::setLength(double l)
 {
        length = l;
 }
 
-double RS_ActionDrawLineRelAngle::getLength()
+double ActionDrawLineRelAngle::getLength()
 {
        return length;
 }
 
-bool RS_ActionDrawLineRelAngle::hasFixedAngle()
+bool ActionDrawLineRelAngle::hasFixedAngle()
 {
        return fixedAngle;
 }
-
similarity index 77%
rename from src/actions/rs_actiondrawlinerelangle.h
rename to src/actions/actiondrawlinerelangle.h
index beaf461460a3e172acf14109159fc80337db4b4d..6120006f461eadfb1429f43b50006e52b9ce298e 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONDRAWLINERELANGLE_H
-#define RS_ACTIONDRAWLINERELANGLE_H
+#ifndef __ACTIONDRAWLINERELANGLE_H__
+#define __ACTIONDRAWLINERELANGLE_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -11,9 +11,10 @@ class RS_Entity;
  * This action class can handle user events to draw lines with a given angle
  * to a given entity.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineRelAngle: public RS_PreviewActionInterface
+class ActionDrawLineRelAngle: public ActionInterface
 {
        private:
                enum Status {
@@ -24,8 +25,8 @@ class RS_ActionDrawLineRelAngle: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineRelAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
-               ~RS_ActionDrawLineRelAngle();
+               ActionDrawLineRelAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
+               ~ActionDrawLineRelAngle();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -66,4 +67,4 @@ class RS_ActionDrawLineRelAngle: public RS_PreviewActionInterface
                bool fixedAngle;
 };
 
-#endif
+#endif // __ACTIONDRAWLINERELANGLE_H__
similarity index 63%
rename from src/actions/rs_actiondrawlinetangent1.cpp
rename to src/actions/actiondrawlinetangent1.cpp
index ed3703d2ca5286e6380f07a82f2d5021318aec03..fbb128ae117b2723a7aadfcc86cf2603270913c9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinetangent1.cpp
+// actiondrawlinetangent1.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinetangent1.h"
+#include "actiondrawlinetangent1.h"
 
 #include "rs_creation.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineTangent1::RS_ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Tangents 1",
+ActionDrawLineTangent1::ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 1",
                container, graphicView)
 {
        tangent = NULL;
@@ -27,27 +27,27 @@ RS_ActionDrawLineTangent1::RS_ActionDrawLineTangent1(RS_EntityContainer & contai
        circle = NULL;
 }
 
-RS_ActionDrawLineTangent1::~RS_ActionDrawLineTangent1()
+ActionDrawLineTangent1::~ActionDrawLineTangent1()
 {
 }
 
-void RS_ActionDrawLineTangent1::trigger()
+void ActionDrawLineTangent1::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
-       if (tangent != NULL)
+       if (tangent)
        {
                RS_Entity * newEntity = NULL;
                newEntity = new RS_Line(container, tangent->getData());
 
-               if (newEntity != NULL)
+               if (newEntity)
                {
                        newEntity->setLayerToActive();
                        newEntity->setPenToActive();
                        container->addEntity(newEntity);
 
                        // upd. undo list:
-                       if (document != NULL)
+                       if (document)
                        {
                                document->startUndoCycle();
                                document->addUndoable(newEntity);
@@ -64,14 +64,13 @@ void RS_ActionDrawLineTangent1::trigger()
                tangent = NULL;
        }
        else
-               RS_DEBUG->print("RS_ActionDrawLineTangent1::trigger:"
+               RS_DEBUG->print("ActionDrawLineTangent1::trigger:"
                        " Entity is NULL\n");
 }
 
-void RS_ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineTangent1::mouseMoveEvent begin");
-
+       RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent begin");
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
@@ -80,43 +79,42 @@ void RS_ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
                point = snapPoint(e);
                break;
 
-       case SetCircle: {
+       case SetCircle:
+       {
                RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
-               if (en != NULL && (en->rtti() == RS2::EntityCircle
-                                  || en->rtti() == RS2::EntityArc
-                                  || en->rtti() == RS2::EntityEllipse))
+               if (en && (en->rtti() == RS2::EntityCircle
+                       || en->rtti() == RS2::EntityArc
+                       || en->rtti() == RS2::EntityEllipse))
                {
                        circle = en;
-
                        RS_Creation creation(NULL, NULL);
-                       RS_Line * t = creation.createTangent1(mouse,
-                                       point,
-                                       circle);
+                       RS_Line * t = creation.createTangent1(mouse, point, circle);
 
-                       if (t != NULL)
+                       if (t)
                        {
-                               if (tangent != NULL)
+                               if (tangent)
                                        delete tangent;
+
                                tangent = (RS_Line *)t->clone();
 
                                deletePreview();
                                clearPreview();
-                               preview->addEntity(t);
+//                             preview->addEntity(t);
                                drawPreview();
                        }
                }
        }
-       break;
+               break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineTangent1::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
        {
@@ -129,11 +127,12 @@ void RS_ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
        {
                switch (getStatus())
                {
-               case SetPoint: {
+               case SetPoint:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
-               break;
+                       break;
 
                case SetCircle:
                        trigger();
@@ -142,7 +141,7 @@ void RS_ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineTangent1::coordinateEvent(Vector * e)
+void ActionDrawLineTangent1::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -161,15 +160,14 @@ void RS_ActionDrawLineTangent1::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawLineTangent1::updateMouseButtonHints()
+void ActionDrawLineTangent1::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetPoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"),
-                               tr("Cancel"));
+                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
                        break;
 
                case SetCircle:
@@ -184,14 +182,14 @@ void RS_ActionDrawLineTangent1::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineTangent1::updateMouseCursor()
+void ActionDrawLineTangent1::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineTangent1::updateToolBar()
+void ActionDrawLineTangent1::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
        {
                if (!isFinished())
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -199,5 +197,3 @@ void RS_ActionDrawLineTangent1::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
-
-// EOF
similarity index 71%
rename from src/actions/rs_actiondrawlinetangent1.h
rename to src/actions/actiondrawlinetangent1.h
index b772f74ca7a1bc9b138088f20c017fb4bdfdd08f..8d369c8b64d802e3332a03bf08851c879676cc71 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONDRAWLINETANGENT1_H
-#define RS_ACTIONDRAWLINETANGENT1_H
+#ifndef __ACTIONDRAWLINETANGENT1_H__
+#define __ACTIONDRAWLINETANGENT1_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Line;
@@ -12,9 +12,10 @@ class RS_Entity;
  * This action class can handle user events to draw tangents from points
  * to circles.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineTangent1: public RS_PreviewActionInterface
+class ActionDrawLineTangent1: public ActionInterface
 {
        private:
                enum Status {
@@ -23,8 +24,8 @@ class RS_ActionDrawLineTangent1: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineTangent1();
+               ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineTangent1();
 
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
@@ -45,4 +46,4 @@ class RS_ActionDrawLineTangent1: public RS_PreviewActionInterface
                RS_LineData data;
 };
 
-#endif
+#endif // __ACTIONDRAWLINETANGENT1_H__
similarity index 70%
rename from src/actions/rs_actiondrawlinetangent2.cpp
rename to src/actions/actiondrawlinetangent2.cpp
index f4bcf99db927b66280c49f5885c9924dbd60a9df..55802863268b306ad03f03ebc532d24a3747134b 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawlinetangent2.cpp
+// actiondrawlinetangent2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawlinetangent2.h"
+#include "actiondrawlinetangent2.h"
 
 #include "rs_creation.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawLineTangent2::RS_ActionDrawLineTangent2(
+ActionDrawLineTangent2::ActionDrawLineTangent2(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw Tangents 2", container, graphicView)
+       ActionInterface("Draw Tangents 2", container, graphicView)
 {
        tangent = NULL;
        circle1 = NULL;
        circle2 = NULL;
 }
 
-RS_ActionDrawLineTangent2::~RS_ActionDrawLineTangent2()
+ActionDrawLineTangent2::~ActionDrawLineTangent2()
 {
 }
 
-void RS_ActionDrawLineTangent2::trigger()
+void ActionDrawLineTangent2::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (tangent != NULL)
        {
@@ -62,13 +62,13 @@ void RS_ActionDrawLineTangent2::trigger()
                tangent = NULL;
        }
        else
-               RS_DEBUG->print("RS_ActionDrawLineTangent2::trigger:"
+               RS_DEBUG->print("ActionDrawLineTangent2::trigger:"
                        " Entity is NULL\n");
 }
 
-void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawLineTangent2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -83,28 +83,27 @@ void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
        }
        break;
 
-       case SetCircle2: {
+       case SetCircle2:
+       {
                RS_Entity * en = catchEntity(e, RS2::ResolveAll);
 
-               if (en != NULL && (en->rtti() == RS2::EntityCircle
-                                  || en->rtti() == RS2::EntityArc))
+               if (en && (en->rtti() == RS2::EntityCircle
+                       || en->rtti() == RS2::EntityArc))
                {
                        circle2 = en;
-
                        RS_Creation creation(NULL, NULL);
-                       RS_Line * t = creation.createTangent2(mouse,
-                                       circle1,
-                                       circle2);
+                       RS_Line * t = creation.createTangent2(mouse, circle1, circle2);
 
-                       if (t != NULL)
+                       if (t)
                        {
-                               if (tangent != NULL)
+                               if (tangent)
                                        delete tangent;
+
                                tangent = (RS_Line *)t->clone();
 
                                deletePreview();
                                clearPreview();
-                               preview->addEntity(t);
+//                             preview->addEntity(t);
                                drawPreview();
                        }
                }
@@ -115,10 +114,10 @@ void RS_ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionDrawLineTangent2::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent end");
 }
 
-void RS_ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
        {
@@ -141,7 +140,7 @@ void RS_ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawLineTangent2::updateMouseButtonHints()
+void ActionDrawLineTangent2::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -164,15 +163,13 @@ void RS_ActionDrawLineTangent2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawLineTangent2::updateMouseCursor()
+void ActionDrawLineTangent2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawLineTangent2::updateToolBar()
+void ActionDrawLineTangent2::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
-
-// EOF
similarity index 71%
rename from src/actions/rs_actiondrawlinetangent2.h
rename to src/actions/actiondrawlinetangent2.h
index 374e3041572edc52b2334d2af064b4e14fce12ae..62e315d1a1733c6cbc17d879626c719522577528 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONDRAWLINETANGENT2_H
-#define RS_ACTIONDRAWLINETANGENT2_H
+#ifndef __ACTIONDRAWLINETANGENT2_H__
+#define __ACTIONDRAWLINETANGENT2_H__
 
 #include "rs_line.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 class RS_Entity;
 /**
  * This action class can handle user events to draw tangents from circle to
  * circle.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawLineTangent2: public RS_PreviewActionInterface
+class ActionDrawLineTangent2: public ActionInterface
 {
        private:
                enum Status {
@@ -20,8 +21,8 @@ class RS_ActionDrawLineTangent2: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawLineTangent2(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawLineTangent2();
+               ActionDrawLineTangent2(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawLineTangent2();
 
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
@@ -43,4 +44,4 @@ class RS_ActionDrawLineTangent2: public RS_PreviewActionInterface
                RS_LineData data;
 };
 
-#endif
+#endif // __ACTIONDRAWLINETANGENT2_H__
similarity index 72%
rename from src/actions/rs_actiondrawpoint.cpp
rename to src/actions/actiondrawpoint.cpp
index 820863903028762de03d75cfbb1f82d7c72e44d6..67476b329bcb390d5c9b93e9adf4f333721b95a2 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawpoint.cpp
+// actiondrawpoint.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawpoint.h"
+#include "actiondrawpoint.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawPoint::RS_ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw Points", container, graphicView)
+ActionDrawPoint::ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw Points", container, graphicView)
 {
 }
 
-RS_ActionDrawPoint::~RS_ActionDrawPoint()
+ActionDrawPoint::~ActionDrawPoint()
 {
 }
 
-void RS_ActionDrawPoint::trigger()
+void ActionDrawPoint::trigger()
 {
        if (pt.valid)
        {
@@ -50,12 +50,12 @@ void RS_ActionDrawPoint::trigger()
        }
 }
 
-void RS_ActionDrawPoint::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawPoint::mouseMoveEvent(QMouseEvent * e)
 {
        snapPoint(e);
 }
 
-void RS_ActionDrawPoint::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawPoint::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -69,7 +69,7 @@ void RS_ActionDrawPoint::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawPoint::coordinateEvent(Vector * e)
+void ActionDrawPoint::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -80,7 +80,7 @@ void RS_ActionDrawPoint::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionDrawPoint::commandEvent(RS_CommandEvent * e)
+void ActionDrawPoint::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -94,13 +94,13 @@ void RS_ActionDrawPoint::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawPoint::getAvailableCommands()
+QStringList ActionDrawPoint::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionDrawPoint::updateMouseButtonHints()
+void ActionDrawPoint::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -117,12 +117,12 @@ void RS_ActionDrawPoint::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawPoint::updateMouseCursor()
+void ActionDrawPoint::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawPoint::updateToolBar()
+void ActionDrawPoint::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -132,4 +132,3 @@ void RS_ActionDrawPoint::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarPoints);
        }
 }
-
similarity index 64%
rename from src/actions/rs_actiondrawpoint.h
rename to src/actions/actiondrawpoint.h
index e7efb203c6b80f5fb5d22685f553db0735358669..7e2aa59b857d0186603177f070fbd0746e27cec1 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef RS_ACTIONDRAWPOINT_H
-#define RS_ACTIONDRAWPOINT_H
+#ifndef __ACTIONDRAWPOINT_H__
+#define __ACTIONDRAWPOINT_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to draw points.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawPoint: public RS_PreviewActionInterface
+class ActionDrawPoint: public ActionInterface
 {
        public:
-               RS_ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawPoint();
+               ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawPoint();
 
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
@@ -29,4 +30,4 @@ class RS_ActionDrawPoint: public RS_PreviewActionInterface
                Vector pt;
 };
 
-#endif
+#endif // __ACTIONDRAWPOINT_H__
similarity index 57%
rename from src/actions/rs_actiondrawspline.cpp
rename to src/actions/actiondrawspline.cpp
index 533ca4b6625c422db3d6d0da7502c7eefba6dca3..13727355ec6a5bd03bce2bdcf56ca8c82a87310a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawspline.cpp
+// actiondrawspline.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actiondrawspline.h"
+#include "actiondrawspline.h"
 
 #include "rs_commandevent.h"
 #include "commands.h"
@@ -20,8 +20,8 @@
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawSpline::RS_ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Draw splines", container, graphicView)
+ActionDrawSpline::ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Draw splines", container, graphicView)
 {
        reset();
 #warning "!!! Need to port setAutoDelete() behaviour from Qt3 to Qt4 !!!"
@@ -30,16 +30,16 @@ RS_ActionDrawSpline::RS_ActionDrawSpline(RS_EntityContainer & container, Graphic
        //bHistory.setAutoDelete(true);
 }
 
-RS_ActionDrawSpline::~RS_ActionDrawSpline()
+ActionDrawSpline::~ActionDrawSpline()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawSpline::rtti()
+/*virtual*/ RS2::ActionType ActionDrawSpline::rtti()
 {
        return RS2::ActionDrawSpline;
 }
 
-void RS_ActionDrawSpline::reset()
+void ActionDrawSpline::reset()
 {
        spline = NULL;
        //start = Vector(false);
@@ -47,22 +47,21 @@ void RS_ActionDrawSpline::reset()
        //bHistory.clear();
 }
 
-void RS_ActionDrawSpline::init(int status)
+void ActionDrawSpline::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 }
 
-void RS_ActionDrawSpline::trigger()
+void ActionDrawSpline::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (spline == NULL)
                return;
 
        // add the entity
-       //RS_Spline* spline = new RS_Spline(container, data);
        spline->setLayerToActive();
        spline->setPenToActive();
        spline->update();
@@ -83,19 +82,19 @@ void RS_ActionDrawSpline::trigger()
        graphicView->drawEntity(spline);
        graphicView->moveRelativeZero(r);
        drawSnapper();
-       RS_DEBUG->print("RS_ActionDrawSpline::trigger(): spline added: %d", spline->getId());
+       RS_DEBUG->print("ActionDrawSpline::trigger(): spline added: %d", spline->getId());
 
        spline = NULL;
        //history.clear();
 }
 
-void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawSpline::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawSpline::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
-       if (getStatus() == SetNextPoint && spline != NULL /*&& point.valid*/)
+       if (getStatus() == SetNextPoint && spline)
        {
                deletePreview();
                clearPreview();
@@ -103,21 +102,21 @@ void RS_ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
                RS_Spline * tmpSpline = (RS_Spline *)spline->clone();
                tmpSpline->addControlPoint(mouse);
                tmpSpline->update();
-               preview->addEntity(tmpSpline);
+//             preview->addEntity(tmpSpline);
 
                QList<Vector> cpts = tmpSpline->getControlPoints();
                QList<Vector>::iterator it;
 
-               for(it = cpts.begin(); it != cpts.end(); ++it)
-                       preview->addEntity(new RS_Point(preview, RS_PointData(*it)));
+//             for(it=cpts.begin(); it!=cpts.end(); it+)
+//                     preview->addEntity(new RS_Point(preview, RS_PointData(*it)));
 
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDrawSpline::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawSpline::mouseMoveEvent end");
 }
 
-void RS_ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -136,9 +135,9 @@ void RS_ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawSpline::coordinateEvent(Vector * e)
+void ActionDrawSpline::coordinateEvent(Vector * e)
 {
-       if (e == NULL)
+       if (!e)
                return;
 
        Vector mouse = *e;
@@ -146,20 +145,15 @@ void RS_ActionDrawSpline::coordinateEvent(Vector * e)
        switch (getStatus())
        {
        case SetStartpoint:
-               //data.startpoint = mouse;
-               //point = mouse;
                history.clear();
                history.append(new Vector(mouse));
 
-               if (spline == NULL)
+               if (!spline)
                {
                        spline = new RS_Spline(container, data);
                        spline->addControlPoint(mouse);
                }
 
-               //bHistory.clear();
-               //bHistory.append(new double(0.0));
-               //start = mouse;
                setStatus(SetNextPoint);
                graphicView->moveRelativeZero(mouse);
                updateMouseButtonHints();
@@ -167,31 +161,18 @@ void RS_ActionDrawSpline::coordinateEvent(Vector * e)
 
        case SetNextPoint:
                graphicView->moveRelativeZero(mouse);
-               //point = mouse;
                history.append(new Vector(mouse));
-               //bHistory.append(new double(0.0));
 
-               if (spline != NULL)
+               if (spline)
                {
-                       //graphicView->deleteEntity(spline);
                        spline->addControlPoint(mouse);
-                       //spline->setEndpoint(mouse);
-                       //if (spline->count()==1) {
-                       //spline->setLayerToActive();
-                       //spline->setPenToActive();
-                       //container->addEntity(spline);
-                       //}
                        deletePreview();
                        clearPreview();
                        deleteSnapper();
-                       //graphicView->drawEntity(spline);
                        drawSnapper();
                }
 
-               //trigger();
-               //data.startpoint = data.endpoint;
                updateMouseButtonHints();
-               //graphicView->moveRelativeZero(mouse);
                break;
 
        default:
@@ -199,35 +180,30 @@ void RS_ActionDrawSpline::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawSpline::commandEvent(RS_CommandEvent * e)
+void ActionDrawSpline::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        switch (getStatus())
        {
        case SetStartpoint:
-
                if (checkCommand("help", c))
                {
                        RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                        return;
                }
+
                break;
 
        case SetNextPoint:
-               /*if (checkCommand("close", c)) {
-                   close();
-                   updateMouseButtonHints();
-                   return;
-                  }*/
-
                if (checkCommand("undo", c))
                {
                        undo();
                        updateMouseButtonHints();
                        return;
                }
+
                break;
 
        default:
@@ -235,7 +211,7 @@ void RS_ActionDrawSpline::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawSpline::getAvailableCommands()
+QStringList ActionDrawSpline::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -245,13 +221,12 @@ QStringList RS_ActionDrawSpline::getAvailableCommands()
                break;
 
        case SetNextPoint:
-
                if (history.count() >= 2)
                        cmd += command("undo");
 
-
                if (history.count() >= 3)
                        cmd += command("close");
+
                break;
 
        default:
@@ -261,7 +236,7 @@ QStringList RS_ActionDrawSpline::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawSpline::updateMouseButtonHints()
+void ActionDrawSpline::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -270,7 +245,8 @@ void RS_ActionDrawSpline::updateMouseButtonHints()
                        tr("Cancel"));
                break;
 
-       case SetNextPoint: {
+       case SetNextPoint:
+       {
                QString msg = "";
 
                if (history.count() >= 3)
@@ -291,7 +267,7 @@ void RS_ActionDrawSpline::updateMouseButtonHints()
                                tr("Specify next control point"),
                                tr("Back"));
        }
-       break;
+               break;
 
        default:
                RS_DIALOGFACTORY->updateMouseWidget("", "");
@@ -299,110 +275,82 @@ void RS_ActionDrawSpline::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawSpline::showOptions()
+void ActionDrawSpline::showOptions()
 {
-       RS_ActionInterface::showOptions();
-
+       ActionInterface::showOptions();
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionDrawSpline::hideOptions()
+void ActionDrawSpline::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
-
+       ActionInterface::hideOptions();
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawSpline::updateMouseCursor()
+void ActionDrawSpline::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawSpline::updateToolBar()
+void ActionDrawSpline::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSplines);
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
-/*
-   void RS_ActionDrawSpline::close() {
-    if (history.count()>2 && start.valid) {
-        //data.endpoint = start;
-        //trigger();
-                if (spline!=NULL) {
-                        Vector e(spline->getStartpoint());
-                        coordinateEvent(&e);
-                }
-                trigger();
-        setStatus(SetStartpoint);
-        graphicView->moveRelativeZero(start);
-    } else {
-        RS_DIALOGFACTORY->commandMessage(
-            tr("Cannot close sequence of lines: "
-               "Not enough entities defined yet."));
-    }
-   }
- */
-
-void RS_ActionDrawSpline::undo()
+void ActionDrawSpline::undo()
 {
        if (history.count() > 1)
        {
                history.removeLast();
-               //bHistory.removeLast();
                deletePreview();
                clearPreview();
 
-               //graphicView->setCurrentAction(
-               //    new RS_ActionEditUndo(true, *container, *graphicView));
-               if (history.last() != NULL)
+               if (history.last())
                {
                        //point = *history.last();
                }
 
-               if (spline != NULL)
+               if (spline)
                {
                        spline->removeLastControlPoint();
                        Vector * v = history.last();
 
-                       if (v != NULL)
+                       if (v)
                                graphicView->moveRelativeZero(*v);
+
                        graphicView->redraw();
                }
        }
        else
                RS_DIALOGFACTORY->commandMessage(
-                       tr("Cannot undo: "
-                               "Not enough entities defined yet."));
+                       tr("Cannot undo: Not enough entities defined yet."));
 }
 
-void RS_ActionDrawSpline::setDegree(int deg)
+void ActionDrawSpline::setDegree(int deg)
 {
        data.degree = deg;
 
-       if (spline != NULL)
+       if (spline)
                spline->setDegree(deg);
 }
 
-int RS_ActionDrawSpline::getDegree()
+int ActionDrawSpline::getDegree()
 {
        return data.degree;
 }
 
-void RS_ActionDrawSpline::setClosed(bool c)
+void ActionDrawSpline::setClosed(bool c)
 {
        data.closed = c;
 
-       if (spline != NULL)
+       if (spline)
                spline->setClosed(c);
 }
 
-bool RS_ActionDrawSpline::isClosed()
+bool ActionDrawSpline::isClosed()
 {
        return data.closed;
 }
-
-// EOF
similarity index 75%
rename from src/actions/rs_actiondrawspline.h
rename to src/actions/actiondrawspline.h
index 928db1e91379b316474bf37b15844b133dd792f8..02722d7c7fad1a84ab928b6c4b5f5177541bf910 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONDRAWSPLINE_H
-#define RS_ACTIONDRAWSPLINE_H
+#ifndef __ACTIONDRAWSPLINE_H__
+#define __ACTIONDRAWSPLINE_H__
 
 #include <QtCore>
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_spline.h"
 
 /**
  * This action class can handle user events to draw splines.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawSpline: public RS_PreviewActionInterface
+class ActionDrawSpline: public ActionInterface
 {
        public:
                /**
@@ -22,11 +23,10 @@ class RS_ActionDrawSpline: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView);
-               virtual ~RS_ActionDrawSpline();
+               ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView);
+               virtual ~ActionDrawSpline();
 
                virtual RS2::ActionType rtti();
-               //static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
                void reset();
                virtual void init(int status = 0);
                virtual void trigger();
@@ -41,7 +41,6 @@ class RS_ActionDrawSpline: public RS_PreviewActionInterface
                virtual void updateMouseCursor();
                virtual void updateToolBar();
 
-               //void close();
                void undo();
                void setDegree(int deg);
                int getDegree();
@@ -65,4 +64,4 @@ class RS_ActionDrawSpline: public RS_PreviewActionInterface
                QList<Vector *> history;
 };
 
-#endif
+#endif // __ACTIONDRAWSPLINE_H__
similarity index 70%
rename from src/actions/rs_actiondrawtext.cpp
rename to src/actions/actiondrawtext.cpp
index 1d3eb7c4c885253de8b6a385ee70e3f3d16ff6a8..3bb7b242cfc7ad5558322fe4057b5193631d804a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiondrawtext.cpp
+// actiondrawtext.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 //                  preview.
 //
 
-#include "rs_actiondrawtext.h"
+#include "actiondrawtext.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionDrawText::RS_ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Text", container, graphicView)
+ActionDrawText::ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Text", container, graphicView)
 {
        pos = Vector(false);
        textChanged = true;
 }
 
-RS_ActionDrawText::~RS_ActionDrawText()
+ActionDrawText::~ActionDrawText()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionDrawText::rtti()
+/*virtual*/ RS2::ActionType ActionDrawText::rtti()
 {
        return RS2::ActionDrawText;
 }
 
-void RS_ActionDrawText::init(int status)
+void ActionDrawText::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
        if (RS_DIALOGFACTORY == NULL)
                return;
@@ -56,7 +56,7 @@ void RS_ActionDrawText::init(int status)
                {
                        data = tmp.getData();
                        preparePreview();
-                       preview->setVisible(false);
+//                     preview->setVisible(false);
 
                        setStatus(SetPos);
                        showOptions();
@@ -80,16 +80,16 @@ void RS_ActionDrawText::init(int status)
        }
 }
 
-void RS_ActionDrawText::reset()
+void ActionDrawText::reset()
 {
        data = RS_TextData(Vector(0.0, 0.0), 1.0, 100.0, RS2::VAlignTop,
-                       RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, data.text,
-                       "standard", 0.0, RS2::Update);
+               RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, data.text,
+               "standard", 0.0, RS2::Update);
 }
 
-void RS_ActionDrawText::trigger()
+void ActionDrawText::trigger()
 {
-       RS_DEBUG->print("RS_ActionDrawText::trigger()");
+       RS_DEBUG->print("ActionDrawText::trigger()");
 
        if (pos.valid)
        {
@@ -117,20 +117,19 @@ void RS_ActionDrawText::trigger()
        }
 }
 
-void RS_ActionDrawText::preparePreview()
+void ActionDrawText::preparePreview()
 {
-       clearPreview();
+/*     clearPreview();
        data.insertionPoint = Vector(0.0, 0.0);
        RS_Text * text = new RS_Text(preview, data);
        text->update();
-       //text->setVisible(false);
        preview->addEntity(text);
-       textChanged = false;
+       textChanged = false;*/
 }
 
-void RS_ActionDrawText::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawText::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionDrawText::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionDrawText::mouseMoveEvent begin");
 
        if (getStatus() == SetPos)
        {
@@ -145,17 +144,17 @@ void RS_ActionDrawText::mouseMoveEvent(QMouseEvent * e)
                if (textChanged)
                        preparePreview();
 
-               if (!preview->isVisible())
-                       preview->setVisible(true);
-
-               offset = Vector(graphicView->toGuiDX(pos.x), -graphicView->toGuiDY(pos.y));
+//             if (!preview->isVisible())
+//                     preview->setVisible(true);
+//
+//             offset = Vector(graphicView->toGuiDX(pos.x), -graphicView->toGuiDY(pos.y));
                drawPreview();
        }
 
-       RS_DEBUG->print("RS_ActionDrawText::mouseMoveEvent end");
+       RS_DEBUG->print("ActionDrawText::mouseMoveEvent end");
 }
 
-void RS_ActionDrawText::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawText::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -177,7 +176,7 @@ void RS_ActionDrawText::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionDrawText::coordinateEvent(Vector * e)
+void ActionDrawText::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -199,7 +198,7 @@ void RS_ActionDrawText::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionDrawText::commandEvent(RS_CommandEvent * e)
+void ActionDrawText::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -229,7 +228,7 @@ void RS_ActionDrawText::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(e->getCommand());
 
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->requestOptions(this, true, true);
 
                graphicView->enableCoordinateInput();
@@ -241,7 +240,7 @@ void RS_ActionDrawText::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionDrawText::getAvailableCommands()
+QStringList ActionDrawText::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -251,25 +250,25 @@ QStringList RS_ActionDrawText::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionDrawText::showOptions()
+void ActionDrawText::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
-void RS_ActionDrawText::hideOptions()
+void ActionDrawText::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionDrawText::updateMouseButtonHints()
+void ActionDrawText::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY == NULL)
+       if (!RS_DIALOGFACTORY)
                return;
 
        switch (getStatus())
@@ -288,14 +287,14 @@ void RS_ActionDrawText::updateMouseButtonHints()
        }
 }
 
-void RS_ActionDrawText::updateMouseCursor()
+void ActionDrawText::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionDrawText::updateToolBar()
+void ActionDrawText::updateToolBar()
 {
-       if (RS_DIALOGFACTORY == NULL)
+       if (!RS_DIALOGFACTORY)
                return;
 
        switch (getStatus())
@@ -310,25 +309,24 @@ void RS_ActionDrawText::updateToolBar()
        }
 }
 
-void RS_ActionDrawText::setText(const QString & t)
+void ActionDrawText::setText(const QString & t)
 {
        data.text = t;
        textChanged = true;
 }
 
-QString RS_ActionDrawText::getText()
+QString ActionDrawText::getText()
 {
        return data.text;
 }
 
-void RS_ActionDrawText::setAngle(double a)
+void ActionDrawText::setAngle(double a)
 {
        data.angle = a;
        textChanged = true;
 }
 
-double RS_ActionDrawText::getAngle()
+double ActionDrawText::getAngle()
 {
        return data.angle;
 }
-
similarity index 78%
rename from src/actions/rs_actiondrawtext.h
rename to src/actions/actiondrawtext.h
index a8e9c467337d51d5d5f73534ef62d41bc5c8a41e..92c338040982ea9e8ef08a5fc106cb9993df2dcc 100644 (file)
@@ -1,16 +1,16 @@
-#ifndef RS_ACTIONDRAWTEXT_H
-#define RS_ACTIONDRAWTEXT_H
+#ifndef __ACTIONDRAWTEXT_H__
+#define __ACTIONDRAWTEXT_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_text.h"
 
 /**
  * This action class can handle user events to draw texts.
  *
- * @author James L. Hammons
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionDrawText: public RS_PreviewActionInterface
+class ActionDrawText: public ActionInterface
 {
        public:
                /**
@@ -23,8 +23,8 @@ class RS_ActionDrawText: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionDrawText();
+               ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionDrawText();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -52,4 +52,4 @@ class RS_ActionDrawText: public RS_PreviewActionInterface
                bool textChanged;
 };
 
-#endif
+#endif // __ACTIONDRAWTEXT_H__
similarity index 66%
rename from src/actions/rs_actioneditcopy.cpp
rename to src/actions/actioneditcopy.cpp
index e174d428e0c025b43f2b165711f9ecafd0cae078..14403181ecb31c1dc730aabf7d42b7a6f599cae5 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioneditcopy.cpp
+// actioneditcopy.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actioneditcopy.h"
+#include "actioneditcopy.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_modification.h"
  *
  * @param undo true for undo and false for redo.
  */
-RS_ActionEditCopy::RS_ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Edit Copy", container, graphicView)
+ActionEditCopy::ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Edit Copy", container, graphicView)
 {
        this->copy = copy;
 }
 
-RS_ActionEditCopy::~RS_ActionEditCopy()
+ActionEditCopy::~ActionEditCopy()
 {
 }
 
-void RS_ActionEditCopy::init(int status)
+void ActionEditCopy::init(int status)
 {
-       RS_ActionInterface::init(status);
-       //trigger();
+       ActionInterface::init(status);
 }
 
-void RS_ActionEditCopy::trigger()
+void ActionEditCopy::trigger()
 {
        deleteSnapper();
 
        RS_Modification m(*container, graphicView);
        m.copy(referencePoint, !copy);
 
-       //graphicView->redraw();
        finish();
        graphicView->killSelectActions();
-       //init(getStatus()-1);
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionEditCopy::mouseMoveEvent(QMouseEvent * e)
+void ActionEditCopy::mouseMoveEvent(QMouseEvent * e)
 {
        snapPoint(e);
 }
 
-void RS_ActionEditCopy::mouseReleaseEvent(QMouseEvent * e)
+void ActionEditCopy::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -71,7 +68,7 @@ void RS_ActionEditCopy::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionEditCopy::coordinateEvent(Vector * e)
+void ActionEditCopy::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -80,7 +77,7 @@ void RS_ActionEditCopy::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionEditCopy::updateMouseButtonHints()
+void ActionEditCopy::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -95,17 +92,15 @@ void RS_ActionEditCopy::updateMouseButtonHints()
        }
 }
 
-void RS_ActionEditCopy::updateMouseCursor()
+void ActionEditCopy::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionEditCopy::updateToolBar()
+void ActionEditCopy::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
-
-// EOF
similarity index 70%
rename from src/actions/rs_actioneditcopy.h
rename to src/actions/actioneditcopy.h
index 5f97a2f12ec067a5f66637602af91e8a8cb0be8a..265077ccf10e1aafbc5744cc2b1bec1005f6af9f 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONEDITCOPY_H
-#define RS_ACTIONEDITCOPY_H
+#ifndef __ACTIONEDITCOPY_H__
+#define __ACTIONEDITCOPY_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events for copying or cutting entities
  * to the clipboard.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionEditCopy: public RS_ActionInterface
+class ActionEditCopy: public ActionInterface
 {
        public:
                /**
@@ -21,8 +22,8 @@ class RS_ActionEditCopy: public RS_ActionInterface
                };
 
        public:
-               RS_ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionEditCopy();
+               ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionEditCopy();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -40,4 +41,4 @@ class RS_ActionEditCopy: public RS_ActionInterface
                Vector referencePoint;
 };
 
-#endif
+#endif // __ACTIONEDITCOPY_H__
similarity index 68%
rename from src/actions/rs_actioneditpaste.cpp
rename to src/actions/actioneditpaste.cpp
index 40f3110b19831df128803df135a12eef97680ca9..7d4ac423bdcc96dfa9bc897fffb720d4641bccfe 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioneditpaste.cpp
+// actioneditpaste.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioneditpaste.h"
+#include "actioneditpaste.h"
 
 #include "rs_clipboard.h"
 #include "rs_dialogfactory.h"
  *
  * @param undo true for undo and false for redo.
  */
-RS_ActionEditPaste::RS_ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Edit Paste",
+ActionEditPaste::ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Paste",
                container, graphicView)
 {
 }
 
-RS_ActionEditPaste::~RS_ActionEditPaste()
+ActionEditPaste::~ActionEditPaste()
 {
 }
 
-void RS_ActionEditPaste::init(int status)
+void ActionEditPaste::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        //trigger();
 }
 
-void RS_ActionEditPaste::trigger()
+void ActionEditPaste::trigger()
 {
        deleteSnapper();
        deletePreview();
@@ -48,13 +48,12 @@ void RS_ActionEditPaste::trigger()
 
        RS_Modification m(*container, graphicView);
        m.paste(RS_PasteData(targetPoint, 1.0, 0.0, false, ""));
-       //std::cout << *RS_Clipboard::instance();
 
        graphicView->redraw();
        finish();
 }
 
-void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
+void ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
@@ -63,16 +62,17 @@ void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
 
                deletePreview();
                clearPreview();
-               preview->addAllFrom(*RS_CLIPBOARD->getGraphic());
-               preview->move(targetPoint);
+//             preview->addAllFrom(*RS_CLIPBOARD->getGraphic());
+//             preview->move(targetPoint);
 
-               if (graphic != NULL)
+               if (graphic)
                {
                        RS2::Unit sourceUnit = RS_CLIPBOARD->getGraphic()->getUnit();
                        RS2::Unit targetUnit = graphic->getUnit();
                        double f = RS_Units::convert(1.0, sourceUnit, targetUnit);
-                       preview->scale(targetPoint, Vector(f, f));
+//                     preview->scale(targetPoint, Vector(f, f));
                }
+
                drawPreview();
                break;
 
@@ -81,7 +81,7 @@ void RS_ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
+void ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -95,7 +95,7 @@ void RS_ActionEditPaste::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionEditPaste::coordinateEvent(Vector * e)
+void ActionEditPaste::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -104,7 +104,7 @@ void RS_ActionEditPaste::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionEditPaste::updateMouseButtonHints()
+void ActionEditPaste::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -119,17 +119,15 @@ void RS_ActionEditPaste::updateMouseButtonHints()
        }
 }
 
-void RS_ActionEditPaste::updateMouseCursor()
+void ActionEditPaste::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionEditPaste::updateToolBar()
+void ActionEditPaste::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
-
-// EOF
similarity index 69%
rename from src/actions/rs_actioneditpaste.h
rename to src/actions/actioneditpaste.h
index d910bf4dbc5f1553a506862e955968a8769b55dc..dd7f3e9848ce93236c1ba7529cae6a7e5b93944a 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONEDITPASTE_H
-#define RS_ACTIONEDITPASTE_H
+#ifndef __ACTIONEDITPASTE_H__
+#define __ACTIONEDITPASTE_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events for pasting entities from
  * the clipboard into the current document.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionEditPaste: public RS_PreviewActionInterface
+class ActionEditPaste: public ActionInterface
 {
        public:
                /**
@@ -21,8 +22,8 @@ class RS_ActionEditPaste: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionEditPaste();
+               ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionEditPaste();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -37,4 +38,4 @@ class RS_ActionEditPaste: public RS_PreviewActionInterface
                Vector targetPoint;
 };
 
-#endif
+#endif // __ACTIONEDITPASTE_H__
similarity index 67%
rename from src/actions/rs_actioneditundo.cpp
rename to src/actions/actioneditundo.cpp
index 5380adcc2c05980c38f56f3cf0827f8742ff023b..17dd207305c71cceb2d29111caff84be769c09d7 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioneditundo.cpp
+// actioneditundo.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actioneditundo.h"
+#include "actioneditundo.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
  *
  * @param undo true for undo and false for redo.
  */
-RS_ActionEditUndo::RS_ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Edit Undo", container, graphicView)
+ActionEditUndo::ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Undo", container, graphicView)
 {
        this->undo = undo;
 }
 
-RS_ActionEditUndo::~RS_ActionEditUndo()
+ActionEditUndo::~ActionEditUndo()
 {
 }
 
-void RS_ActionEditUndo::init(int status)
+void ActionEditUndo::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionEditUndo::trigger()
+void ActionEditUndo::trigger()
 {
        if (undo)
                document->undo();
@@ -51,4 +51,3 @@ void RS_ActionEditUndo::trigger()
        finish();
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
-
diff --git a/src/actions/actioneditundo.h b/src/actions/actioneditundo.h
new file mode 100644 (file)
index 0000000..69633ec
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ACTIONEDITUNDO_H__
+#define __ACTIONEDITUNDO_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events for undo / redo.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionEditUndo: public ActionInterface
+{
+       public:
+               ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionEditUndo();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               /** Undo (true) or redo (false) */
+               bool undo;
+};
+
+#endif // __ACTIONEDITUNDO_H__
similarity index 62%
rename from src/actions/rs_actionfilenew.cpp
rename to src/actions/actionfilenew.cpp
index 6ed300a995850277967e460862c77a37da6a8331..e44f3d0bf612d8fb7fdd832c3715cb88b11ea145 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionfilenew.cpp
+// actionfilenew.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionfilenew.h"
+#include "actionfilenew.h"
 
 //#include "drawing.h"
 
-RS_ActionFileNew::RS_ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("File New", container, graphicView)
+ActionFileNew::ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("File New", container, graphicView)
 {
 }
 
-RS_ActionFileNew::~RS_ActionFileNew()
+ActionFileNew::~ActionFileNew()
 {
 }
 
-void RS_ActionFileNew::trigger()
+void ActionFileNew::trigger()
 {
        /*
           // Not supported currently
-          RS_DEBUG->print("RS_ActionFileNew::trigger");
+          RS_DEBUG->print("ActionFileNew::trigger");
 
           QString fileName; //= RS_DIALOGFACTORY->requestFileNewDialog();
           if (graphic!=NULL && !fileName.isEmpty()) {
@@ -39,9 +39,8 @@ void RS_ActionFileNew::trigger()
        finish();
 }
 
-void RS_ActionFileNew::init(int status)
+void ActionFileNew::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionfilenew.h b/src/actions/actionfilenew.h
new file mode 100644 (file)
index 0000000..a77e0c5
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONFILENEW_H__
+#define __ACTIONFILENEW_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to create new blank documents.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionFileNew: public ActionInterface
+{
+       public:
+               ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionFileNew();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONFILENEW_H__
similarity index 61%
rename from src/actions/rs_actionfileopen.cpp
rename to src/actions/actionfileopen.cpp
index a8d1fa80874d3944e6db1bdb881122b86d7de69e..1a12881bf242e4a6c4eafd83f18702d39d7622cc 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionfileopen.cpp
+// actionfileopen.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionfileopen.h"
+#include "actionfileopen.h"
 
 //#include "drawing.h"
 
-RS_ActionFileOpen::RS_ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("File Open", container, graphicView)
+ActionFileOpen::ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("File Open", container, graphicView)
 {
 }
 
-RS_ActionFileOpen::~RS_ActionFileOpen()
+ActionFileOpen::~ActionFileOpen()
 {
 }
 
-void RS_ActionFileOpen::trigger()
+void ActionFileOpen::trigger()
 {
        /*
           // Not supported currently
-          RS_DEBUG->print("RS_ActionFileOpen::trigger");
+          RS_DEBUG->print("ActionFileOpen::trigger");
 
           QString fileName; //= RS_DIALOGFACTORY->requestFileOpenDialog();
           if (graphic!=NULL && !fileName.isEmpty()) {
@@ -39,9 +39,8 @@ void RS_ActionFileOpen::trigger()
        finish();
 }
 
-void RS_ActionFileOpen::init(int status)
+void ActionFileOpen::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionfileopen.h b/src/actions/actionfileopen.h
new file mode 100644 (file)
index 0000000..8fb26e1
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONFILEOPEN_H__
+#define __ACTIONFILEOPEN_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to open files.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionFileOpen: public ActionInterface
+{
+       public:
+               ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionFileOpen();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONFILEOPEN_H__
similarity index 55%
rename from src/actions/rs_actionfilesave.cpp
rename to src/actions/actionfilesave.cpp
index 06274c48ea215fbbb2179f17d179a8adf9fdbc4c..363f99db8d2778b7c408941f6241cb3145dfda82 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionfilesave.cpp
+// actionfilesave.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionfilesave.h"
+#include "actionfilesave.h"
 
 #include "drawing.h"
 
-RS_ActionFileSave::RS_ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("File Save", container, graphicView)
+ActionFileSave::ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("File Save", container, graphicView)
 {
 }
 
-RS_ActionFileSave::~RS_ActionFileSave()
+ActionFileSave::~ActionFileSave()
 {
 }
 
-void RS_ActionFileSave::trigger()
+void ActionFileSave::trigger()
 {
-       RS_DEBUG->print("RS_ActionFileSave::trigger");
+       RS_DEBUG->print("ActionFileSave::trigger");
 
        if (graphic != NULL)
                graphic->save();
@@ -35,9 +35,8 @@ void RS_ActionFileSave::trigger()
        finish();
 }
 
-void RS_ActionFileSave::init(int status)
+void ActionFileSave::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionfilesave.h b/src/actions/actionfilesave.h
new file mode 100644 (file)
index 0000000..5587486
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONFILESAVE_H__
+#define __ACTIONFILESAVE_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to save the current file.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionFileSave: public ActionInterface
+{
+       public:
+               ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionFileSave();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONFILESAVE_H__
similarity index 59%
rename from src/actions/rs_actionfilesaveas.cpp
rename to src/actions/actionfilesaveas.cpp
index 000546aa9369af13252216b53e3a333545d73add..88a2a4dc39f2ae220d75a8bd6996d5c3c65f7471 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionfilesaveas.cpp
+// actionfilesaveas.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionfilesaveas.h"
+#include "actionfilesaveas.h"
 
 #include "drawing.h"
 
-RS_ActionFileSaveAs::RS_ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Add Layer", container, graphicView)
+ActionFileSaveAs::ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Add Layer", container, graphicView)
 {
 }
 
-RS_ActionFileSaveAs::~RS_ActionFileSaveAs()
+ActionFileSaveAs::~ActionFileSaveAs()
 {
 }
 
-void RS_ActionFileSaveAs::trigger()
+void ActionFileSaveAs::trigger()
 {
-       RS_DEBUG->print("RS_ActionFileSaveAs::trigger");
+       RS_DEBUG->print("ActionFileSaveAs::trigger");
        QString fileName; // = RS_DIALOGFACTORY->requestFileSaveAsDialog();
 
        if (graphic != NULL && !fileName.isEmpty())
@@ -36,9 +36,8 @@ void RS_ActionFileSaveAs::trigger()
        finish();
 }
 
-void RS_ActionFileSaveAs::init(int status)
+void ActionFileSaveAs::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionfilesaveas.h b/src/actions/actionfilesaveas.h
new file mode 100644 (file)
index 0000000..3915cbb
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONFILESAVEAS_H__
+#define __ACTIONFILESAVEAS_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to export files in various formats.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionFileSaveAs: public ActionInterface
+{
+       public:
+               ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionFileSaveAs();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONFILESAVEAS_H__
similarity index 76%
rename from src/actions/rs_actioninfoangle.cpp
rename to src/actions/actioninfoangle.cpp
index 31aa8fbff8560fe4fbc1c71fd59209b31e6d4b5b..d2bf0e6ec27d9d80dac820233815cd77ef60d0e9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfoangle.cpp
+// actioninfoangle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfoangle.h"
+#include "actioninfoangle.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_information.h"
 
-RS_ActionInfoAngle::RS_ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Info Angle",
+ActionInfoAngle::ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle",
                container, graphicView)
 {
 }
 
-RS_ActionInfoAngle::~RS_ActionInfoAngle()
+ActionInfoAngle::~ActionInfoAngle()
 {
 }
 
-void RS_ActionInfoAngle::init(int status)
+void ActionInfoAngle::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionInfoAngle::trigger()
+void ActionInfoAngle::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoAngle::trigger()");
+       RS_DEBUG->print("ActionInfoAngle::trigger()");
        deleteSnapper();
 
        if (entity1 != NULL && entity2 != NULL)
@@ -61,9 +61,9 @@ void RS_ActionInfoAngle::trigger()
        }
 }
 
-void RS_ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
+void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
 {
-       RS_DEBUG->print("RS_ActionInfoAngle::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -77,10 +77,10 @@ void RS_ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionInfoAngle::mouseMoveEvent end");
+       RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent end");
 }
 
-void RS_ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -123,7 +123,7 @@ void RS_ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoAngle::updateMouseButtonHints()
+void ActionInfoAngle::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -143,12 +143,12 @@ void RS_ActionInfoAngle::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoAngle::updateMouseCursor()
+void ActionInfoAngle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoAngle::updateToolBar()
+void ActionInfoAngle::updateToolBar()
 {
        switch (getStatus())
        {
@@ -162,4 +162,3 @@ void RS_ActionInfoAngle::updateToolBar()
                break;
        }
 }
-
similarity index 70%
rename from src/actions/rs_actioninfoangle.h
rename to src/actions/actioninfoangle.h
index 50bff9409095d30bc24fbc3605ede87759d83880..8c878c7bdefe2c035c9a652be88d19661cc3c240 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONINFOANGLE_H
-#define RS_ACTIONINFOANGLE_H
+#ifndef __ACTIONINFOANGLE_H__
+#define __ACTIONINFOANGLE_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -9,9 +9,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to measure angles.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionInfoAngle: public RS_PreviewActionInterface
+class ActionInfoAngle: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionInfoAngle: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoAngle();
+               ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoAngle();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -44,4 +45,4 @@ class RS_ActionInfoAngle: public RS_PreviewActionInterface
                Vector intersection;
 };
 
-#endif
+#endif // __ACTIONINFOANGLE_H__
similarity index 65%
rename from src/actions/rs_actioninfoarea.cpp
rename to src/actions/actioninfoarea.cpp
index ae2c2c3fb26e7915c8596f72be132de17b67c031..3b877408d2fef9d1ec192651f6732c43a4ea604a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfoarea.cpp
+// actioninfoarea.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfoarea.h"
+#include "actioninfoarea.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionInfoArea::RS_ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Info Area",
+ActionInfoArea::ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Area",
                container, graphicView)
 {
 }
 
-RS_ActionInfoArea::~RS_ActionInfoArea()
+ActionInfoArea::~ActionInfoArea()
 {
 }
 
-void RS_ActionInfoArea::init(int status)
+void ActionInfoArea::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
        currentLine = NULL;
        closingLine = NULL;
 
-       //std::cout << "RS_ActionInfoArea::init: " << status << "\n";
+       //std::cout << "ActionInfoArea::init: " << status << "\n";
 }
 
-void RS_ActionInfoArea::trigger()
+void ActionInfoArea::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoArea::trigger()");
+       RS_DEBUG->print("ActionInfoArea::trigger()");
 
        if (ia.isValid())
        {
@@ -48,7 +48,7 @@ void RS_ActionInfoArea::trigger()
                double area = ia.getArea();
                double circ = ia.getCircumference();
 
-               RS_DEBUG->print("RS_ActionInfoArea::trigger: area: %f", area);
+               RS_DEBUG->print("ActionInfoArea::trigger: area: %f", area);
                RS_DIALOGFACTORY->commandMessage(tr("Area: %1").arg(area));
                RS_DIALOGFACTORY->commandMessage(tr("Circumference: %1").arg(circ));
        }
@@ -65,9 +65,9 @@ void RS_ActionInfoArea::trigger()
         */
 }
 
-void RS_ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
+void ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
 {
-       //RS_DEBUG->print("RS_ActionInfoArea::mouseMoveEvent begin");
+       //RS_DEBUG->print("ActionInfoArea::mouseMoveEvent begin");
 
        if (getStatus() == SetFirstPoint
            || getStatus() == SetNextPoint)
@@ -85,31 +85,26 @@ void RS_ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
                        {
                                deletePreview();
 
-                               if (currentLine != NULL)
+                               if (currentLine)
                                {
-                                       preview->removeEntity(currentLine);
+//                                     preview->removeEntity(currentLine);
                                        currentLine = NULL;
                                }
 
-                               if (closingLine != NULL)
+                               if (closingLine)
                                {
-                                       preview->removeEntity(closingLine);
+//                                     preview->removeEntity(closingLine);
                                        closingLine = NULL;
                                }
 
-                               currentLine = new RS_Line(preview,
-                                               RS_LineData(prev,
-                                                       mouse));
-                               preview->addEntity(currentLine);
+//                             currentLine = new RS_Line(preview, RS_LineData(prev, mouse));
+//                             preview->addEntity(currentLine);
 
-                               if (preview->count() > 1)
-                               {
-                                       closingLine = new RS_Line(preview,
-                                                       RS_LineData(mouse,
-                                                               point1));
-
-                                       preview->addEntity(closingLine);
-                               }
+//                             if (preview->count() > 1)
+//                             {
+//                                     closingLine = new RS_Line(preview, RS_LineData(mouse, point1));
+//                                     preview->addEntity(closingLine);
+//                             }
 
                                drawPreview();
                        }
@@ -119,11 +114,9 @@ void RS_ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
                        break;
                }
        }
-
-       //RS_DEBUG->print("RS_ActionInfoArea::mouseMoveEvent end");
 }
 
-void RS_ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -132,9 +125,6 @@ void RS_ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
        }
        else if (e->button() == Qt::RightButton)
        {
-               //deletePreview();
-               //clearPreview();
-
                // close the polygon (preview)
                if (getStatus() == SetNextPoint && prev.valid)
                {
@@ -142,22 +132,18 @@ void RS_ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
 
                        if (currentLine != NULL)
                        {
-                               preview->removeEntity(currentLine);
+//                             preview->removeEntity(currentLine);
                                currentLine = NULL;
                        }
 
                        if (closingLine != NULL)
                        {
-                               preview->removeEntity(closingLine);
+//                             preview->removeEntity(closingLine);
                                closingLine = NULL;
                        }
 
-                       currentLine = new RS_Line(preview,
-                                       RS_LineData(prev,
-                                               point1));
-
-                       preview->addEntity(currentLine);
-
+//                     currentLine = new RS_Line(preview, RS_LineData(prev, point1));
+//                     preview->addEntity(currentLine);
                        drawPreview();
                }
 
@@ -167,7 +153,7 @@ void RS_ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoArea::coordinateEvent(Vector * e)
+void ActionInfoArea::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -195,10 +181,6 @@ void RS_ActionInfoArea::coordinateEvent(Vector * e)
 
                if (point1.valid)
                {
-                       //point2 = mouse;
-                       /*deletePreview();
-                          clearPreview();
-                        */
                        ia.addPoint(mouse);
                        RS_DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y));
 
@@ -213,8 +195,6 @@ void RS_ActionInfoArea::coordinateEvent(Vector * e)
                                trigger();
                                setStatus(SetFirstPoint);
                        }
-                       //trigger();
-                       //setStatus(SetFirstPoint);
                }
                break;
 
@@ -223,7 +203,7 @@ void RS_ActionInfoArea::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionInfoArea::updateMouseButtonHints()
+void ActionInfoArea::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -245,12 +225,12 @@ void RS_ActionInfoArea::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoArea::updateMouseCursor()
+void ActionInfoArea::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoArea::updateToolBar()
+void ActionInfoArea::updateToolBar()
 {
        switch (getStatus())
        {
@@ -264,5 +244,3 @@ void RS_ActionInfoArea::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 74%
rename from src/actions/rs_actioninfoarea.h
rename to src/actions/actioninfoarea.h
index 1d1bcd48b6e8b4f7597ccabf925962302557787e..0527155cba220a5a6b201bfa366eee1f1b4900ee 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONINFOAREA_H
-#define RS_ACTIONINFOAREA_H
+#ifndef __ACTIONINFOAREA_H__
+#define __ACTIONINFOAREA_H__
 
 #include "rs_infoarea.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -11,9 +11,10 @@ class RS_Entity;
  * This action class can handle user events to measure distances between
  * two points.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionInfoArea: public RS_PreviewActionInterface
+class ActionInfoArea: public ActionInterface
 {
        public:
                /**
@@ -25,8 +26,8 @@ class RS_ActionInfoArea: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoArea();
+               ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoArea();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -45,4 +46,4 @@ class RS_ActionInfoArea: public RS_PreviewActionInterface
                RS_InfoArea ia;
 };
 
-#endif
+#endif // __ACTIONINFOAREA_H__
similarity index 71%
rename from src/actions/rs_actioninfodist.cpp
rename to src/actions/actioninfodist.cpp
index af59d52643b37869107c1abc77db714ad7becf0d..57c744b2c9a1c973c9a8eff7cf1df0b7928796b2 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfodist.cpp
+// actioninfodist.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfodist.h"
+#include "actioninfodist.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionInfoDist::RS_ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Info Dist",
+ActionInfoDist::ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Dist",
                container, graphicView)
 {
 }
 
-RS_ActionInfoDist::~RS_ActionInfoDist()
+ActionInfoDist::~ActionInfoDist()
 {
 }
 
-void RS_ActionInfoDist::init(int status)
+void ActionInfoDist::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionInfoDist::trigger()
+void ActionInfoDist::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoDist::trigger()");
+       RS_DEBUG->print("ActionInfoDist::trigger()");
 
        if (point1.valid && point2.valid)
        {
@@ -45,9 +45,9 @@ void RS_ActionInfoDist::trigger()
        }
 }
 
-void RS_ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
+void ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionInfoDist::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionInfoDist::mouseMoveEvent begin");
 
        if (getStatus() == SetPoint1
            || getStatus() == SetPoint2)
@@ -67,11 +67,7 @@ void RS_ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
 
                                deletePreview();
                                clearPreview();
-
-                               preview->addEntity(new RS_Line(preview,
-                                               RS_LineData(point1,
-                                                       point2)));
-
+//                             preview->addEntity(new RS_Line(preview, RS_LineData(point1, point2)));
                                drawPreview();
                        }
                        break;
@@ -81,10 +77,10 @@ void RS_ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionInfoDist::mouseMoveEvent end");
+       RS_DEBUG->print("ActionInfoDist::mouseMoveEvent end");
 }
 
-void RS_ActionInfoDist::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoDist::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -99,7 +95,7 @@ void RS_ActionInfoDist::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoDist::coordinateEvent(Vector * e)
+void ActionInfoDist::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -132,7 +128,7 @@ void RS_ActionInfoDist::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionInfoDist::updateMouseButtonHints()
+void ActionInfoDist::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -154,12 +150,12 @@ void RS_ActionInfoDist::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoDist::updateMouseCursor()
+void ActionInfoDist::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoDist::updateToolBar()
+void ActionInfoDist::updateToolBar()
 {
        switch (getStatus())
        {
@@ -173,5 +169,3 @@ void RS_ActionInfoDist::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 71%
rename from src/actions/rs_actioninfodist.h
rename to src/actions/actioninfodist.h
index 9209de474df2bc62e4da80bd5bd433e245888eac..1d3d01ec433584465d51f8376e960b324e81a3dd 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONINFODIST_H
-#define RS_ACTIONINFODIST_H
+#ifndef __ACTIONINFODIST_H__
+#define __ACTIONINFODIST_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to measure distances between
  * two points.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionInfoDist: public RS_PreviewActionInterface
+class ActionInfoDist: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionInfoDist: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoDist();
+               ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoDist();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -39,4 +40,4 @@ class RS_ActionInfoDist: public RS_PreviewActionInterface
                Vector point2;
 };
 
-#endif
+#endif // __ACTIONINFODIST_H__
similarity index 63%
rename from src/actions/rs_actioninfodist2.cpp
rename to src/actions/actioninfodist2.cpp
index c8cea153c7e6ae599a98c9dd81d0260c749cb6f6..2bf002886ed0331c491d8bf7764b7c8871d65ebd 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfodist2.cpp
+// actioninfodist2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfodist2.h"
+#include "actioninfodist2.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_preview.h"
 
-RS_ActionInfoDist2::RS_ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Info Dist2", container, graphicView)
+ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Info Dist2", container, graphicView)
 {
 }
 
-RS_ActionInfoDist2::~RS_ActionInfoDist2()
+ActionInfoDist2::~ActionInfoDist2()
 {
 }
 
-void RS_ActionInfoDist2::init(int status)
+void ActionInfoDist2::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionInfoDist2::trigger()
+void ActionInfoDist2::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoDist2::trigger()");
+       RS_DEBUG->print("ActionInfoDist2::trigger()");
        deleteSnapper();
 
        if (point.valid && entity != NULL)
@@ -46,9 +46,9 @@ void RS_ActionInfoDist2::trigger()
        }
 }
 
-void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -57,19 +57,19 @@ void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
                break;
 
        case SetPoint:
-
                if (entity != NULL)
                        point = snapPoint(e);
+
                break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent end");
+       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
 }
 
-void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -82,11 +82,12 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
                                setStatus(SetPoint);
                        break;
 
-               case SetPoint: {
+               case SetPoint:
+               {
                        Vector ce(snapPoint(e));
                        coordinateEvent(&ce);
                }
-               break;
+                       break;
 
                default:
                        break;
@@ -100,7 +101,7 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoDist2::coordinateEvent(Vector * e)
+void ActionInfoDist2::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -114,20 +115,16 @@ void RS_ActionInfoDist2::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionInfoDist2::updateMouseButtonHints()
+void ActionInfoDist2::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(
-                       tr("Specify entity"),
-                       tr("Cancel"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
                break;
 
        case SetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(
-                       tr("Specify point"),
-                       tr("Back"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
                break;
 
        default:
@@ -136,12 +133,12 @@ void RS_ActionInfoDist2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoDist2::updateMouseCursor()
+void ActionInfoDist2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoDist2::updateToolBar()
+void ActionInfoDist2::updateToolBar()
 {
        switch (getStatus())
        {
@@ -155,5 +152,3 @@ void RS_ActionInfoDist2::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 71%
rename from src/actions/rs_actioninfodist2.h
rename to src/actions/actioninfodist2.h
index c33dfe577c5a768760a754e6a8a2086334ea9a22..4af31e44ac5e02157a3e7bd683d87f9fd5d8ee6b 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONINFODIST2_H
-#define RS_ACTIONINFODIST2_H
+#ifndef __ACTIONINFODIST2_H__
+#define __ACTIONINFODIST2_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -10,9 +10,10 @@ class RS_Entity;
  * This action class can handle user events to measure distances between
  * entities and points.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionInfoDist2: public RS_PreviewActionInterface
+class ActionInfoDist2: public ActionInterface
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionInfoDist2: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoDist2();
+               ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoDist2();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -41,4 +42,4 @@ class RS_ActionInfoDist2: public RS_PreviewActionInterface
                Vector point;
 };
 
-#endif
+#endif // __ACTIONINFODIST2_H__
similarity index 67%
rename from src/actions/rs_actioninfoinside.cpp
rename to src/actions/actioninfoinside.cpp
index 5edbf63a91423e997f0abccfda4bcb18fd39aa6c..7beeaa1bdb255c300e7e05e3f490d6b3c9e06f6c 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfoinside.cpp
+// actioninfoinside.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfoinside.h"
+#include "actioninfoinside.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_information.h"
 
-RS_ActionInfoInside::RS_ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Info Inside", container, graphicView)
+ActionInfoInside::ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Info Inside", container, graphicView)
 {
        contour = new RS_EntityContainer(NULL, false);
 
@@ -28,12 +28,12 @@ RS_ActionInfoInside::RS_ActionInfoInside(RS_EntityContainer & container, Graphic
                        contour->addEntity(e);
 }
 
-RS_ActionInfoInside::~RS_ActionInfoInside()
+ActionInfoInside::~ActionInfoInside()
 {
        delete contour;
 }
 
-void RS_ActionInfoInside::trigger()
+void ActionInfoInside::trigger()
 {
        deleteSnapper();
        bool onContour = false;
@@ -46,16 +46,11 @@ void RS_ActionInfoInside::trigger()
        finish();
 }
 
-void RS_ActionInfoInside::mouseMoveEvent(QMouseEvent * /*e*/)
+void ActionInfoInside::mouseMoveEvent(QMouseEvent * /*e*/)
 {
-       //Vector mouse = snapPoint(e);
-       //bool onContour = false;
-       /*if (RS_Information::isPointInsideContour(mouse, contour, &onContour)) {
-          } else {
-          }*/
 }
 
-void RS_ActionInfoInside::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoInside::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
        {
@@ -69,7 +64,7 @@ void RS_ActionInfoInside::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionInfoInside::updateMouseButtonHints()
+void ActionInfoInside::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -83,16 +78,15 @@ void RS_ActionInfoInside::updateMouseButtonHints()
        }
 }
 
-void RS_ActionInfoInside::updateMouseCursor()
+void ActionInfoInside::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionInfoInside::updateToolBar()
+void ActionInfoInside::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
 }
-
diff --git a/src/actions/actioninfoinside.h b/src/actions/actioninfoinside.h
new file mode 100644 (file)
index 0000000..e660683
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __ACTIONINFOINSIDE_H__
+#define __ACTIONINFOINSIDE_H__
+
+#include "actioninterface.h"
+#include "vector.h"
+
+/**
+ * This action class can handle user events for checking if a given point is
+ * inside or outside the selected contour.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionInfoInside: public ActionInterface
+{
+       public:
+               ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoInside();
+
+               virtual void trigger();
+               virtual void mouseMoveEvent(QMouseEvent * e);
+               virtual void mouseReleaseEvent(QMouseEvent * e);
+               virtual void updateMouseButtonHints();
+               virtual void updateMouseCursor();
+               virtual void updateToolBar();
+
+       private:
+               Vector pt;
+               RS_EntityContainer * contour;
+};
+
+#endif // __ACTIONINFOINSIDE_H__
similarity index 62%
rename from src/actions/rs_actioninfototallength.cpp
rename to src/actions/actioninfototallength.cpp
index 40b2605e1d971e02e34bd778e51a31264991d9ee..ae58f007d3ba6da66aa189b283ce3398b0d00044 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninfototallength.cpp
+// actioninfototallength.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actioninfototallength.h"
+#include "actioninfototallength.h"
 
 #include "rs_dialogfactory.h"
 
-RS_ActionInfoTotalLength::RS_ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Info Total Length",
+ActionInfoTotalLength::ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
                container, graphicView)
 {
 }
 
-RS_ActionInfoTotalLength::~RS_ActionInfoTotalLength()
+ActionInfoTotalLength::~ActionInfoTotalLength()
 {
 }
 
-void RS_ActionInfoTotalLength::init(int status)
+void ActionInfoTotalLength::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionInfoTotalLength::trigger()
+void ActionInfoTotalLength::trigger()
 {
-       RS_DEBUG->print("RS_ActionInfoTotalLength::trigger()");
+       RS_DEBUG->print("ActionInfoTotalLength::trigger()");
 
        double len = 0.0;
 
-       for (RS_Entity * e = container->firstEntity(RS2::ResolveNone);
-            e != NULL;
-            e = container->nextEntity(RS2::ResolveNone))
-
+       for(RS_Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
+               e=container->nextEntity(RS2::ResolveNone))
+       {
                if (e->isVisible() && e->isSelected())
                {
                        double l = e->getLength();
@@ -53,6 +52,7 @@ void RS_ActionInfoTotalLength::trigger()
                        else
                                len += l;
                }
+       }
 
        if (len > 0.0)
                RS_DIALOGFACTORY->commandMessage(
@@ -64,7 +64,7 @@ void RS_ActionInfoTotalLength::trigger()
        finish();
 }
 
-void RS_ActionInfoTotalLength::updateToolBar()
+void ActionInfoTotalLength::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -74,5 +74,3 @@ void RS_ActionInfoTotalLength::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
-
-// EOF
diff --git a/src/actions/actioninfototallength.h b/src/actions/actioninfototallength.h
new file mode 100644 (file)
index 0000000..c6ed621
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __ACTIONINFOTOTALLENGTH_H__
+#define __ACTIONINFOTOTALLENGTH_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to delete entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionInfoTotalLength: public ActionInterface
+{
+       public:
+               /**
+                * Action States.
+                */
+               enum Status {
+                       Acknowledge    /**< Acknowledge or cancel. */
+               };
+
+       public:
+               ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionInfoTotalLength();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+               virtual void updateToolBar();
+};
+
+#endif // __ACTIONINFOTOTALLENGTH_H__
similarity index 65%
rename from src/actions/rs_actionlayersadd.cpp
rename to src/actions/actionlayersadd.cpp
index 49196535fc789d5403458350c9eb7ce16cadaf5f..670731d1b0a734b07ec5da684ba465ca4d0d74a1 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlayersadd.cpp
+// actionlayersadd.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlayersadd.h"
+#include "actionlayersadd.h"
 
 #include "rs_dialogfactory.h"
 #include "drawing.h"
 
-RS_ActionLayersAdd::RS_ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Add Layer", container, graphicView)
+ActionLayersAdd::ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Add Layer", container, graphicView)
 {
 }
 
-RS_ActionLayersAdd::~RS_ActionLayersAdd()
+ActionLayersAdd::~ActionLayersAdd()
 {
 }
 
-void RS_ActionLayersAdd::trigger()
+void ActionLayersAdd::trigger()
 {
        RS_DEBUG->print("add layer");
 
@@ -41,9 +41,8 @@ void RS_ActionLayersAdd::trigger()
        finish();
 }
 
-void RS_ActionLayersAdd::init(int status)
+void ActionLayersAdd::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionlayersadd.h b/src/actions/actionlayersadd.h
new file mode 100644 (file)
index 0000000..b5791c6
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONLAYERSADD_H__
+#define __ACTIONLAYERSADD_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to add layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersAdd: public ActionInterface
+{
+       public:
+               ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersAdd();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONLAYERSADD_H__
similarity index 56%
rename from src/actions/rs_actionlayersedit.cpp
rename to src/actions/actionlayersedit.cpp
index 85ebe069a540158703688bcb7ee5bc0c4802e524..187fb7592416ec11a35a377993b1fba6d33cf98a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlayersedit.cpp
+// actionlayersedit.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlayersedit.h"
+#include "actionlayersedit.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "drawing.h"
 
-RS_ActionLayersEdit::RS_ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Edit Layer", container, graphicView)
+ActionLayersEdit::ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Edit Layer", container, graphicView)
 {
 }
 
-RS_ActionLayersEdit::~RS_ActionLayersEdit()
+ActionLayersEdit::~ActionLayersEdit()
 {
 }
 
-void RS_ActionLayersEdit::trigger()
+void ActionLayersEdit::trigger()
 {
-       RS_DEBUG->print("RS_ActionLayersEdit::trigger");
+       RS_DEBUG->print("ActionLayersEdit::trigger");
        RS_Layer * layer = NULL;
 
-       if (graphic != NULL)
+       if (graphic)
        {
                layer = RS_DIALOGFACTORY->requestEditLayerDialog(graphic->getLayerList());
 
-               if (layer != NULL)
+               if (layer)
                {
                        graphic->editLayer(graphic->getActiveLayer(), *layer);
 
                        // update updateable entities on the layer that has changed
-                       for (RS_Entity * e = graphic->firstEntity(RS2::ResolveNone);
-                            e != NULL; e = graphic->nextEntity(RS2::ResolveNone))
+                       for(RS_Entity * e=graphic->firstEntity(RS2::ResolveNone);
+                               e!=NULL; e=graphic->nextEntity(RS2::ResolveNone))
                        {
                                RS_Layer * l = e->getLayer();
 
-                               if (l != NULL && l->getName() == layer->getName())
+                               if (l && l->getName() == layer->getName())
                                        e->update();
                        }
                }
@@ -56,10 +56,8 @@ void RS_ActionLayersEdit::trigger()
        graphicView->redraw();
 }
 
-void RS_ActionLayersEdit::init(int status)
+void ActionLayersEdit::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
-// EOF
diff --git a/src/actions/actionlayersedit.h b/src/actions/actionlayersedit.h
new file mode 100644 (file)
index 0000000..ccf6c24
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONLAYERSEDIT_H__
+#define __ACTIONLAYERSEDIT_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersEdit: public ActionInterface
+{
+       public:
+               ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersEdit();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONLAYERSEDIT_H__
diff --git a/src/actions/actionlayersfreezeall.cpp b/src/actions/actionlayersfreezeall.cpp
new file mode 100644 (file)
index 0000000..13ebe1c
--- /dev/null
@@ -0,0 +1,44 @@
+// actionlayersfreezeall.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  05/22/2010  Added this text. :-)
+//
+
+#include "actionlayersfreezeall.h"
+
+#include "drawing.h"
+
+ActionLayersFreezeAll::ActionLayersFreezeAll(bool freeze,
+       RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Freeze all Layers", container, graphicView)
+{
+       this->freeze = freeze;
+}
+
+ActionLayersFreezeAll::~ActionLayersFreezeAll()
+{
+}
+
+void ActionLayersFreezeAll::trigger()
+{
+       RS_DEBUG->print("ActionLayersFreezeAll::trigger");
+
+       if (graphic)
+               graphic->freezeAllLayers(freeze);
+
+       finish();
+}
+
+void ActionLayersFreezeAll::init(int status)
+{
+       ActionInterface::init(status);
+       trigger();
+}
diff --git a/src/actions/actionlayersfreezeall.h b/src/actions/actionlayersfreezeall.h
new file mode 100644 (file)
index 0000000..cad0b41
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __ACTIONLAYERSFREEZEALL_H__
+#define __ACTIONLAYERSFREEZEALL_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersFreezeAll: public ActionInterface
+{
+       public:
+               ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersFreezeAll();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       private:
+               bool freeze;
+};
+
+#endif // __ACTIONLAYERSFREEZEALL_H__
diff --git a/src/actions/actionlayersremove.cpp b/src/actions/actionlayersremove.cpp
new file mode 100644 (file)
index 0000000..ac6bd42
--- /dev/null
@@ -0,0 +1,51 @@
+// actionlayersedit.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  06/04/2010  Added this text. :-)
+//
+
+#include "actionlayersremove.h"
+
+#include "rs_dialogfactory.h"
+#include "drawing.h"
+
+ActionLayersRemove::ActionLayersRemove(RS_EntityContainer & container,
+       GraphicView & graphicView):
+       ActionInterface("Remove Layer", container, graphicView)
+{
+}
+
+ActionLayersRemove::~ActionLayersRemove()
+{
+}
+
+void ActionLayersRemove::trigger()
+{
+       RS_DEBUG->print("ActionLayersRemove::trigger");
+
+       if (graphic)
+       {
+               RS_Layer * layer =
+                       RS_DIALOGFACTORY->requestLayerRemovalDialog(graphic->getLayerList());
+
+               // Now remove the layer from the layer list:
+               graphic->removeLayer(layer);
+       }
+
+       finish();
+       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+}
+
+void ActionLayersRemove::init(int status)
+{
+       ActionInterface::init(status);
+       trigger();
+}
diff --git a/src/actions/actionlayersremove.h b/src/actions/actionlayersremove.h
new file mode 100644 (file)
index 0000000..b48779a
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONLAYERSREMOVE_H__
+#define __ACTIONLAYERSREMOVE_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to remove layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersRemove: public ActionInterface
+{
+       public:
+               ActionLayersRemove(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersRemove();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONLAYERSREMOVE_H__
similarity index 72%
rename from src/actions/rs_actionlayerstogglelock.cpp
rename to src/actions/actionlayerstogglelock.cpp
index 578be160f2d7d66f5d11141045c2e01de462dcb3..3743f786379cc4b601077941ac8408117b812347 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlayerstogglelock.cpp
+// actionlayerstogglelock.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlayerstogglelock.h"
+#include "actionlayerstogglelock.h"
 
 #include "graphicview.h"
 #include "drawing.h"
 
-RS_ActionLayersToggleLock::RS_ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Toggle Layer Visibility",
+ActionLayersToggleLock::ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
                container, graphicView)
 {
 }
 
-RS_ActionLayersToggleLock::~RS_ActionLayersToggleLock()
+ActionLayersToggleLock::~ActionLayersToggleLock()
 {
 }
 
-void RS_ActionLayersToggleLock::trigger()
+void ActionLayersToggleLock::trigger()
 {
        RS_DEBUG->print("toggle layer");
 
@@ -58,9 +58,8 @@ void RS_ActionLayersToggleLock::trigger()
        finish();
 }
 
-void RS_ActionLayersToggleLock::init(int status)
+void ActionLayersToggleLock::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionlayerstogglelock.h b/src/actions/actionlayerstogglelock.h
new file mode 100644 (file)
index 0000000..a0cfafa
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONLAYERSTOGGLELOCK_H__
+#define __ACTIONLAYERSTOGGLELOCK_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersToggleLock: public ActionInterface
+{
+       public:
+               ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersToggleLock();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONLAYERSTOGGLELOCK_H__
similarity index 60%
rename from src/actions/rs_actionlayerstoggleview.cpp
rename to src/actions/actionlayerstoggleview.cpp
index 1e824d6c7ed557a96a710e3bb21823ccc68e08f3..6a1d8513e5a35fe31ad86c042bca2f6ad5417176 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlayerstoggleview.cpp
+// actionlayerstoggleview.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlayerstoggleview.h"
+#include "actionlayerstoggleview.h"
 
 #include "drawing.h"
 
-RS_ActionLayersToggleView::RS_ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionInterface("Toggle Layer Visibility",
+ActionLayersToggleView::ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
                container, graphicView)
 {
 }
 
-RS_ActionLayersToggleView::~RS_ActionLayersToggleView()
+ActionLayersToggleView::~ActionLayersToggleView()
 {
 }
 
-void RS_ActionLayersToggleView::trigger()
+void ActionLayersToggleView::trigger()
 {
        RS_DEBUG->print("toggle layer");
 
@@ -38,9 +38,8 @@ void RS_ActionLayersToggleView::trigger()
        finish();
 }
 
-void RS_ActionLayersToggleView::init(int status)
+void ActionLayersToggleView::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
-
diff --git a/src/actions/actionlayerstoggleview.h b/src/actions/actionlayerstoggleview.h
new file mode 100644 (file)
index 0000000..b283018
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONLAYERSTOGGLEVIEW_H__
+#define __ACTIONLAYERSTOGGLEVIEW_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to edit layers.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionLayersToggleView: public ActionInterface
+{
+       public:
+               ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionLayersToggleView();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONLAYERSTOGGLEVIEW_H__
similarity index 69%
rename from src/actions/rs_actionlibraryinsert.cpp
rename to src/actions/actionlibraryinsert.cpp
index b1a5757acd554a8fa4fc4486ae08ada8718ad460..17d0f44199168792ff0ee988deae27090e2c8cba 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlibraryinsert.cpp
+// actionlibraryinsert.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlibraryinsert.h"
+#include "actionlibraryinsert.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 /**
  * Constructor.
  */
-RS_ActionLibraryInsert::RS_ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Library Insert", container, graphicView)
+ActionLibraryInsert::ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Library Insert", container, graphicView)
 {
 }
 
-RS_ActionLibraryInsert::~RS_ActionLibraryInsert()
+ActionLibraryInsert::~ActionLibraryInsert()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionLibraryInsert::rtti()
+/*virtual*/ RS2::ActionType ActionLibraryInsert::rtti()
 {
        return RS2::ActionLibraryInsert;
 }
 
-void RS_ActionLibraryInsert::init(int status)
+void ActionLibraryInsert::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        reset();
 
@@ -52,7 +52,7 @@ void RS_ActionLibraryInsert::init(int status)
        //trigger();
 }
 
-void RS_ActionLibraryInsert::setFile(const QString & file)
+void ActionLibraryInsert::setFile(const QString & file)
 {
        data.file = file;
 
@@ -60,7 +60,7 @@ void RS_ActionLibraryInsert::setFile(const QString & file)
                RS_DIALOGFACTORY->commandMessage(tr("Cannot open file '%1'").arg(file));
 }
 
-void RS_ActionLibraryInsert::reset()
+void ActionLibraryInsert::reset()
 {
        /*data = RS_InsertData("",
                             Vector(0.0,0.0),
@@ -76,7 +76,7 @@ void RS_ActionLibraryInsert::reset()
        data.angle = 0.0;
 }
 
-void RS_ActionLibraryInsert::trigger()
+void ActionLibraryInsert::trigger()
 {
        deleteSnapper();
        deletePreview();
@@ -88,34 +88,28 @@ void RS_ActionLibraryInsert::trigger()
        graphicView->redraw();
 }
 
-void RS_ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e)
+void ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
        case SetTargetPoint:
                data.insertionPoint = snapPoint(e);
 
-               //if (block!=NULL) {
                deletePreview();
                clearPreview();
-               preview->addAllFrom(prev);
-               preview->move(data.insertionPoint);
-               preview->scale(data.insertionPoint,
-                       Vector(data.factor, data.factor));
+//             preview->addAllFrom(prev);
+//             preview->move(data.insertionPoint);
+//             preview->scale(data.insertionPoint, Vector(data.factor, data.factor));
 
                // unit conversion:
-               if (graphic != NULL)
+               if (graphic)
                {
                        double uf = RS_Units::convert(1.0, prev.getUnit(), graphic->getUnit());
-                       preview->scale(data.insertionPoint, Vector(uf, uf));
+//                     preview->scale(data.insertionPoint, Vector(uf, uf));
                }
 
-               preview->rotate(data.insertionPoint, data.angle);
-               // too slow:
-               //RS_Creation creation(preview, NULL, false);
-               //creation.createInsert(data);
+//             preview->rotate(data.insertionPoint, data.angle);
                drawPreview();
-               //}
                break;
 
        default:
@@ -123,7 +117,7 @@ void RS_ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionLibraryInsert::mouseReleaseEvent(QMouseEvent * e)
+void ActionLibraryInsert::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -137,7 +131,7 @@ void RS_ActionLibraryInsert::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionLibraryInsert::coordinateEvent(Vector * e)
+void ActionLibraryInsert::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -146,7 +140,7 @@ void RS_ActionLibraryInsert::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
+void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -213,7 +207,7 @@ void RS_ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionLibraryInsert::getAvailableCommands()
+QStringList ActionLibraryInsert::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -231,21 +225,21 @@ QStringList RS_ActionLibraryInsert::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionLibraryInsert::showOptions()
+void ActionLibraryInsert::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionLibraryInsert::hideOptions()
+void ActionLibraryInsert::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionLibraryInsert::updateMouseButtonHints()
+void ActionLibraryInsert::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -267,12 +261,12 @@ void RS_ActionLibraryInsert::updateMouseButtonHints()
        }
 }
 
-void RS_ActionLibraryInsert::updateMouseCursor()
+void ActionLibraryInsert::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionLibraryInsert::updateToolBar()
+void ActionLibraryInsert::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -280,23 +274,22 @@ void RS_ActionLibraryInsert::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
-double RS_ActionLibraryInsert::getAngle()
+double ActionLibraryInsert::getAngle()
 {
        return data.angle;
 }
 
-void RS_ActionLibraryInsert::setAngle(double a)
+void ActionLibraryInsert::setAngle(double a)
 {
        data.angle = a;
 }
 
-double RS_ActionLibraryInsert::getFactor()
+double ActionLibraryInsert::getFactor()
 {
        return data.factor;
 }
 
-void RS_ActionLibraryInsert::setFactor(double f)
+void ActionLibraryInsert::setFactor(double f)
 {
        data.factor = f;
 }
-
similarity index 82%
rename from src/actions/rs_actionlibraryinsert.h
rename to src/actions/actionlibraryinsert.h
index 51e3e442d87ffe386d64a51870ea94f4d67d671b..f69576d79e50f7c4c1ee877483d852c31eb618ee 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONLIBRARYINSERT_H
-#define RS_ACTIONLIBRARYINSERT_H
+#ifndef __ACTIONLIBRARYINSERT_H__
+#define __ACTIONLIBRARYINSERT_H__
 
 #include "rs_creation.h"
 #include "drawing.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events for inserting library items
  * (or any other DXF files) into the current drawing (as block/insert).
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionLibraryInsert: public RS_PreviewActionInterface
+class ActionLibraryInsert: public ActionInterface
 {
        public:
                /**
@@ -28,8 +29,8 @@ class RS_ActionLibraryInsert: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView);
-               virtual ~RS_ActionLibraryInsert();
+               ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView);
+               virtual ~ActionLibraryInsert();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -59,4 +60,4 @@ class RS_ActionLibraryInsert: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONLIBRARYINSERT_H__
similarity index 60%
rename from src/actions/rs_actionlockrelativezero.cpp
rename to src/actions/actionlockrelativezero.cpp
index 68ccadaaa8956330b5a3b2be8116278502e24839..944c7e9955bec6a8842d9a4d0216f9b32b881091 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionlockrelativezero.cpp
+// actionlockrelativezero.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionlockrelativezero.h"
+#include "actionlockrelativezero.h"
 
 #include "graphicview.h"
 
-RS_ActionLockRelativeZero::RS_ActionLockRelativeZero(
+ActionLockRelativeZero::ActionLockRelativeZero(
        RS_EntityContainer & container, GraphicView & graphicView, bool on):
-       RS_ActionInterface("(Un-)lock the relative Zero", container, graphicView)
+       ActionInterface("(Un-)lock the relative Zero", container, graphicView)
 {
        this->on = on;
 }
 
-RS_ActionLockRelativeZero::~RS_ActionLockRelativeZero()
+ActionLockRelativeZero::~ActionLockRelativeZero()
 {
 }
 
-void RS_ActionLockRelativeZero::init(int status)
+void ActionLockRelativeZero::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
        finish();
 }
 
-void RS_ActionLockRelativeZero::trigger()
+void ActionLockRelativeZero::trigger()
 {
        graphicView->lockRelativeZero(on);
 }
-
diff --git a/src/actions/actionlockrelativezero.h b/src/actions/actionlockrelativezero.h
new file mode 100644 (file)
index 0000000..59e1d08
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef __ACTIONLOCKRELATIVEZERO_H__
+#define __ACTIONLOCKRELATIVEZERO_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to lock or unlock
+ * the relative Zero point.
+ * It overrides but retains the locking of the relative Zero.
+ *
+ * @author James Hammons
+ * @author Ulf Lehnert
+ */
+class ActionLockRelativeZero: public ActionInterface
+{
+       public:
+               ActionLockRelativeZero(RS_EntityContainer & container, GraphicView & graphicView, bool on);
+               ~ActionLockRelativeZero();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       private:
+               bool on;
+};
+
+#endif // __ACTIONLOCKRELATIVEZERO_H__
similarity index 71%
rename from src/actions/rs_actionmodifyattributes.cpp
rename to src/actions/actionmodifyattributes.cpp
index ee8468513b97fc4a5d207bebcb2e662343095b2b..e66d3d47db9fbd00e5ed37ec784c7e4f57d7cb68 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyattributes.cpp
+// actionmodifyattributes.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyattributes.h"
+#include "actionmodifyattributes.h"
 
 #include "rs_dialogfactory.h"
 #include "drawing.h"
 #include "graphicview.h"
 #include "rs_modification.h"
 
-RS_ActionModifyAttributes::RS_ActionModifyAttributes(
+ActionModifyAttributes::ActionModifyAttributes(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Change Attributes", container, graphicView)
+       ActionInterface("Change Attributes", container, graphicView)
 {
 }
 
-RS_ActionModifyAttributes::~RS_ActionModifyAttributes()
+ActionModifyAttributes::~ActionModifyAttributes()
 {
 }
 
-void RS_ActionModifyAttributes::init(int status)
+void ActionModifyAttributes::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionModifyAttributes::trigger()
+void ActionModifyAttributes::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyAttributes::trigger()");
+       RS_DEBUG->print("ActionModifyAttributes::trigger()");
 
        RS_AttributesData data;
        data.pen = RS_Pen();
@@ -61,7 +61,7 @@ void RS_ActionModifyAttributes::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyAttributes::updateMouseButtonHints()
+void ActionModifyAttributes::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -74,16 +74,15 @@ void RS_ActionModifyAttributes::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyAttributes::updateMouseCursor()
+void ActionModifyAttributes::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::DelCursor);
 }
 
-void RS_ActionModifyAttributes::updateToolBar()
+void ActionModifyAttributes::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
-
similarity index 55%
rename from src/actions/rs_actionmodifyattributes.h
rename to src/actions/actionmodifyattributes.h
index 6337e0e5e130511e0bbff73dbc449678b4de1bd9..58423fd88284bbe9e715c3aebf6ea63e2b29e296 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONMODIFYATTRIBUTES_H
-#define RS_ACTIONMODIFYATTRIBUTES_H
+#ifndef __ACTIONMODIFYATTRIBUTES_H__
+#define __ACTIONMODIFYATTRIBUTES_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to change the attributes of
  * entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyAttributes: public RS_ActionInterface
+class ActionModifyAttributes: public ActionInterface
 {
        public:
                /**
@@ -20,8 +21,8 @@ class RS_ActionModifyAttributes: public RS_ActionInterface
                };
 
        public:
-               RS_ActionModifyAttributes(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyAttributes();
+               ActionModifyAttributes(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyAttributes();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -30,4 +31,4 @@ class RS_ActionModifyAttributes: public RS_ActionInterface
                virtual void updateToolBar();
 };
 
-#endif
+#endif // __ACTIONMODIFYATTRIBUTES_H__
similarity index 74%
rename from src/actions/rs_actionmodifybevel.cpp
rename to src/actions/actionmodifybevel.cpp
index 1949c8107b8ebd3943d50247208ed29613ac5a8c..0b4ffd2930eec33926d58dbd151d7fbe6433f6fb 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifybevel.cpp
+// actionmodifybevel.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifybevel.h"
+#include "actionmodifybevel.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_information.h"
 
-RS_ActionModifyBevel::RS_ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Bevel Entities",
+ActionModifyBevel::ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Bevel Entities",
                container, graphicView)
 {
        entity1 = NULL;
@@ -27,34 +27,32 @@ RS_ActionModifyBevel::RS_ActionModifyBevel(RS_EntityContainer & container, Graph
        coord2 = Vector(false);
 }
 
-RS_ActionModifyBevel::~RS_ActionModifyBevel()
+ActionModifyBevel::~ActionModifyBevel()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionModifyBevel::rtti()
+/*virtual*/ RS2::ActionType ActionModifyBevel::rtti()
 {
        return RS2::ActionModifyBevel;
 }
 
-void RS_ActionModifyBevel::init(int status)
+void ActionModifyBevel::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionModifyBevel::trigger()
+void ActionModifyBevel::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyBevel::trigger()");
+       RS_DEBUG->print("ActionModifyBevel::trigger()");
 
-       if (entity1 != NULL && entity1->isAtomic()
-           && entity2 != NULL && entity2->isAtomic())
+       if (entity1 && entity1->isAtomic()
+           && entity2 && entity2->isAtomic())
        {
                RS_Modification m(*container, graphicView);
-               m.bevel(coord1, (RS_AtomicEntity *)entity1,
-                       coord2, (RS_AtomicEntity *)entity2,
-                       data);
+               m.bevel(coord1, (RS_AtomicEntity *)entity1, coord2, (RS_AtomicEntity *)entity2, data);
 
                entity1 = NULL;
                entity2 = NULL;
@@ -64,9 +62,9 @@ void RS_ActionModifyBevel::trigger()
        }
 }
 
-void RS_ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyBevel::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
        RS_Entity * se = catchEntity(e, RS2::ResolveAll);
@@ -91,10 +89,10 @@ void RS_ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyBevel::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent end");
 }
 
-void RS_ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -125,7 +123,7 @@ void RS_ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyBevel::commandEvent(RS_CommandEvent * e)
+void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -214,7 +212,7 @@ void RS_ActionModifyBevel::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionModifyBevel::getAvailableCommands()
+QStringList ActionModifyBevel::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -233,21 +231,21 @@ QStringList RS_ActionModifyBevel::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionModifyBevel::showOptions()
+void ActionModifyBevel::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionModifyBevel::hideOptions()
+void ActionModifyBevel::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionModifyBevel::updateMouseButtonHints()
+void ActionModifyBevel::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -281,43 +279,42 @@ void RS_ActionModifyBevel::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyBevel::updateMouseCursor()
+void ActionModifyBevel::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyBevel::updateToolBar()
+void ActionModifyBevel::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
-void RS_ActionModifyBevel::setLength1(double l1)
+void ActionModifyBevel::setLength1(double l1)
 {
        data.length1 = l1;
 }
 
-double RS_ActionModifyBevel::getLength1()
+double ActionModifyBevel::getLength1()
 {
        return data.length1;
 }
 
-void RS_ActionModifyBevel::setLength2(double l2)
+void ActionModifyBevel::setLength2(double l2)
 {
        data.length2 = l2;
 }
 
-double RS_ActionModifyBevel::getLength2()
+double ActionModifyBevel::getLength2()
 {
        return data.length2;
 }
 
-void RS_ActionModifyBevel::setTrim(bool t)
+void ActionModifyBevel::setTrim(bool t)
 {
        data.trim = t;
 }
 
-bool RS_ActionModifyBevel::isTrimOn()
+bool ActionModifyBevel::isTrimOn()
 {
        return data.trim;
 }
-
similarity index 80%
rename from src/actions/rs_actionmodifybevel.h
rename to src/actions/actionmodifybevel.h
index 997993d5585655945603fca07dac45245ee84c85..2718dfdb9ce6e9710387e83763fcebb042a5c5f8 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONMODIFYBEVEL_H
-#define RS_ACTIONMODIFYBEVEL_H
+#ifndef __ACTIONMODIFYBEVEL_H__
+#define __ACTIONMODIFYBEVEL_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "rs_modification.h"
 
 /**
  * This action class can handle user events to bevel corners.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyBevel: public RS_PreviewActionInterface
+class ActionModifyBevel: public ActionInterface
 {
        public:
                /**
@@ -24,8 +25,8 @@ class RS_ActionModifyBevel: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyBevel();
+               ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyBevel();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -56,4 +57,4 @@ class RS_ActionModifyBevel: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONMODIFYBEVEL_H__
similarity index 79%
rename from src/actions/rs_actionmodifycut.cpp
rename to src/actions/actionmodifycut.cpp
index 1fa53a6261d8fd2c46adcb4fd45a3dec237a40cd..b9c35f0560ba2184167fb97161e8d0cf4f28eeca 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifycut.cpp
+// actionmodifycut.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifycut.h"
+#include "actionmodifycut.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_modification.h"
 
-RS_ActionModifyCut::RS_ActionModifyCut(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_ActionInterface("Cut Entity",
+ActionModifyCut::ActionModifyCut(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Cut Entity",
                container, graphicView)
 {
        cutEntity = NULL;
        cutCoord = Vector(false);
 }
 
-RS_ActionModifyCut::~RS_ActionModifyCut()
+ActionModifyCut::~ActionModifyCut()
 {
 }
 
-void RS_ActionModifyCut::init(int status)
+void ActionModifyCut::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyCut::trigger()
+void ActionModifyCut::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyCut::trigger()");
+       RS_DEBUG->print("ActionModifyCut::trigger()");
 
        if (cutEntity != NULL && cutEntity->isAtomic() && cutCoord.valid
            && cutEntity->isPointOnEntity(cutCoord))
@@ -56,9 +56,9 @@ void RS_ActionModifyCut::trigger()
        }
 }
 
-void RS_ActionModifyCut::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyCut::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyCut::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyCut::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -73,10 +73,10 @@ void RS_ActionModifyCut::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyTrim::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
 }
 
-void RS_ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -136,7 +136,7 @@ void RS_ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyCut::updateMouseButtonHints()
+void ActionModifyCut::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -156,12 +156,12 @@ void RS_ActionModifyCut::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyCut::updateMouseCursor()
+void ActionModifyCut::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyCut::updateToolBar()
+void ActionModifyCut::updateToolBar()
 {
        switch (getStatus())
        {
similarity index 69%
rename from src/actions/rs_actionmodifycut.h
rename to src/actions/actionmodifycut.h
index 61c73b1d1781301a265b62e4e3f8e6222f45cf1e..e38ada26b40f9b6592ecaf241691de9c792c98cd 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONMODIFYCUT_H
-#define RS_ACTIONMODIFYCUT_H
+#ifndef __ACTIONMODIFYCUT_H__
+#define __ACTIONMODIFYCUT_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -9,9 +9,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to divide entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyCut: public RS_ActionInterface
+class ActionModifyCut: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyCut: public RS_ActionInterface
                };
 
        public:
-               RS_ActionModifyCut(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyCut();
+               ActionModifyCut(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyCut();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -39,4 +40,4 @@ class RS_ActionModifyCut: public RS_ActionInterface
                Vector cutCoord;
 };
 
-#endif
+#endif // __ACTIONMODIFYCUT_H__
similarity index 67%
rename from src/actions/rs_actionmodifydelete.cpp
rename to src/actions/actionmodifydelete.cpp
index abfd500edd6640c50da0a41b0ba80b52d0902d1b..7c5cc9f9976f229222a4c8bce33db94f334edad9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifydelete.cpp
+// actionmodifydelete.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifydelete.h"
+#include "actionmodifydelete.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_modification.h"
 
-RS_ActionModifyDelete::RS_ActionModifyDelete(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_ActionInterface("Delete Entities",
+ActionModifyDelete::ActionModifyDelete(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Delete Entities",
                container, graphicView)
 {
 }
 
-RS_ActionModifyDelete::~RS_ActionModifyDelete()
+ActionModifyDelete::~ActionModifyDelete()
 {
 }
 
-void RS_ActionModifyDelete::init(int status)
+void ActionModifyDelete::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionModifyDelete::trigger()
+void ActionModifyDelete::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyDelete::trigger()");
+       RS_DEBUG->print("ActionModifyDelete::trigger()");
        RS_Modification m(*container, graphicView);
        m.remove();
        finish();
@@ -45,7 +45,7 @@ void RS_ActionModifyDelete::trigger()
                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyDelete::updateMouseButtonHints()
+void ActionModifyDelete::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -62,12 +62,12 @@ void RS_ActionModifyDelete::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyDelete::updateMouseCursor()
+void ActionModifyDelete::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::DelCursor);
 }
 
-void RS_ActionModifyDelete::updateToolBar()
+void ActionModifyDelete::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -77,4 +77,3 @@ void RS_ActionModifyDelete::updateToolBar()
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
-
similarity index 56%
rename from src/actions/rs_actionmodifydelete.h
rename to src/actions/actionmodifydelete.h
index 49c388adc244c43268a88c01a1bfa48f0eed3a89..9c51dd1fcfae39326e9b6b1e564bcef140e7eddb 100644 (file)
@@ -1,14 +1,15 @@
-#ifndef RS_ACTIONMODIFYDELETE_H
-#define RS_ACTIONMODIFYDELETE_H
+#ifndef __ACTIONMODIFYDELETE_H__
+#define __ACTIONMODIFYDELETE_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to delete entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyDelete: public RS_ActionInterface
+class ActionModifyDelete: public ActionInterface
 {
        public:
                /**
@@ -19,8 +20,8 @@ class RS_ActionModifyDelete: public RS_ActionInterface
                };
 
        public:
-               RS_ActionModifyDelete(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyDelete();
+               ActionModifyDelete(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyDelete();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -29,4 +30,4 @@ class RS_ActionModifyDelete: public RS_ActionInterface
                virtual void updateToolBar();
 };
 
-#endif
+#endif // __ACTIONMODIFYDELETE_H__
similarity index 75%
rename from src/actions/rs_actionmodifydeletefree.cpp
rename to src/actions/actionmodifydeletefree.cpp
index 2a4c8bb72dc6a2ec4515724c2584267ca47efeb5..12cc39d68842ddd1ffb0ce414e04521907e13da3 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifydeletefree.cpp
+// actionmodifydeletefree.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifydeletefree.h"
+#include "actionmodifydeletefree.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 #include "rs_polyline.h"
 #include "rs_undo.h"
 
-RS_ActionModifyDeleteFree::RS_ActionModifyDeleteFree(
-       RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Delete Entities Freehand",
-               container, graphicView)
+ActionModifyDeleteFree::ActionModifyDeleteFree(RS_EntityContainer & container,
+       GraphicView & graphicView):
+       ActionInterface("Delete Entities Freehand", container, graphicView)
 {
 }
 
-RS_ActionModifyDeleteFree::~RS_ActionModifyDeleteFree()
+ActionModifyDeleteFree::~ActionModifyDeleteFree()
 {
 }
 
-void RS_ActionModifyDeleteFree::init(int status)
+void ActionModifyDeleteFree::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        polyline = NULL;
        e1 = e2 = NULL;
        v1 = v2 = Vector(false);
-       setSnapMode(RS2::SnapOnEntity);
+//     setSnapMode(RS2::SnapOnEntity);
 }
 
-void RS_ActionModifyDeleteFree::trigger()
+void ActionModifyDeleteFree::trigger()
 {
-       if (e1 != NULL && e2 != NULL)
+       if (e1 && e2)
        {
                RS_EntityContainer * parent = e2->getParent();
 
-               if (parent != NULL)
+               if (parent)
                {
                        if (parent->rtti() == RS2::EntityPolyline)
                        {
@@ -59,10 +58,7 @@ void RS_ActionModifyDeleteFree::trigger()
                                        RS_Polyline * pl1;
                                        RS_Polyline * pl2;
                                        RS_Modification m(*container);
-                                       m.splitPolyline(*polyline,
-                                               *e1, v1,
-                                               *e2, v2,
-                                               &pl1, &pl2);
+                                       m.splitPolyline(*polyline, *e1, v1, *e2, v2, &pl1, &pl2);
 
                                        if (document)
                                        {
@@ -95,7 +91,7 @@ void RS_ActionModifyDeleteFree::trigger()
                RS_DIALOGFACTORY->commandMessage(tr("One of the chosen entities is NULL"));
 }
 
-void RS_ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -105,13 +101,14 @@ void RS_ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
                {
                case 0:
                        v1 = snapPoint(e);
-                       e1 = getKeyEntity();
+//                     e1 = getKeyEntity();
+                       e1 = graphicView->snapper.getKeyEntity();
 
-                       if (e1 != NULL)
+                       if (e1)
                        {
                                RS_EntityContainer * parent = e1->getParent();
 
-                               if (parent != NULL)
+                               if (parent)
                                {
                                        if (parent->rtti() == RS2::EntityPolyline)
                                        {
@@ -134,9 +131,10 @@ void RS_ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
 
                case 1:
                        v2 = snapPoint(e);
-                       e2 = getKeyEntity();
+//                     e2 = getKeyEntity();
+                       e2 = graphicView->snapper.getKeyEntity();
 
-                       if (e2 != NULL)
+                       if (e2)
                                trigger();
                        else
                                RS_DIALOGFACTORY->commandMessage(tr("Second entity is NULL"));
@@ -146,19 +144,18 @@ void RS_ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyDeleteFree::updateMouseButtonHints()
+void ActionModifyDeleteFree::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case 0:
                RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first break point "
-                               "on a polyline"), tr("Cancel"));
+                       "on a polyline"), tr("Cancel"));
                break;
 
        case 1:
                RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second break point "
-                               "on the same polyline"),
-                       tr("Back"));
+                       "on the same polyline"), tr("Back"));
                break;
 
        default:
@@ -166,4 +163,3 @@ void RS_ActionModifyDeleteFree::updateMouseButtonHints()
                break;
        }
 }
-
similarity index 56%
rename from src/actions/rs_actionmodifydeletefree.h
rename to src/actions/actionmodifydeletefree.h
index c88c6ee011a7f601827fddd500a2bcec71de742a..694639d5e5d5760a6c239808ad2e8c9301ae2045 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONMODIFYDELETEFREE_H
-#define RS_ACTIONMODIFYDELETEFREE_H
+#ifndef __ACTIONMODIFYDELETEFREE_H__
+#define __ACTIONMODIFYDELETEFREE_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -10,13 +10,14 @@ class RS_Polyline;
 /**
  * This action class can handle user events to delete entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyDeleteFree: public RS_ActionInterface
+class ActionModifyDeleteFree: public ActionInterface
 {
        public:
-               RS_ActionModifyDeleteFree(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyDeleteFree();
+               ActionModifyDeleteFree(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyDeleteFree();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -31,4 +32,4 @@ class RS_ActionModifyDeleteFree: public RS_ActionInterface
                Vector v2;
 };
 
-#endif
+#endif // __ACTIONMODIFYDELETEFREE_H__
similarity index 69%
rename from src/actions/rs_actionmodifydeletequick.cpp
rename to src/actions/actionmodifydeletequick.cpp
index 737c30a83bde73c1117abfc770e8be681fd53964..6ec8ddd301ec5e96fa0848c17794c4f9c3dddc87 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifydeletequick.cpp
+// actionmodifydeletequick.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifydeletequick.h"
+#include "actionmodifydeletequick.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionModifyDeleteQuick::RS_ActionModifyDeleteQuick(
+ActionModifyDeleteQuick::ActionModifyDeleteQuick(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Quick Delete Entities", container, graphicView)
+       ActionInterface("Quick Delete Entities", container, graphicView)
 {
        en = NULL;
 }
 
-RS_ActionModifyDeleteQuick::~RS_ActionModifyDeleteQuick()
+ActionModifyDeleteQuick::~ActionModifyDeleteQuick()
 {
 }
 
 /**
  * Deletes all entities that were selected.
  */
-void RS_ActionModifyDeleteQuick::trigger()
+void ActionModifyDeleteQuick::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyDeleteQuick::trigger()");
+       RS_DEBUG->print("ActionModifyDeleteQuick::trigger()");
 
        if (en != NULL)
        {
@@ -57,11 +57,11 @@ void RS_ActionModifyDeleteQuick::trigger()
                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("RS_ActionModifyDeleteQuick::mousePressEvent:"
+               RS_DEBUG->print("ActionModifyDeleteQuick::mousePressEvent:"
                        " Entity is NULL\n");
 }
 
-void RS_ActionModifyDeleteQuick::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyDeleteQuick::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -72,7 +72,7 @@ void RS_ActionModifyDeleteQuick::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyDeleteQuick::updateMouseButtonHints()
+void ActionModifyDeleteQuick::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -87,9 +87,7 @@ void RS_ActionModifyDeleteQuick::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyDeleteQuick::updateMouseCursor()
+void ActionModifyDeleteQuick::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::DelCursor);
 }
-
-// EOF
similarity index 51%
rename from src/actions/rs_actionmodifydeletequick.h
rename to src/actions/actionmodifydeletequick.h
index b97efd9704a0fd2c6c0f8eb3550d63af81ff40fd..981b54a811538b92494ababb7ec0a3c0ef9f349f 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONMODIFYDELETEQUICK_H
-#define RS_ACTIONMODIFYDELETEQUICK_H
+#ifndef __ACTIONMODIFYDELETEQUICK_H__
+#define __ACTIONMODIFYDELETEQUICK_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 class RS_Entity;
 
@@ -9,13 +9,14 @@ class RS_Entity;
  * This action class can handle user events to delete entities
  * directly (every click removes an entity).
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyDeleteQuick: public RS_ActionInterface
+class ActionModifyDeleteQuick: public ActionInterface
 {
        public:
-               RS_ActionModifyDeleteQuick(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyDeleteQuick();
+               ActionModifyDeleteQuick(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyDeleteQuick();
 
                virtual void trigger();
                virtual void mouseReleaseEvent(QMouseEvent * e);
@@ -26,4 +27,4 @@ class RS_ActionModifyDeleteQuick: public RS_ActionInterface
                RS_Entity * en;
 };
 
-#endif
+#endif // __ACTIONMODIFYDELETEQUICK_H__
similarity index 72%
rename from src/actions/rs_actionmodifyentity.cpp
rename to src/actions/actionmodifyentity.cpp
index 7aaaae48d46adb511d96b0292874deaeaecfb60e..f491f5670b026eb69a2e42222e6f6492714fb12a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyentity.cpp
+// actionmodifyentity.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyentity.h"
+#include "actionmodifyentity.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionModifyEntity::RS_ActionModifyEntity(RS_EntityContainer & container,
+ActionModifyEntity::ActionModifyEntity(RS_EntityContainer & container,
        GraphicView & graphicView):
-       RS_ActionInterface("Modify Entity", container, graphicView)
+       ActionInterface("Modify Entity", container, graphicView)
 {
        en = NULL;
 }
 
-RS_ActionModifyEntity::~RS_ActionModifyEntity()
+ActionModifyEntity::~ActionModifyEntity()
 {
 }
 
-void RS_ActionModifyEntity::trigger()
+void ActionModifyEntity::trigger()
 {
        if (en != NULL)
        {
@@ -61,10 +61,10 @@ void RS_ActionModifyEntity::trigger()
 
        }
        else
-               RS_DEBUG->print("RS_ActionModifyEntity::trigger: Entity is NULL\n");
+               RS_DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
 }
 
-void RS_ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -75,9 +75,9 @@ void RS_ActionModifyEntity::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyEntity::updateMouseCursor()
+void ActionModifyEntity::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
 
-// EOF
+
diff --git a/src/actions/actionmodifyentity.h b/src/actions/actionmodifyentity.h
new file mode 100644 (file)
index 0000000..991730c
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __ACTIONMODIFYENTITY_H__
+#define __ACTIONMODIFYENTITY_H__
+
+#include "actioninterface.h"
+
+class RS_Entity;
+
+/**
+ * This action class can handle user events to select entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionModifyEntity: public ActionInterface
+{
+       public:
+               ActionModifyEntity(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyEntity();
+
+               virtual void trigger();
+               virtual void mouseReleaseEvent(QMouseEvent * e);
+               virtual void updateMouseCursor();
+
+       private:
+               RS_Entity * en;
+};
+
+#endif // __ACTIONMODIFYENTITY_H__
similarity index 56%
rename from src/actions/rs_actionmodifyexplodetext.cpp
rename to src/actions/actionmodifyexplodetext.cpp
index 62a263c10456f5eb6dca69937c7fc3c600176783..ee2efcc5f8dc14b1d50e8090c558595923dd9891 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyexplodetext.cpp
+// actionmodifyexplodetext.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyexplodetext.h"
+#include "actionmodifyexplodetext.h"
 
 #include "rs_modification.h"
 
 /**
  * Constructor.
  */
-RS_ActionModifyExplodeText::RS_ActionModifyExplodeText(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_PreviewActionInterface("Blocks Explode",
+ActionModifyExplodeText::ActionModifyExplodeText(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Blocks Explode",
                container, graphicView)
 {
 }
 
-RS_ActionModifyExplodeText::~RS_ActionModifyExplodeText()
+ActionModifyExplodeText::~ActionModifyExplodeText()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionModifyExplodeText::rtti()
+/*virtual*/ RS2::ActionType ActionModifyExplodeText::rtti()
 {
        return RS2::ActionModifyExplodeText;
 }
 
-void RS_ActionModifyExplodeText::init(int status)
+void ActionModifyExplodeText::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
 
        trigger();
        finish();
 }
 
-void RS_ActionModifyExplodeText::trigger()
+void ActionModifyExplodeText::trigger()
 {
        RS_Modification m(*container, graphicView);
        m.explodeTextIntoLetters();
diff --git a/src/actions/actionmodifyexplodetext.h b/src/actions/actionmodifyexplodetext.h
new file mode 100644 (file)
index 0000000..ee496ed
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __ACTIONMODIFYEXPLODETEXT_H__
+#define __ACTIONMODIFYEXPLODETEXT_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events for exploding blocks and
+ * other entity containers into single entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionModifyExplodeText: public ActionInterface
+{
+       public:
+               ActionModifyExplodeText(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyExplodeText();
+
+               virtual RS2::ActionType rtti();
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONMODIFYEXPLODETEXT_H__
similarity index 73%
rename from src/actions/rs_actionmodifymirror.cpp
rename to src/actions/actionmodifymirror.cpp
index 215a10efcada1331c3b9bf010a06244c5caba749..f0f037369af67702ed4ac0c4ff7769882318a721 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifymirror.cpp
+// actionmodifymirror.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifymirror.h"
+#include "actionmodifymirror.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_preview.h"
 
-RS_ActionModifyMirror::RS_ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Mirror Entities", container, graphicView)
+ActionModifyMirror::ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Mirror Entities", container, graphicView)
 {
 }
 
-RS_ActionModifyMirror::~RS_ActionModifyMirror()
+ActionModifyMirror::~ActionModifyMirror()
 {
 }
 
-void RS_ActionModifyMirror::init(int status)
+void ActionModifyMirror::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyMirror::trigger()
+void ActionModifyMirror::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyMirror::trigger()");
+       RS_DEBUG->print("ActionModifyMirror::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.mirror(data);
@@ -42,9 +42,9 @@ void RS_ActionModifyMirror::trigger()
                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyMirror::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyMirror::mouseMoveEvent begin");
 
        if (getStatus() == SetAxisPoint1 || getStatus() == SetAxisPoint2)
        {
@@ -64,10 +64,9 @@ void RS_ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
 
                                deletePreview();
                                clearPreview();
-                               preview->addSelectionFrom(*container);
+/*                             preview->addSelectionFrom(*container);
                                preview->mirror(axisPoint1, axisPoint2);
-                               preview->addEntity(new RS_Line(preview,RS_LineData(axisPoint1,
-                                       axisPoint2)));
+                               preview->addEntity(new RS_Line(preview,RS_LineData(axisPoint1, axisPoint2)));*/
                                drawPreview();
                        }
                        break;
@@ -77,10 +76,10 @@ void RS_ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyMirror::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyMirror::mouseMoveEvent end");
 }
 
-void RS_ActionModifyMirror::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyMirror::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -95,7 +94,7 @@ void RS_ActionModifyMirror::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyMirror::coordinateEvent(Vector * e)
+void ActionModifyMirror::coordinateEvent(Vector * e)
 {
        if (!e)
                return;
@@ -134,7 +133,7 @@ void RS_ActionModifyMirror::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyMirror::updateMouseButtonHints()
+void ActionModifyMirror::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY)
        {
@@ -163,12 +162,12 @@ void RS_ActionModifyMirror::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyMirror::updateMouseCursor()
+void ActionModifyMirror::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyMirror::updateToolBar()
+void ActionModifyMirror::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
similarity index 71%
rename from src/actions/rs_actionmodifymirror.h
rename to src/actions/actionmodifymirror.h
index feb5398a6effe5df800fc45765e2728dc95f1650..4c74872ad67c3537468d1c1b0d8185f87d64ae17 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONMODIFYMIRROR_H
-#define RS_ACTIONMODIFYMIRROR_H
+#ifndef __ACTIONMODIFYMIRROR_H__
+#define __ACTIONMODIFYMIRROR_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to mirror entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyMirror: public RS_PreviewActionInterface
+class ActionModifyMirror: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyMirror: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyMirror();
+               ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyMirror();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -41,4 +42,4 @@ class RS_ActionModifyMirror: public RS_PreviewActionInterface
                Vector axisPoint2;
 };
 
-#endif
+#endif // __ACTIONMODIFYMIRROR_H__
similarity index 73%
rename from src/actions/rs_actionmodifymove.cpp
rename to src/actions/actionmodifymove.cpp
index 5a966f7a3d6d903a0844369ad0c862faa7d8c82b..b0df30477e2b8287b55aa65765e3b246022bb4a9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifymove.cpp
+// actionmodifymove.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifymove.h"
+#include "actionmodifymove.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_preview.h"
 
-RS_ActionModifyMove::RS_ActionModifyMove(RS_EntityContainer & container,
+ActionModifyMove::ActionModifyMove(RS_EntityContainer & container,
        GraphicView & graphicView):
-       RS_PreviewActionInterface("Move Entities", container, graphicView)
+       ActionInterface("Move Entities", container, graphicView)
 {
 }
 
-RS_ActionModifyMove::~RS_ActionModifyMove()
+ActionModifyMove::~ActionModifyMove()
 {
 }
 
-void RS_ActionModifyMove::init(int status)
+void ActionModifyMove::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyMove::trigger()
+void ActionModifyMove::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyMove::trigger()");
+       RS_DEBUG->print("ActionModifyMove::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.move(data);
@@ -42,9 +42,9 @@ void RS_ActionModifyMove::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyMove::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyMove::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint
            || getStatus() == SetTargetPoint)
@@ -65,8 +65,8 @@ void RS_ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
 
                                deletePreview();
                                clearPreview();
-                               preview->addSelectionFrom(*container);
-                               preview->move(targetPoint - referencePoint);
+/*                             preview->addSelectionFrom(*container);
+                               preview->move(targetPoint - referencePoint);*/
                                drawPreview();
                        }
                        break;
@@ -76,10 +76,10 @@ void RS_ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyMove::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyMove::mouseMoveEvent end");
 }
 
-void RS_ActionModifyMove::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyMove::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -94,7 +94,7 @@ void RS_ActionModifyMove::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyMove::coordinateEvent(Vector * e)
+void ActionModifyMove::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -127,7 +127,7 @@ void RS_ActionModifyMove::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyMove::updateMouseButtonHints()
+void ActionModifyMove::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -151,12 +151,12 @@ void RS_ActionModifyMove::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyMove::updateMouseCursor()
+void ActionModifyMove::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyMove::updateToolBar()
+void ActionModifyMove::updateToolBar()
 {
        switch (getStatus())
        {
@@ -174,4 +174,4 @@ void RS_ActionModifyMove::updateToolBar()
        }
 }
 
-// EOF
+
similarity index 72%
rename from src/actions/rs_actionmodifymove.h
rename to src/actions/actionmodifymove.h
index ebdda4c483afd36fa358ac27afd197625b65c2d9..7f93a39cc93941145181eced39cfd39ed6ed26d8 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONMODIFYMOVE_H
-#define RS_ACTIONMODIFYMOVE_H
+#ifndef __ACTIONMODIFYMOVE_H__
+#define __ACTIONMODIFYMOVE_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to move entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyMove: public RS_PreviewActionInterface
+class ActionModifyMove: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyMove: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyMove(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyMove();
+               ActionModifyMove(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyMove();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -41,4 +42,4 @@ class RS_ActionModifyMove: public RS_PreviewActionInterface
                Vector targetPoint;
 };
 
-#endif
+#endif // __ACTIONMODIFYMOVE_H__
similarity index 70%
rename from src/actions/rs_actionmodifymoverotate.cpp
rename to src/actions/actionmodifymoverotate.cpp
index 706c9d2b82e2cc9bb199b81bba30ec54b5669255..0eec89f0dea91038b176ef2acba8b0cbf3987b75 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifymoverotate.cpp
+// actionmodifymoverotate.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifymoverotate.h"
+#include "actionmodifymoverotate.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_preview.h"
 
-RS_ActionModifyMoveRotate::RS_ActionModifyMoveRotate(
+ActionModifyMoveRotate::ActionModifyMoveRotate(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Move and Rotate Entities", container, graphicView)
+       ActionInterface("Move and Rotate Entities", container, graphicView)
 {
 }
 
-RS_ActionModifyMoveRotate::~RS_ActionModifyMoveRotate()
+ActionModifyMoveRotate::~ActionModifyMoveRotate()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionModifyMoveRotate::rtti()
+/*virtual*/ RS2::ActionType ActionModifyMoveRotate::rtti()
 {
        return RS2::ActionModifyMoveRotate;
 }
 
-void RS_ActionModifyMoveRotate::init(int status)
+void ActionModifyMoveRotate::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyMoveRotate::trigger()
+void ActionModifyMoveRotate::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyMoveRotate::trigger()");
+       RS_DEBUG->print("ActionModifyMoveRotate::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.moveRotate(data);
@@ -50,9 +50,9 @@ void RS_ActionModifyMoveRotate::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyMoveRotate::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint || getStatus() == SetTargetPoint)
        {
@@ -73,9 +73,9 @@ void RS_ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
 
                                deletePreview();
                                clearPreview();
-                               preview->addSelectionFrom(*container);
+/*                             preview->addSelectionFrom(*container);
                                preview->rotate(data.referencePoint, data.angle);
-                               preview->move(data.offset);
+                               preview->move(data.offset);*/
                                drawPreview();
                        }
                        break;
@@ -85,10 +85,10 @@ void RS_ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyMoveRotate::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent end");
 }
 
-void RS_ActionModifyMoveRotate::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyMoveRotate::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -103,7 +103,7 @@ void RS_ActionModifyMoveRotate::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyMoveRotate::coordinateEvent(Vector * e)
+void ActionModifyMoveRotate::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -133,7 +133,7 @@ void RS_ActionModifyMoveRotate::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyMoveRotate::commandEvent(RS_CommandEvent * e)
+void ActionModifyMoveRotate::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -177,7 +177,7 @@ void RS_ActionModifyMoveRotate::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionModifyMoveRotate::getAvailableCommands()
+QStringList ActionModifyMoveRotate::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -195,25 +195,25 @@ QStringList RS_ActionModifyMoveRotate::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionModifyMoveRotate::showOptions()
+void ActionModifyMoveRotate::showOptions()
 {
-       //std::cout << "RS_ActionModifyMoveRotate::showOptions()\n";
+       //std::cout << "ActionModifyMoveRotate::showOptions()\n";
 
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionModifyMoveRotate::hideOptions()
+void ActionModifyMoveRotate::hideOptions()
 {
-       //std::cout << "RS_ActionModifyMoveRotate::hideOptions()\n";
+       //std::cout << "ActionModifyMoveRotate::hideOptions()\n";
 
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionModifyMoveRotate::updateMouseButtonHints()
+void ActionModifyMoveRotate::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -235,12 +235,12 @@ void RS_ActionModifyMoveRotate::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyMoveRotate::updateMouseCursor()
+void ActionModifyMoveRotate::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyMoveRotate::updateToolBar()
+void ActionModifyMoveRotate::updateToolBar()
 {
        switch (getStatus())
        {
@@ -255,12 +255,12 @@ void RS_ActionModifyMoveRotate::updateToolBar()
        }
 }
 
-void RS_ActionModifyMoveRotate::setAngle(double a)
+void ActionModifyMoveRotate::setAngle(double a)
 {
        data.angle = a;
 }
 
-double RS_ActionModifyMoveRotate::getAngle()
+double ActionModifyMoveRotate::getAngle()
 {
        return data.angle;
 }
similarity index 78%
rename from src/actions/rs_actionmodifymoverotate.h
rename to src/actions/actionmodifymoverotate.h
index ad09386142b04e31cbcff6912c4ec4c6ca690c9d..ca9c67ac4c6e36000f64da6078151b851dd73d89 100644 (file)
@@ -1,17 +1,18 @@
-#ifndef RS_ACTIONMODIFYMOVEROTATE_H
-#define RS_ACTIONMODIFYMOVEROTATE_H
+#ifndef __ACTIONMODIFYMOVEROTATE_H__
+#define __ACTIONMODIFYMOVEROTATE_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to move and at the same
  * time rotate entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyMoveRotate: public RS_PreviewActionInterface
+class ActionModifyMoveRotate: public ActionInterface
 {
        public:
                /**
@@ -25,8 +26,8 @@ class RS_ActionModifyMoveRotate: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyMoveRotate(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyMoveRotate();
+               ActionModifyMoveRotate(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyMoveRotate();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -58,4 +59,4 @@ class RS_ActionModifyMoveRotate: public RS_PreviewActionInterface
                QString cmdAngle3;
 };
 
-#endif
+#endif // __ACTIONMODIFYMOVEROTATE_H__
similarity index 66%
rename from src/actions/rs_actionmodifyrotate.cpp
rename to src/actions/actionmodifyrotate.cpp
index 41efd58bf6f7e75a8e6a410cade968a7e52737d6..8eb13e641bb88ad34fc424225d395e20f78f6088 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyrotate.cpp
+// actionmodifyrotate.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyrotate.h"
+#include "actionmodifyrotate.h"
 
 #include "rs_dialogfactory.h"
 
-RS_ActionModifyRotate::RS_ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Rotate Entities",
+ActionModifyRotate::ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Rotate Entities",
                container, graphicView)
 {
 }
 
-RS_ActionModifyRotate::~RS_ActionModifyRotate()
+ActionModifyRotate::~ActionModifyRotate()
 {
 }
 
-void RS_ActionModifyRotate::init(int status)
+void ActionModifyRotate::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyRotate::trigger()
+void ActionModifyRotate::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyRotate::trigger()");
+       RS_DEBUG->print("ActionModifyRotate::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.rotate(data);
@@ -41,9 +41,9 @@ void RS_ActionModifyRotate::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyRotate::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyRotate::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyRotate::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyRotate::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint)
        {
@@ -60,10 +60,10 @@ void RS_ActionModifyRotate::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyRotate::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyRotate::mouseMoveEvent end");
 }
 
-void RS_ActionModifyRotate::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyRotate::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -78,7 +78,7 @@ void RS_ActionModifyRotate::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyRotate::coordinateEvent(Vector * e)
+void ActionModifyRotate::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -104,7 +104,7 @@ void RS_ActionModifyRotate::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyRotate::updateMouseButtonHints()
+void ActionModifyRotate::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -119,12 +119,12 @@ void RS_ActionModifyRotate::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyRotate::updateMouseCursor()
+void ActionModifyRotate::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyRotate::updateToolBar()
+void ActionModifyRotate::updateToolBar()
 {
        switch (getStatus())
        {
@@ -137,5 +137,3 @@ void RS_ActionModifyRotate::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 70%
rename from src/actions/rs_actionmodifyrotate.h
rename to src/actions/actionmodifyrotate.h
index 1569dc2eb06dec4d8c2fddc925840a4e1f878a66..be88a0e9b6d0760115962f8f7aa8e3f1c8a70fd0 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONMODIFYROTATE_H
-#define RS_ACTIONMODIFYROTATE_H
+#ifndef __ACTIONMODIFYROTATE_H__
+#define __ACTIONMODIFYROTATE_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to move entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyRotate: public RS_PreviewActionInterface
+class ActionModifyRotate: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionModifyRotate: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyRotate();
+               ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyRotate();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -40,4 +41,4 @@ class RS_ActionModifyRotate: public RS_PreviewActionInterface
                Vector targetPoint;
 };
 
-#endif
+#endif // __ACTIONMODIFYROTATE_H__
similarity index 61%
rename from src/actions/rs_actionmodifyrotate2.cpp
rename to src/actions/actionmodifyrotate2.cpp
index 0bdabab68526acfb4cb1cfc442b73e04bafbecbc..b5d6baac6c9bfd8e38013fdd3137634bde4e0f5d 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyrotate2.cpp
+// actionmodifyrotate2.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyrotate2.h"
+#include "actionmodifyrotate2.h"
 
 #include "rs_dialogfactory.h"
 
-RS_ActionModifyRotate2::RS_ActionModifyRotate2(
+ActionModifyRotate2::ActionModifyRotate2(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Rotate Entities around two centers", container, graphicView)
+       ActionInterface("Rotate Entities around two centers", container, graphicView)
 {
 }
 
-RS_ActionModifyRotate2::~RS_ActionModifyRotate2()
+ActionModifyRotate2::~ActionModifyRotate2()
 {
 }
 
-void RS_ActionModifyRotate2::init(int status)
+void ActionModifyRotate2::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyRotate2::trigger()
+void ActionModifyRotate2::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyRotate2::trigger()");
+       RS_DEBUG->print("ActionModifyRotate2::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.rotate2(data);
@@ -43,12 +43,11 @@ void RS_ActionModifyRotate2::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyRotate2::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
 
-       if (getStatus() == SetReferencePoint1
-           || getStatus() == SetReferencePoint2)
+       if (getStatus() == SetReferencePoint1 || getStatus() == SetReferencePoint2)
        {
                Vector mouse = snapPoint(e);
 
@@ -62,15 +61,7 @@ void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
 
                        if (data.center1.valid)
                                data.center2 = mouse;
-                               //data.offset = data.center2-data.center1;
-
-                               /*deletePreview();
-                                  clearPreview();
-                                  preview->addSelectionFrom(*container);
-                                  preview->rotate(data.center1, data.angle);
-                                  preview->move(data.offset);
-                                  drawPreview();
-                                */
+
                        break;
 
                default:
@@ -78,10 +69,10 @@ void RS_ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyRotate2::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
 }
 
-void RS_ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -96,7 +87,7 @@ void RS_ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyRotate2::coordinateEvent(Vector * e)
+void ActionModifyRotate2::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -124,17 +115,17 @@ void RS_ActionModifyRotate2::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
+void ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
 {
 }
 
-QStringList RS_ActionModifyRotate2::getAvailableCommands()
+QStringList ActionModifyRotate2::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionModifyRotate2::updateMouseButtonHints()
+void ActionModifyRotate2::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -154,12 +145,12 @@ void RS_ActionModifyRotate2::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyRotate2::updateMouseCursor()
+void ActionModifyRotate2::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyRotate2::updateToolBar()
+void ActionModifyRotate2::updateToolBar()
 {
        switch (getStatus())
        {
@@ -173,5 +164,3 @@ void RS_ActionModifyRotate2::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 72%
rename from src/actions/rs_actionmodifyrotate2.h
rename to src/actions/actionmodifyrotate2.h
index c74074a01dc8b40a18fbf690fc7be3c2ef4e88c1..673f255c9c41696c7582ac8c3f4cb0f437cd1b66 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONMODIFYROTATE2_H
-#define RS_ACTIONMODIFYROTATE2_H
+#ifndef __ACTIONMODIFYROTATE2_H__
+#define __ACTIONMODIFYROTATE2_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to rotate entities around
  * two entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyRotate2: public RS_PreviewActionInterface
+class ActionModifyRotate2: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyRotate2: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyRotate2(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyRotate2();
+               ActionModifyRotate2(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyRotate2();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -41,4 +42,4 @@ class RS_ActionModifyRotate2: public RS_PreviewActionInterface
                RS_Rotate2Data data;
 };
 
-#endif
+#endif // __ACTIONMODIFYROTATE2_H__
similarity index 71%
rename from src/actions/rs_actionmodifyround.cpp
rename to src/actions/actionmodifyround.cpp
index 530ddfab42e48a283af7e8493b4e9eaf52e3d1fc..4eb96d436537b0fa61eba3c85356a9ba3a978b82 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyround.cpp
+// actionmodifyround.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyround.h"
+#include "actionmodifyround.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_information.h"
 #include "rs_preview.h"
 
-RS_ActionModifyRound::RS_ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Round Entities", container, graphicView)
+ActionModifyRound::ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Round Entities", container, graphicView)
 {
        entity1 = NULL;
        entity2 = NULL;
@@ -28,26 +28,26 @@ RS_ActionModifyRound::RS_ActionModifyRound(RS_EntityContainer & container, Graph
        coord2 = Vector(false);
 }
 
-RS_ActionModifyRound::~RS_ActionModifyRound()
+ActionModifyRound::~ActionModifyRound()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionModifyRound::rtti()
+/*virtual*/ RS2::ActionType ActionModifyRound::rtti()
 {
        return RS2::ActionModifyRound;
 }
 
-void RS_ActionModifyRound::init(int status)
+void ActionModifyRound::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionModifyRound::trigger()
+void ActionModifyRound::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyRound::trigger()");
+       RS_DEBUG->print("ActionModifyRound::trigger()");
 
        if (entity1 != NULL && entity1->isAtomic()
            && entity2 != NULL && entity2->isAtomic())
@@ -55,14 +55,9 @@ void RS_ActionModifyRound::trigger()
                deletePreview();
 
                RS_Modification m(*container, graphicView);
-               m.round(coord2,
-                       coord1,
-                       (RS_AtomicEntity *)entity1,
-                       coord2,
-                       (RS_AtomicEntity *)entity2,
-                       data);
-
-               //coord = Vector(false);
+               m.round(coord2, coord1, (RS_AtomicEntity *)entity1, coord2,
+                       (RS_AtomicEntity *)entity2, data);
+
                coord1 = Vector(false);
                entity1 = NULL;
                coord2 = Vector(false);
@@ -76,9 +71,9 @@ void RS_ActionModifyRound::trigger()
        }
 }
 
-void RS_ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyRound::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
        RS_Entity * se = catchEntity(e, RS2::ResolveAll);
@@ -99,28 +94,22 @@ void RS_ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-                       //preview->addSelectionFrom(*container);
-                       //preview->move(targetPoint-referencePoint);
-                       RS_Entity * tmp1 = entity1->clone();
-                       RS_Entity * tmp2 = entity2->clone();
-                       tmp1->reparent(preview);
-                       tmp2->reparent(preview);
-                       preview->addEntity(tmp1);
-                       preview->addEntity(tmp2);
-
-                       bool trim = data.trim;
+/*                     RS_Entity * tmp1 = entity1->clone();
+                       RS_Entity * tmp2 = entity2->clone();*/
+//                     tmp1->reparent(preview);
+//                     tmp2->reparent(preview);
+//                     preview->addEntity(tmp1);
+//                     preview->addEntity(tmp2);
+
+/*                     bool trim = data.trim;
                        data.trim = false;
                        RS_Modification m(*preview, NULL, false);
-                       m.round(coord2,
-                               coord1,
-                               (RS_AtomicEntity *)tmp1,
-                               coord2,
-                               (RS_AtomicEntity *)tmp2,
-                               data);
+                       m.round(coord2, coord1, (RS_AtomicEntity *)tmp1, coord2,
+                               (RS_AtomicEntity *)tmp2, data);
                        data.trim = trim;
 
                        preview->removeEntity(tmp1);
-                       preview->removeEntity(tmp2);
+                       preview->removeEntity(tmp2);*/
                        drawPreview();
                }
                break;
@@ -129,10 +118,10 @@ void RS_ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyRound::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent end");
 }
 
-void RS_ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
 {
        Vector mouse = graphicView->toGraph(e->x(), e->y());
        RS_Entity * se = catchEntity(e, RS2::ResolveAll);
@@ -172,7 +161,7 @@ void RS_ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyRound::commandEvent(RS_CommandEvent * e)
+void ActionModifyRound::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -246,7 +235,7 @@ void RS_ActionModifyRound::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionModifyRound::getAvailableCommands()
+QStringList ActionModifyRound::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -264,23 +253,23 @@ QStringList RS_ActionModifyRound::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionModifyRound::showOptions()
+void ActionModifyRound::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionModifyRound::hideOptions()
+void ActionModifyRound::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionModifyRound::updateMouseButtonHints()
+void ActionModifyRound::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -312,33 +301,33 @@ void RS_ActionModifyRound::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyRound::updateMouseCursor()
+void ActionModifyRound::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyRound::updateToolBar()
+void ActionModifyRound::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
-void RS_ActionModifyRound::setRadius(double r)
+void ActionModifyRound::setRadius(double r)
 {
        data.radius = r;
 }
 
-double RS_ActionModifyRound::getRadius()
+double ActionModifyRound::getRadius()
 {
        return data.radius;
 }
 
-void RS_ActionModifyRound::setTrim(bool t)
+void ActionModifyRound::setTrim(bool t)
 {
        data.trim = t;
 }
 
-bool RS_ActionModifyRound::isTrimOn()
+bool ActionModifyRound::isTrimOn()
 {
        return data.trim;
 }
similarity index 79%
rename from src/actions/rs_actionmodifyround.h
rename to src/actions/actionmodifyround.h
index 27efe84079acc84bf3344bdeaf5e762fedc16037..fab4beda749d84d417b99b95f66773e73ea0f9fd 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef RS_ACTIONMODIFYROUND_H
-#define RS_ACTIONMODIFYROUND_H
+#ifndef __ACTIONMODIFYROUND_H__
+#define __ACTIONMODIFYROUND_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -10,9 +10,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to round corners.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyRound: public RS_PreviewActionInterface
+class ActionModifyRound: public ActionInterface
 {
        public:
                /**
@@ -26,8 +27,8 @@ class RS_ActionModifyRound: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyRound();
+               ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyRound();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -56,4 +57,4 @@ class RS_ActionModifyRound: public RS_PreviewActionInterface
                Status lastStatus;
 };
 
-#endif
+#endif // __ACTIONMODIFYROUND_H__
similarity index 59%
rename from src/actions/rs_actionmodifyscale.cpp
rename to src/actions/actionmodifyscale.cpp
index c8168f6e8a96f59357d3643f09416a335efb9d32..4b6b482e4e2653c83374447ca10694c94ffc3c05 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifyscale.cpp
+// actionmodifyscale.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifyscale.h"
+#include "actionmodifyscale.h"
 
 #include "rs_dialogfactory.h"
 
-RS_ActionModifyScale::RS_ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Scale Entities",
-               container, graphicView)
+ActionModifyScale::ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Scale Entities", container, graphicView)
 {
 }
 
-RS_ActionModifyScale::~RS_ActionModifyScale()
+ActionModifyScale::~ActionModifyScale()
 {
 }
 
-void RS_ActionModifyScale::init(int status)
+void ActionModifyScale::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyScale::trigger()
+void ActionModifyScale::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyScale::trigger()");
+       RS_DEBUG->print("ActionModifyScale::trigger()");
 
        RS_Modification m(*container, graphicView);
        m.scale(data);
@@ -41,9 +40,9 @@ void RS_ActionModifyScale::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyScale::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint)
        {
@@ -60,10 +59,10 @@ void RS_ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionModifyScale::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent end");
 }
 
-void RS_ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -94,17 +93,12 @@ void RS_ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyScale::updateMouseButtonHints()
+void ActionModifyScale::updateMouseButtonHints()
 {
        switch (getStatus())
        {
-       /*case Select:
-           RS_DIALOGFACTORY->updateMouseWidget(tr("Pick entities to scale"),
-                                          tr("Cancel"));
-           break;*/
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
-                       tr("Cancel"));
+               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        default:
@@ -113,18 +107,15 @@ void RS_ActionModifyScale::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyScale::updateMouseCursor()
+void ActionModifyScale::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyScale::updateToolBar()
+void ActionModifyScale::updateToolBar()
 {
        switch (getStatus())
        {
-       /*case Select:
-           RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
-           break;*/
        case SetReferencePoint:
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
@@ -134,5 +125,3 @@ void RS_ActionModifyScale::updateToolBar()
                break;
        }
 }
-
-// EOF
similarity index 69%
rename from src/actions/rs_actionmodifyscale.h
rename to src/actions/actionmodifyscale.h
index 099672ec9df3284bc3bc9f92f6e14559d6956782..3a070cbe94df19418146df4300876ff16311360c 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONMODIFYSCALE_H
-#define RS_ACTIONMODIFYSCALE_H
+#ifndef __ACTIONMODIFYSCALE_H__
+#define __ACTIONMODIFYSCALE_H__
 
 #include "rs_modification.h"
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to move entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyScale: public RS_PreviewActionInterface
+class ActionModifyScale: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionModifyScale: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyScale();
+               ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyScale();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -39,4 +40,4 @@ class RS_ActionModifyScale: public RS_PreviewActionInterface
                Vector targetPoint;
 };
 
-#endif
+#endif // __ACTIONMODIFYSCALE_H__
similarity index 63%
rename from src/actions/rs_actionmodifystretch.cpp
rename to src/actions/actionmodifystretch.cpp
index df7c9ae3a3665b645f3b34dbb00cd2a6285380ac..d9568af9ecc5d112b25d0e2ef4697de2e829a788 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifystretch.cpp
+// actionmodifystretch.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifystretch.h"
+#include "actionmodifystretch.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_modification.h"
 #include "rs_preview.h"
 
-RS_ActionModifyStretch::RS_ActionModifyStretch(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_PreviewActionInterface("Stretch Entities",
+ActionModifyStretch::ActionModifyStretch(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Stretch Entities",
                container, graphicView)
 {
        firstCorner = Vector(false);
@@ -28,18 +28,18 @@ RS_ActionModifyStretch::RS_ActionModifyStretch(RS_EntityContainer & container,
        targetPoint = Vector(false);
 }
 
-RS_ActionModifyStretch::~RS_ActionModifyStretch()
+ActionModifyStretch::~ActionModifyStretch()
 {
 }
 
-void RS_ActionModifyStretch::init(int status)
+void ActionModifyStretch::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 }
 
-void RS_ActionModifyStretch::trigger()
+void ActionModifyStretch::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyStretch::trigger()");
+       RS_DEBUG->print("ActionModifyStretch::trigger()");
 
        deletePreview();
        clearPreview();
@@ -56,9 +56,9 @@ void RS_ActionModifyStretch::trigger()
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
-void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -68,67 +68,53 @@ void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
                break;
 
        case SetSecondCorner:
-
                if (firstCorner.valid)
                {
                        secondCorner = snapPoint(e);
                        deletePreview();
                        clearPreview();
+/*                     preview->addEntity(
+                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, firstCorner.y),
+                                       Vector(secondCorner.x, firstCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(firstCorner.x,
-                                                       firstCorner.y),
-                                               Vector(secondCorner.x,
-                                                       firstCorner.y))));
-                       preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(secondCorner.x,
-                                                       firstCorner.y),
-                                               Vector(secondCorner.x,
-                                                       secondCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, firstCorner.y),
+                                               Vector(secondCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(secondCorner.x,
-                                                       secondCorner.y),
-                                               Vector(firstCorner.x,
-                                                       secondCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, secondCorner.y),
+                                               Vector(firstCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview,
-                                       RS_LineData(Vector(firstCorner.x,
-                                                       secondCorner.y),
-                                               Vector(firstCorner.x,
-                                                       firstCorner.y))));
+                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, secondCorner.y),
+                                               Vector(firstCorner.x, firstCorner.y))));*/
                        drawPreview();
                }
+
                break;
 
        case SetReferencePoint:
                break;
 
        case SetTargetPoint:
-
                if (referencePoint.valid)
                {
                        targetPoint = mouse;
 
                        deletePreview();
                        clearPreview();
-                       preview->addStretchablesFrom(*container, firstCorner, secondCorner);
-                       //preview->move(targetPoint-referencePoint);
-                       preview->stretch(firstCorner, secondCorner,
-                               targetPoint - referencePoint);
+/*                     preview->addStretchablesFrom(*container, firstCorner, secondCorner);
+                       preview->stretch(firstCorner, secondCorner, targetPoint - referencePoint);*/
                        drawPreview();
                }
+
                break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent end");
 }
 
-void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -143,7 +129,7 @@ void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyStretch::coordinateEvent(Vector * e)
+void ActionModifyStretch::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -182,7 +168,7 @@ void RS_ActionModifyStretch::coordinateEvent(Vector * e)
        }
 }
 
-void RS_ActionModifyStretch::updateMouseButtonHints()
+void ActionModifyStretch::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -212,12 +198,12 @@ void RS_ActionModifyStretch::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyStretch::updateMouseCursor()
+void ActionModifyStretch::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyStretch::updateToolBar()
+void ActionModifyStretch::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -225,4 +211,4 @@ void RS_ActionModifyStretch::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
-// EOF
+
similarity index 72%
rename from src/actions/rs_actionmodifystretch.h
rename to src/actions/actionmodifystretch.h
index a6cd584c864fb56ee178bd32c6d9e47f27c9f23e..6b96d2852b4ecb56a0be85e9c8423a486c85603a 100644 (file)
@@ -1,17 +1,17 @@
-#ifndef RS_ACTIONMODIFYSTRETCH_H
-#define RS_ACTIONMODIFYSTRETCH_H
+#ifndef __ACTIONMODIFYSTRETCH_H__
+#define __ACTIONMODIFYSTRETCH_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to move entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyStretch: public RS_PreviewActionInterface
+class ActionModifyStretch: public ActionInterface
 {
-       //Q_OBJECT
        public:
                /**
                 * Action States.
@@ -24,8 +24,8 @@ class RS_ActionModifyStretch: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyStretch(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyStretch();
+               ActionModifyStretch(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyStretch();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -43,4 +43,4 @@ class RS_ActionModifyStretch: public RS_PreviewActionInterface
                Vector targetPoint;
 };
 
-#endif
+#endif // __ACTIONMODIFYSTRETCH_H__
similarity index 71%
rename from src/actions/rs_actionmodifytrim.cpp
rename to src/actions/actionmodifytrim.cpp
index 6ba19eabfe88cb3de854b1de4e7b48d324c88bd6..4cb23892963efafe4f12e88b478c13228bead8e4 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifytrim.cpp
+// actionmodifytrim.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifytrim.h"
+#include "actionmodifytrim.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_modification.h"
@@ -20,8 +20,8 @@
 /**
  * @param both Trim both entities.
  */
-RS_ActionModifyTrim::RS_ActionModifyTrim(RS_EntityContainer & container,
-       GraphicView & graphicView, bool both): RS_PreviewActionInterface("Trim Entity",
+ActionModifyTrim::ActionModifyTrim(RS_EntityContainer & container,
+       GraphicView & graphicView, bool both): ActionInterface("Trim Entity",
                container, graphicView)
 {
        trimEntity = NULL;
@@ -31,29 +31,27 @@ RS_ActionModifyTrim::RS_ActionModifyTrim(RS_EntityContainer & container,
        this->both = both;
 }
 
-RS_ActionModifyTrim::~RS_ActionModifyTrim()
+ActionModifyTrim::~ActionModifyTrim()
 {
 }
 
-void RS_ActionModifyTrim::init(int status)
+void ActionModifyTrim::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionModifyTrim::trigger()
+void ActionModifyTrim::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyTrim::trigger()");
+       RS_DEBUG->print("ActionModifyTrim::trigger()");
 
-       if (trimEntity != NULL && trimEntity->isAtomic()
-           && limitEntity != NULL /* && limitEntity->isAtomic()*/)
+       if (trimEntity && trimEntity->isAtomic() && limitEntity)
        {
                RS_Modification m(*container, graphicView);
                m.trim(trimCoord, (RS_AtomicEntity *)trimEntity,
-                       limitCoord, /*(RS_AtomicEntity*)*/ limitEntity,
-                       both);
+                       limitCoord, limitEntity, both);
 
                trimEntity = NULL;
 
@@ -70,9 +68,9 @@ void RS_ActionModifyTrim::trigger()
        }
 }
 
-void RS_ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionModifyTrim::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
        RS_Entity * se = catchEntity(e);
@@ -93,10 +91,10 @@ void RS_ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("RS_ActionModifyTrim::mouseMoveEvent end");
+       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
 }
 
-void RS_ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -109,7 +107,7 @@ void RS_ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
                        limitCoord = mouse;
                        limitEntity = se;
 
-                       if (limitEntity != NULL /*&& limitEntity->isAtomic()*/)
+                       if (limitEntity)
                        {
                                limitEntity->setHighlighted(true);
                                graphicView->drawEntity(limitEntity);
@@ -143,7 +141,7 @@ void RS_ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyTrim::updateMouseButtonHints()
+void ActionModifyTrim::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -173,12 +171,12 @@ void RS_ActionModifyTrim::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyTrim::updateMouseCursor()
+void ActionModifyTrim::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyTrim::updateToolBar()
+void ActionModifyTrim::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
similarity index 69%
rename from src/actions/rs_actionmodifytrim.h
rename to src/actions/actionmodifytrim.h
index f88156d6ef9347b50ddfe0774594644763146860..e91af171e39702ec32cf2f52e7616c25bd693159 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONMODIFYTRIM_H
-#define RS_ACTIONMODIFYTRIM_H
+#ifndef __ACTIONMODIFYTRIM_H__
+#define __ACTIONMODIFYTRIM_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -9,9 +9,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to trim entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyTrim: public RS_PreviewActionInterface
+class ActionModifyTrim: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyTrim: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionModifyTrim(RS_EntityContainer & container, GraphicView & graphicView, bool both = false);
-               ~RS_ActionModifyTrim();
+               ActionModifyTrim(RS_EntityContainer & container, GraphicView & graphicView, bool both = false);
+               ~ActionModifyTrim();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -42,4 +43,4 @@ class RS_ActionModifyTrim: public RS_PreviewActionInterface
                bool both;
 };
 
-#endif
+#endif // __ACTIONMODIFYTRIM_H__
similarity index 70%
rename from src/actions/rs_actionmodifytrimamount.cpp
rename to src/actions/actionmodifytrimamount.cpp
index 94a3ad8aca6d3f8869b8d64828f9d4cd3b7939c0..41a25dfb3dd8e8dd12a26b1f743f5839c4f0470c 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionmodifytrimamount.cpp
+// actionmodifytrimamount.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionmodifytrimamount.h"
+#include "actionmodifytrimamount.h"
 
 #include "rs_commandevent.h"
 #include "rs_dialogfactory.h"
 #include "rs_modification.h"
 
-RS_ActionModifyTrimAmount::RS_ActionModifyTrimAmount(
+ActionModifyTrimAmount::ActionModifyTrimAmount(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Trim Entity by a given amount",
+       ActionInterface("Trim Entity by a given amount",
                container, graphicView)
 {
        trimEntity = NULL;
@@ -28,26 +28,26 @@ RS_ActionModifyTrimAmount::RS_ActionModifyTrimAmount(
        distance = 0.0;
 }
 
-RS_ActionModifyTrimAmount::~RS_ActionModifyTrimAmount()
+ActionModifyTrimAmount::~ActionModifyTrimAmount()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionModifyTrimAmount::rtti()
+/*virtual*/ RS2::ActionType ActionModifyTrimAmount::rtti()
 {
        return RS2::ActionModifyTrimAmount;
 }
 
-void RS_ActionModifyTrimAmount::init(int status)
+void ActionModifyTrimAmount::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionModifyTrimAmount::trigger()
+void ActionModifyTrimAmount::trigger()
 {
-       RS_DEBUG->print("RS_ActionModifyTrimAmount::trigger()");
+       RS_DEBUG->print("ActionModifyTrimAmount::trigger()");
 
        if (trimEntity != NULL && trimEntity->isAtomic())
        {
@@ -61,7 +61,7 @@ void RS_ActionModifyTrimAmount::trigger()
        }
 }
 
-void RS_ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e)
 {
        trimCoord = graphicView->toGraph(e->x(), e->y());
        trimEntity = catchEntity(e);
@@ -101,7 +101,7 @@ void RS_ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e)
+void ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -132,7 +132,7 @@ void RS_ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e)
        }
 }
 
-QStringList RS_ActionModifyTrimAmount::getAvailableCommands()
+QStringList ActionModifyTrimAmount::getAvailableCommands()
 {
        QStringList cmd;
 
@@ -148,28 +148,27 @@ QStringList RS_ActionModifyTrimAmount::getAvailableCommands()
        return cmd;
 }
 
-void RS_ActionModifyTrimAmount::showOptions()
+void ActionModifyTrimAmount::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionModifyTrimAmount::hideOptions()
+void ActionModifyTrimAmount::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionModifyTrimAmount::updateMouseButtonHints()
+void ActionModifyTrimAmount::updateMouseButtonHints()
 {
        switch (getStatus())
        {
        case ChooseTrimEntity:
                RS_DIALOGFACTORY->updateMouseWidget(
-                       tr("Select entity to trim or enter distance:"),
-                       tr("Back"));
+                       tr("Select entity to trim or enter distance:"), tr("Back"));
                break;
 
        default:
@@ -178,22 +177,22 @@ void RS_ActionModifyTrimAmount::updateMouseButtonHints()
        }
 }
 
-void RS_ActionModifyTrimAmount::updateMouseCursor()
+void ActionModifyTrimAmount::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionModifyTrimAmount::updateToolBar()
+void ActionModifyTrimAmount::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
-double RS_ActionModifyTrimAmount::getDistance()
+double ActionModifyTrimAmount::getDistance()
 {
        return distance;
 }
 
-void RS_ActionModifyTrimAmount::setDistance(double d)
+void ActionModifyTrimAmount::setDistance(double d)
 {
        distance = d;
 }
similarity index 72%
rename from src/actions/rs_actionmodifytrimamount.h
rename to src/actions/actionmodifytrimamount.h
index e77df4f60573e934e0a944f619b7262f66a31a8a..0f3db59d74d424db177404d0c58fbce885a1ef4a 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONMODIFYTRIMAMOUNT_H
-#define RS_ACTIONMODIFYTRIMAMOUNT_H
+#ifndef __ACTIONMODIFYTRIMAMOUNT_H__
+#define __ACTIONMODIFYTRIMAMOUNT_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -10,9 +10,10 @@ class RS_Entity;
  * This action class can handle user events to trim entities by a given
  * amount.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionModifyTrimAmount: public RS_ActionInterface
+class ActionModifyTrimAmount: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionModifyTrimAmount: public RS_ActionInterface
                };
 
        public:
-               RS_ActionModifyTrimAmount(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyTrimAmount();
+               ActionModifyTrimAmount(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionModifyTrimAmount();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -47,4 +48,4 @@ class RS_ActionModifyTrimAmount: public RS_ActionInterface
                double distance;
 };
 
-#endif
+#endif // __ACTIONMODIFYTRIMAMOUNT_H__
similarity index 52%
rename from src/actions/rs_actionoptionsdrawing.cpp
rename to src/actions/actionoptionsdrawing.cpp
index 7e848680446b0bb08596ee0bd4f802a2b9cd36e0..8869c7ae0454a89e548cc369d8f58cd23782f82b 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionoptionsdrawing.cpp
+// actionoptionsdrawing.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionoptionsdrawing.h"
+#include "actionoptionsdrawing.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionOptionsDrawing::RS_ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Drawing Options", container, graphicView)
+ActionOptionsDrawing::ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Drawing Options", container, graphicView)
 {
 }
 
-RS_ActionOptionsDrawing::~RS_ActionOptionsDrawing()
+ActionOptionsDrawing::~ActionOptionsDrawing()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionOptionsDrawing::rtti()
+/*virtual*/ RS2::ActionType ActionOptionsDrawing::rtti()
 {
        return RS2::ActionOptionsDrawing;
 }
 
-void RS_ActionOptionsDrawing::init(int status)
+void ActionOptionsDrawing::init(int status)
 {
-       RS_ActionInterface::init(status);
-
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionOptionsDrawing::trigger()
+void ActionOptionsDrawing::trigger()
 {
-       if (graphic != NULL)
+       if (graphic)
        {
                RS_DIALOGFACTORY->requestOptionsDrawingDialog(*graphic);
-               RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0),
-                       Vector(0.0, 0.0),
-                       true);
+               RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
                graphicView->updateGrid();
                graphicView->redraw();
        }
        finish();
 }
-
-// EOF
diff --git a/src/actions/actionoptionsdrawing.h b/src/actions/actionoptionsdrawing.h
new file mode 100644 (file)
index 0000000..f068db3
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __ACTIONOPTIONSDRAWING_H__
+#define __ACTIONOPTIONSDRAWING_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to change general
+ * application options.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionOptionsDrawing: public ActionInterface
+{
+       public:
+               ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionOptionsDrawing();
+
+               virtual RS2::ActionType rtti();
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONOPTIONSDRAWING_H__
similarity index 55%
rename from src/actions/rs_actionprintpreview.cpp
rename to src/actions/actionprintpreview.cpp
index c3f274c8546fdacc44f556d98fe66f82802e49b6..d1c5fd111f482f36307ee44ccbc267ace4e581e9 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionprintpreview.cpp
+// actionprintpreview.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionprintpreview.h"
+#include "actionprintpreview.h"
 
 #include "rs_dialogfactory.h"
 #include "drawing.h"
 /**
  * Constructor.
  */
-RS_ActionPrintPreview::RS_ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Print Preview",
-               container, graphicView)
+ActionPrintPreview::ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Print Preview", container, graphicView)
 {
        showOptions();
 }
 
-RS_ActionPrintPreview::~RS_ActionPrintPreview()
+ActionPrintPreview::~ActionPrintPreview()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionPrintPreview::rtti()
+/*virtual*/ RS2::ActionType ActionPrintPreview::rtti()
 {
        return RS2::ActionPrintPreview;
 }
 
-void RS_ActionPrintPreview::init(int status)
+void ActionPrintPreview::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        showOptions();
 }
 
-void RS_ActionPrintPreview::trigger()
+void ActionPrintPreview::trigger()
 {
 }
 
-void RS_ActionPrintPreview::mouseMoveEvent(QMouseEvent * e)
+void ActionPrintPreview::mouseMoveEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
        case Moving:
                v2 = graphicView->toGraph(e->x(), e->y());
 
-               if (graphic != NULL)
+               if (graphic)
                {
                        Vector pinsbase = graphic->getPaperInsertionBase();
-
                        double scale = graphic->getPaperScale();
-
                        graphic->setPaperInsertionBase(pinsbase - v2 * scale + v1 * scale);
                }
+
                v1 = v2;
                graphicView->redraw();
                break;
@@ -71,7 +69,7 @@ void RS_ActionPrintPreview::mouseMoveEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionPrintPreview::mousePressEvent(QMouseEvent * e)
+void ActionPrintPreview::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -88,7 +86,7 @@ void RS_ActionPrintPreview::mousePressEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionPrintPreview::mouseReleaseEvent(QMouseEvent * e)
+void ActionPrintPreview::mouseReleaseEvent(QMouseEvent * e)
 {
        switch (getStatus())
        {
@@ -97,105 +95,104 @@ void RS_ActionPrintPreview::mouseReleaseEvent(QMouseEvent * e)
                break;
 
        default:
-               //deleteSnapper();
                RS_DIALOGFACTORY->requestPreviousMenu();
                e->accept();
                break;
        }
 }
 
-void RS_ActionPrintPreview::coordinateEvent(Vector *)
+void ActionPrintPreview::coordinateEvent(Vector *)
 {
 }
 
-void RS_ActionPrintPreview::commandEvent(RS_CommandEvent *)
+void ActionPrintPreview::commandEvent(RS_CommandEvent *)
 {
 }
 
-QStringList RS_ActionPrintPreview::getAvailableCommands()
+QStringList ActionPrintPreview::getAvailableCommands()
 {
        QStringList cmd;
        return cmd;
 }
 
-void RS_ActionPrintPreview::showOptions()
+void ActionPrintPreview::showOptions()
 {
-       RS_ActionInterface::showOptions();
+       ActionInterface::showOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, true);
 }
 
-void RS_ActionPrintPreview::hideOptions()
+void ActionPrintPreview::hideOptions()
 {
-       RS_ActionInterface::hideOptions();
+       ActionInterface::hideOptions();
 
        RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
-void RS_ActionPrintPreview::updateMouseButtonHints()
+void ActionPrintPreview::updateMouseButtonHints()
 {
 }
 
-void RS_ActionPrintPreview::updateMouseCursor()
+void ActionPrintPreview::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::MovingHandCursor);
 }
 
-void RS_ActionPrintPreview::updateToolBar()
+void ActionPrintPreview::updateToolBar()
 {
 }
 
-void RS_ActionPrintPreview::center()
+void ActionPrintPreview::center()
 {
-       if (graphic != NULL)
+       if (graphic)
        {
                graphic->centerToPage();
                graphicView->redraw();
        }
 }
 
-void RS_ActionPrintPreview::fit()
+void ActionPrintPreview::fit()
 {
-       if (graphic != NULL)
+       if (graphic)
        {
                graphic->fitToPage();
                graphicView->redraw();
        }
 }
 
-void RS_ActionPrintPreview::setScale(double f)
+void ActionPrintPreview::setScale(double f)
 {
-       if (graphic != NULL)
+       if (graphic)
        {
                graphic->setPaperScale(f);
                graphicView->redraw();
        }
 }
 
-double RS_ActionPrintPreview::getScale()
+double ActionPrintPreview::getScale()
 {
        double ret = 1.0;
 
-       if (graphic != NULL)
+       if (graphic)
                ret = graphic->getPaperScale();
+
        return ret;
 }
 
-void RS_ActionPrintPreview::setBlackWhite(bool bw)
+void ActionPrintPreview::setBlackWhite(bool bw)
 {
        if (bw)
                graphicView->setDrawingMode(RS2::ModeBW);
        else
                graphicView->setDrawingMode(RS2::ModeFull);
+
        graphicView->redraw();
 }
 
-RS2::Unit RS_ActionPrintPreview::getUnit()
+RS2::Unit ActionPrintPreview::getUnit()
 {
-       if (graphic != NULL)
+       if (graphic)
                return graphic->getUnit();
-       else
-               return RS2::None;
-}
 
-// EOF
+       return RS2::None;
+}
similarity index 75%
rename from src/actions/rs_actionprintpreview.h
rename to src/actions/actionprintpreview.h
index eb20194defabae1eca50d2bd40e8e65c4a4ad650..435e84990c34f0cfd4585f1650cb0f7901123e9f 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef RS_ACTIONPRINTPREVIEW_H
-#define RS_ACTIONPRINTPREVIEW_H
+#ifndef __ACTIONPRINTPREVIEW_H__
+#define __ACTIONPRINTPREVIEW_H__
 
 #include "rs.h"
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * Default action for print preview.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionPrintPreview: public RS_ActionInterface
+class ActionPrintPreview: public ActionInterface
 {
        public:
                /**
@@ -22,8 +23,8 @@ class RS_ActionPrintPreview: public RS_ActionInterface
                };
 
        public:
-               RS_ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionPrintPreview();
+               ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionPrintPreview();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -51,4 +52,4 @@ class RS_ActionPrintPreview: public RS_ActionInterface
                Vector v2;
 };
 
-#endif
+#endif // __ACTIONPRINTPREVIEW_H__
similarity index 59%
rename from src/actions/rs_actionselect.cpp
rename to src/actions/actionselect.cpp
index 83077c7d54046ecce984ddf3331d36b74ac08b10..ab19e14a0d8afac296242135c95c24fc75bc6962 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselect.cpp
+// actionselect.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionselect.h"
+#include "actionselect.h"
 
-#include "rs_actionselectsingle.h"
+#include "actionselectsingle.h"
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionSelect::RS_ActionSelect(RS_EntityContainer & container, GraphicView & graphicView,
+ActionSelect::ActionSelect(RS_EntityContainer & container, GraphicView & graphicView,
        RS2::ActionType nextAction):
-       RS_ActionInterface("Select Entities", container, graphicView)
+       ActionInterface("Select Entities", container, graphicView)
 {
        this->nextAction = nextAction;
 }
 
-RS_ActionSelect::~RS_ActionSelect()
+ActionSelect::~ActionSelect()
 {
 }
 
-void RS_ActionSelect::init(int status)
+void ActionSelect::init(int status)
 {
-       RS_ActionInterface::init(status);
-       graphicView->setCurrentAction(new RS_ActionSelectSingle(*container, *graphicView));
+       ActionInterface::init(status);
+       graphicView->setCurrentAction(new ActionSelectSingle(*container, *graphicView));
 }
 
-void RS_ActionSelect::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelect::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
 }
 
-void RS_ActionSelect::updateToolBar()
+void ActionSelect::updateToolBar()
 {
        if (RS_DIALOGFACTORY)
        {
diff --git a/src/actions/actionselect.h b/src/actions/actionselect.h
new file mode 100644 (file)
index 0000000..f90b261
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ACTIONSELECT_H__
+#define __ACTIONSELECT_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to select entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSelect: public ActionInterface
+{
+       public:
+               ActionSelect(RS_EntityContainer & container, GraphicView & graphicView, RS2::ActionType nextAction);
+               ~ActionSelect();
+
+               void init(int status);
+               void mouseReleaseEvent(QMouseEvent * e);
+               void updateToolBar();
+
+       private:
+               RS2::ActionType nextAction;
+};
+
+#endif // __ACTIONSELECT_H__
similarity index 64%
rename from src/actions/rs_actionselectall.cpp
rename to src/actions/actionselectall.cpp
index 912dce514d3b7cbdd06c8ed22a1031d76630586a..4abe16393a432ca60f573cbb448021a55c569201 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectall.cpp
+// actionselectall.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/22/2010  Added this text. :-)
 //
 
-#include "rs_actionselectall.h"
+#include "actionselectall.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectAll::RS_ActionSelectAll(RS_EntityContainer & container,
+ActionSelectAll::ActionSelectAll(RS_EntityContainer & container,
        GraphicView & graphicView, bool select):
-       RS_ActionInterface("Select All Entities", container, graphicView)
+       ActionInterface("Select All Entities", container, graphicView)
 {
        this->select = select;
 }
 
-RS_ActionSelectAll::~RS_ActionSelectAll()
+ActionSelectAll::~ActionSelectAll()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectAll::rtti()
+/*virtual*/ RS2::ActionType ActionSelectAll::rtti()
 {
        return RS2::ActionSelectAll;
 }
 
-void RS_ActionSelectAll::init(int status)
+void ActionSelectAll::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
        finish();
 }
 
-void RS_ActionSelectAll::trigger()
+void ActionSelectAll::trigger()
 {
        RS_Selection s(*container, graphicView);
        s.selectAll(select);
diff --git a/src/actions/actionselectall.h b/src/actions/actionselectall.h
new file mode 100644 (file)
index 0000000..8cce0c3
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ACTIONSELECTALL_H__
+#define __ACTIONSELECTALL_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to select all entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSelectAll: public ActionInterface
+{
+       public:
+               ActionSelectAll(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ~ActionSelectAll();
+
+               virtual RS2::ActionType rtti();
+               void init(int status);
+               virtual void trigger();
+
+       protected:
+               bool select;
+};
+
+#endif // __ACTIONSELECTALL_H__
similarity index 65%
rename from src/actions/rs_actionselectbase.cpp
rename to src/actions/actionselectbase.cpp
index d1bfb1e53693a060868f07dbbd513097cf6c5177..cefd57ef05c52d1c463c5eb7c5d1957860e85305 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectbase.cpp
+// actionselectbase.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionselectbase.h"
+#include "actionselectbase.h"
 
 #include "graphicview.h"
 
-RS_ActionSelectBase::RS_ActionSelectBase(const char * name,
+ActionSelectBase::ActionSelectBase(const char * name,
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface(name, container, graphicView)
+       ActionInterface(name, container, graphicView)
 {
 }
 
-RS_ActionSelectBase::~RS_ActionSelectBase()
+ActionSelectBase::~ActionSelectBase()
 {
 }
 
@@ -30,13 +30,13 @@ RS_ActionSelectBase::~RS_ActionSelectBase()
  * Default behaviour of this method is triggering the predecesing
  * action and finishing this one when the enter key is pressed.
  */
-void RS_ActionSelectBase::keyReleaseEvent(QKeyEvent * e)
+void ActionSelectBase::keyReleaseEvent(QKeyEvent * e)
 {
-       if (e->key() == Qt::Key_Return && predecessor != NULL)
+       if (e->key() == Qt::Key_Return && predecessor)
                finish();
 }
 
-void RS_ActionSelectBase::updateMouseCursor()
+void ActionSelectBase::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
diff --git a/src/actions/actionselectbase.h b/src/actions/actionselectbase.h
new file mode 100644 (file)
index 0000000..374ec71
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONSELECTBASE_H__
+#define __ACTIONSELECTBASE_H__
+
+#include "actioninterface.h"
+
+/**
+ * This class is the base class to all select actions.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSelectBase: public ActionInterface
+{
+       public:
+               ActionSelectBase(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSelectBase();
+
+               virtual void keyReleaseEvent(QKeyEvent * e);
+               virtual void updateMouseCursor();
+};
+
+#endif // __ACTIONSELECTBASE_H__
similarity index 55%
rename from src/actions/rs_actionselectcontour.cpp
rename to src/actions/actionselectcontour.cpp
index 992474770b14561f6918366ad9132dd446793b38..0c018547d3d908558c8545f19aeb724f107ff693 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectcontour.cpp
+// actionselectcontour.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/04/2010  Added this text. :-)
 //
 
-#include "rs_actionselectcontour.h"
+#include "actionselectcontour.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectContour::RS_ActionSelectContour(RS_EntityContainer & container,
+ActionSelectContour::ActionSelectContour(RS_EntityContainer & container,
        GraphicView & graphicView):
-       RS_ActionInterface("Select Contours", container, graphicView)
+       ActionInterface("Select Contours", container, graphicView)
 {
        en = NULL;
 }
 
-RS_ActionSelectContour::~RS_ActionSelectContour()
+ActionSelectContour::~ActionSelectContour()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectContour::rtti()
+/*virtual*/ RS2::ActionType ActionSelectContour::rtti()
 {
        return RS2::ActionSelectContour;
 }
 
-void RS_ActionSelectContour::trigger()
+void ActionSelectContour::trigger()
 {
-       if (en != NULL)
+       if (en)
        {
                if (en->isAtomic())
                {
                        RS_Selection s(*container, graphicView);
                        s.selectContour(en);
 
-                       if (RS_DIALOGFACTORY != NULL)
+                       if (RS_DIALOGFACTORY)
                                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(
-                               tr("Entity must be an Atomic Entity."));
-
+               else if (RS_DIALOGFACTORY)
+                       RS_DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
        }
        else
-               RS_DEBUG->print("RS_ActionSelectContour::trigger: Entity is NULL\n");
+               RS_DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
 }
 
-void RS_ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -65,9 +63,7 @@ void RS_ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionSelectContour::updateMouseCursor()
+void ActionSelectContour::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
-
-// EOF
diff --git a/src/actions/actionselectcontour.h b/src/actions/actionselectcontour.h
new file mode 100644 (file)
index 0000000..309b81b
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __ACTIONSELECTCONTOURS_H__
+#define __ACTIONSELECTCONTOURS_H__
+
+#include "actioninterface.h"
+
+class RS_Entity;
+
+/**
+ * This action class can handle user events to select contours.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSelectContour: public ActionInterface
+{
+       public:
+               ActionSelectContour(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSelectContour();
+
+               virtual RS2::ActionType rtti();
+               virtual void trigger();
+               virtual void mouseReleaseEvent(QMouseEvent * e);
+               virtual void updateMouseCursor();
+
+       private:
+               RS_Entity * en;
+};
+
+#endif // __ACTIONSELECTCONTOURS_H__
similarity index 64%
rename from src/actions/rs_actionselectintersected.cpp
rename to src/actions/actionselectintersected.cpp
index 240c4da4faa04faa944d76884d3cafd02c0396e2..08b80926e818814d257acc85650fe9ccd0c4f8b1 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectintersected.cpp
+// actionselectintersected.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actionselectintersected.h"
+#include "actionselectintersected.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
  *
  * @param select true: select window. false: deselect window
  */
-RS_ActionSelectIntersected::RS_ActionSelectIntersected(
+ActionSelectIntersected::ActionSelectIntersected(
        RS_EntityContainer & container, GraphicView & graphicView, bool select):
-       RS_PreviewActionInterface("Select Intersected", container, graphicView)
+       ActionInterface("Select Intersected", container, graphicView)
 {
        this->select = select;
 }
 
-RS_ActionSelectIntersected::~RS_ActionSelectIntersected()
+ActionSelectIntersected::~ActionSelectIntersected()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectIntersected::rtti()
+/*virtual*/ RS2::ActionType ActionSelectIntersected::rtti()
 {
        return RS2::ActionSelectIntersected;
 }
 
-void RS_ActionSelectIntersected::init(int status)
+void ActionSelectIntersected::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
-
+       ActionInterface::init(status);
        v1 = v2 = Vector(false);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionSelectIntersected::trigger()
+void ActionSelectIntersected::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (v1.valid && v2.valid)
+       {
                if (graphicView->toGuiDX(v1.distanceTo(v2)) > 10)
                {
                        deleteSnapper();
-
                        RS_Selection s(*container, graphicView);
                        s.selectIntersected(v1, v2, select);
 
-                       if (RS_DIALOGFACTORY != NULL)
+                       if (RS_DIALOGFACTORY)
                                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 
                        init();
                }
+       }
 }
 
-void RS_ActionSelectIntersected::mouseMoveEvent(QMouseEvent * e)
+void ActionSelectIntersected::mouseMoveEvent(QMouseEvent * e)
 {
        if (getStatus() == SetPoint2 && v1.valid)
        {
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v1.y),
-                                       Vector(v2.x, v2.y))));
+//             preview->addEntity(new RS_Line(preview, RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v2.y))));
                drawPreview();
        }
 }
 
-void RS_ActionSelectIntersected::mousePressEvent(QMouseEvent * e)
+void ActionSelectIntersected::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -97,30 +95,33 @@ void RS_ActionSelectIntersected::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionSelectIntersected::mousePressEvent(): %f %f",
+       RS_DEBUG->print("ActionSelectIntersected::mousePressEvent(): %f %f",
                v1.x, v1.y);
 }
 
-void RS_ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionSelectIntersected::mouseReleaseEvent()");
+       RS_DEBUG->print("ActionSelectIntersected::mouseReleaseEvent()");
 
        if (e->button() == Qt::RightButton)
        {
                if (getStatus() == SetPoint2)
                        deletePreview();
+
                deleteSnapper();
                init(getStatus() - 1);
        }
        else if (e->button() == Qt::LeftButton)
+       {
                if (getStatus() == SetPoint2)
                {
                        v2 = snapPoint(e);
                        trigger();
                }
+       }
 }
 
-void RS_ActionSelectIntersected::updateMouseButtonHints()
+void ActionSelectIntersected::updateMouseButtonHints()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
@@ -141,21 +142,20 @@ void RS_ActionSelectIntersected::updateMouseButtonHints()
        }
 }
 
-void RS_ActionSelectIntersected::updateMouseCursor()
+void ActionSelectIntersected::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
 
-void RS_ActionSelectIntersected::updateToolBar()
+void ActionSelectIntersected::updateToolBar()
 {
        if (RS_DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
                else
                        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
        }
 }
 
-// EOF
+
similarity index 67%
rename from src/actions/rs_actionselectintersected.h
rename to src/actions/actionselectintersected.h
index 6dceec76ec2f622c7421da14f77282dfe7c0299e..2487afcada6d3aabf6daee71748563cfd8a5ce03 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONSELECTINTERSECTED_H
-#define RS_ACTIONSELECTINTERSECTED_H
+#ifndef __ACTIONSELECTINTERSECTED_H__
+#define __ACTIONSELECTINTERSECTED_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to select all entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionSelectIntersected: public RS_PreviewActionInterface
+class ActionSelectIntersected: public ActionInterface
 {
        public:
                /**
@@ -21,8 +22,8 @@ class RS_ActionSelectIntersected: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionSelectIntersected(RS_EntityContainer & container, GraphicView & graphicView, bool select);
-               ~RS_ActionSelectIntersected();
+               ActionSelectIntersected(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ~ActionSelectIntersected();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -41,4 +42,4 @@ class RS_ActionSelectIntersected: public RS_PreviewActionInterface
                bool select;
 };
 
-#endif
+#endif // __ACTIONSELECTINTERSECTED_H__
similarity index 61%
rename from src/actions/rs_actionselectinvert.cpp
rename to src/actions/actionselectinvert.cpp
index b28542635341e4cb15b958b0f83465003410bc45..ef1e6c2b68a97831d7add861a5db97d77d71cfd8 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectinvert.cpp
+// actionselectinvert.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionselectinvert.h"
+#include "actionselectinvert.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectInvert::RS_ActionSelectInvert(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_ActionInterface("Invert Selection",
+ActionSelectInvert::ActionSelectInvert(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Invert Selection",
                container, graphicView)
 {
 }
 
-RS_ActionSelectInvert::~RS_ActionSelectInvert()
+ActionSelectInvert::~ActionSelectInvert()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectInvert::rtti()
+/*virtual*/ RS2::ActionType ActionSelectInvert::rtti()
 {
        return RS2::ActionSelectInvert;
 }
 
-void RS_ActionSelectInvert::init(int status)
+void ActionSelectInvert::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
        finish();
 }
 
-void RS_ActionSelectInvert::trigger()
+void ActionSelectInvert::trigger()
 {
        RS_Selection s(*container, graphicView);
        s.invertSelection();
diff --git a/src/actions/actionselectinvert.h b/src/actions/actionselectinvert.h
new file mode 100644 (file)
index 0000000..2726975
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __ACTIONSELECTINVERT_H__
+#define __ACTIONSELECTINVERT_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to select all entities.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSelectInvert: public ActionInterface
+{
+       public:
+               ActionSelectInvert(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSelectInvert();
+
+               virtual RS2::ActionType rtti();
+               void init(int status);
+               virtual void trigger();
+};
+
+#endif // __ACTIONSELECTINVERT_H__
similarity index 58%
rename from src/actions/rs_actionselectlayer.cpp
rename to src/actions/actionselectlayer.cpp
index 788e40376dd5ab601a9f6d49dafb14d1fa2e2427..3bd91322c917565b3f6fa63edbd7f0fdcb3a7ff0 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectlayer.cpp
+// actionselectlayer.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionselectlayer.h"
+#include "actionselectlayer.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectLayer::RS_ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Select Layers", container, graphicView)
+ActionSelectLayer::ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Select Layers", container, graphicView)
 {
        en = NULL;
 }
 
-RS_ActionSelectLayer::~RS_ActionSelectLayer()
+ActionSelectLayer::~ActionSelectLayer()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectLayer::rtti()
+/*virtual*/ RS2::ActionType ActionSelectLayer::rtti()
 {
        return RS2::ActionSelectLayer;
 }
 
-void RS_ActionSelectLayer::trigger()
+void ActionSelectLayer::trigger()
 {
-       if (en != NULL)
+       if (en)
        {
                RS_Selection s(*container, graphicView);
                s.selectLayer(en);
 
-               if (RS_DIALOGFACTORY != NULL)
+               if (RS_DIALOGFACTORY)
                        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("RS_ActionSelectLayer::trigger: Entity is NULL\n");
+               RS_DEBUG->print("ActionSelectLayer::trigger: Entity is NULL\n");
 }
 
-void RS_ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -57,9 +57,7 @@ void RS_ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionSelectLayer::updateMouseCursor()
+void ActionSelectLayer::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
-
-// EOF
similarity index 50%
rename from src/actions/rs_actionselectlayer.h
rename to src/actions/actionselectlayer.h
index 743c997416c3628d9433ab378364bb3758f0da3a..f3bccc6ff11ac331c8e549c1bc4ce1d636ff4027 100644 (file)
@@ -1,20 +1,21 @@
-#ifndef RS_ACTIONSELECTLAYER_H
-#define RS_ACTIONSELECTLAYER_H
+#ifndef __ACTIONSELECTLAYER_H__
+#define __ACTIONSELECTLAYER_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 class RS_Entity;
 
 /**
  * This action class can handle user events to select contours.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionSelectLayer: public RS_ActionInterface
+class ActionSelectLayer: public ActionInterface
 {
        public:
-               RS_ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSelectLayer();
+               ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSelectLayer();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -25,4 +26,4 @@ class RS_ActionSelectLayer: public RS_ActionInterface
                RS_Entity * en;
 };
 
-#endif
+#endif // __ACTIONSELECTLAYER_H__
similarity index 59%
rename from src/actions/rs_actionselectsingle.cpp
rename to src/actions/actionselectsingle.cpp
index 28f966ae9cebbf9ee2906977850d21ca4fbd2d35..1c6843bd9de70bd7db240a78cdde54e6f619482a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectsingle.cpp
+// actionselectsingle.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionselectsingle.h"
+#include "actionselectsingle.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectSingle::RS_ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Select Entities", container, graphicView)
+ActionSelectSingle::ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Select Entities", container, graphicView)
 {
        en = NULL;
 }
 
-RS_ActionSelectSingle::~RS_ActionSelectSingle()
+ActionSelectSingle::~ActionSelectSingle()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectSingle::rtti()
+/*virtual*/ RS2::ActionType ActionSelectSingle::rtti()
 {
        return RS2::ActionSelectSingle;
 }
 
-void RS_ActionSelectSingle::trigger()
+void ActionSelectSingle::trigger()
 {
        if (en != NULL)
        {
@@ -42,16 +42,16 @@ void RS_ActionSelectSingle::trigger()
                RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("RS_ActionSelectSingle::trigger: Entity is NULL\n");
+               RS_DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
 }
 
-void RS_ActionSelectSingle::keyPressEvent(QKeyEvent * e)
+void ActionSelectSingle::keyPressEvent(QKeyEvent * e)
 {
        if (e->key() == Qt::Key_Enter)
                finish();
 }
 
-void RS_ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -62,9 +62,9 @@ void RS_ActionSelectSingle::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionSelectSingle::updateMouseCursor()
+void ActionSelectSingle::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
 
-// EOF
+
similarity index 53%
rename from src/actions/rs_actionselectsingle.h
rename to src/actions/actionselectsingle.h
index bb003b6dcecc0eaa29fbb594ed66ca7df49e3b86..20d0c95d20da6f2d4abd3a76d1d4f3e9f4fa01d1 100644 (file)
@@ -1,20 +1,21 @@
-#ifndef RS_ACTIONSELECTSINGLE_H
-#define RS_ACTIONSELECTSINGLE_H
+#ifndef __ACTIONSELECTSINGLE_H__
+#define __ACTIONSELECTSINGLE_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 class RS_Entity;
 
 /**
  * This action class can handle user events to select entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionSelectSingle: public RS_ActionInterface
+class ActionSelectSingle: public ActionInterface
 {
        public:
-               RS_ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSelectSingle();
+               ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSelectSingle();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
@@ -26,4 +27,4 @@ class RS_ActionSelectSingle: public RS_ActionInterface
                RS_Entity * en;
 };
 
-#endif
+#endif // __ACTIONSELECTSINGLE_H__
similarity index 62%
rename from src/actions/rs_actionselectwindow.cpp
rename to src/actions/actionselectwindow.cpp
index 293ac982164e44a852bde84880a8857d5de305c1..5685214fa4645aa67fef989903f32189a25ff444 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionselectwindow.cpp
+// actionselectwindow.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actionselectwindow.h"
+#include "actionselectwindow.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_selection.h"
  *
  * @param select true: select window. false: deselect window
  */
-RS_ActionSelectWindow::RS_ActionSelectWindow(RS_EntityContainer & container,
+ActionSelectWindow::ActionSelectWindow(RS_EntityContainer & container,
        GraphicView & graphicView, bool select):
-       RS_PreviewActionInterface("Select Window", container, graphicView)
+       ActionInterface("Select Window", container, graphicView)
 {
        this->select = select;
 }
 
-RS_ActionSelectWindow::~RS_ActionSelectWindow()
+ActionSelectWindow::~ActionSelectWindow()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSelectWindow::rtti()
+/*virtual*/ RS2::ActionType ActionSelectWindow::rtti()
 {
        return RS2::ActionSelectWindow;
 }
 
-void RS_ActionSelectWindow::init(int status)
+void ActionSelectWindow::init(int status)
 {
-       RS_PreviewActionInterface::init(status);
+       ActionInterface::init(status);
        v1 = v2 = Vector(false);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionSelectWindow::trigger()
+void ActionSelectWindow::trigger()
 {
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (v1.valid && v2.valid)
        {
                if (graphicView->toGuiDX(v1.distanceTo(v2)) > 10)
                {
                        deleteSnapper();
-
                        bool cross = (v2.y > v1.y);
-
                        RS_Selection s(*container, graphicView);
                        s.selectWindow(v1, v2, select, cross);
-
                        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
-
                        init();
                }
        }
 }
 
-void RS_ActionSelectWindow::mouseMoveEvent(QMouseEvent * e)
+void ActionSelectWindow::mouseMoveEvent(QMouseEvent * e)
 {
        if (getStatus() == SetCorner2 && v1.valid)
        {
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
+/*             preview->addEntity(new RS_Line(preview,
+                               RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
                preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v1.y),
-                                       Vector(v2.x, v1.y))));
+                               RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v1.y),
-                                       Vector(v2.x, v2.y))));
+                               RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v2.y),
-                                       Vector(v1.x, v2.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v2.y),
-                                       Vector(v1.x, v1.y))));
+                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
                drawPreview();
        }
 }
 
-void RS_ActionSelectWindow::mousePressEvent(QMouseEvent * e)
+void ActionSelectWindow::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -108,13 +100,13 @@ void RS_ActionSelectWindow::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionSelectWindow::mousePressEvent(): %f %f",
+       RS_DEBUG->print("ActionSelectWindow::mousePressEvent(): %f %f",
                v1.x, v1.y);
 }
 
-void RS_ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e)
+void ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionSelectWindow::mouseReleaseEvent()");
+       RS_DEBUG->print("ActionSelectWindow::mouseReleaseEvent()");
 
        if (e->button() == Qt::LeftButton)
        {
@@ -128,12 +120,13 @@ void RS_ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e)
        {
                if (getStatus() == SetCorner2)
                        deletePreview();
+
                deleteSnapper();
                init(getStatus() - 1);
        }
 }
 
-void RS_ActionSelectWindow::updateMouseButtonHints()
+void ActionSelectWindow::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -151,18 +144,15 @@ void RS_ActionSelectWindow::updateMouseButtonHints()
        }
 }
 
-void RS_ActionSelectWindow::updateMouseCursor()
+void ActionSelectWindow::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::SelectCursor);
 }
 
-void RS_ActionSelectWindow::updateToolBar()
+void ActionSelectWindow::updateToolBar()
 {
        if (!isFinished())
-               //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
        else
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
 }
-
-// EOF
similarity index 69%
rename from src/actions/rs_actionselectwindow.h
rename to src/actions/actionselectwindow.h
index 62aafc7a78dd3ad519a4e1205f27ed75ff92f0a4..f96bbffbf0645abbf5aac9b46cff8f36f6e5cdfc 100644 (file)
@@ -1,15 +1,16 @@
-#ifndef RS_ACTIONSELECTWINDOW_H
-#define RS_ACTIONSELECTWINDOW_H
+#ifndef __ACTIONSELECTWINDOW_H__
+#define __ACTIONSELECTWINDOW_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to select all entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionSelectWindow: public RS_PreviewActionInterface
+class ActionSelectWindow: public ActionInterface
 {
        public:
                /**
@@ -21,8 +22,8 @@ class RS_ActionSelectWindow: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionSelectWindow(RS_EntityContainer & container, GraphicView & graphicView, bool select);
-               ~RS_ActionSelectWindow();
+               ActionSelectWindow(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ~ActionSelectWindow();
 
                virtual RS2::ActionType rtti();
                virtual void init(int status = 0);
@@ -41,4 +42,4 @@ class RS_ActionSelectWindow: public RS_PreviewActionInterface
                bool select;
 };
 
-#endif
+#endif // __ACTIONSELECTWINDOW_H__
similarity index 64%
rename from src/actions/rs_actionsetrelativezero.cpp
rename to src/actions/actionsetrelativezero.cpp
index fc7484d4712d4775d17f75a23ab25d212555622d..b77d5106ac41fadc9d26e7da3bf54b9cadbc58b2 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionsetrelativezero.cpp
+// actionsetrelativezero.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionsetrelativezero.h"
+#include "actionsetrelativezero.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 
-RS_ActionSetRelativeZero::RS_ActionSetRelativeZero(RS_EntityContainer & container,
-       GraphicView & graphicView): RS_PreviewActionInterface("Set the relative Zero",
+ActionSetRelativeZero::ActionSetRelativeZero(RS_EntityContainer & container,
+       GraphicView & graphicView): ActionInterface("Set the relative Zero",
                container, graphicView)
 {
 }
 
-RS_ActionSetRelativeZero::~RS_ActionSetRelativeZero()
+ActionSetRelativeZero::~ActionSetRelativeZero()
 {
 }
 
-/*virtual*/ RS2::ActionType RS_ActionSetRelativeZero::rtti()
+/*virtual*/ RS2::ActionType ActionSetRelativeZero::rtti()
 {
        return RS2::ActionSetRelativeZero;
 }
 
-void RS_ActionSetRelativeZero::trigger()
+void ActionSetRelativeZero::trigger()
 {
        bool wasLocked = graphicView->isRelativeZeroLocked();
 
@@ -45,12 +45,12 @@ void RS_ActionSetRelativeZero::trigger()
        finish();
 }
 
-void RS_ActionSetRelativeZero::mouseMoveEvent(QMouseEvent * e)
+void ActionSetRelativeZero::mouseMoveEvent(QMouseEvent * e)
 {
        snapPoint(e);
 }
 
-void RS_ActionSetRelativeZero::mouseReleaseEvent(QMouseEvent * e)
+void ActionSetRelativeZero::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
        {
@@ -64,7 +64,7 @@ void RS_ActionSetRelativeZero::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionSetRelativeZero::coordinateEvent(Vector * e)
+void ActionSetRelativeZero::coordinateEvent(Vector * e)
 {
        if (e == NULL)
                return;
@@ -73,7 +73,7 @@ void RS_ActionSetRelativeZero::coordinateEvent(Vector * e)
        trigger();
 }
 
-void RS_ActionSetRelativeZero::updateMouseButtonHints()
+void ActionSetRelativeZero::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -87,12 +87,12 @@ void RS_ActionSetRelativeZero::updateMouseButtonHints()
        }
 }
 
-void RS_ActionSetRelativeZero::updateMouseCursor()
+void ActionSetRelativeZero::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionSetRelativeZero::updateToolBar()
+void ActionSetRelativeZero::updateToolBar()
 {
        if (!isFinished())
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
@@ -100,4 +100,4 @@ void RS_ActionSetRelativeZero::updateToolBar()
                RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
 }
 
-// EOF
+
diff --git a/src/actions/actionsetrelativezero.h b/src/actions/actionsetrelativezero.h
new file mode 100644 (file)
index 0000000..a199f2c
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __ACTIONSETRELATIVEZERO_H__
+#define __ACTIONSETRELATIVEZERO_H__
+
+#include "actioninterface.h"
+#include "vector.h"
+
+/**
+ * This action class can handle user events to set the relative Zero point. It
+ * overrides but retains the locking of the relative Zero.
+ *
+ * @author James Hammons
+ * @author Ulf Lehnert
+ */
+class ActionSetRelativeZero: public ActionInterface
+{
+       public:
+               ActionSetRelativeZero(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSetRelativeZero();
+
+               virtual RS2::ActionType rtti();
+               virtual void trigger();
+               virtual void mouseMoveEvent(QMouseEvent * e);
+               virtual void mouseReleaseEvent(QMouseEvent * e);
+               virtual void coordinateEvent(Vector * e);
+               virtual void updateMouseButtonHints();
+               virtual void updateMouseCursor();
+               virtual void updateToolBar();
+
+       private:
+               Vector pt;
+};
+
+#endif // __ACTIONSETRELATIVEZERO_H__
similarity index 59%
rename from src/actions/rs_actionsetsnapmode.cpp
rename to src/actions/actionsetsnapmode.cpp
index 49ddf886423481eba40dbfd17c6b52ea88658036..9b912795915394a1640704414de5441c6233c61f 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionsetsnapmode.cpp
+// actionsetsnapmode.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionsetsnapmode.h"
+#include "actionsetsnapmode.h"
 
 #include "graphicview.h"
 
  *
  * @param snapMode The new snap mode used from now on.
  */
-RS_ActionSetSnapMode::RS_ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode):
-       RS_ActionInterface("Set Snap Mode", container, graphicView)
+ActionSetSnapMode::ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode):
+       ActionInterface("Set Snap Mode", container, graphicView)
 {
        this->snapMode = snapMode;
 }
 
-RS_ActionSetSnapMode::~RS_ActionSetSnapMode()
+ActionSetSnapMode::~ActionSetSnapMode()
 {
 }
 
-void RS_ActionSetSnapMode::trigger()
+void ActionSetSnapMode::trigger()
 {
        graphicView->setDefaultSnapMode(snapMode);
        finish();
 }
 
-void RS_ActionSetSnapMode::init(int status)
+void ActionSetSnapMode::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
diff --git a/src/actions/actionsetsnapmode.h b/src/actions/actionsetsnapmode.h
new file mode 100644 (file)
index 0000000..713d4f6
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ACTIONSETSNAPMODE_H__
+#define __ACTIONSETSNAPMODE_H__
+
+#include "rs.h"
+#include "actioninterface.h"
+
+/**
+ * This action changes the current snap mode.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSetSnapMode: public ActionInterface
+{
+       public:
+               ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode);
+               ~ActionSetSnapMode();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               RS2::SnapMode snapMode;
+};
+
+#endif // __ACTIONSETSNAPMODE_H__
similarity index 65%
rename from src/actions/rs_actionsetsnaprestriction.cpp
rename to src/actions/actionsetsnaprestriction.cpp
index d4805d019c03014ba4d9ad79900c59963abef54e..878942447d3807534776ad0a7f1050f08794b775 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionsetsnaprestriction.cpp
+// actionsetsnaprestriction.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionsetsnaprestriction.h"
+#include "actionsetsnaprestriction.h"
 
 #include "graphicview.h"
 
  * @param snapRes The new snap mode used from now on.
  * @param set true: set additional snap mode / false: unset
  */
-RS_ActionSetSnapRestriction::RS_ActionSetSnapRestriction(
+ActionSetSnapRestriction::ActionSetSnapRestriction(
        RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes):
-       RS_ActionInterface("Set Additional Snap Mode", container, graphicView)
+       ActionInterface("Set Additional Snap Mode", container, graphicView)
 {
        this->snapRes = snapRes;
 }
 
-RS_ActionSetSnapRestriction::~RS_ActionSetSnapRestriction()
+ActionSetSnapRestriction::~ActionSetSnapRestriction()
 {
 }
 
-void RS_ActionSetSnapRestriction::trigger()
+void ActionSetSnapRestriction::trigger()
 {
        graphicView->setSnapRestriction(snapRes);
        finish();
 }
 
-void RS_ActionSetSnapRestriction::init(int status)
+void ActionSetSnapRestriction::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
diff --git a/src/actions/actionsetsnaprestriction.h b/src/actions/actionsetsnaprestriction.h
new file mode 100644 (file)
index 0000000..8bbca94
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ACTIONSETSNAPRESTRICTION_H__
+#define __ACTIONSETSNAPRESTRICTION_H__
+
+#include "rs.h"
+#include "actioninterface.h"
+
+/**
+ * This action changes the current additional snap mode.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionSetSnapRestriction: public ActionInterface
+{
+       public:
+               ActionSetSnapRestriction(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes);
+               ~ActionSetSnapRestriction();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               RS2::SnapRestriction snapRes;
+};
+
+#endif // __ACTIONSETSNAPRESTRICTION_H__
similarity index 62%
rename from src/actions/rs_actionsnapintersectionmanual.cpp
rename to src/actions/actionsnapintersectionmanual.cpp
index d10c83096a918ae91f62961c81b283d8447433ee..e8a27a7a3731cdf37c547cb6ddd8eee0b62f9b61 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionsetsnapintersectionmanual.cpp
+// actionsetsnapintersectionmanual.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionsnapintersectionmanual.h"
+#include "actionsnapintersectionmanual.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
 /**
  * @param both Trim both entities.
  */
-RS_ActionSnapIntersectionManual::RS_ActionSnapIntersectionManual(
+ActionSnapIntersectionManual::ActionSnapIntersectionManual(
        RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Trim Entity", container, graphicView)
+       ActionInterface("Trim Entity", container, graphicView)
 {
        entity2 = NULL;
        entity1 = NULL;
        coord = Vector(false);
 }
 
-RS_ActionSnapIntersectionManual::~RS_ActionSnapIntersectionManual()
+ActionSnapIntersectionManual::~ActionSnapIntersectionManual()
 {
 }
 
-void RS_ActionSnapIntersectionManual::init(int status)
+void ActionSnapIntersectionManual::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
 
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionSnapIntersectionManual::trigger()
+void ActionSnapIntersectionManual::trigger()
 {
-       RS_DEBUG->print("RS_ActionSnapIntersectionManual::trigger()");
+       RS_DEBUG->print("ActionSnapIntersectionManual::trigger()");
 
        if (entity2 != NULL && entity2->isAtomic()
            && entity1 != NULL && entity1->isAtomic())
@@ -69,9 +69,9 @@ void RS_ActionSnapIntersectionManual::trigger()
        }
 }
 
-void RS_ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
+void ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionSnapIntersectionManual::mouseMoveEvent begin");
+       RS_DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent begin");
 
        RS_Entity * se = catchEntity(e);
        Vector mouse = graphicView->toGraph(e->x(), e->y());
@@ -82,45 +82,34 @@ void RS_ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
                entity1 = se;
                break;
 
-       case ChooseEntity2: {
+       case ChooseEntity2:
+       {
                entity2 = se;
                coord = mouse;
 
-               VectorSolutions sol =
-                       RS_Information::getIntersection(entity1, entity2, false);
-
-               //for (int i=0; i<sol.getNumber(); i++) {
-               //    ip = sol.get(i);
-               //    break;
-               //}
-
+               VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false);
                Vector ip = sol.getClosest(coord);
 
                if (ip.valid)
                {
                        deletePreview();
                        clearPreview();
-                       preview->addEntity(
-                               new RS_Circle(preview,
-                                       RS_CircleData(
-                                               ip,
-                                               graphicView->toGraphDX(4))));
+//                     preview->addEntity(new RS_Circle(preview, RS_CircleData(ip, graphicView->toGraphDX(4))));
                        drawPreview();
 
-                       RS_DIALOGFACTORY->updateCoordinateWidget(ip,
-                               ip - graphicView->getRelativeZero());
+                       RS_DIALOGFACTORY->updateCoordinateWidget(ip, ip - graphicView->getRelativeZero());
                }
        }
-       break;
+               break;
 
        default:
                break;
        }
 
-       RS_DEBUG->print("RS_ActionSnapIntersectionManual::mouseMoveEvent end");
+       RS_DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent end");
 }
 
-void RS_ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
+void ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -134,6 +123,7 @@ void RS_ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
 
                        if (entity1 != NULL && entity1->isAtomic())
                                setStatus(ChooseEntity2);
+
                        break;
 
                case ChooseEntity2:
@@ -156,7 +146,7 @@ void RS_ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionSnapIntersectionManual::updateMouseButtonHints()
+void ActionSnapIntersectionManual::updateMouseButtonHints()
 {
        switch (getStatus())
        {
@@ -176,14 +166,14 @@ void RS_ActionSnapIntersectionManual::updateMouseButtonHints()
        }
 }
 
-void RS_ActionSnapIntersectionManual::updateMouseCursor()
+void ActionSnapIntersectionManual::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::CadCursor);
 }
 
-void RS_ActionSnapIntersectionManual::updateToolBar()
+void ActionSnapIntersectionManual::updateToolBar()
 {
        RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
 }
 
-// EOF
+
similarity index 64%
rename from src/actions/rs_actionsnapintersectionmanual.h
rename to src/actions/actionsnapintersectionmanual.h
index 10e6b3f1973e2e2a70d6c37fa17666421f0b8946..b119c50614604e67085590938cbdc4cef475a3e1 100644 (file)
@@ -1,7 +1,7 @@
-#ifndef RS_ACTIONSNAPINTERSECTIONMANUAL_H
-#define RS_ACTIONSNAPINTERSECTIONMANUAL_H
+#ifndef __ACTIONSNAPINTERSECTIONMANUAL_H__
+#define __ACTIONSNAPINTERSECTIONMANUAL_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 class RS_Entity;
@@ -9,9 +9,10 @@ class RS_Entity;
 /**
  * This action class can handle user events to trim entities.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionSnapIntersectionManual: public RS_PreviewActionInterface
+class ActionSnapIntersectionManual: public ActionInterface
 {
        public:
                /**
@@ -23,8 +24,8 @@ class RS_ActionSnapIntersectionManual: public RS_PreviewActionInterface
                };
 
        public:
-               RS_ActionSnapIntersectionManual(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSnapIntersectionManual();
+               ActionSnapIntersectionManual(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionSnapIntersectionManual();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -40,4 +41,4 @@ class RS_ActionSnapIntersectionManual: public RS_PreviewActionInterface
                Vector coord;
 };
 
-#endif
+#endif // __ACTIONSNAPINTERSECTIONMANUAL_H__
similarity index 66%
rename from src/actions/rs_actiontoolregeneratedimensions.cpp
rename to src/actions/actiontoolregeneratedimensions.cpp
index 04827e6942a25181cee171b05198afae8d77886b..e8cc18036a0102d852a3b440a0866c06a6d0d279 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actiontoolregeneratedimensions.cpp
+// actiontoolregeneratedimensions.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actiontoolregeneratedimensions.h"
+#include "actiontoolregeneratedimensions.h"
 
 #include "rs_dialogfactory.h"
 #include "rs_dimension.h"
 #include "graphicview.h"
 #include "rs_information.h"
 
-RS_ActionToolRegenerateDimensions::RS_ActionToolRegenerateDimensions(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Tool Regen Dim", container, graphicView)
+ActionToolRegenerateDimensions::ActionToolRegenerateDimensions(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Tool Regen Dim", container, graphicView)
 {
 }
 
-RS_ActionToolRegenerateDimensions::~RS_ActionToolRegenerateDimensions()
+ActionToolRegenerateDimensions::~ActionToolRegenerateDimensions()
 {
 }
 
-void RS_ActionToolRegenerateDimensions::init(int status)
+void ActionToolRegenerateDimensions::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionToolRegenerateDimensions::trigger()
+void ActionToolRegenerateDimensions::trigger()
 {
-       RS_DEBUG->print("RS_ActionToolRegenerateDimensions::trigger()");
+       RS_DEBUG->print("ActionToolRegenerateDimensions::trigger()");
 
        int num = 0;
 
@@ -65,4 +65,4 @@ void RS_ActionToolRegenerateDimensions::trigger()
        finish();
 }
 
-// EOF
+
diff --git a/src/actions/actiontoolregeneratedimensions.h b/src/actions/actiontoolregeneratedimensions.h
new file mode 100644 (file)
index 0000000..9ca8d95
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONTOOLREGENERATEDIMENSIONS_H__
+#define __ACTIONTOOLREGENERATEDIMENSIONS_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action class can handle user events to regenerate dimensions.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionToolRegenerateDimensions: public ActionInterface
+{
+       public:
+               ActionToolRegenerateDimensions(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionToolRegenerateDimensions();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONTOOLREGENERATEDIMENSIONS_H__
similarity index 69%
rename from src/actions/rs_actionzoomauto.cpp
rename to src/actions/actionzoomauto.cpp
index 1d57827bd64a2493b9413c40f007fe3a26a7390e..bc0ee2b8b938b262b6a57edf0b197c9260abe5c7 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomauto.cpp
+// actionzoomauto.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomauto.h"
+#include "actionzoomauto.h"
 
 #include "graphicview.h"
 
  * @param keepAspectRatio true: keep same zoom value for x/y.
  *                        false: adjust both x and y individually
  */
-RS_ActionZoomAuto::RS_ActionZoomAuto(RS_EntityContainer & container,
+ActionZoomAuto::ActionZoomAuto(RS_EntityContainer & container,
        GraphicView & graphicView, bool keepAspectRatio):
-       RS_ActionInterface("Auto zoom", container, graphicView)
+       ActionInterface("Auto zoom", container, graphicView)
 {
        this->keepAspectRatio = keepAspectRatio;
 }
 
-RS_ActionZoomAuto::~RS_ActionZoomAuto()
+ActionZoomAuto::~ActionZoomAuto()
 {
 }
 
-void RS_ActionZoomAuto::init(int status)
+void ActionZoomAuto::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionZoomAuto::trigger()
+void ActionZoomAuto::trigger()
 {
        graphicView->zoomAuto(false, keepAspectRatio);
        finish();
diff --git a/src/actions/actionzoomauto.h b/src/actions/actionzoomauto.h
new file mode 100644 (file)
index 0000000..d9c7cba
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __ACTIONZOOMAUTO_H__
+#define __ACTIONZOOMAUTO_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action triggers an auto zoom.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomAuto: public ActionInterface
+{
+       public:
+               ActionZoomAuto(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
+               ~ActionZoomAuto();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               bool keepAspectRatio;
+};
+
+#endif // __ACTIONZOOMAUTO_H__
similarity index 57%
rename from src/actions/rs_actionzoomautoy.cpp
rename to src/actions/actionzoomautoy.cpp
index 1705ff635a8d6b213c1d6cab22b2406e17548c5b..a0832551658e2238247188933a5cbedcd1836108 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomautoy.cpp
+// actionzoomautoy.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomautoy.h"
+#include "actionzoomautoy.h"
 
 #include "graphicview.h"
 
-RS_ActionZoomAutoY::RS_ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Auto zoom Y", container, graphicView)
+ActionZoomAutoY::ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Auto zoom Y", container, graphicView)
 {
 }
 
-RS_ActionZoomAutoY::~RS_ActionZoomAutoY()
+ActionZoomAutoY::~ActionZoomAutoY()
 {
 }
 
-void RS_ActionZoomAutoY::trigger()
+void ActionZoomAutoY::trigger()
 {
        graphicView->zoomAutoY(false);
        finish();
 }
 
-void RS_ActionZoomAutoY::init(int status)
+void ActionZoomAutoY::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
diff --git a/src/actions/actionzoomautoy.h b/src/actions/actionzoomautoy.h
new file mode 100644 (file)
index 0000000..2857670
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONZOOMAUTOY_H__
+#define __ACTIONZOOMAUTOY_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action triggers an auto zoom in Y only.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomAutoY: public ActionInterface
+{
+       public:
+               ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionZoomAutoY();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONZOOMAUTOY_H__
similarity index 72%
rename from src/actions/rs_actionzoomin.cpp
rename to src/actions/actionzoomin.cpp
index dd3715934dbb4ac91318a1be4bf9887a3623ae91..03147b4a1296e933e681b57d20704c053006664a 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomin.cpp
+// actionzoomin.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/28/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomin.h"
+#include "actionzoomin.h"
 
 #include "graphicview.h"
 
  * @param direction In for zooming in, Out for zooming out.
  * @param axis Axis that are affected by the zoom (OnlyX, OnlyY or Both)
  */
-RS_ActionZoomIn::RS_ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
-       RS_ActionInterface("Zoom in", container, graphicView)
+ActionZoomIn::ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
+       ActionInterface("Zoom in", container, graphicView)
 {
        this->direction = direction;
        this->axis = axis;
        this->center = center;
 }
 
-RS_ActionZoomIn::~RS_ActionZoomIn()
+ActionZoomIn::~ActionZoomIn()
 {
 }
 
-void RS_ActionZoomIn::init(int status)
+void ActionZoomIn::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionZoomIn::trigger()
+void ActionZoomIn::trigger()
 {
        switch (axis)
        {
@@ -72,4 +72,4 @@ void RS_ActionZoomIn::trigger()
        finish();
 }
 
-// EOF
+
diff --git a/src/actions/actionzoomin.h b/src/actions/actionzoomin.h
new file mode 100644 (file)
index 0000000..23de8d7
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __ACTIONZOOMIN_H__
+#define __ACTIONZOOMIN_H__
+
+#include "rs.h"
+#include "actioninterface.h"
+#include "vector.h"
+
+/**
+ * This action triggers zoom increase.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomIn: public ActionInterface
+{
+       public:
+               ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction = RS2::In, RS2::Axis axis = RS2::Both, const Vector & center = Vector(false));
+               ~ActionZoomIn();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               RS2::ZoomDirection direction;
+               RS2::Axis axis;
+               Vector center;
+};
+
+#endif // __ACTIONZOOMIN_H__
similarity index 64%
rename from src/actions/rs_actionzoompan.cpp
rename to src/actions/actionzoompan.cpp
index e4ce07afef8e813f1e2ee97c309e933d4f6f5e06..0425f60e014d1fd0502b8b92de783c66c80d96b7 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoompan.cpp
+// actionzoompan.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoompan.h"
+#include "actionzoompan.h"
 
 #include "graphicview.h"
 
-RS_ActionZoomPan::RS_ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Zoom Pan", container, graphicView)
+ActionZoomPan::ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Zoom Pan", container, graphicView)
 {
 }
 
-RS_ActionZoomPan::~RS_ActionZoomPan()
+ActionZoomPan::~ActionZoomPan()
 {
 }
 
-void RS_ActionZoomPan::init(int status)
+void ActionZoomPan::init(int status)
 {
-       RS_ActionInterface::init(status);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+       ActionInterface::init(status);
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
        x1 = y1 = x2 = y2 = -1;
 }
 
-void RS_ActionZoomPan::trigger()
+void ActionZoomPan::trigger()
 {
        if (x1 >= 0)
        {
@@ -44,7 +44,7 @@ void RS_ActionZoomPan::trigger()
 }
 
 #define SCROLL_DELTA 4
-void RS_ActionZoomPan::mouseMoveEvent(QMouseEvent * e)
+void ActionZoomPan::mouseMoveEvent(QMouseEvent * e)
 {
        x2 = e->x();
        y2 = e->y();
@@ -57,7 +57,7 @@ void RS_ActionZoomPan::mouseMoveEvent(QMouseEvent * e)
                trigger();
 }
 
-void RS_ActionZoomPan::mousePressEvent(QMouseEvent * e)
+void ActionZoomPan::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::MidButton || e->button() == Qt::LeftButton)
        {
@@ -67,7 +67,7 @@ void RS_ActionZoomPan::mousePressEvent(QMouseEvent * e)
        }
 }
 
-void RS_ActionZoomPan::mouseReleaseEvent(QMouseEvent * e)
+void ActionZoomPan::mouseReleaseEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::RightButton)
                init(getStatus() - 1);
@@ -75,11 +75,9 @@ void RS_ActionZoomPan::mouseReleaseEvent(QMouseEvent * e)
                init(-1);
        else
                setStatus(0);
-
-       //RS_DEBUG->print("RS_ActionZoomPan::mousePressEvent(): %f %f", v1.x, v1.y);
 }
 
-void RS_ActionZoomPan::updateMouseCursor()
+void ActionZoomPan::updateMouseCursor()
 {
 #ifndef __APPLE__
        graphicView->setMouseCursor(RS2::SizeAllCursor);
similarity index 59%
rename from src/actions/rs_actionzoompan.h
rename to src/actions/actionzoompan.h
index a2cc8394e1407081b709082e43582b1d696f43f0..526ab56ee6d30e6dcf921c9479cee78adbc7c08f 100644 (file)
@@ -1,18 +1,19 @@
-#ifndef RS_ACTIONZOOMPAN_H
-#define RS_ACTIONZOOMPAN_H
+#ifndef __ACTIONZOOMPAN_H__
+#define __ACTIONZOOMPAN_H__
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 /**
  * This action class can handle user events to zoom in a window.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionZoomPan: public RS_ActionInterface
+class ActionZoomPan: public ActionInterface
 {
        public:
-               RS_ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionZoomPan();
+               ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionZoomPan();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -28,4 +29,4 @@ class RS_ActionZoomPan: public RS_ActionInterface
                int y2;
 };
 
-#endif
+#endif // __ACTIONZOOMPAN_H__
similarity index 56%
rename from src/actions/rs_actionzoomprevious.cpp
rename to src/actions/actionzoomprevious.cpp
index eb0642bcbc0fdfe708ebf992aaa158b3d08d8fc3..de2837977124b9e242ce7fb33ea8bee9890038b7 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomprevious.cpp
+// actionzoomprevious.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomprevious.h"
+#include "actionzoomprevious.h"
 
 #include "graphicview.h"
 
 /**
  * Constructor.
  */
-RS_ActionZoomPrevious::RS_ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Previous zoom", container, graphicView)
+ActionZoomPrevious::ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Previous zoom", container, graphicView)
 {
 }
 
-RS_ActionZoomPrevious::~RS_ActionZoomPrevious()
+ActionZoomPrevious::~ActionZoomPrevious()
 {
 }
 
-void RS_ActionZoomPrevious::init(int status)
+void ActionZoomPrevious::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionZoomPrevious::trigger()
+void ActionZoomPrevious::trigger()
 {
        graphicView->zoomPrevious();
        finish();
diff --git a/src/actions/actionzoomprevious.h b/src/actions/actionzoomprevious.h
new file mode 100644 (file)
index 0000000..9604664
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __ACTIONZOOMPREVIOUS_H__
+#define __ACTIONZOOMPREVIOUS_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action switches back to the previously used view..
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomPrevious: public ActionInterface
+{
+       public:
+               ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionZoomPrevious();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+};
+
+#endif // __ACTIONZOOMPREVIOUS_H__
similarity index 63%
rename from src/actions/rs_actionzoomredraw.cpp
rename to src/actions/actionzoomredraw.cpp
index 3cd34d339233a4a51226fe7b6a4cac99808d709e..eeaaa08e3df861b67f7c95f9b1130acec53a5b01 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomredraw.cpp
+// actionzoomredraw.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomredraw.h"
+#include "actionzoomredraw.h"
 
 #include "graphicview.h"
 
  * @param keepAspectRatio true: keep same zoom value for x/y.
  *                        false: adjust both x and y individually
  */
-RS_ActionZoomRedraw::RS_ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Redraw", container, graphicView)
+ActionZoomRedraw::ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Redraw", container, graphicView)
 {
 }
 
-RS_ActionZoomRedraw::~RS_ActionZoomRedraw()
+ActionZoomRedraw::~ActionZoomRedraw()
 {
 }
 
-void RS_ActionZoomRedraw::init(int status)
+void ActionZoomRedraw::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
 
-void RS_ActionZoomRedraw::trigger()
+void ActionZoomRedraw::trigger()
 {
        graphicView->redraw();
        finish();
diff --git a/src/actions/actionzoomredraw.h b/src/actions/actionzoomredraw.h
new file mode 100644 (file)
index 0000000..4cdf6e5
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __ACTIONZOOMREDRAW_H__
+#define __ACTIONZOOMREDRAW_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action triggers an auto zoom.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomRedraw: public ActionInterface
+{
+       public:
+               ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionZoomRedraw();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+};
+
+#endif // __ACTIONZOOMREDRAW_H__
similarity index 56%
rename from src/actions/rs_actionzoomscroll.cpp
rename to src/actions/actionzoomscroll.cpp
index 50779c400f134b1ab78aa53cc572109fe499ddc6..f5ac790019dbac510d040c0957b740c396b57a45 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomscroll.cpp
+// actionzoomscroll.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomscroll.h"
+#include "actionzoomscroll.h"
 
 #include "graphicview.h"
 
-RS_ActionZoomScroll::RS_ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Zoom scroll", container, graphicView)
+ActionZoomScroll::ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView):
+       ActionInterface("Zoom scroll", container, graphicView)
 {
        this->direction = direction;
 }
 
-RS_ActionZoomScroll::~RS_ActionZoomScroll()
+ActionZoomScroll::~ActionZoomScroll()
 {
 }
 
-void RS_ActionZoomScroll::trigger()
+void ActionZoomScroll::trigger()
 {
        graphicView->zoomScroll(direction);
        finish();
 }
 
-void RS_ActionZoomScroll::init(int status)
+void ActionZoomScroll::init(int status)
 {
-       RS_ActionInterface::init(status);
+       ActionInterface::init(status);
        trigger();
 }
diff --git a/src/actions/actionzoomscroll.h b/src/actions/actionzoomscroll.h
new file mode 100644 (file)
index 0000000..cbe683a
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __ACTIONZOOMSCROLL_H__
+#define __ACTIONZOOMSCROLL_H__
+
+#include "actioninterface.h"
+
+/**
+ * This action triggers a scrolling.
+ *
+ * @author James Hammons
+ * @author Andrew Mustun
+ */
+class ActionZoomScroll: public ActionInterface
+{
+       public:
+               ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView);
+               ~ActionZoomScroll();
+
+               virtual void init(int status = 0);
+               virtual void trigger();
+
+       protected:
+               RS2::Direction direction;
+};
+
+#endif // __ACTIONZOOMSCROLL_H__
similarity index 65%
rename from src/actions/rs_actionzoomwindow.cpp
rename to src/actions/actionzoomwindow.cpp
index 1c53bbbb4c308d5d9314637444b79cf0d3db2dd2..e16c7ae0fdee768b64f2868b81c15c4a92c1afa8 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actionzoomwindow.cpp
+// actionzoomwindow.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  06/05/2010  Added this text. :-)
 //
 
-#include "rs_actionzoomwindow.h"
+#include "actionzoomwindow.h"
 
 #include "rs_dialogfactory.h"
 #include "graphicview.h"
  *          in x and y will stay the same. false Exactly the chosen
  *          area will be fit to the viewport.
  */
-RS_ActionZoomWindow::RS_ActionZoomWindow(RS_EntityContainer & container,
+ActionZoomWindow::ActionZoomWindow(RS_EntityContainer & container,
        GraphicView & graphicView, bool keepAspectRatio):
-       RS_PreviewActionInterface("Zoom Window", container, graphicView)
+       ActionInterface("Zoom Window", container, graphicView)
 {
        this->keepAspectRatio = keepAspectRatio;
 }
 
-RS_ActionZoomWindow::~RS_ActionZoomWindow()
+ActionZoomWindow::~ActionZoomWindow()
 {
 }
 
-void RS_ActionZoomWindow::init(int status)
+void ActionZoomWindow::init(int status)
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::init()");
-
-       RS_PreviewActionInterface::init(status);
+       RS_DEBUG->print("ActionZoomWindow::init()");
+       ActionInterface::init(status);
        v1 = v2 = Vector(false);
-       snapMode = RS2::SnapFree;
-       snapRes = RS2::RestrictNothing;
+/*     snapMode = RS2::SnapFree;
+       snapRes = RS2::RestrictNothing;*/
 }
 
-void RS_ActionZoomWindow::trigger()
+void ActionZoomWindow::trigger()
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::trigger()");
+       RS_DEBUG->print("ActionZoomWindow::trigger()");
 
-       RS_PreviewActionInterface::trigger();
+       ActionInterface::trigger();
 
        if (v1.valid && v2.valid)
        {
@@ -65,26 +64,26 @@ void RS_ActionZoomWindow::trigger()
        }
 }
 
-void RS_ActionZoomWindow::mouseMoveEvent(QMouseEvent * e)
+void ActionZoomWindow::mouseMoveEvent(QMouseEvent * e)
 {
        if (getStatus() == 1 && v1.valid)
        {
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-               preview->addEntity(new RS_Line(preview,
+/*             preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
                preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
                                RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
                preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
+                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
                drawPreview();
        }
 }
 
-void RS_ActionZoomWindow::mousePressEvent(QMouseEvent * e)
+void ActionZoomWindow::mousePressEvent(QMouseEvent * e)
 {
        if (e->button() == Qt::LeftButton)
        {
@@ -100,12 +99,12 @@ void RS_ActionZoomWindow::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
+       RS_DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
 }
 
-void RS_ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
+void ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::mouseReleaseEvent()");
+       RS_DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
 
        if (e->button() == Qt::RightButton)
        {
@@ -122,9 +121,9 @@ void RS_ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
                }
 }
 
-void RS_ActionZoomWindow::updateMouseButtonHints()
+void ActionZoomWindow::updateMouseButtonHints()
 {
-       RS_DEBUG->print("RS_ActionZoomWindow::updateMouseButtonHints()");
+       RS_DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
 
        switch (getStatus())
        {
@@ -142,9 +141,9 @@ void RS_ActionZoomWindow::updateMouseButtonHints()
        }
 }
 
-void RS_ActionZoomWindow::updateMouseCursor()
+void ActionZoomWindow::updateMouseCursor()
 {
        graphicView->setMouseCursor(RS2::MagnifierCursor);
 }
 
-// EOF
+
similarity index 60%
rename from src/actions/rs_actionzoomwindow.h
rename to src/actions/actionzoomwindow.h
index f1f81659db52bc89f19e726ac376ad980282b427..628da6fefd4b90a1dc98eb30d556edb9f9bfdf23 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef RS_ACTIONZOOMWINDOW_H
-#define RS_ACTIONZOOMWINDOW_H
+#ifndef __ACTIONZOOMWINDOW_H__
+#define __ACTIONZOOMWINDOW_H__
 
-#include "rs_previewactioninterface.h"
+#include "actioninterface.h"
 #include "vector.h"
 
 /**
  * This action class can handle user events to zoom in a window.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionZoomWindow: public RS_PreviewActionInterface
+class ActionZoomWindow: public ActionInterface
 {
        public:
-               RS_ActionZoomWindow(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
-               ~RS_ActionZoomWindow();
+               ActionZoomWindow(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
+               ~ActionZoomWindow();
 
                virtual void init(int status = 0);
                virtual void trigger();
@@ -30,4 +31,4 @@ class RS_ActionZoomWindow: public RS_PreviewActionInterface
                bool keepAspectRatio;
 };
 
-#endif
+#endif // __ACTIONZOOMWINDOW_H__
diff --git a/src/actions/rs_actionblocksadd.cpp b/src/actions/rs_actionblocksadd.cpp
deleted file mode 100644 (file)
index d8b197f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksadd.cpp 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "rs_actionblocksadd.h"
-
-#include "drawing.h"
-#include "rs_dialogfactory.h"
-
-RS_ActionBlocksAdd::RS_ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Add Block", container, graphicView)
-{
-}
-
-QAction * RS_ActionBlocksAdd::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
-{
-//OLD: Descr, Menu text, Key sequ., QObject * parent, ...
-//    QAction * action = new QAction(tr("Add Block"), tr("&Add Block"),
-//                             QKeySequence(), NULL);
-       QAction * action = new QAction(tr("&Add Block"), 0);
-       action->setStatusTip(tr("Add Block"));
-       return action;
-}
-
-void RS_ActionBlocksAdd::trigger()
-{
-       RS_DEBUG->print("adding block");
-       //RS_Block* block = new RS_Block(container, "", Vector(0.0,0.0));
-
-       if (graphic != NULL)
-       {
-               RS_BlockList * blockList = graphic->getBlockList();
-
-               if (blockList != NULL)
-               {
-                       RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
-
-                       if (d.isValid())
-                               graphic->addBlock(new RS_Block(container, d));
-               }
-       }
-
-       finish();
-}
-
-void RS_ActionBlocksAdd::init(int status)
-{
-       RS_ActionInterface::init(status);
-       trigger();
-}
-
-// EOF
diff --git a/src/actions/rs_actionblocksadd.h b/src/actions/rs_actionblocksadd.h
deleted file mode 100644 (file)
index 5bb31b9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksadd.h 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef RS_ACTIONBLOCKSADD_H
-#define RS_ACTIONBLOCKSADD_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit blocks.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksAdd: public RS_ActionInterface
-{
-       //Q_OBJECT
-       public:
-               RS_ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksAdd()
-               {
-               }
-
-               static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionblocksattributes.cpp b/src/actions/rs_actionblocksattributes.cpp
deleted file mode 100644 (file)
index a4e084b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksattributes.cpp 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "rs_actionblocksattributes.h"
-
-#include "drawing.h"
-#include "rs_dialogfactory.h"
-
-RS_ActionBlocksAttributes::RS_ActionBlocksAttributes(
-       RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Edit Block Attributes", container, graphicView)
-{
-}
-
-QAction * RS_ActionBlocksAttributes::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
-{
-       QAction * action = new QAction(tr("&Rename Block"), 0);
-//    QAction* action = new QAction(tr("Rename Block"),
-//                                  tr("&Rename Block"),
-//                                  QKeySequence(), NULL);
-       action->setStatusTip(tr("Rename Block and all Inserts"));
-       return action;
-}
-
-void RS_ActionBlocksAttributes::trigger()
-{
-       RS_DEBUG->print("editing block attributes");
-
-       if (graphic != NULL && RS_DIALOGFACTORY != NULL)
-       {
-               RS_Block * block = graphic->getActiveBlock();
-               RS_BlockList * blockList = graphic->getBlockList();
-
-               if (blockList != NULL && block != NULL)
-               {
-                       QString oldName = block->getName();
-
-                       RS_BlockData d;
-                       d = RS_DIALOGFACTORY->requestBlockAttributesDialog(
-                                       blockList);
-
-                       if (d.isValid())
-                       {
-                               QString newName = d.name;
-                               blockList->rename(block, newName);
-
-                               // update the name of all inserts:
-                               graphic->renameInserts(oldName, newName);
-
-                               graphic->addBlockNotification();
-                       }
-               }
-       }
-       finish();
-}
-
-void RS_ActionBlocksAttributes::init(int status)
-{
-       RS_ActionInterface::init(status);
-       trigger();
-}
-
-// EOF
diff --git a/src/actions/rs_actionblocksattributes.h b/src/actions/rs_actionblocksattributes.h
deleted file mode 100644 (file)
index 5945bde..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksattributes.h 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef RS_ACTIONBLOCKSATTRIBUTES_H
-#define RS_ACTIONBLOCKSATTRIBUTES_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit block attributes.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksAttributes: public RS_ActionInterface
-{
-       //Q_OBJECT
-       public:
-               RS_ActionBlocksAttributes(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksAttributes()
-               {
-               }
-
-               static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionblocksedit.cpp b/src/actions/rs_actionblocksedit.cpp
deleted file mode 100644 (file)
index 3383648..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksedit.cpp 1161 2004-12-09 23:10:09Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "rs_actionblocksedit.h"
-
-#include "drawing.h"
-#include "rs_dialogfactory.h"
-
-RS_ActionBlocksEdit::RS_ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Edit Block", container, graphicView)
-{
-}
-
-QAction * RS_ActionBlocksEdit::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
-{
-       QAction * action = new QAction(tr("&Edit Block"), 0);
-//        QAction* action = new QAction(tr("Edit Block"), tr("&Edit Block"),
-//                             QKeySequence(), NULL);
-       action->setStatusTip(tr("Edit Block"));
-       return action;
-}
-
-void RS_ActionBlocksEdit::trigger()
-{
-       RS_DEBUG->print("edit block");
-
-       if (graphic != NULL)
-       {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestEditBlockWindow(graphic->getBlockList());
-       }
-       else
-               RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_ActionBlocksEdit::trigger(): graphic is NULL");
-       finish();
-}
-
-void RS_ActionBlocksEdit::init(int status)
-{
-       RS_ActionInterface::init(status);
-       trigger();
-}
-
diff --git a/src/actions/rs_actionblocksedit.h b/src/actions/rs_actionblocksedit.h
deleted file mode 100644 (file)
index 0a0780e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksedit.h 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef RS_ACTIONBLOCKSEDIT_H
-#define RS_ACTIONBLOCKSEDIT_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit blocks.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksEdit: public RS_ActionInterface
-{
-       //Q_OBJECT
-       public:
-               RS_ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksEdit()
-               {
-               }
-
-               static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionblocksexplode.cpp b/src/actions/rs_actionblocksexplode.cpp
deleted file mode 100644 (file)
index a868083..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksexplode.cpp 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "rs_actionblocksexplode.h"
-
-#include "rs_modification.h"
-
-/**
- * Constructor.
- */
-RS_ActionBlocksExplode::RS_ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_PreviewActionInterface("Blocks Explode",
-               container, graphicView)
-{
-}
-
-RS_ActionBlocksExplode::~RS_ActionBlocksExplode()
-{
-}
-
-QAction * RS_ActionBlocksExplode::createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/)
-{
-       QAction * action = new QAction(tr("&Explode"), 0);
-//    QAction* action = new QAction(tr("Explode"),
-//                                  tr("&Explode"),
-//                                  QKeySequence(), NULL);
-       action->setStatusTip(tr("Explode Blocks and other Entity Groups"));
-
-       return action;
-}
-
-void RS_ActionBlocksExplode::init(int status)
-{
-       RS_PreviewActionInterface::init(status);
-
-       trigger();
-       finish();
-}
-
-void RS_ActionBlocksExplode::trigger()
-{
-       RS_Modification m(*container, graphicView);
-       m.explode();
-}
-
-// EOF
diff --git a/src/actions/rs_actionblocksexplode.h b/src/actions/rs_actionblocksexplode.h
deleted file mode 100644 (file)
index d5fae51..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-** $Id: rs_actionblocksexplode.h 1062 2004-01-16 21:51:20Z andrew $
-**
-** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
-**
-** This file is part of the qcadlib Library project.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** Licensees holding valid qcadlib Professional Edition licenses may use
-** this file in accordance with the qcadlib Commercial License
-** Agreement provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.ribbonsoft.com for further details.
-**
-** Contact info@ribbonsoft.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef RS_ACTIONBLOCKSEXPLODE_H
-#define RS_ACTIONBLOCKSEXPLODE_H
-
-#include "rs_previewactioninterface.h"
-#include "rs_insert.h"
-
-/**
- * This action class can handle user events for exploding blocks and
- * other entity containers into single entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksExplode: public RS_PreviewActionInterface
-{
-       //Q_OBJECT
-       public:
-               RS_ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksExplode();
-
-               static QAction * createGUIAction(RS2::ActionType /*type*/, QObject * /*parent*/);
-
-               virtual RS2::ActionType rtti()
-               {
-                       return RS2::ActionBlocksExplode;
-               }
-
-               virtual void init(int status = 0);
-
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionblocksfreezeall.h b/src/actions/rs_actionblocksfreezeall.h
deleted file mode 100644 (file)
index 6f75d9e..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef RS_ACTIONBLOCKSFREEZEALL_H
-#define RS_ACTIONBLOCKSFREEZEALL_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksFreezeAll: public RS_ActionInterface
-{
-       public:
-               RS_ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksFreezeAll();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       private:
-               bool freeze;
-};
-
-#endif
diff --git a/src/actions/rs_actionblocksremove.h b/src/actions/rs_actionblocksremove.h
deleted file mode 100644 (file)
index ed0faf8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONBLOCKSREMOVE_H
-#define RS_ACTIONBLOCKSREMOVE_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to remove blocks.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksRemove: public RS_ActionInterface
-{
-       public:
-               RS_ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksRemove();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionblockstoggleview.h b/src/actions/rs_actionblockstoggleview.h
deleted file mode 100644 (file)
index f48d90d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONBLOCKSTOGGLEVIEW_H
-#define RS_ACTIONBLOCKSTOGGLEVIEW_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionBlocksToggleView: public RS_ActionInterface
-{
-       public:
-               RS_ActionBlocksToggleView(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionBlocksToggleView();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actioneditundo.h b/src/actions/rs_actioneditundo.h
deleted file mode 100644 (file)
index 9b9720a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef RS_ACTIONEDITUNDO_H
-#define RS_ACTIONEDITUNDO_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events for undo / redo.
- *
- * @author Andrew Mustun
- */
-class RS_ActionEditUndo: public RS_ActionInterface
-{
-       public:
-               RS_ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionEditUndo();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               /** Undo (true) or redo (false) */
-               bool undo;
-};
-
-#endif
diff --git a/src/actions/rs_actionfilenew.h b/src/actions/rs_actionfilenew.h
deleted file mode 100644 (file)
index 43ecc2e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONFILENEW_H
-#define RS_ACTIONFILENEW_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to create new blank documents.
- *
- * @author Andrew Mustun
- */
-class RS_ActionFileNew: public RS_ActionInterface
-{
-       public:
-               RS_ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionFileNew();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionfileopen.h b/src/actions/rs_actionfileopen.h
deleted file mode 100644 (file)
index eb478b1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONFILEOPEN_H
-#define RS_ACTIONFILEOPEN_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to open files.
- *
- * @author Andrew Mustun
- */
-class RS_ActionFileOpen: public RS_ActionInterface
-{
-       public:
-               RS_ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionFileOpen();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionfilesave.h b/src/actions/rs_actionfilesave.h
deleted file mode 100644 (file)
index a2a119d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONFILESAVE_H
-#define RS_ACTIONFILESAVE_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to save the current file.
- *
- * @author Andrew Mustun
- */
-class RS_ActionFileSave: public RS_ActionInterface
-{
-       public:
-               RS_ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionFileSave();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionfilesaveas.h b/src/actions/rs_actionfilesaveas.h
deleted file mode 100644 (file)
index 33a609d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef RS_ACTIONFILESAVEAS_H
-#define RS_ACTIONFILESAVEAS_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to export files
- * in various formats.
- *
- * @author Andrew Mustun
- */
-class RS_ActionFileSaveAs: public RS_ActionInterface
-{
-       public:
-               RS_ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionFileSaveAs();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actioninfoinside.h b/src/actions/rs_actioninfoinside.h
deleted file mode 100644 (file)
index eaa7bfc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef RS_ACTIONINFOINSIDE_H
-#define RS_ACTIONINFOINSIDE_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events for checking if
- * a given point is inside or outside the selected contour.
- *
- * @author Andrew Mustun
- */
-class RS_ActionInfoInside: public RS_ActionInterface
-{
-       public:
-               RS_ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoInside();
-
-               virtual void trigger();
-               virtual void mouseMoveEvent(QMouseEvent * e);
-               virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void updateMouseButtonHints();
-               virtual void updateMouseCursor();
-               virtual void updateToolBar();
-
-       private:
-               Vector pt;
-               RS_EntityContainer * contour;
-};
-
-#endif
diff --git a/src/actions/rs_actioninfototallength.h b/src/actions/rs_actioninfototallength.h
deleted file mode 100644 (file)
index 8225cb9..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef RS_ACTIONINFOTOTALLENGTH_H
-#define RS_ACTIONINFOTOTALLENGTH_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to delete entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionInfoTotalLength: public RS_ActionInterface
-{
-       public:
-               /**
-                * Action States.
-                */
-               enum Status {
-                       Acknowledge    /**< Acknowledge or cancel. */
-               };
-
-       public:
-               RS_ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionInfoTotalLength();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-               virtual void updateToolBar();
-};
-
-#endif
diff --git a/src/actions/rs_actionlayersadd.h b/src/actions/rs_actionlayersadd.h
deleted file mode 100644 (file)
index 0c1b37e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONLAYERSADD_H
-#define RS_ACTIONLAYERSADD_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to add layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersAdd: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersAdd();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionlayersedit.h b/src/actions/rs_actionlayersedit.h
deleted file mode 100644 (file)
index 86f9adc..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONLAYERSEDIT_H
-#define RS_ACTIONLAYERSEDIT_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersEdit: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersEdit();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionlayersfreezeall.cpp b/src/actions/rs_actionlayersfreezeall.cpp
deleted file mode 100644 (file)
index 62308d0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// rs_actionlayersfreezeall.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  05/22/2010  Added this text. :-)
-//
-
-#include "rs_actionlayersfreezeall.h"
-
-#include "drawing.h"
-
-RS_ActionLayersFreezeAll::RS_ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Freeze all Layers", container, graphicView)
-{
-       this->freeze = freeze;
-}
-
-RS_ActionLayersFreezeAll::~RS_ActionLayersFreezeAll()
-{
-}
-
-void RS_ActionLayersFreezeAll::trigger()
-{
-       RS_DEBUG->print("RS_ActionLayersFreezeAll::trigger");
-
-       if (graphic != NULL)
-               //RS_Layer* layer = graphic->getActiveLayer();
-               graphic->freezeAllLayers(freeze);
-
-       finish();
-}
-
-void RS_ActionLayersFreezeAll::init(int status)
-{
-       RS_ActionInterface::init(status);
-       trigger();
-}
-
diff --git a/src/actions/rs_actionlayersfreezeall.h b/src/actions/rs_actionlayersfreezeall.h
deleted file mode 100644 (file)
index 11b9290..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef RS_ACTIONLAYERSFREEZEALL_H
-#define RS_ACTIONLAYERSFREEZEALL_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersFreezeAll: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersFreezeAll();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       private:
-               bool freeze;
-};
-
-#endif
diff --git a/src/actions/rs_actionlayersremove.cpp b/src/actions/rs_actionlayersremove.cpp
deleted file mode 100644 (file)
index ba4daef..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// rs_actionlayersedit.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  06/04/2010  Added this text. :-)
-//
-
-#include "rs_actionlayersremove.h"
-
-#include "rs_dialogfactory.h"
-#include "drawing.h"
-
-RS_ActionLayersRemove::RS_ActionLayersRemove(RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface("Remove Layer", container, graphicView)
-{
-}
-
-RS_ActionLayersRemove::~RS_ActionLayersRemove()
-{
-}
-
-void RS_ActionLayersRemove::trigger()
-{
-       RS_DEBUG->print("RS_ActionLayersRemove::trigger");
-
-       if (graphic != NULL)
-       {
-               RS_Layer * layer =
-                       RS_DIALOGFACTORY->requestLayerRemovalDialog(graphic->getLayerList());
-
-               /*
-                     if (layer!=NULL && layer->getName()!="0") {
-
-                         graphic->startUndoCycle();
-                         for (RS_Entity* e=graphic->firstEntity(RS2::ResolveNone);
-                                 e!=NULL;
-                                 e=graphic->nextEntity(RS2::ResolveNone)) {
-
-                             if (e->getLayer()!=NULL &&
-                                     e->getLayer()->getName()==layer->getName()) {
-
-                                 e->setUndoState(true);
-                                 e->setLayer("0");
-                                 graphic->addUndoable(e);
-                             }
-                         }
-
-
-                         graphic->endUndoCycle();
-                */
-
-               // Now remove the layer from the layer list:
-               graphic->removeLayer(layer);
-       }
-       finish();
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
-}
-
-void RS_ActionLayersRemove::init(int status)
-{
-       RS_ActionInterface::init(status);
-       trigger();
-}
-
-// EOF
diff --git a/src/actions/rs_actionlayersremove.h b/src/actions/rs_actionlayersremove.h
deleted file mode 100644 (file)
index f0be5ca..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONLAYERSREMOVE_H
-#define RS_ACTIONLAYERSREMOVE_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to remove layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersRemove: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersRemove(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersRemove();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionlayerstogglelock.h b/src/actions/rs_actionlayerstogglelock.h
deleted file mode 100644 (file)
index 80f60b0..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONLAYERSTOGGLELOCK_H
-#define RS_ACTIONLAYERSTOGGLELOCK_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersToggleLock: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersToggleLock();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionlayerstoggleview.h b/src/actions/rs_actionlayerstoggleview.h
deleted file mode 100644 (file)
index 95e737d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONLAYERSTOGGLEVIEW_H
-#define RS_ACTIONLAYERSTOGGLEVIEW_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to edit layers.
- *
- * @author Andrew Mustun
- */
-class RS_ActionLayersToggleView: public RS_ActionInterface
-{
-       public:
-               RS_ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionLayersToggleView();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionlockrelativezero.h b/src/actions/rs_actionlockrelativezero.h
deleted file mode 100644 (file)
index 36bc65c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef RS_ACTIONLOCKRELATIVEZERO_H
-#define RS_ACTIONLOCKRELATIVEZERO_H
-
-#include "rs_previewactioninterface.h"
-
-/**
- * This action class can handle user events to lock or unlock
- * the relative Zero point.
- * It overrides but retains the locking of the relative Zero.
- *
- * @author Ulf Lehnert
- */
-class RS_ActionLockRelativeZero: public RS_ActionInterface
-{
-       public:
-               RS_ActionLockRelativeZero(RS_EntityContainer & container, GraphicView & graphicView, bool on);
-               ~RS_ActionLockRelativeZero();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       private:
-               bool on;
-};
-
-#endif
diff --git a/src/actions/rs_actionmodifyentity.h b/src/actions/rs_actionmodifyentity.h
deleted file mode 100644 (file)
index c38477b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef RS_ACTIONMODIFYENTITY_H
-#define RS_ACTIONMODIFYENTITY_H
-
-#include "rs_actioninterface.h"
-
-class RS_Entity;
-
-/**
- * This action class can handle user events to select entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionModifyEntity: public RS_ActionInterface
-{
-       //Q_OBJECT
-       public:
-               RS_ActionModifyEntity(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyEntity();
-
-               virtual void trigger();
-               virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void updateMouseCursor();
-
-       private:
-               RS_Entity * en;
-};
-
-#endif
diff --git a/src/actions/rs_actionmodifyexplodetext.h b/src/actions/rs_actionmodifyexplodetext.h
deleted file mode 100644 (file)
index f4e7c71..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef RS_ACTIONMODIFYEXPLODETEXT_H
-#define RS_ACTIONMODIFYEXPLODETEXT_H
-
-#include "rs_previewactioninterface.h"
-
-/**
- * This action class can handle user events for exploding blocks and
- * other entity containers into single entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionModifyExplodeText: public RS_PreviewActionInterface
-{
-       public:
-               RS_ActionModifyExplodeText(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionModifyExplodeText();
-
-               virtual RS2::ActionType rtti();
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionoptionsdrawing.h b/src/actions/rs_actionoptionsdrawing.h
deleted file mode 100644 (file)
index 27b5f7c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef RS_ACTIONOPTIONSDRAWING_H
-#define RS_ACTIONOPTIONSDRAWING_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to change general
- * application options.
- *
- * @author Andrew Mustun
- */
-class RS_ActionOptionsDrawing: public RS_ActionInterface
-{
-       public:
-               RS_ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionOptionsDrawing();
-
-               virtual RS2::ActionType rtti();
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionselect.h b/src/actions/rs_actionselect.h
deleted file mode 100644 (file)
index c4fb4c3..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef RS_ACTIONSELECT_H
-#define RS_ACTIONSELECT_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to select entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSelect: public RS_ActionInterface
-{
-       public:
-               RS_ActionSelect(RS_EntityContainer & container, GraphicView & graphicView, RS2::ActionType nextAction);
-               ~RS_ActionSelect();
-
-               void init(int status);
-               void mouseReleaseEvent(QMouseEvent * e);
-               void updateToolBar();
-
-       private:
-               RS2::ActionType nextAction;
-};
-
-#endif
diff --git a/src/actions/rs_actionselectall.h b/src/actions/rs_actionselectall.h
deleted file mode 100644 (file)
index daef00f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef RS_ACTIONSELECTALL_H
-#define RS_ACTIONSELECTALL_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to select all entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSelectAll: public RS_ActionInterface
-{
-       public:
-               RS_ActionSelectAll(RS_EntityContainer & container, GraphicView & graphicView, bool select);
-               ~RS_ActionSelectAll();
-
-               virtual RS2::ActionType rtti();
-               void init(int status);
-               virtual void trigger();
-
-       protected:
-               bool select;
-};
-
-#endif
diff --git a/src/actions/rs_actionselectbase.h b/src/actions/rs_actionselectbase.h
deleted file mode 100644 (file)
index 6af7a6b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONSELECTBASE_H
-#define RS_ACTIONSELECTBASE_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This class is the base class to all select actions.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSelectBase: public RS_ActionInterface
-{
-       public:
-               RS_ActionSelectBase(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSelectBase();
-
-               virtual void keyReleaseEvent(QKeyEvent * e);
-               virtual void updateMouseCursor();
-};
-
-#endif
diff --git a/src/actions/rs_actionselectcontour.h b/src/actions/rs_actionselectcontour.h
deleted file mode 100644 (file)
index 8ef6b53..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef RS_ACTIONSELECTCONTOURS_H
-#define RS_ACTIONSELECTCONTOURS_H
-
-#include "rs_actioninterface.h"
-
-class RS_Entity;
-
-/**
- * This action class can handle user events to select contours.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSelectContour: public RS_ActionInterface
-{
-       public:
-               RS_ActionSelectContour(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSelectContour();
-
-               virtual RS2::ActionType rtti();
-               virtual void trigger();
-               virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void updateMouseCursor();
-
-       private:
-               RS_Entity * en;
-};
-
-#endif
diff --git a/src/actions/rs_actionselectinvert.h b/src/actions/rs_actionselectinvert.h
deleted file mode 100644 (file)
index bcf7f82..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef RS_ACTIONSELECTINVERT_H
-#define RS_ACTIONSELECTINVERT_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to select all entities.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSelectInvert: public RS_ActionInterface
-{
-       public:
-               RS_ActionSelectInvert(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSelectInvert();
-
-               virtual RS2::ActionType rtti();
-               void init(int status);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionsetrelativezero.h b/src/actions/rs_actionsetrelativezero.h
deleted file mode 100644 (file)
index 801df0f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef RS_ACTIONSETRELATIVEZERO_H
-#define RS_ACTIONSETRELATIVEZERO_H
-
-#include "rs_previewactioninterface.h"
-#include "vector.h"
-
-/**
- * This action class can handle user events to set
- * the relative Zero point.
- * It overrides but retains the locking of the relative Zero.
- *
- * @author Ulf Lehnert
- */
-class RS_ActionSetRelativeZero: public RS_PreviewActionInterface
-{
-       public:
-               RS_ActionSetRelativeZero(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionSetRelativeZero();
-
-               virtual RS2::ActionType rtti();
-               virtual void trigger();
-               virtual void mouseMoveEvent(QMouseEvent * e);
-               virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void coordinateEvent(Vector * e);
-               virtual void updateMouseButtonHints();
-               virtual void updateMouseCursor();
-               virtual void updateToolBar();
-
-       private:
-               Vector pt;
-};
-
-#endif
diff --git a/src/actions/rs_actionsetsnapmode.h b/src/actions/rs_actionsetsnapmode.h
deleted file mode 100644 (file)
index f9315b1..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef RS_ACTIONSETSNAPMODE_H
-#define RS_ACTIONSETSNAPMODE_H
-
-#include "rs.h"
-#include "rs_actioninterface.h"
-
-/**
- * This action changes the current snap mode.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSetSnapMode: public RS_ActionInterface
-{
-       public:
-               RS_ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode);
-               ~RS_ActionSetSnapMode();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               RS2::SnapMode snapMode;
-};
-
-#endif
diff --git a/src/actions/rs_actionsetsnaprestriction.h b/src/actions/rs_actionsetsnaprestriction.h
deleted file mode 100644 (file)
index dc2a92e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef RS_ACTIONSETSNAPRESTRICTION_H
-#define RS_ACTIONSETSNAPRESTRICTION_H
-
-#include "rs.h"
-#include "rs_actioninterface.h"
-
-/**
- * This action changes the current additional snap mode.
- *
- * @author Andrew Mustun
- */
-class RS_ActionSetSnapRestriction: public RS_ActionInterface
-{
-       public:
-               RS_ActionSetSnapRestriction(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes);
-               ~RS_ActionSetSnapRestriction();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               RS2::SnapRestriction snapRes;
-};
-
-#endif
diff --git a/src/actions/rs_actiontoolregeneratedimensions.h b/src/actions/rs_actiontoolregeneratedimensions.h
deleted file mode 100644 (file)
index 905a855..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONTOOLREGENERATEDIMENSIONS_H
-#define RS_ACTIONTOOLREGENERATEDIMENSIONS_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action class can handle user events to regenerate dimensions.
- *
- * @author Andrew Mustun
- */
-class RS_ActionToolRegenerateDimensions: public RS_ActionInterface
-{
-       public:
-               RS_ActionToolRegenerateDimensions(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionToolRegenerateDimensions();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomauto.h b/src/actions/rs_actionzoomauto.h
deleted file mode 100644 (file)
index 2f7411a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef RS_ACTIONZOOMAUTO_H
-#define RS_ACTIONZOOMAUTO_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action triggers an auto zoom.
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomAuto: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomAuto(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
-               ~RS_ActionZoomAuto();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               bool keepAspectRatio;
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomautoy.h b/src/actions/rs_actionzoomautoy.h
deleted file mode 100644 (file)
index 7c85883..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONZOOMAUTOY_H
-#define RS_ACTIONZOOMAUTOY_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action triggers an auto zoom in Y only.
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomAutoY: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionZoomAutoY();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomin.h b/src/actions/rs_actionzoomin.h
deleted file mode 100644 (file)
index 4dbd693..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef RS_ACTIONZOOMIN_H
-#define RS_ACTIONZOOMIN_H
-
-#include "rs.h"
-#include "rs_actioninterface.h"
-#include "vector.h"
-
-/**
- * This action triggers zoom increase.
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomIn: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction = RS2::In, RS2::Axis axis = RS2::Both, const Vector & center = Vector(false));
-               ~RS_ActionZoomIn();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               RS2::ZoomDirection direction;
-               RS2::Axis axis;
-               Vector center;
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomprevious.h b/src/actions/rs_actionzoomprevious.h
deleted file mode 100644 (file)
index ef82c90..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef RS_ACTIONZOOMPREVIOUS_H
-#define RS_ACTIONZOOMPREVIOUS_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action switches back to the previously used view..
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomPrevious: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionZoomPrevious();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomredraw.h b/src/actions/rs_actionzoomredraw.h
deleted file mode 100644 (file)
index 33b8c01..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RS_ACTIONZOOMREDRAW_H
-#define RS_ACTIONZOOMREDRAW_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action triggers an auto zoom.
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomRedraw: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionZoomRedraw();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-};
-
-#endif
diff --git a/src/actions/rs_actionzoomscroll.h b/src/actions/rs_actionzoomscroll.h
deleted file mode 100644 (file)
index 2832bc9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef RS_ACTIONZOOMSCROLL_H
-#define RS_ACTIONZOOMSCROLL_H
-
-#include "rs_actioninterface.h"
-
-/**
- * This action triggers a scrolling.
- *
- * @author Andrew Mustun
- */
-class RS_ActionZoomScroll: public RS_ActionInterface
-{
-       public:
-               RS_ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView);
-               ~RS_ActionZoomScroll();
-
-               virtual void init(int status = 0);
-               virtual void trigger();
-
-       protected:
-               RS2::Direction direction;
-};
-
-#endif
similarity index 65%
rename from src/base/rs_actioninterface.cpp
rename to src/base/actioninterface.cpp
index e6790280133d6f88e3c71879cade5f2087d3757e..4280b5c9c8a40f1b9234212b4bcf6f652403f3d5 100644 (file)
@@ -1,4 +1,4 @@
-// rs_actioninterface.cpp
+// actioninterface.cpp
 //
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
@@ -12,7 +12,7 @@
 // JLH  05/22/2010  Added this text. :-)
 //
 
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 
 #include "commands.h"
 #include "rs_debug.h"
  *               is suspended and resumed again the cursor will always
  *               be reset to the one given here.
  */
-RS_ActionInterface::RS_ActionInterface(const char * name,
-       RS_EntityContainer & container, GraphicView & graphicView):
-       RS_Snapper(container, graphicView)
+ActionInterface::ActionInterface(const char * name, RS_EntityContainer & c,
+       GraphicView & v): graphicView(&v), container(&c)
 {
-       RS_DEBUG->print("RS_ActionInterface::RS_ActionInterface: Setting up action: \"%s\"", name);
+       RS_DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\"", name);
 
        this->name = name;
        status = 0;
        finished = false;
        //triggerOnResume = false;
 
-       // graphic provides a pointer to the graphic if the
-       // entity container is a graphic (i.e. can also hold
-       // layers).
-       graphic = container.getGraphic();
+       // Graphic provides a pointer to the graphic if the entity container is a
+       //graphic (i.e. can also hold layers).
+       graphic = c.getGraphic();
 
-       // document pointer will be used for undo / redo
-       document = container.getDocument();
+       // Document pointer will be used for undo / redo
+       document = c.getDocument();
 
        //this->cursor = cursor;
        //setSnapMode(graphicView.getDefaultSnapMode());
 
-       RS_DEBUG->print("RS_ActionInterface::RS_ActionInterface: Setting up action: \"%s\": OK", name);
+       RS_DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\": OK", name);
 }
 
 /**
  * Destructor.
  */
-RS_ActionInterface::~RS_ActionInterface()
+ActionInterface::~ActionInterface()
 {
        // would be pure virtual now:
        // hideOptions();
@@ -75,7 +73,7 @@ RS_ActionInterface::~RS_ActionInterface()
 *
 * @todo no default implementation
  */
-RS2::ActionType RS_ActionInterface::rtti()
+RS2::ActionType ActionInterface::rtti()
 {
        return RS2::ActionNone;
 }
@@ -83,7 +81,7 @@ RS2::ActionType RS_ActionInterface::rtti()
 /**
  * @return name of this action
  */
-QString RS_ActionInterface::getName()
+QString ActionInterface::getName()
 {
        return name;
 }
@@ -95,9 +93,9 @@ QString RS_ActionInterface::getName()
  * @param status The status on which to initiate this action.
  * default is 0 to begin the action.
  */
-void RS_ActionInterface::init(int status/*= 0*/)
+void ActionInterface::init(int status/*= 0*/)
 {
-       RS_Snapper::init();
+//     RS_Snapper::init();
        setStatus(status);
 
        if (status >= 0)
@@ -114,7 +112,7 @@ void RS_ActionInterface::init(int status/*= 0*/)
  * This function can be overwritten by the implementing action.
  * The default implementation keeps track of the mouse position.
  */
-void RS_ActionInterface::mouseMoveEvent(QMouseEvent *)
+void ActionInterface::mouseMoveEvent(QMouseEvent *)
 {
 }
 
@@ -124,7 +122,7 @@ void RS_ActionInterface::mouseMoveEvent(QMouseEvent *)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::mousePressEvent(QMouseEvent *)
+void ActionInterface::mousePressEvent(QMouseEvent *)
 {
 }
 
@@ -134,7 +132,7 @@ void RS_ActionInterface::mousePressEvent(QMouseEvent *)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::mouseReleaseEvent(QMouseEvent *)
+void ActionInterface::mouseReleaseEvent(QMouseEvent *)
 {
 }
 
@@ -143,7 +141,7 @@ void RS_ActionInterface::mouseReleaseEvent(QMouseEvent *)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::keyPressEvent(QKeyEvent * e)
+void ActionInterface::keyPressEvent(QKeyEvent * e)
 {
     e->ignore();
 }
@@ -153,7 +151,7 @@ void RS_ActionInterface::keyPressEvent(QKeyEvent * e)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::keyReleaseEvent(QKeyEvent * e)
+void ActionInterface::keyReleaseEvent(QKeyEvent * e)
 {
     e->ignore();
 }
@@ -163,8 +161,7 @@ void RS_ActionInterface::keyReleaseEvent(QKeyEvent * e)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-//void RS_ActionInterface::coordinateEvent(RS_CoordinateEvent *)
-void RS_ActionInterface::coordinateEvent(Vector *)
+void ActionInterface::coordinateEvent(Vector *)
 {
 }
 
@@ -174,7 +171,7 @@ void RS_ActionInterface::coordinateEvent(Vector *)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::commandEvent(RS_CommandEvent *)
+void ActionInterface::commandEvent(RS_CommandEvent *)
 {
 }
 
@@ -182,7 +179,7 @@ void RS_ActionInterface::commandEvent(RS_CommandEvent *)
  * Must be implemented to return the currently available commands
  *  for the command line.
  */
-QStringList RS_ActionInterface::getAvailableCommands()
+QStringList ActionInterface::getAvailableCommands()
 {
        QStringList l;
        return l;
@@ -200,7 +197,7 @@ QStringList RS_ActionInterface::getAvailableCommands()
  *               of progress and decreases when the user goes one
  *               step back (i.e. presses the right mouse button).
  */
-void RS_ActionInterface::setStatus(int status)
+void ActionInterface::setStatus(int status)
 {
        this->status = status;
 
@@ -218,7 +215,7 @@ void RS_ActionInterface::setStatus(int status)
 /**
  * @return Current status of this action.
  */
-int RS_ActionInterface::getStatus()
+int ActionInterface::getStatus()
 {
        return status;
 }
@@ -228,7 +225,7 @@ int RS_ActionInterface::getStatus()
  * data needed for this action was collected / set.
  * The default implementation does nothing.
  */
-void RS_ActionInterface::trigger()
+void ActionInterface::trigger()
 {
 }
 
@@ -236,28 +233,28 @@ void RS_ActionInterface::trigger()
  * Should be overwritten to update the mouse button hints
  * wherever they might needed.
  */
-void RS_ActionInterface::updateMouseButtonHints()
+void ActionInterface::updateMouseButtonHints()
 {
 }
 
 /**
  * Should be overwritten to set the mouse cursor for this action.
  */
-void RS_ActionInterface::updateMouseCursor()
+void ActionInterface::updateMouseCursor()
 {
 }
 
 /**
  * Should be overwritten to set the toolbar for this action.
  */
-void RS_ActionInterface::updateToolBar()
+void ActionInterface::updateToolBar()
 {
 }
 
 /**
  * @return true, if the action is finished and can be deleted.
  */
-bool RS_ActionInterface::isFinished()
+bool ActionInterface::isFinished()
 {
        return finished;
 }
@@ -265,7 +262,7 @@ bool RS_ActionInterface::isFinished()
 /**
  * Forces a termination of the action without any cleanup.
  */
-void RS_ActionInterface::setFinished()
+void ActionInterface::setFinished()
 {
        status = -1;
 }
@@ -273,72 +270,71 @@ void RS_ActionInterface::setFinished()
 /**
  * Finishes this action.
  */
-void RS_ActionInterface::finish()
+void ActionInterface::finish()
 {
-       RS_DEBUG->print("RS_ActionInterface::finish");
+       RS_DEBUG->print("ActionInterface::finish");
        status = -1;
-       graphicView->setMouseCursor(RS2::ArrowCursor);
+//     graphicView->setMouseCursor(RS2::ArrowCursor);
        //graphicView->requestToolBar(RS2::ToolBarMain);
        updateToolBar();
 //Maybe change this to SnapperOff()?
 //jlh: deleteSnapper();
        hideOptions();
        finished = true;
-       RS_Snapper::finish();           // Sets RS_Snapper::finished = true
+//     RS_Snapper::finish();           // Sets RS_Snapper::finished = true
        // I think this is where we want to update the screen...
-//     graphicView->update();
-       graphicView->redraw();
-       RS_DEBUG->print("RS_ActionInterface::finish: OK");
+//     graphicView->redraw();
+       RS_DEBUG->print("ActionInterface::finish: OK");
 }
 
 /**
  * Called by the event handler to give this action a chance to
  * communicate with its predecessor.
  */
-void RS_ActionInterface::setPredecessor(RS_ActionInterface * pre)
+void ActionInterface::setPredecessor(ActionInterface * p)
 {
-       predecessor = pre;
+       predecessor = p;
 }
 
 /**
  * Suspends this action while another action takes place.
  */
-void RS_ActionInterface::suspend()
+void ActionInterface::suspend()
 {
-       graphicView->setMouseCursor(RS2::ArrowCursor);
-       RS_Snapper::suspend();
+//     graphicView->setMouseCursor(RS2::ArrowCursor);
+//     RS_Snapper::suspend();
 }
 
 /**
  * Resumes an action after it was suspended.
  */
-void RS_ActionInterface::resume()
+void ActionInterface::resume()
 {
        updateMouseCursor();
        updateToolBar();
-       RS_Snapper::resume();
+//     RS_Snapper::resume();
 }
 
 /**
  * Hides the tool options. Default implementation does nothing.
  */
-void RS_ActionInterface::hideOptions()
+void ActionInterface::hideOptions()
 {
-       RS_Snapper::hideOptions();
+//     RS_Snapper::hideOptions();
 }
 
 /**
  * Shows the tool options. Default implementation does nothing.
  */
-void RS_ActionInterface::showOptions()
+void ActionInterface::showOptions()
 {
-       RS_Snapper::showOptions();
+//     RS_Snapper::showOptions();
 }
 
 /**
  * Calls checkCommand() from the RS_COMMANDS module.
  */
-bool RS_ActionInterface::checkCommand(const QString & cmd, const QString & str,
+bool ActionInterface::checkCommand(const QString & cmd, const QString & str,
        RS2::ActionType action)
 {
        return RS_COMMANDS->checkCommand(cmd, str, action);
@@ -347,7 +343,7 @@ bool RS_ActionInterface::checkCommand(const QString & cmd, const QString & str,
 /**
  * Calls command() from the RS_COMMANDS module.
  */
-QString RS_ActionInterface::command(const QString & cmd)
+QString ActionInterface::command(const QString & cmd)
 {
        return RS_COMMANDS->command(cmd);
 }
@@ -355,7 +351,45 @@ QString RS_ActionInterface::command(const QString & cmd)
 /**
  * Calls msgAvailableCommands() from the RS_COMMANDS module.
  */
-QString RS_ActionInterface::msgAvailableCommands()
+QString ActionInterface::msgAvailableCommands()
 {
        return RS_COMMANDS->msgAvailableCommands();
 }
+
+// This is here to save some typing in all the action* classes derived from
+// this one. May go away in the future.
+Vector ActionInterface::snapPoint(QMouseEvent * e)
+{
+       return graphicView->snapper.snapPoint(e);
+}
+
+RS_Entity * ActionInterface::catchEntity(QMouseEvent * e, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
+{
+       return graphicView->snapper.catchEntity(e, level);
+}
+
+RS_Entity * ActionInterface::catchEntity(Vector v, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
+{
+       return graphicView->snapper.catchEntity(v, level);
+}
+
+//dummy functions, will delete later...
+void ActionInterface::drawSnapper(void)
+{
+}
+
+void ActionInterface::deleteSnapper(void)
+{
+}
+
+void ActionInterface::drawPreview(void)
+{
+}
+
+void ActionInterface::clearPreview(void)
+{
+}
+
+void ActionInterface::deletePreview(void)
+{
+}
similarity index 51%
rename from src/base/rs_actioninterface.h
rename to src/base/actioninterface.h
index d9fd82881520157fd681e5811fbbd4ea68979290..7647b20438c9c1fe1fab76ce2c5eb2fcf9330d9d 100644 (file)
@@ -1,36 +1,36 @@
-#ifndef RS_ACTIONINTERFACE_H
-#define RS_ACTIONINTERFACE_H
+#ifndef __ACTIONINTERFACE_H__
+#define __ACTIONINTERFACE_H__
 
 #include <QtGui>
-#include "rs_snapper.h"
+#include "rs.h"
 
 class RS_CommandEvent;
 class RS_Document;
 class Drawing;
+class RS_Entity;
 class RS_EntityContainer;
 class GraphicView;
 class Vector;
 
 /**
- * This is the interface that must be implemented for all
- * action classes. Action classes handle actions such
- * as drawing lines, moving entities or zooming in.
+ * This is the interface that must be implemented for all action classes.
+ * Action classes handle actions such as drawing lines, moving entities or
+ * zooming in.
  *
  * Inherited from QObject for Qt translation features.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_ActionInterface: public QObject, public RS_Snapper
+class ActionInterface: public QObject
 {
-//huh? no slots/signals here...    Q_OBJECT
-//WHY derive from QObject???
-//for the TR macro???
+//WHY derive from QObject??? for the TR macro???
 //mebbe... Well, that's what he says above. Though it would be just as easy to
 //prefix a QObject::tr in front of translated strings...
        public:
-               RS_ActionInterface(const char * name, RS_EntityContainer & container,
-                       GraphicView & graphicView);
-               virtual ~RS_ActionInterface();
+               ActionInterface(const char * name, RS_EntityContainer &,
+                       GraphicView &);
+               virtual ~ActionInterface();
 
                virtual RS2::ActionType rtti();
                QString getName();
@@ -52,7 +52,7 @@ class RS_ActionInterface: public QObject, public RS_Snapper
                virtual bool isFinished();
                virtual void setFinished();
                virtual void finish();
-               virtual void setPredecessor(RS_ActionInterface * pre);
+               virtual void setPredecessor(ActionInterface *);
                virtual void suspend();
                virtual void resume();
                virtual void hideOptions();
@@ -61,16 +61,24 @@ class RS_ActionInterface: public QObject, public RS_Snapper
                        RS2::ActionType action = RS2::ActionNone);
                QString command(const QString & cmd);
                QString msgAvailableCommands();
+               //built-in for now, we'll see how it goes...
+               Vector snapPoint(QMouseEvent *);
+               RS_Entity * catchEntity(QMouseEvent *, RS2::ResolveLevel level = RS2::ResolveNone);
+               RS_Entity * catchEntity(Vector, RS2::ResolveLevel level = RS2::ResolveNone);
+#warning "!!! The following functions are DEPRECATED and only in place to help with porting.. !!!"
+               void drawSnapper(void);
+               void deleteSnapper(void);
+               void drawPreview(void);
+               void clearPreview(void);
+               void deletePreview(void);
 
        private:
                /**
-                * Current status of the action. After an action has
-                * been created the action status is set to 0. Actions
-                * that are terminated have a status of -1. Other status
-                * numbers can be used to describe the stage this action
-                * is in. E.g. a window zoom consists of selecting the
-                * first corner (status 0), and selecting the second
-                * corner (status 1).
+                * Current status of the action. After an action has been created the
+                * action status is set to 0. Actions that are terminated have a status
+                * of -1. Other status numbers can be used to describe the stage this
+                * action is in. E.g. a window zoom consists of selecting the first
+                * corner (status 0), and selecting the second corner (status 1).
                 */
                int status;
 
@@ -79,14 +87,12 @@ class RS_ActionInterface: public QObject, public RS_Snapper
                QString name;
 
                /**
-                * This flag is set when the action has terminated and
-                * can be deleted.
+                * This flag is set when the action has terminated and can be deleted.
                 */
                bool finished;
 
                /**
-                * Pointer to the graphic is this container is a graphic.
-                * NULL otherwise
+                * Pointer to the graphic is this container is a graphic. NULL otherwise
                 */
                Drawing * graphic;
 
@@ -98,7 +104,10 @@ class RS_ActionInterface: public QObject, public RS_Snapper
                /**
                 * Predecessor of this action or NULL.
                 */
-               RS_ActionInterface * predecessor;
+               ActionInterface * predecessor;
+
+               GraphicView * graphicView;
+               RS_EntityContainer * container;
 };
 
-#endif
+#endif // __ACTIONINTERFACE_H__
similarity index 99%
rename from src/base/paintintf.cpp
rename to src/base/paintinterface.cpp
index e2534f04fbc7e9fbb28a56bca0c6e0bb1c763404..55da307881a7cb13902759492b98c0755bf45bcf 100644 (file)
@@ -1,7 +1,6 @@
-// paintintf.cpp
+// paintinterface.cpp
 //
 // Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
 // (C) 2010 Underground Software
 //
@@ -9,13 +8,13 @@
 //
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
-// JLH  05/21/2010  Added this text. :-)
+// JLH  05/21/2010  Created this file. :-)
 //
 
 // BIG NOTE: THIS CLASS ASSUMES THAT THE PAINTER * IS VALID!!! BAD THINGS WILL
 //           HAPPEN IF IT IS NOT!!!
 
-#include "paintintf.h"
+#include "paintinterface.h"
 
 #include "rs_debug.h"
 #include "rs_math.h"
similarity index 93%
rename from src/base/paintintf.h
rename to src/base/paintinterface.h
index 242ce7f6a84f5aa21346b5463715cad1f6d43b4a..3815dd0c28767e97470e2794facba4facc57d6e8 100644 (file)
@@ -1,10 +1,5 @@
-// paintintf.h: Qt Painter interface
-//
-// by James L. Hammons
-// (C) 2010 Underground Software
-
-#ifndef __PAINTINTF_H__
-#define __PAINTINTF_H__
+#ifndef __PAINTINTERFACE_H__
+#define __PAINTINTERFACE_H__
 
 #include <QtGui>
 #include "rs.h"
@@ -80,4 +75,4 @@ class PaintInterface
                RS_Pen lpen;
 };
 
-#endif // __PAINTINTF_H__
+#endif // __PAINTINTERFACE_H__
index f9bb52cc28f6253947afb3dc88e68de3548651ff..d674fcf19c01fbe457ec80d75e04a36fb8d75aff 100644 (file)
@@ -20,7 +20,7 @@
 #include "rs_information.h"
 #include "rs_math.h"
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Default constructor.
index 5eebd9a6262479e72a1074ebfa6e15029ffb6e15..2e9405bead32bc6bf85a2909f450e86a76eaf116 100644 (file)
@@ -18,7 +18,7 @@
 #include "rs_information.h"
 #include "rs_linetypepattern.h"
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Default constructor.
index bd20b7acedf4f454a1ad8cdc0ee6a5e1f27c5b56..527ec2393e9e6c7500d102e078ba0ba618fd5abd 100644 (file)
@@ -28,6 +28,10 @@ RS_DialogFactory::RS_DialogFactory()
        RS_DEBUG->print("RS_DialogFacgory::RS_DialogFactory: OK");
 }
 
+/*virtual*/ RS_DialogFactory::~RS_DialogFactory()
+{
+}
+
 /**
  * @return Instance to the unique font list.
  */
index 19d64f486c5dd827bf69ce336fe4dc41beeb7f88..128aa564b4157fade6aa66461fe8c619b424c6c9 100644 (file)
@@ -16,7 +16,7 @@ class RS_DialogFactory
                RS_DialogFactory();
 
        public:
-               virtual ~RS_DialogFactory() {}
+               virtual ~RS_DialogFactory();
 
                static RS_DialogFactory * instance();
 
index af67162304a3c04f141a1cece4268b67d04c959d..8ddb17fd63e7509af14134f8bfb0cf9771ecba83 100644 (file)
@@ -12,7 +12,7 @@ class RS_LayerList;
  * Adapter for dialog factory interface.
  * Used when no factory object was set.
  */
-class RS_DialogFactoryAdapter : public RS_DialogFactoryInterface
+class RS_DialogFactoryAdapter: public RS_DialogFactoryInterface
 {
        public:
                RS_DialogFactoryAdapter() {}
@@ -31,7 +31,7 @@ class RS_DialogFactoryAdapter : public RS_DialogFactoryInterface
                virtual void requestEditBlockWindow(RS_BlockList *) {}
                virtual void closeEditBlockWindow(RS_Block *) {}
                virtual QString requestImageOpenDialog() { return ""; }
-               virtual void requestOptions(RS_ActionInterface *, bool, bool = false) {}
+               virtual void requestOptions(ActionInterface *, bool, bool = false) {}
                virtual void requestSnapDistOptions(double &, bool) {}
                virtual bool requestAttributesDialog(RS_AttributesData &, RS_LayerList &) { return false; }
                virtual bool requestMoveDialog(RS_MoveData &) { return false; }
@@ -41,7 +41,7 @@ class RS_DialogFactoryAdapter : public RS_DialogFactoryInterface
                virtual bool requestMoveRotateDialog(RS_MoveRotateData &) { return false; }
                virtual bool requestRotate2Dialog(RS_Rotate2Data &) { return false; }
                virtual void requestToolBar(RS2::ToolBarId) {}
-               virtual void requestToolBarSelect(RS_ActionInterface *, RS2::ActionType) {}
+               virtual void requestToolBarSelect(ActionInterface *, RS2::ActionType) {}
                virtual bool requestModifyEntityDialog(RS_Entity *) { return false; }
                virtual bool requestTextDialog(RS_Text *) { return false; }
                virtual bool requestHatchDialog(RS_Hatch *) { return false; }
index 2ea60114f996c6a462483448e365624aa3b27f03..9df40defc0e17d344b722fc2bd04bc113f7283b6 100644 (file)
@@ -4,7 +4,7 @@
 #include <QtCore>
 #include "rs.h"
 
-class RS_ActionInterface;
+class ActionInterface;
 class RS_ArcData;
 class RS_AttributesData;
 class RS_BevelData;
@@ -195,7 +195,7 @@ public:
         * @param update true: widget gets data from the action, false:
         *   widget gets data from config file.
      */
-    virtual void requestOptions(RS_ActionInterface * action, bool on, bool update = false) = 0;
+    virtual void requestOptions(ActionInterface * action, bool on, bool update = false) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -286,7 +286,7 @@ public:
      *
      * @param nextAction ID of next action to create after selecting was done.
      */
-    virtual void requestToolBarSelect(RS_ActionInterface * selectAction, RS2::ActionType nextAction) = 0;
+    virtual void requestToolBarSelect(ActionInterface * selectAction, RS2::ActionType nextAction) = 0;
 
     /**
      * This virtual method must be overwritten and must present
index 2f5deda92b551de5f7774a3b1a229c47b8168ebc..c7a260b68bd27c2e3be60f2458bda5d5ae8c0c66 100644 (file)
@@ -29,7 +29,7 @@ class RS_DimAlignedData
                }
 
                friend class RS_DimAligned;
-               friend class RS_ActionDimAligned;
+               friend class ActionDimAligned;
 
                friend std::ostream & operator<<(std::ostream & os, const RS_DimAlignedData & dd)
                {
index 380df86f83358d323c0388728460fed898c6bbfa..7ec0eed58f66135c13844daa03e4f729044539b9 100644 (file)
@@ -18,7 +18,7 @@
 #include "graphicview.h"
 #include "rs_information.h"
 #include "rs_linetypepattern.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Constructor.
index a13c0d6fc82ea385193d560c8f8da65eade50357..94f3a4ceb09aa4382b809454d930436bb49a5b70 100644 (file)
@@ -25,7 +25,7 @@
 #include "rs_spline.h"
 #include "rs_information.h"
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 bool RS_EntityContainer::autoUpdateBorders = true;
 
index a92775c000a6bc46ae54318b8e1bfa51cae9565c..3484ca9f159b11e83d4dee41b4a81219706c2c3b 100644 (file)
@@ -14,8 +14,7 @@
 
 #include "rs_eventhandler.h"
 
-#include <QtGui>
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "rs_commandevent.h"
 #include "rs_debug.h"
 #include "rs_dialogfactory.h"
@@ -168,14 +167,14 @@ void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
  */
 void RS_EventHandler::mouseLeaveEvent()
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                currentActions[actionIndex]->suspend();
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                        defaultAction->suspend();
                //RS_DEBUG->print("currently no action defined");
        }
@@ -186,14 +185,14 @@ void RS_EventHandler::mouseLeaveEvent()
  */
 void RS_EventHandler::mouseEnterEvent()
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                currentActions[actionIndex]->resume();
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                        defaultAction->resume();
        }
 }
@@ -203,14 +202,14 @@ void RS_EventHandler::mouseEnterEvent()
  */
 void RS_EventHandler::keyPressEvent(QKeyEvent * e)
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                currentActions[actionIndex]->keyPressEvent(e);
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                        defaultAction->keyPressEvent(e);
                else
                        e->ignore();
@@ -224,14 +223,14 @@ void RS_EventHandler::keyPressEvent(QKeyEvent * e)
  */
 void RS_EventHandler::keyReleaseEvent(QKeyEvent * e)
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                currentActions[actionIndex]->keyReleaseEvent(e);
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                        defaultAction->keyReleaseEvent(e);
                else
                        e->ignore();
@@ -423,9 +422,9 @@ void RS_EventHandler::disableCoordinateInput()
 /**
  * @return Current action.
  */
-RS_ActionInterface * RS_EventHandler::getCurrentAction()
+ActionInterface * RS_EventHandler::getCurrentAction()
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
                return currentActions[actionIndex];
 
@@ -435,7 +434,7 @@ RS_ActionInterface * RS_EventHandler::getCurrentAction()
 /**
  * @return The current default action.
  */
-RS_ActionInterface * RS_EventHandler::getDefaultAction()
+ActionInterface * RS_EventHandler::getDefaultAction()
 {
        return defaultAction;
 }
@@ -443,9 +442,9 @@ RS_ActionInterface * RS_EventHandler::getDefaultAction()
 /**
  * Sets the default action.
  */
-void RS_EventHandler::setDefaultAction(RS_ActionInterface * action)
+void RS_EventHandler::setDefaultAction(ActionInterface * action)
 {
-       if (defaultAction != NULL)
+       if (defaultAction)
        {
                defaultAction->finish();
                delete defaultAction;
@@ -458,7 +457,7 @@ void RS_EventHandler::setDefaultAction(RS_ActionInterface * action)
 /**
  * Sets the current action.
  */
-void RS_EventHandler::setCurrentAction(RS_ActionInterface * action)
+void RS_EventHandler::setCurrentAction(ActionInterface * action)
 {
        RS_DEBUG->print("RS_EventHandler::setCurrentAction");
 
@@ -466,7 +465,7 @@ void RS_EventHandler::setCurrentAction(RS_ActionInterface * action)
                return;
 
        // Predecessor of the new action or NULL:
-       RS_ActionInterface * predecessor = NULL;
+       ActionInterface * predecessor = NULL;
 
        // Suspend current action:
        if (actionIndex >= 0 && currentActions[actionIndex]
@@ -490,7 +489,7 @@ void RS_EventHandler::setCurrentAction(RS_ActionInterface * action)
        if (actionIndex == RS_MAXACTIONS - 1)
        {
                // delete oldest action if necessary (usually never happens):
-               if (currentActions[0] != NULL)
+               if (currentActions[0])
                {
                        currentActions[0]->finish();
                        delete currentActions[0];
@@ -538,7 +537,7 @@ void RS_EventHandler::killSelectActions()
 {
        for(int c=0; c<RS_MAXACTIONS; ++c)
        {
-               if (currentActions[c] != NULL)
+               if (currentActions[c])
                {
                        if (currentActions[c]->rtti() == RS2::ActionSelectSingle
                                || currentActions[c]->rtti() == RS2::ActionSelectContour
@@ -657,12 +656,17 @@ void RS_EventHandler::cleanUp()
  */
 void RS_EventHandler::setSnapMode(RS2::SnapMode sm)
 {
+#if 0
        for(int c=0; c<RS_MAXACTIONS; ++c)
                if (currentActions[c])
                        currentActions[c]->setSnapMode(sm);
 
        if (defaultAction)
                defaultAction->setSnapMode(sm);
+#else
+#warning "!!! Not sure if this is going to work correctly..."
+       graphicView->snapper.setSnapMode(sm);
+#endif
 }
 
 /**
@@ -670,12 +674,17 @@ void RS_EventHandler::setSnapMode(RS2::SnapMode sm)
  */
 void RS_EventHandler::setSnapRestriction(RS2::SnapRestriction sr)
 {
+#if 0
        for(int c=0; c<RS_MAXACTIONS; ++c)
                if (currentActions[c])
                        currentActions[c]->setSnapRestriction(sr);
 
        if (defaultAction)
                defaultAction->setSnapRestriction(sr);
+#else
+#warning "!!! Not sure if this is going to work correctly..."
+       graphicView->snapper.setSnapRestriction(sr);
+#endif
 }
 
 void RS_EventHandler::debugActions()
@@ -687,7 +696,7 @@ void RS_EventHandler::debugActions()
                if (c == actionIndex)
                        RS_DEBUG->print("Current");
 
-               if (currentActions[c] != NULL)
+               if (currentActions[c])
                        RS_DEBUG->print("Action %03d: %s [%s]",
                                c, currentActions[c]->getName().toLatin1().data(),
                                currentActions[c]->isFinished() ? "finished" : "active");
index 601bba7c17bfed218dc37f43483ca674470c1534..55e0dc7ffcf20572227800ef1383e2bbb417571f 100644 (file)
@@ -1,11 +1,13 @@
 #ifndef RS_EVENTHANDLER_H
 #define RS_EVENTHANDLER_H
 
-#include "rs_actioninterface.h"
+#include <QtGui>
+#include "rs.h"
 
 #define RS_MAXACTIONS 16
 
-class RS_ActionInterface;
+class ActionInterface;
+class RS_CommandEvent;
 class GraphicView;
 
 /**
@@ -21,29 +23,22 @@ class RS_EventHandler
 
                void back();
                void enter();
-
                void mousePressEvent(QMouseEvent * e);
                void mouseReleaseEvent(QMouseEvent * e);
                void mouseMoveEvent(QMouseEvent * e);
                void mouseLeaveEvent();
                void mouseEnterEvent();
-
                void keyPressEvent(QKeyEvent * e);
                void keyReleaseEvent(QKeyEvent * e);
-
                void commandEvent(RS_CommandEvent * e);
                void enableCoordinateInput();
                void disableCoordinateInput();
-
-               void setDefaultAction(RS_ActionInterface * action);
-               RS_ActionInterface * getDefaultAction();
-
-               void setCurrentAction(RS_ActionInterface * action);
-               RS_ActionInterface * getCurrentAction();
-
+               void setDefaultAction(ActionInterface * action);
+               ActionInterface * getDefaultAction();
+               void setCurrentAction(ActionInterface * action);
+               ActionInterface * getCurrentAction();
                void killSelectActions();
                void killAllActions();
-
                bool hasAction();
                void cleanUp();
                void debugActions();
@@ -52,8 +47,8 @@ class RS_EventHandler
 
        protected:
                GraphicView * graphicView;
-               RS_ActionInterface * defaultAction;
-               RS_ActionInterface * currentActions[RS_MAXACTIONS];
+               ActionInterface * defaultAction;
+               ActionInterface * currentActions[RS_MAXACTIONS];
                int actionIndex;
                bool coordinateInputEnabled;
 };
index 2a7b5a76dc424bee25b9b44ce51dacf5528c8486..56e4f1e0183a940e537e91fdb8e48c8abcf1374a 100644 (file)
@@ -18,7 +18,7 @@
 #include "drawing.h"
 #include "graphicview.h"
 #include "rs_information.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 #include "rs_pattern.h"
 #include "rs_patternlist.h"
 
index a92297f2c3295d57b01947d964b72e0f3e20bb32..91816b2e5b40e9a6aaaf1982d086c541a9570d83 100644 (file)
@@ -18,7 +18,7 @@
 #include "rs_debug.h"
 #include "graphicview.h"
 #include "rs_line.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Constructor.
index 224d17033982688ab005d6fe53cd0ac411ebb5ad..32254bd2dbaf781b2b8314822bfd1d76764e3c07 100644 (file)
@@ -18,7 +18,7 @@
 #include "drawing.h"
 #include "graphicview.h"
 #include "rs_linetypepattern.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Constructor.
index de32daa77b595f0acc0f6fafea3d32d7f5b3001d..6475bd3a129b35380fb0b987c36f57145ccc2f79 100644 (file)
@@ -15,7 +15,7 @@
 #include "rs_point.h"
 
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Default constructor.
index c0ca2e5866c6df8e3a18a6848ee3ecd0d3ee9961..6fd34c67516840fa9f7dce93c6985f7fa15af77b 100644 (file)
@@ -18,7 +18,7 @@
 #include "rs_line.h"
 #include "rs_arc.h"
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Constructor.
index 1de0166b68947bdec3f5587888f86787e3e002c6..841841b68e534007b0aa190704daca51d6e48a54 100644 (file)
@@ -17,7 +17,7 @@
 #include "rs_entitycontainer.h"
 #include "graphicview.h"
 #include "rs_information.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 #include "settings.h"
 
 /**
@@ -200,8 +200,13 @@ void RS_Preview::Draw(GraphicView * view, PaintInterface * painter)
        if (isEmpty())
                return;
 
-//     painter->setPreviewMode();
+       painter->setPen(RS_Pen(RS_Color(60, 255, 80), RS2::Width00, RS2::SolidLine));
        painter->setOffset(offset);
-       view->drawEntity(this, false);
+
+       // We have to traverse the container ourselves, because RS_Container::draw()
+       // uses drawEntity() instead of drawEntityPlain()...
+       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               view->drawEntityPlain(e);
+
        painter->setOffset(Vector(0, 0));
 }
diff --git a/src/base/rs_previewactioninterface.cpp b/src/base/rs_previewactioninterface.cpp
deleted file mode 100644 (file)
index e25a4e6..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-// rs_previewactioninterface.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  06/02/2010  Added this text. :-)
-//
-
-#include "rs_previewactioninterface.h"
-
-#include "rs_debug.h"
-#include "graphicview.h"
-#include "rs_preview.h"
-
-/**
- * Constructor.
- *
- * Sets the entity container on which the action class inherited
- * from this interface operates.
- */
-RS_PreviewActionInterface::RS_PreviewActionInterface(const char * name,
-       RS_EntityContainer & container, GraphicView & graphicView):
-       RS_ActionInterface(name, container, graphicView)
-{
-       RS_DEBUG->print("RS_PreviewActionInterface::RS_PreviewActionInterface: Setting up action with preview: \"%s\"", name);
-
-       // Preview is linked to the container for getting access to document
-       // settings / dictionary variables
-       preview = new RS_Preview(&container);
-       visible = false;
-
-       RS_DEBUG->print("RS_PreviewActionInterface::RS_PreviewActionInterface: Setting up action with preview: \"%s\": OK", name);
-}
-
-/** Destructor */
-RS_PreviewActionInterface::~RS_PreviewActionInterface()
-{
-       delete preview;
-}
-
-void RS_PreviewActionInterface::init(int status)
-{
-       RS_ActionInterface::init(status);
-       clearPreview();
-}
-
-void RS_PreviewActionInterface::finish()
-{
-       RS_ActionInterface::finish();
-       deletePreview();
-       clearPreview();
-}
-
-void RS_PreviewActionInterface::suspend()
-{
-       RS_ActionInterface::suspend();
-       deletePreview();
-}
-
-void RS_PreviewActionInterface::resume()
-{
-       RS_ActionInterface::resume();
-       drawPreview();
-}
-
-void RS_PreviewActionInterface::trigger()
-{
-       RS_ActionInterface::trigger();
-       deletePreview();
-       clearPreview();
-}
-
-/**
- * Clears the preview by removing all entities in it.
- */
-void RS_PreviewActionInterface::clearPreview()
-{
-       preview->clear();
-}
-
-/**
- * Draws the preview on the screen.
- */
-void RS_PreviewActionInterface::drawPreview()
-{
-       if (!visible)
-               xorPreview();
-}
-
-/**
- * Deletes the preview from the screen.
- */
-void RS_PreviewActionInterface::deletePreview()
-{
-       if (visible)
-               xorPreview();
-}
-
-/**
- * Draws / deletes the current preview.
- */
-void RS_PreviewActionInterface::xorPreview()
-{
-#warning "!!! RS_PreviewActionInterface::xorPreview() is DEPRECATED !!!"
-//not true anymore..
-//#warning "!!! xorPreview() not working AT ALL !!!"
-#if 0
-       if (!preview->isEmpty())
-       {
-               RS_Painter * painter = graphicView->createDirectPainter();
-               painter->setPreviewMode();
-               painter->setOffset(offset);
-               graphicView->drawEntity(preview, false);
-               graphicView->destroyPainter();
-       }
-
-       visible = !visible;
-#else
-       // OK, we need a new approach here--direct painting is NOT acceptable anymore!
-       // So, something like this:
-       /*
-       In graphicView->drawEntity(preview, false); we set the pointer to an entity
-       in the GV. We set a flag telling paintEvent that this is a preview, and then
-       call update() in the view. *That* should do it...
-       */
-//This doesn't work, causes the thing to crash...
-//Now it works, just need to upgrade the rendering paths so that they aren't all
-//fucked up like QCad was...
-       if (!preview->isEmpty())
-       {
-               graphicView->SetPreviewMode();
-               graphicView->SetPreviewEntity(preview);
-               graphicView->SetPreviewOffset(offset);
-               graphicView->redraw();
-       }
-
-       visible = !visible;
-#endif
-}
diff --git a/src/base/rs_previewactioninterface.h b/src/base/rs_previewactioninterface.h
deleted file mode 100644 (file)
index a8f6780..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef RS_PREVIEWACTIONINTERFACE_H
-#define RS_PREVIEWACTIONINTERFACE_H
-
-#include "rs_actioninterface.h"
-#include "vector.h"
-
-class RS_Preview;
-
-/**
- * This is the interface that must be implemented for all
- * action classes which need a preview.
- *
- * @author Andrew Mustun
- */
-class RS_PreviewActionInterface: public RS_ActionInterface
-{
-       public:
-               RS_PreviewActionInterface(const char * name,
-                       RS_EntityContainer & container, GraphicView & graphicView);
-               virtual ~RS_PreviewActionInterface();
-
-               virtual void init(int status = 0);
-               virtual void finish();
-               virtual void suspend();
-               virtual void resume();
-               virtual void trigger();
-               void clearPreview();
-               void drawPreview();
-               void deletePreview();
-
-//     private:
-       protected:
-               void xorPreview();
-
-       protected:
-               /**
-                * Preview that holds the entities to be previewed.
-                */
-               RS_Preview * preview;
-               /**
-                * Keeps track of the drawings in XOR mode.
-                */
-               bool visible;
-               /**
-                * Current offset of the preview.
-                */
-               Vector offset;
-};
-
-#endif
index 0767b6ecd30593c5be9ae958ea68d35ea38fc8ca..bbc306cc736098748264ea3b8091b0696b7ba217 100644 (file)
@@ -20,7 +20,7 @@
 #include "graphicview.h"
 #include "rs_grid.h"
 #include "rs_information.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 #include "settings.h"
 
 /**
@@ -92,11 +92,10 @@ void RS_Snapper::SetGraphicView(GraphicView * v)
 }
 
 /**
- * @return Pointer to the entity which was the key entity for the
- * last successful snapping action. If the snap mode is "end point"
- * the key entity is the entity whos end point was caught.
- * If the snap mode didn't require an entity (e.g. free, grid) this
- * method will return NULL.
+ * @return Pointer to the entity which was the key entity for the last
+ * successful snapping action. If the snap mode is "end point" the key entity
+ * is the entity whos end point was caught. If the snap mode didn't require an
+ * entity (e.g. free, grid) this method will return NULL.
  */
 RS_Entity * RS_Snapper::getKeyEntity()
 {
index 100dcc01fce19c16a8adbc899575a72372eacef7..31600ec564001290f39ecffd5b6d88bf27da431b 100644 (file)
@@ -15,7 +15,7 @@
 #include "rs_solid.h"
 
 #include "graphicview.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Default constructor.
index 27ede786a967d97d52a51d00b4b307c15fde908d..ccb77a5539f7e13f4dce80315875436fa314114a 100644 (file)
@@ -17,7 +17,7 @@
 #include "rs_debug.h"
 #include "graphicview.h"
 #include "drawing.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 /**
  * Constructor.
index 2f95fb9f2d76cbbff6a24ed048af67f54fee89e6..9b09080211edb94a7707a97e03d1571bd24093e5 100644 (file)
@@ -15,8 +15,8 @@
 
 #include "arcoptions.h"
 
-#include "rs_actiondrawarc.h"
-#include "rs_actioninterface.h"
+#include "actiondrawarc.h"
+#include "actioninterface.h"
 #include "settings.h"
 
 ArcOptions::ArcOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -49,11 +49,11 @@ ArcOptions::~ArcOptions()
        settings.endGroup();
 }
 
-void ArcOptions::setAction(RS_ActionInterface * a, bool update)
+void ArcOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawArc)
        {
-               action = (RS_ActionDrawArc *)a;
+               action = (ActionDrawArc *)a;
 
                bool reversed;
 
index 66f2edaa2293a1f452a3c552f12d87ca6cc37cb8..d6ddd6d1acc60b6c0bb82d3f98684a870b665374 100644 (file)
@@ -4,8 +4,8 @@
 //#include "ui_arcoptions.h"
 #include <QtGui>
 
-class RS_ActionDrawArc;
-class RS_ActionInterface;
+class ActionDrawArc;
+class ActionInterface;
 
 class ArcOptions: public QWidget
 {
@@ -16,11 +16,11 @@ class ArcOptions: public QWidget
                ~ArcOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateDirection(bool);
 
        protected:
-               RS_ActionDrawArc * action;
+               ActionDrawArc * action;
                QRadioButton * rbPos;
                QRadioButton * rbNeg;
 
index afce7fa53b3c19144fae9f7b436d1a318df84587..db203a7a906c2d50a1adecdb4987e2a46cdf2732 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "arctangentialoptions.h"
 
-#include "rs_actiondrawarctangential.h"
+#include "actiondrawarctangential.h"
 #include "settings.h"
 
 ArcTangentialOptions::ArcTangentialOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -45,11 +45,11 @@ ArcTangentialOptions::~ArcTangentialOptions()
        settings.endGroup();
 }
 
-void ArcTangentialOptions::setAction(RS_ActionInterface * a, bool update)
+void ArcTangentialOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawArcTangential)
        {
-               action = (RS_ActionDrawArcTangential *)a;
+               action = (ActionDrawArcTangential *)a;
 
                QString sr;
 
index 813116fbe35605b845234c8140cfa4ce6986fcec..7fbe7e6d0cad24f459a4c6d486f4fdac1aeb0ec7 100644 (file)
@@ -4,8 +4,8 @@
 //#include "ui_arctangentialoptions.h"
 #include <QtGui>
 
-class RS_ActionDrawArcTangential;
-class RS_ActionInterface;
+class ActionDrawArcTangential;
+class ActionInterface;
 
 class ArcTangentialOptions: public QWidget
 {
@@ -16,11 +16,11 @@ class ArcTangentialOptions: public QWidget
                ~ArcTangentialOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateRadius(const QString & s);
 
        protected:
-               RS_ActionDrawArcTangential * action;
+               ActionDrawArcTangential * action;
                QLabel * lRadius;
                QLineEdit * leRadius;
                QFrame * sep1;
index 94887b43332ca38677d73dcdfe17390294a7d02e..a464f10df77062f74d16ad986ec1ee949aa57ed8 100644 (file)
@@ -15,8 +15,8 @@
 #include "beveloptions.h"
 
 #include "rs.h"
-#include "rs_actioninterface.h"
-#include "rs_actionmodifybevel.h"
+#include "actioninterface.h"
+#include "actionmodifybevel.h"
 #include "settings.h"
 
 BevelOptions::BevelOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -62,11 +62,11 @@ BevelOptions::~BevelOptions()
        settings.endGroup();
 }
 
-void BevelOptions::setAction(RS_ActionInterface * a, bool update)
+void BevelOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionModifyBevel)
        {
-               action = (RS_ActionModifyBevel *)a;
+               action = (ActionModifyBevel *)a;
 
                QString sd1;
                QString sd2;
index f98ead08f087f90e2480b122a16d39406bc91507..88b26c777d762fd4178f3f298e260222743382e6 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
-class RS_ActionModifyBevel;
+class ActionInterface;
+class ActionModifyBevel;
 
 class BevelOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class BevelOptions: public QWidget
                ~BevelOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
 
        protected:
-               RS_ActionModifyBevel * action;
+               ActionModifyBevel * action;
 
        private:
                QCheckBox * cbTrim;
index 8a09e77e6909c713db2ff0a25402287ea3e9c92e..d988c7ca3895c764d8e72fb2d2c3bb8ab778c931 100644 (file)
@@ -256,7 +256,7 @@ void CadToolBar::showToolBarSelect()
        showToolBarSelect(NULL, -1);
 }
 
-void CadToolBar::showToolBarSelect(RS_ActionInterface * selectAction, int nextAction)
+void CadToolBar::showToolBarSelect(ActionInterface * selectAction, int nextAction)
 {
        tbSelect->setNextAction(nextAction);
        tbSelect->setSelectAction(selectAction);
index eb7286920e4cf0e872edd01c7a30d5c4caa9987f..dcf03f88218eb4ec3a1fbb375e072387f6032c3d 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
+class ActionInterface;
 class QG_ActionHandler;
 class CadToolBarSplines;
 class CadToolBarInfo;
@@ -49,7 +49,7 @@ class CadToolBar: public QWidget
                void showToolBarSnap();
                void showToolBarDim();
                void showToolBarSelect();
-               void showToolBarSelect(RS_ActionInterface * selectAction, int nextAction);
+               void showToolBarSelect(ActionInterface * selectAction, int nextAction);
                QToolButton * CreateBackButton(QWidget *);
                QToolButton * CreateToolButton(QAction * action);
 
index 235d306422c9fbd0f18d1a81af60f4ea928c71a8..6a70ceca0dd94923efc10aa0f983f21f2d09a75a 100644 (file)
@@ -15,7 +15,7 @@
 #include "cadtoolbarselect.h"
 
 #include "qg_actionhandler.h"
-#include "rs_actioninterface.h"
+#include "actioninterface.h"
 #include "cadtoolbar.h"
 #include "createqtactions.h"
 
@@ -56,7 +56,7 @@ CadToolBarSelect::~CadToolBarSelect()
 }
 
 //hmm, should these three funcs be here???
-void CadToolBarSelect::setSelectAction(RS_ActionInterface * selectAction)
+void CadToolBarSelect::setSelectAction(ActionInterface * selectAction)
 {
        this->selectAction = selectAction;
 }
index 03a157dadadf8b7628ac5463f982f5296e20020b..4ba9aa155495b9feeaea9b1a9326157f764db512 100644 (file)
@@ -5,7 +5,7 @@
 
 class CadToolBar;
 class QG_ActionHandler;
-class RS_ActionInterface;
+class ActionInterface;
 
 class CadToolBarSelect: public QWidget
 {
@@ -15,7 +15,7 @@ class CadToolBarSelect: public QWidget
                CadToolBarSelect(CadToolBar * parent, Qt::WindowFlags flags = 0);
                ~CadToolBarSelect();
 
-               void setSelectAction(RS_ActionInterface * selectAction);
+               void setSelectAction(ActionInterface * selectAction);
                void setNextAction(int nextAction);
 
        public slots:
@@ -24,7 +24,7 @@ class CadToolBarSelect: public QWidget
        private:
                QToolButton * doit;
                QG_ActionHandler * actionHandler;
-               RS_ActionInterface * selectAction;
+               ActionInterface * selectAction;
                int nextAction;
 };
 
index 9a0f65e36c4065d20b3c5e33d3e7ea604b7fa3d8..ceef550a9f32c2df7b3a043be65311fbfc5c793d 100644 (file)
@@ -15,8 +15,8 @@
 #include "circleoptions.h"
 
 #include "rs.h"
-#include "rs_actioninterface.h"
-#include "rs_actiondrawcirclecr.h"
+#include "actioninterface.h"
+#include "actiondrawcirclecr.h"
 #include "settings.h"
 
 CircleOptions::CircleOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -47,11 +47,11 @@ CircleOptions::~CircleOptions()
        settings.endGroup();
 }
 
-void CircleOptions::setAction(RS_ActionInterface * a, bool update)
+void CircleOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawCircleCR)
        {
-               action = (RS_ActionDrawCircleCR *)a;
+               action = (ActionDrawCircleCR *)a;
 
                QString sr;
 
index 3af5d51a024881379a787bd304b1b18751d58222..48356d12b240205a155a444090d31217f976919b 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
-class RS_ActionDrawCircleCR;
+class ActionInterface;
+class ActionDrawCircleCR;
 
 class CircleOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class CircleOptions: public QWidget
                ~CircleOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateRadius(const QString & r);
 
        protected:
-               RS_ActionDrawCircleCR * action;
+               ActionDrawCircleCR * action;
 
        private:
                QLabel * lRadius;
index b221d11956be5ad7ef4826de2654d9296e02dddf..7263afab07bbe97890b7dd72fb243df951ded31e 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "dimlinearoptions.h"
 
-#include "rs_actiondimlinear.h"
-#include "rs_actioninterface.h"
+#include "actiondimlinear.h"
+#include "actioninterface.h"
 #include "settings.h"
 
 DimLinearOptions::DimLinearOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -56,11 +56,11 @@ DimLinearOptions::~DimLinearOptions()
        settings.endGroup();
 }
 
-void DimLinearOptions::setAction(RS_ActionInterface * a, bool update)
+void DimLinearOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDimLinear)
        {
-               action = (RS_ActionDimLinear *)a;
+               action = (ActionDimLinear *)a;
 
                QString sa;
 
index e4e74ba4273d599b7c3fb809947115d07aedb5ee..debef0002742aaf4e7d8cc4ae0e950f26cf8bb45 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDimLinear;
-class RS_ActionInterface;
+class ActionDimLinear;
+class ActionInterface;
 
 class DimLinearOptions: public QWidget
 {
@@ -15,13 +15,13 @@ class DimLinearOptions: public QWidget
                ~DimLinearOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateAngle(const QString & a);
                void setHor();
                void setVer();
 
        protected:
-               RS_ActionDimLinear * action;
+               ActionDimLinear * action;
 
        private:
                QLabel * lAngle;
index 6255912421909aa1c06f625c796b1f5ea21a2fdf..905a262da4cfe53183251e9f0801824cfd8a3d33 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "dimoptions.h"
 
-#include "rs_actiondimension.h"
-#include "rs_actioninterface.h"
+#include "actiondimension.h"
+#include "actioninterface.h"
 #include "settings.h"
 
 DimOptions::DimOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -80,11 +80,11 @@ DimOptions::~DimOptions()
        settings.endGroup();
 }
 
-void DimOptions::setAction(RS_ActionInterface * a, bool update)
+void DimOptions::setAction(ActionInterface * a, bool update)
 {
-       if (a != NULL && RS_ActionDimension::isDimensionAction(a->rtti()))
+       if (a != NULL && ActionDimension::isDimensionAction(a->rtti()))
        {
-               action = (RS_ActionDimension *)a;
+               action = (ActionDimension *)a;
 
                QString st;
                QString stol1;
index c5886932c49e248b04453f6dabff1ae5fef04411..28f61b2e4cbe851d8a677e9223d45b008a726105 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDimension;
-class RS_ActionInterface;
+class ActionDimension;
+class ActionInterface;
 
 class DimOptions: public QWidget
 {
@@ -15,12 +15,12 @@ class DimOptions: public QWidget
                ~DimOptions();
 
        public slots:
-               virtual void setAction(RS_ActionInterface * a, bool update);
+               virtual void setAction(ActionInterface * a, bool update);
                virtual void updateLabel();
                virtual void insertSign(const QString & c);
 
        protected:
-               RS_ActionDimension * action;
+               ActionDimension * action;
 
        private:
                QLabel * lLabel;
index 8577613c4272c0beb89f65d04c23ebf4f49aacb5..267837fab19ba721064bedaacfd98b3154cb9a34 100644 (file)
@@ -16,8 +16,8 @@
 
 #include "rs.h"
 #include "settings.h"
-#include "rs_actiondrawimage.h"
-#include "rs_actioninterface.h"
+#include "actiondrawimage.h"
+#include "actioninterface.h"
 
 ImageOptions::ImageOptions(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags)
@@ -33,11 +33,11 @@ ImageOptions::~ImageOptions()
        settings.endGroup();
 }
 
-void ImageOptions::setAction(RS_ActionInterface * a, bool update)
+void ImageOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawImage)
        {
-               action = (RS_ActionDrawImage *)a;
+               action = (ActionDrawImage *)a;
 
                QString sAngle;
                QString sFactor;
index 11e40ca534516b675e987e37d749662a9be322a7..08b5d9e005fc092dc68a0e69d98a2d6dbac0b1ba 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "ui_imageoptions.h"
 
-class RS_ActionDrawImage;
-class RS_ActionInterface;
+class ActionDrawImage;
+class ActionInterface;
 
 class ImageOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class ImageOptions: public QWidget
                ~ImageOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
 
        protected:
-               RS_ActionDrawImage * action;
+               ActionDrawImage * action;
 
        private:
                Ui::ImageOptions ui;
index f1f61724d941e152a74ef4a23a0cff7e4e710067..9e30e116cedad2f66363541b6bd6b46757b90573 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "insertoptions.h"
 
-#include "rs_actionblocksinsert.h"
+#include "actionblocksinsert.h"
 #include "settings.h"
 
 InsertOptions::InsertOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -78,11 +78,11 @@ InsertOptions::~InsertOptions()
        settings.endGroup();
 }
 
-void InsertOptions::setAction(RS_ActionInterface * a, bool update)
+void InsertOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionBlocksInsert)
        {
-               action = (RS_ActionBlocksInsert *)a;
+               action = (ActionBlocksInsert *)a;
 
                QString sAngle;
                QString sFactor;
index 522046abe2b17eb2dbb53a07d41000bc1f0f834e..6d80642deb677676abd7f25a6b5d24d692d93ee4 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionBlocksInsert;
-class RS_ActionInterface;
+class ActionBlocksInsert;
+class ActionInterface;
 
 class InsertOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class InsertOptions: public QWidget
                ~InsertOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
 
        protected:
-               RS_ActionBlocksInsert * action;
+               ActionBlocksInsert * action;
 
        private:
                QLabel * lAngle;
index e19a7d9e390114aad12540394ba420cc2f2729af..3be169b362d96d004c4c25fdad5073f0085f5130 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "libraryinsertoptions.h"
 
-#include "rs_actionlibraryinsert.h"
+#include "actionlibraryinsert.h"
 #include "settings.h"
 
 LibraryInsertOptions::LibraryInsertOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -52,11 +52,11 @@ LibraryInsertOptions::~LibraryInsertOptions()
        settings.endGroup();
 }
 
-void LibraryInsertOptions::setAction(RS_ActionInterface * a, bool update)
+void LibraryInsertOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionLibraryInsert)
        {
-               action = (RS_ActionLibraryInsert *)a;
+               action = (ActionLibraryInsert *)a;
 
                QString sAngle;
                QString sFactor;
index 2cbe83c06163b58932d6324f0161f7ac332caaeb..7d89685935830b733e181daca6dd5a426dfd3eaa 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
-class RS_ActionLibraryInsert;
+class ActionInterface;
+class ActionLibraryInsert;
 
 class LibraryInsertOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class LibraryInsertOptions: public QWidget
                ~LibraryInsertOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
 
        protected:
-               RS_ActionLibraryInsert * action;
+               ActionLibraryInsert * action;
 
        private:
                QLabel * lAngle;
index 77f2b78b2445e4ff81020750ba5d482b8e26d2c3..7657a5d8e0d1d9ca1cd59c1281653de607b59379 100644 (file)
@@ -17,7 +17,7 @@
 #include "drawing.h"
 #include "rs_staticgraphicview.h"
 #include "rs_system.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 
 LibraryWidget::LibraryWidget(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags), actionHandler(NULL)
@@ -70,17 +70,17 @@ void LibraryWidget::insert()
        {
                if (actionHandler != NULL)
                {
-                       RS_ActionInterface * a = actionHandler->setCurrentAction(RS2::ActionLibraryInsert);
+                       ActionInterface * a = actionHandler->setCurrentAction(RS2::ActionLibraryInsert);
 
                        if (a != NULL)
                        {
-                               RS_ActionLibraryInsert * action = (RS_ActionLibraryInsert *)a;
+                               ActionLibraryInsert * action = (ActionLibraryInsert *)a;
                                action->setFile(dxfPath);
                        }
                        else
                        {
                                RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::insert:"
-                                       "Cannot create action RS_ActionLibraryInsert");
+                                       "Cannot create action ActionLibraryInsert");
                        }
                }
        }
index 3695d9891fcee8b723826ee85a13e66ec88b0330..43775e41702fbf6a853f8f98fb9f8dc7ea7cf67c 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "lineangleoptions.h"
 
-#include "rs_actiondrawlineangle.h"
+#include "actiondrawlineangle.h"
 #include "settings.h"
 
 LineAngleOptions::LineAngleOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -68,11 +68,11 @@ LineAngleOptions::~LineAngleOptions()
        }
 }
 
-void LineAngleOptions::setAction(RS_ActionInterface * a, bool update)
+void LineAngleOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLineAngle)
        {
-               action = (RS_ActionDrawLineAngle *)a;
+               action = (ActionDrawLineAngle *)a;
 
                if (action->hasFixedAngle())
                {
index a7b0978385801db39d8ec221aad71d205c74612b..67c76dca5b6e7ffacdc9020299b904f1494d6c44 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLineAngle;
-class RS_ActionInterface;
+class ActionDrawLineAngle;
+class ActionInterface;
 
 class LineAngleOptions: public QWidget
 {
@@ -15,13 +15,13 @@ class LineAngleOptions: public QWidget
                ~LineAngleOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateAngle(const QString & a);
                void updateLength(const QString & l);
                void updateSnapPoint(int sp);
 
        protected:
-               RS_ActionDrawLineAngle * action;
+               ActionDrawLineAngle * action;
 
        private:
                QLabel * lAngle;
index ac7a8dba88dbc3d968c4d2c09536269bdf5cf2e1..515c166d7eb51a906c2a5a9eeee77649d0d0d228 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "linebisectoroptions.h"
 
-#include "rs_actiondrawlinebisector.h"
+#include "actiondrawlinebisector.h"
 #include "settings.h"
 
 LineBisectorOptions::LineBisectorOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -51,11 +51,11 @@ LineBisectorOptions::~LineBisectorOptions()
        settings.endGroup();
 }
 
-void LineBisectorOptions::setAction(RS_ActionInterface * a, bool update)
+void LineBisectorOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLineBisector)
        {
-               action = (RS_ActionDrawLineBisector *)a;
+               action = (ActionDrawLineBisector *)a;
 
                QString sl;
                QString sn;
index ad643472fc6f854b9446cc43d7655aa4068e648d..303a0edb735cfa9f43b559fff4cdd2b6626249dc 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLineBisector;
-class RS_ActionInterface;
+class ActionDrawLineBisector;
+class ActionInterface;
 
 class LineBisectorOptions: public QWidget
 {
@@ -15,12 +15,12 @@ class LineBisectorOptions: public QWidget
                ~LineBisectorOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateLength(const QString & l);
                void updateNumber(int n);
 
        protected:
-               RS_ActionDrawLineBisector * action;
+               ActionDrawLineBisector * action;
 
        private:
                QLabel * lLength;
index 0cca77d1bd2f93c3be3bc0f41d8365d8f48bb925..f4e536299efef31fc4d00a26e4eb4e80b3de1bc7 100644 (file)
@@ -15,8 +15,8 @@
 #include "lineoptions.h"
 
 #include "rs.h"
-#include "rs_actiondrawline.h"
-#include "rs_actioninterface.h"
+#include "actiondrawline.h"
+#include "actioninterface.h"
 
 LineOptions::LineOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags), action(NULL),
@@ -45,11 +45,12 @@ LineOptions::~LineOptions()
 {
 }
 
-void LineOptions::setAction(RS_ActionInterface * a)
+//void LineOptions::setAction(ActionInterface * a)
+void LineOptions::setAction(ActionInterface * a)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLine)
        {
-               action = (RS_ActionDrawLine *)a;
+               action = (ActionDrawLine *)a;
        }
        else
        {
index a1fab0c73c7be2d15cddab9e504395a9f615751e..4a2046b002969212ba4bb9696f55d453300892db 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLine;
-class RS_ActionInterface;
+class ActionDrawLine;
+class ActionInterface;
 
 class LineOptions: public QWidget
 {
@@ -15,12 +15,12 @@ class LineOptions: public QWidget
                ~LineOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a);
+               void setAction(ActionInterface * a);
                void close();
                void undo();
 
        protected:
-               RS_ActionDrawLine * action;
+               ActionDrawLine * action;
 
        private:
                QToolButton * bClose;
index f55bf966a0ea69aee70abf969e49cb7bb0831011..5879357630e81bf3acae69b670263ee5d842e541 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "lineparalleloptions.h"
 
-#include "rs_actiondrawlineparallel.h"
+#include "actiondrawlineparallel.h"
 #include "settings.h"
 
 LineParallelOptions::LineParallelOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -51,11 +51,11 @@ LineParallelOptions::~LineParallelOptions()
        settings.endGroup();
 }
 
-void LineParallelOptions::setAction(RS_ActionInterface * a, bool update)
+void LineParallelOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLineParallel)
        {
-               action = (RS_ActionDrawLineParallel *)a;
+               action = (ActionDrawLineParallel *)a;
 
                QString sd;
                QString sn;
index cac77f58cfdef51b01b3cb29ae26a13d7e6f5cdd..1b701fdffdb2825eb24984d45d562b7c9e1bb42d 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLineParallel;
-class RS_ActionInterface;
+class ActionDrawLineParallel;
+class ActionInterface;
 
 class LineParallelOptions: public QWidget
 {
@@ -15,12 +15,12 @@ class LineParallelOptions: public QWidget
                ~LineParallelOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateDist(const QString & d);
                void updateNumber(int n);
 
        protected:
-               RS_ActionDrawLineParallel * action;
+               ActionDrawLineParallel * action;
 
        private:
                QLabel * lDist;
index d5f994e6e24e11bfcf3e12464e867a9a16a94fc7..b1f66eac96c0ef390f176ff4b91d15004c4e1c87 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "lineparallelthroughoptions.h"
 
-#include "rs_actiondrawlineparallelthrough.h"
+#include "actiondrawlineparallelthrough.h"
 #include "settings.h"
 
 LineParallelThroughOptions::LineParallelThroughOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -45,11 +45,11 @@ LineParallelThroughOptions::~LineParallelThroughOptions()
        settings.endGroup();
 }
 
-void LineParallelThroughOptions::setAction(RS_ActionInterface * a, bool update)
+void LineParallelThroughOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLineParallelThrough)
        {
-               action = (RS_ActionDrawLineParallelThrough *)a;
+               action = (ActionDrawLineParallelThrough *)a;
 
                QString sn;
 
index 925cd3dae8b06ac23d033b9b9eb212cabb46d05a..506453bb49af8ab7c98d8b7b339dfb2dddcf1bb5 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLineParallelThrough;
-class RS_ActionInterface;
+class ActionDrawLineParallelThrough;
+class ActionInterface;
 
 class LineParallelThroughOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class LineParallelThroughOptions: public QWidget
                ~LineParallelThroughOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateNumber(int n);
 
        protected:
-               RS_ActionDrawLineParallelThrough * action;
+               ActionDrawLineParallelThrough * action;
 
        private:
                QLabel * lNumber;
index 1468a1cf4d3069d93901e9a3cc4fea865b2c30af..894bc08e016c1fcc8f15b47315a47d5ce770b206 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "linepolygon2options.h"
 
-#include "rs_actiondrawlinepolygon2.h"
+#include "actiondrawlinepolygon2.h"
 #include "rs_debug.h"
 #include "settings.h"
 
@@ -46,11 +46,11 @@ LinePolygon2Options::~LinePolygon2Options()
        settings.endGroup();
 }
 
-void LinePolygon2Options::setAction(RS_ActionInterface * a, bool update)
+void LinePolygon2Options::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLinePolygon2)
        {
-               action = (RS_ActionDrawLinePolygon2 *)a;
+               action = (ActionDrawLinePolygon2 *)a;
 
                QString sn;
 
index 968ced2ff5ec8691cf758ae02693515205244049..f9f4fa0b9f62194836e0fb5d96d0af266e003757 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLinePolygon2;
-class RS_ActionInterface;
+class ActionDrawLinePolygon2;
+class ActionInterface;
 
 class LinePolygon2Options: public QWidget
 {
@@ -15,11 +15,11 @@ class LinePolygon2Options: public QWidget
                ~LinePolygon2Options();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateNumber(int n);
 
        protected:
-               RS_ActionDrawLinePolygon2 * action;
+               ActionDrawLinePolygon2 * action;
 
        private:
                QLabel * lNumber;
index c0b42cd53cf5781b9ec4243cfadd9c2f34d8e2dc..1a0b695b8c76390089a9302f2994323045e11597 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "linepolygonoptions.h"
 
-#include "rs_actiondrawlinepolygon.h"
+#include "actiondrawlinepolygon.h"
 #include "rs_debug.h"
 #include "settings.h"
 
@@ -46,11 +46,11 @@ LinePolygonOptions::~LinePolygonOptions()
        settings.endGroup();
 }
 
-void LinePolygonOptions::setAction(RS_ActionInterface * a, bool update)
+void LinePolygonOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLinePolygon)
        {
-               action = (RS_ActionDrawLinePolygon *)a;
+               action = (ActionDrawLinePolygon *)a;
 
                QString sn;
 
index 8a0672b9896fd2917032a35b118fa3d12804204d..59600cdb19578c5d7e9eed71e6c6fcb453f3593a 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLinePolygon;
-class RS_ActionInterface;
+class ActionDrawLinePolygon;
+class ActionInterface;
 
 class LinePolygonOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class LinePolygonOptions: public QWidget
                ~LinePolygonOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateNumber(int n);
 
        protected:
-               RS_ActionDrawLinePolygon * action;
+               ActionDrawLinePolygon * action;
 
        private:
                QLabel * lNumber;
index dc92c13f151dc8f4a7a161d2302c5a2e294317e9..df93bb998c533b730530367e6a5deeb191bb4641 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "linerelangleoptions.h"
 
-#include "rs_actiondrawlinerelangle.h"
+#include "actiondrawlinerelangle.h"
 #include "settings.h"
 
 LineRelAngleOptions::LineRelAngleOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -58,11 +58,11 @@ LineRelAngleOptions::~LineRelAngleOptions()
        }
 }
 
-void LineRelAngleOptions::setAction(RS_ActionInterface * a, bool update)
+void LineRelAngleOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawLineRelAngle)
        {
-               action = (RS_ActionDrawLineRelAngle *)a;
+               action = (ActionDrawLineRelAngle *)a;
 
                if (action->hasFixedAngle())
                {
index 7623de69558ab2100758645bc6de62ef94134025..dfece2793b89ee7c3f80bb43f05785374806e011 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawLineRelAngle;
-class RS_ActionInterface;
+class ActionDrawLineRelAngle;
+class ActionInterface;
 
 class LineRelAngleOptions: public QWidget
 {
@@ -15,12 +15,12 @@ class LineRelAngleOptions: public QWidget
                ~LineRelAngleOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateAngle(const QString & a);
                void updateLength(const QString & l);
 
        protected:
-               RS_ActionDrawLineRelAngle * action;
+               ActionDrawLineRelAngle * action;
 
        private:
                QLabel * lAngle;
index 4a257e708f093a3a07fafc2f5a3fa6f457279043..a38d4ad9eea8a2243c5fbfdb6eec5f976c54efac 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "moverotateoptions.h"
 
-#include "rs_actionmodifymoverotate.h"
+#include "actionmodifymoverotate.h"
 #include "settings.h"
 
 MoveRotateOptions::MoveRotateOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -45,11 +45,11 @@ MoveRotateOptions::~MoveRotateOptions()
        settings.endGroup();
 }
 
-void MoveRotateOptions::setAction(RS_ActionInterface * a, bool update)
+void MoveRotateOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionModifyMoveRotate)
        {
-               action = (RS_ActionModifyMoveRotate *)a;
+               action = (ActionModifyMoveRotate *)a;
 
                QString sa;
 
index e26dfd16dbd42192aaab684e1100eaab76f2592b..82c868b7baa3437cf92fc06c688b25abd69903b7 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
-class RS_ActionModifyMoveRotate;
+class ActionInterface;
+class ActionModifyMoveRotate;
 
 class MoveRotateOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class MoveRotateOptions: public QWidget
                ~MoveRotateOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateAngle(const QString & a);
 
        protected:
-               RS_ActionModifyMoveRotate * action;
+               ActionModifyMoveRotate * action;
 
        private:
                QLabel * lAngle;
index a88bbf253dfb35a5bb9529db35c467f9ce29cfcd..42d0463889f6520146e141565490f372ec031dfd 100644 (file)
@@ -14,8 +14,8 @@
 #include "printpreviewoptions.h"
 
 #include "rs.h"
-#include "rs_actioninterface.h"
-#include "rs_actionprintpreview.h"
+#include "actioninterface.h"
+#include "actionprintpreview.h"
 #include "rs_debug.h"
 #include "rs_math.h"
 
@@ -64,11 +64,11 @@ PrintPreviewOptions::~PrintPreviewOptions()
        */
 }
 
-void PrintPreviewOptions::setAction(RS_ActionInterface * a, bool/*update*/)
+void PrintPreviewOptions::setAction(ActionInterface * a, bool/*update*/)
 {
        if (a != NULL && a->rtti() == RS2::ActionPrintPreview)
        {
-               action = (RS_ActionPrintPreview *)a;
+               action = (ActionPrintPreview *)a;
 
                updateDisabled = true;
                RS2::Unit u = action->getUnit();
index 3e9dd34a1e1444d1c0e6aa375a28c5576b8cc8f6..5ae45dd04e61052c09d5633cf48ba66a851f2525 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "ui_printpreviewoptions.h"
 
-class RS_ActionInterface;
-class RS_ActionPrintPreview;
+class ActionInterface;
+class ActionPrintPreview;
 class QToolBar;
 
 class PrintPreviewOptions: public QWidget
@@ -17,7 +17,7 @@ class PrintPreviewOptions: public QWidget
                ~PrintPreviewOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
                void center();
                void setBlackWhite(bool on);
@@ -25,7 +25,7 @@ class PrintPreviewOptions: public QWidget
                void scale(const QString & s);
 
        protected:
-               RS_ActionPrintPreview * action;
+               ActionPrintPreview * action;
 
        private:
                QStringList imperialScales;
index 8c72258ec23e9f0b3c555b54a331e393ba209c0f..7f439b40a49baec874b29ac2d468e088b5a1888c 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "roundoptions.h"
 
-#include "rs_actionmodifyround.h"
+#include "actionmodifyround.h"
 #include "settings.h"
 
 RoundOptions::RoundOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -53,11 +53,11 @@ RoundOptions::~RoundOptions()
        settings.endGroup();
 }
 
-void RoundOptions::setAction(RS_ActionInterface * a, bool update)
+void RoundOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionModifyRound)
        {
-               action = (RS_ActionModifyRound *)a;
+               action = (ActionModifyRound *)a;
 
                QString sr;
                bool st;
index f261c83d3c521dfd9a9d1c329cd2e67ee33952c9..ce4995240cf5fb6d89ac7e20035a8a06659208a3 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionInterface;
-class RS_ActionModifyRound;
+class ActionInterface;
+class ActionModifyRound;
 
 class RoundOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class RoundOptions: public QWidget
                ~RoundOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateData();
 
        protected:
-               RS_ActionModifyRound * action;
+               ActionModifyRound * action;
 
        private:
                QCheckBox * cbTrim;
index 7355ace52ba8e84d632d8c4ed337f10b98b21997..056b365cce3f7e3fcff5c79bd83ade6e9e9fa7ac 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "snapdistoptions.h"
 
-//#include "rs_actionmodifytrimamount.h"
-//#include "rs_actioninterface.h"
+//#include "actionmodifytrimamount.h"
+//#include "actioninterface.h"
 //#include "rs_debug.h"
 #include "rs_math.h"
 #include "settings.h"
index 2d1630142837a8dc4c1e0ad19245a923558f22bc..be7e220a1ac2014ebe272d93fa6c4788a91e1808 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "splineoptions.h"
 
-#include "rs_actiondrawspline.h"
-#include "rs_actioninterface.h"
+#include "actiondrawspline.h"
+#include "actioninterface.h"
 #include "settings.h"
 
 SplineOptions::SplineOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
@@ -57,11 +57,11 @@ SplineOptions::~SplineOptions()
        settings.endGroup();
 }
 
-void SplineOptions::setAction(RS_ActionInterface * a, bool update)
+void SplineOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawSpline)
        {
-               action = (RS_ActionDrawSpline *)a;
+               action = (ActionDrawSpline *)a;
 
                int degree;
                bool closed;
index 77a4a4e71ce1d30fd76aee65f8f53011d55287fa..9ab115e9623e2de3383e8cf5c71f69c1609ce4d7 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionDrawSpline;
-class RS_ActionInterface;
+class ActionDrawSpline;
+class ActionInterface;
 
 class SplineOptions: public QWidget
 {
@@ -15,13 +15,13 @@ class SplineOptions: public QWidget
                ~SplineOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void setClosed(bool c);
                void undo();
                void setDegree(const QString & deg);
 
        protected:
-               RS_ActionDrawSpline * action;
+               ActionDrawSpline * action;
 
        private:
                QLabel * lDegree;
index 2190360edc0050934904de0f35074d5ea422eee5..789eaf0ba40fb1a9eecdd56fa0b86e65ade41a03 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "textoptions.h"
 
-#include "rs_actiondrawtext.h"
-#include "rs_actioninterface.h"
+#include "actiondrawtext.h"
+#include "actioninterface.h"
 
 TextOptions::TextOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags)
@@ -32,11 +32,11 @@ TextOptions::~TextOptions()
 {
 }
 
-void TextOptions::setAction(RS_ActionInterface * a, bool update)
+void TextOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionDrawText)
        {
-               action = (RS_ActionDrawText *)a;
+               action = (ActionDrawText *)a;
 
                QString st;
                QString sa;
index c701fd56eb2b53de65d5b9b46dde4d684552b885..fd845140031f1f2710973aeb98322b0b9e7aada6 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "ui_textoptions.h"
 
-class RS_ActionInterface;
-class RS_ActionDrawText;
+class ActionInterface;
+class ActionDrawText;
 class QToolBar;
 
 class TextOptions: public QWidget
@@ -16,12 +16,12 @@ class TextOptions: public QWidget
                ~TextOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateText();
                void updateAngle();
 
        protected:
-               RS_ActionDrawText * action;
+               ActionDrawText * action;
 
        private:
                Ui::TextOptions ui;
index c48283d42226884969509d125dfc407a42a676a6..dde64764687063c00eeb9b184440aa907b739443 100644 (file)
@@ -14,8 +14,8 @@
 
 #include "trimamountoptions.h"
 
-#include "rs_actionmodifytrimamount.h"
-#include "rs_actioninterface.h"
+#include "actionmodifytrimamount.h"
+#include "actioninterface.h"
 #include "rs_debug.h"
 #include "rs_math.h"
 #include "settings.h"
@@ -48,11 +48,11 @@ TrimAmountOptions::~TrimAmountOptions()
        settings.endGroup();
 }
 
-void TrimAmountOptions::setAction(RS_ActionInterface * a, bool update)
+void TrimAmountOptions::setAction(ActionInterface * a, bool update)
 {
        if (a != NULL && a->rtti() == RS2::ActionModifyTrimAmount)
        {
-               action = (RS_ActionModifyTrimAmount *)a;
+               action = (ActionModifyTrimAmount *)a;
 
                QString sd;
 
index a118fe98fb1ee3cb93d60aad47ae32634d01523f..7ce2920e8b36c7e486b74689334b3e8c807071e5 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_ActionModifyTrimAmount;
-class RS_ActionInterface;
+class ActionModifyTrimAmount;
+class ActionInterface;
 
 class TrimAmountOptions: public QWidget
 {
@@ -15,11 +15,11 @@ class TrimAmountOptions: public QWidget
                ~TrimAmountOptions();
 
        public slots:
-               void setAction(RS_ActionInterface * a, bool update);
+               void setAction(ActionInterface * a, bool update);
                void updateDist(const QString & d);
 
        protected:
-               RS_ActionModifyTrimAmount * action;
+               ActionModifyTrimAmount * action;
 
        private:
                QLabel * lDist;
index 7e3e989225e205d2e24e87bd29563f32624f13b5..c0da383fafe889ebad0f4bd5379180246910cbb7 100644 (file)
@@ -17,9 +17,9 @@
 #include "applicationwindow.h"
 
 #include <fstream>
-#include "rs_actiondrawlinefree.h"
-#include "rs_actionlibraryinsert.h"
-#include "rs_actionprintpreview.h"
+#include "actiondrawlinefree.h"
+#include "actionlibraryinsert.h"
+#include "actionprintpreview.h"
 #include "rs_creation.h"
 #include "rs_dialogfactory.h"
 #include "rs_dimaligned.h"
@@ -30,7 +30,7 @@
 #include "rs_hatch.h"
 #include "rs_insert.h"
 #include "rs_image.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 #include "rs_script.h"
 #include "rs_scriptlist.h"
 #include "settings.h"
@@ -259,7 +259,7 @@ void ApplicationWindow::slotInsertBlock(const QString & name)
 
        if (graphicView && document)
        {
-               RS_ActionLibraryInsert * action = new RS_ActionLibraryInsert(*document, *graphicView);
+               ActionLibraryInsert * action = new ActionLibraryInsert(*document, *graphicView);
                action->setFile(name);
                graphicView->setCurrentAction(action);
        }
@@ -2595,7 +2595,7 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
                                w->setWindowIcon(QIcon(":/res/document.png"));
                                w->getGraphicView()->setPrintPreview(true);
                                w->getGraphicView()->setBackground(RS_Color(255, 255, 255));
-                               w->getGraphicView()->setDefaultAction(new RS_ActionPrintPreview(*w->getDocument(), *w->getGraphicView()));
+                               w->getGraphicView()->setDefaultAction(new ActionPrintPreview(*w->getDocument(), *w->getGraphicView()));
 
                                // only graphics offer block lists, blocks don't
                                RS_DEBUG->print("  adding listeners");
@@ -3338,8 +3338,8 @@ void ApplicationWindow::slotTestDrawFreehand()
     //Drawing* g = document->getMarking();
     /*
 
-       RS_ActionDrawLineFree* action =
-          new RS_ActionDrawLineFree(*document->getGraphic(),
+       ActionDrawLineFree* action =
+          new ActionDrawLineFree(*document->getGraphic(),
                                     *graphicView);
 
        for (int i=0; i<100; ++i) {
index abb835f375502f299c8879f9e6d477797b1844f9..a8834af3a6860645091bc9e257d2c423e8202892 100644 (file)
@@ -5,7 +5,6 @@
 
 #include "rs_document.h"
 #include "qc_dialogfactory.h"
-//#include "qc_graphicview.h"
 #include "mdiwindow.h"
 #include "qg_actionhandler.h"
 #include "qg_blockwidget.h"
@@ -30,7 +29,7 @@ class RecentFiles;
 /**
  * Main application window. Hold together document, view and controls.
  *
- * @author James L. Hammons
+ * @author James Hammons
  * @author Andrew Mustun
  */
 class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
index a79ce63273ebcee5118871a5e63ee43036e8885a..5475dfd1b6577b3bc439ccb17fc9edb8b32144ba 100644 (file)
@@ -19,7 +19,7 @@
 #include "rs_eventhandler.h"
 #include "rs_grid.h"
 #include "rs_linetypepattern.h"
-#include "paintintf.h"
+#include "paintinterface.h"
 #include "settings.h"
 #include "rs_text.h"
 #include "rs_units.h"
@@ -27,8 +27,7 @@
 /**
  * Constructor.
  */
-GraphicView::GraphicView(): background(), foreground(), previewMode(false),
-       previewOffset(Vector(0, 0))//, snapperDraw(false)
+GraphicView::GraphicView(): background(), foreground()
 {
        drawingMode = RS2::ModeFull;
        printing = false;
@@ -46,10 +45,8 @@ GraphicView::GraphicView(): background(), foreground(), previewMode(false),
        grid = new RS_Grid(this);
        updateEnabled = 0;
        zoomFrozen = false;
-       //gridVisible = true;
        draftMode = false;
        painter = NULL;
-       //drawRecursion = 0;
 
        borderLeft = 0;
        borderTop = 0;
@@ -78,8 +75,6 @@ GraphicView::GraphicView(): background(), foreground(), previewMode(false),
        simulationSmooth = false;
        simulationRapid = false;
        simulationRunning = false;
-
-       //currentInsert = NULL;
 }
 
 /**
@@ -87,10 +82,6 @@ GraphicView::GraphicView(): background(), foreground(), previewMode(false),
  */
 GraphicView::~GraphicView()
 {
-       //delete eventHandler;
-       if (painter)
-               delete painter;
-
        delete grid;
 }
 
@@ -160,17 +151,6 @@ void GraphicView::adjustZoomControls()
 {
 }
 
-#if 0
-/**
- * Sets an external painter device.
- */
-//void GraphicView::setPainter(RS_Painter * p)
-void GraphicView::setPainter(PaintInterface * p)
-{
-       painter = p;
-}
-#endif
-
 /**
  * Sets the background color. Note that applying the background
  * color for the widget is up to the implementing class.
@@ -354,7 +334,6 @@ bool GraphicView::isZoomFrozen()
 void GraphicView::setContainer(RS_EntityContainer * container)
 {
        this->container = container;
-       //adjustOffsetControls();
 }
 
 /**
@@ -380,11 +359,11 @@ void GraphicView::setFactorY(double f)
  */
 bool GraphicView::isGridOn()
 {
-       if (container != NULL)
+       if (container)
        {
                Drawing * g = container->getGraphic();
 
-               if (g != NULL)
+               if (g)
                        return g->isGridOn();
        }
 
@@ -451,7 +430,7 @@ void GraphicView::updateView()
 /**
  * @return Current action or NULL.
  */
-RS_ActionInterface * GraphicView::getDefaultAction()
+ActionInterface * GraphicView::getDefaultAction()
 {
        if (eventHandler != NULL)
                return eventHandler->getDefaultAction();
@@ -462,18 +441,18 @@ RS_ActionInterface * GraphicView::getDefaultAction()
 /**
  * Sets the default action of the event handler.
  */
-void GraphicView::setDefaultAction(RS_ActionInterface * action)
+void GraphicView::setDefaultAction(ActionInterface * action)
 {
-    if (eventHandler != NULL)
+    if (eventHandler)
         eventHandler->setDefaultAction(action);
 }
 
 /**
  * @return Current action or NULL.
  */
-RS_ActionInterface * GraphicView::getCurrentAction()
+ActionInterface * GraphicView::getCurrentAction()
 {
-       if (eventHandler != NULL)
+       if (eventHandler)
                return eventHandler->getCurrentAction();
        else
                return NULL;
@@ -482,11 +461,11 @@ RS_ActionInterface * GraphicView::getCurrentAction()
 /**
  * Sets the current action of the event handler.
  */
-void GraphicView::setCurrentAction(RS_ActionInterface * action)
+void GraphicView::setCurrentAction(ActionInterface * action)
 {
        RS_DEBUG->print("GraphicView::setCurrentAction");
 
-       if (eventHandler != NULL)
+       if (eventHandler)
                eventHandler->setCurrentAction(action);
 
        RS_DEBUG->print("GraphicView::setCurrentAction: OK");
@@ -555,7 +534,6 @@ void GraphicView::mouseReleaseEvent(QMouseEvent * e)
        if (e->button() != Qt::RightButton || eventHandler->hasAction())
        {
                eventHandler->mouseReleaseEvent(e);
-               //e->accept();
        }
        else
        {
@@ -691,14 +669,8 @@ void GraphicView::zoomIn(double f, const Vector & center)
        if (c.valid == false)
                c = toGraph(Vector(getWidth() / 2, getHeight() / 2));
 
-       zoomWindow(
-               toGraph(Vector(0, 0)).scale(c, Vector(1.0 / f, 1.0 / f)),
+       zoomWindow(toGraph(Vector(0, 0)).scale(c, Vector(1.0 / f, 1.0 / f)),
                toGraph(Vector(getWidth(), getHeight())).scale(c, Vector(1.0 / f, 1.0 / f)));
-
-       //adjustOffsetControls();
-       //adjustZoomControls();
-       //updateGrid();
-       //redraw();
 }
 
 /**
@@ -1079,8 +1051,6 @@ void GraphicView::zoomWindow(Vector v1, Vector v2, bool keepAspectRatio)
  */
 void GraphicView::zoomPan(int dx, int dy)
 {
-       //offsetX+=(int)toGuiDX(v1.x);
-       //offsetY+=(int)toGuiDY(v1.y);
        if (simulationRunning)
                return;
 
@@ -1089,7 +1059,6 @@ void GraphicView::zoomPan(int dx, int dy)
 
        disableUpdate();
        adjustOffsetControls();
-       //adjustZoomControls();
        updateGrid();
        enableUpdate();
        redraw();
@@ -1481,8 +1450,6 @@ void GraphicView::simulateIt()
        simulationRunning = true;
        simulationLast = Vector(0.0, 0.0);
 
-//jlh  destroyPainter();
-
        painter->erase();
 
        // drawing paper border:
@@ -1497,18 +1464,10 @@ void GraphicView::simulateIt()
        if (!isPrintPreview())
                drawGrid();
 
-       //if (draftMode) {
-       //painter->setPen(RS_Pen(foreground,
-       //      RS2::Width00, RS2::SolidLine));
-       //}
-
        // drawing entities:
        RS_Pen pen(foreground, RS2::Width00, RS2::SolidLine);
        simulateEntity(container, pen);
 
-       //RS_DEBUG->timestamp();
-       //RS_DEBUG->print(" draw zero..");
-
        // drawing zero points:
        if (!isPrintPreview())
        {
@@ -1516,14 +1475,6 @@ void GraphicView::simulateIt()
                drawRelativeZero();
        }
 
-       //RS_DEBUG->timestamp();
-       //RS_DEBUG->print(" draw grid..");
-
-       //RS_DEBUG->timestamp();
-       //RS_DEBUG->print("GraphicView::drawIt() end");
-       //if (painterCreated==true) {
-//jlh  destroyPainter();
-       //}
        simulationRunning = false;
 }
 
@@ -1553,9 +1504,7 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
 
                                        if (sp.distanceTo(simulationLast) > 1.0e-4)
                                        {
-//jlh                                          createDirectPainter();
                                                RS_Pen rpen(RS_Color(0, 0, 255), RS2::Width00, RS2::SolidLine);
-                                               //painter->setPen(pen);
                                                RS_Line rapidLine(NULL, RS_LineData(simulationLast, sp));
                                                simulateEntity(&rapidLine, rpen);
                                        }
@@ -1613,8 +1562,6 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
                }
                else
                {
-//jlh                  createDirectPainter();
-                       //RS_Pen pen(foreground, RS2::Width00, RS2::SolidLine);
                        painter->setPen(pen);
                        drawEntityPlain(e);
                }
@@ -1723,15 +1670,11 @@ void GraphicView::drawLineSmooth(const Vector & p1, const Vector & p2, const RS_
 
        double lx = p1.x;
        double ly = p1.y;
-       //RS_Pen pen(foreground, RS2::Width00, RS2::SolidLine);
 
        do
        {
                if (lx >= 0.0 && lx <= (double)getWidth() && ly >= 0.0 && ly <= (double)getHeight())
                {
-                       //if (painter==NULL) {
-//jlh                  createDirectPainter();
-                       //}
                        painter->setPen(pen);
                        painter->drawGridPoint(Vector(lx, ly));
 
@@ -1749,13 +1692,8 @@ void GraphicView::drawLineSmooth(const Vector & p1, const Vector & p2, const RS_
 void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1, double a2, bool rev,
        const RS_Pen & pen)
 {
-       //int icx = graphic->realToScreenX(cx);
-       //int icy = graphic->realToScreenY(cy);
-       //RS_Pen pen(foreground, RS2::Width00, RS2::SolidLine);
-
        if (radius <= 1.4)
        {
-//jlh          createDirectPainter();
                painter->setPen(pen);
                painter->drawGridPoint(center);
        }
@@ -1788,42 +1726,27 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
                        if (a1 > a2cp - 0.01)
                                a2cp += 2 * M_PI;
 
-                       //if (painter==NULL) {
-                       //painter->setPen(pen);
-                       //createDirectPainter();
-                       //}
-                       //painter->moveTo(ix1, iy1);
-
                        for(a=a1+aStep; a<=a2cp; a+=aStep)
                        {
                                k2x = RS_Math::round(center.x+cos(a)*radius);
                                k2y = RS_Math::round(center.y-sin(a)*radius);
-                               //if(graphic->isPointOnScreen(k2x, k2y) ||
-                               //   graphic->isPointOnScreen(k1x, k1y)    ) {
-//jlh                          createDirectPainter();
                                painter->setPen(pen);
+
                                if ((k2x >= 0 && k2x <= painter->getWidth()
                                        && k2y >= 0 && k2y <= painter->getHeight())
                                        || (k1x >= 0 && k1x <= painter->getWidth()
                                        && k1y >= 0 && k1y <= painter->getHeight()))
                                {
-                                       //painter->lineTo(k2x, k2y);
                                        painter->drawLine(Vector(k1x, k1y), Vector(k2x, k2y));
                                        simulationDelay();
-                                       //graphic->simulationDelay();
                                }
-                               //createDirectPainter();
-                               //painter->setPen(pen);
-                               //painter->moveTo(k2x, k2y);
 
                                k1x = k2x;
                                k1y = k2y;
                        }
 
-//jlh                  createDirectPainter();
                        painter->setPen(pen);
                        painter->drawLine(Vector(k2x, k2y), Vector(ix2, iy2));
-                       //painter->lineTo(ix2, iy2);
                }
                else
                {
@@ -1832,36 +1755,26 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
                        if (a1 < a2cp + 0.01)
                                a2cp -= 2 * M_PI;
 
-                       //createDirectPainter();
-                       //painter->setPen(pen);
-                       //painter->moveTo(ix1, iy1);
                        for(a=a1-aStep; a>=a2cp; a-=aStep)
                        {
                                k2x = RS_Math::round(center.x + cos(a) * radius);
                                k2y = RS_Math::round(center.y - sin(a) * radius);
-                               //if(graphic->isPointOnScreen(k2x, k2y) ||
-                               //        graphic->isPointOnScreen(k1x, k1y)    ) {
-//jlh                          createDirectPainter();
                                painter->setPen(pen);
+
                                if ((k2x >=0 && k2x <= painter->getWidth()
                                        && k2y >= 0 && k2y <= painter->getHeight())
                                        || (k1x >= 0 && k1x <= painter->getWidth()
                                        && k1y >= 0 && k1y <= painter->getHeight()))
                                {
-                                       //painter->lineTo(k2x, k2y);
                                        painter->drawLine(Vector(k1x, k1y), Vector(k2x, k2y));
                                        simulationDelay();
                                }
-                               //createDirectPainter();
-                               //painter->setPen(pen);
-                               //painter->moveTo(k2x, k2y);
+
                                k1x = k2x;
                                k1y = k2y;
                        }
 
-//jlh                  createDirectPainter();
                        painter->setPen(pen);
-                       //painter->lineTo(ix2, iy2);
                        painter->drawLine(Vector(k2x, k2y), Vector(ix2, iy2));
                }
        }
@@ -1970,8 +1883,6 @@ void GraphicView::drawAbsoluteZero()
 
        int zr = 20;
 
-//     RS_Pen pen(metaGridColor, RS2::Width00, RS2::SolidLine);
-//     painter->setPen(pen);
 //     RS_Pen p(Qt::red, RS2::Width00, RS2::SolidLine);
 //Using Qt::red doesn't seem to work here...
 //It's because Qt colors and RS_Color are not 100% compatible...
@@ -1994,7 +1905,6 @@ void GraphicView::drawAbsoluteZero()
  */
 void GraphicView::drawRelativeZero()
 {
-// PROBLEM: relativeZero IS NOT VALID!!!
        if (!relativeZero.valid || !painter)
 #if 1
                return;
@@ -2010,8 +1920,6 @@ void GraphicView::drawRelativeZero()
        }
 #endif
 
-//     RS_Pen p(Qt::red, RS2::Width00, RS2::SolidLine);
-//     p.setScreenWidth(0);
 //Using Qt::red doesn't seem to work here...
        RS_Pen p(RS_Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
        painter->setPen(p);
@@ -2115,7 +2023,7 @@ void GraphicView::drawGrid()
  */
 void GraphicView::drawMetaGrid()
 {
-       if (!grid || isGridOn() == false /*|| grid->getMetaSpacing()<0.0*/)
+       if (!grid || isGridOn() == false)
                return;
 
        if (!painter)
@@ -2340,15 +2248,7 @@ void GraphicView::setRelativeZero(const Vector & pos)
  */
 void GraphicView::moveRelativeZero(const Vector & pos)
 {
-//this is crap. we're taking this shit out.
-//#warning "!!! GraphicView::moveRelativeZero(): Bad render path !!!"
-//     if (!painter)
-//             return;
-
-       //painter->setXORMode();
-//     drawRelativeZero();
        setRelativeZero(pos);
-//     drawRelativeZero();
 }
 
 RS_EventHandler * GraphicView::getEventHandler()
@@ -2437,35 +2337,3 @@ bool GraphicView::getSimulationRapid()
 {
        return simulationRapid;
 }
-
-// These functions are here because of the focacta way that this
-// program set up its rendering...
-void GraphicView::SetPreviewMode(bool mode/*= true*/)
-{
-       previewMode = mode;
-}
-
-void GraphicView::SetPreviewEntity(RS_Preview * p)
-{
-       previewEntity = p;
-}
-
-void GraphicView::SetPreviewOffset(Vector o)
-{
-       previewOffset = o;
-}
-
-//Don't need this no more...
-#if 0
-void GraphicView::SetSnapperDraw(bool mode)
-{
-       snapperDraw = mode;
-}
-
-void GraphicView::SetSnapperVars(Vector snapSpot, Vector snapCoord, bool showCrosshairs)
-{
-       snapSpot1 = snapSpot;
-       snapCoord1 = snapCoord;
-       showCrosshairs1 = showCrosshairs;
-}
-#endif
index 94e5be2c50fa4f20a736bedf7e13834ee93fbf87..6e2ec159156379b4b7a8ff0afb81335eb5c98036 100644 (file)
@@ -8,18 +8,16 @@
 #include "rs_snapper.h"
 #include "vector.h"
 
+class ActionInterface;
+class RS_CommandEvent;
 class Drawing;
 class PaintInterface;
-class RS_EntityContainer;
-class RS_ActionInterface;
 class RS_Entity;
-class RS_LineTypePattern;
-class RS_CommandEvent;
-class Vector;
-class RS_Preview;
+class RS_EntityContainer;
+class RS_EventHandler;
 class RS_Grid;
+class RS_LineTypePattern;
 class RS_Pen;
-class RS_EventHandler;
 
 class GraphicView
 {
@@ -87,10 +85,10 @@ class GraphicView
                void freezeZoom(bool freeze);
                bool isZoomFrozen();
 
-               void setDefaultAction(RS_ActionInterface * action);
-               RS_ActionInterface *  getDefaultAction();
-               void setCurrentAction(RS_ActionInterface * action);
-               RS_ActionInterface * getCurrentAction();
+               void setDefaultAction(ActionInterface * action);
+               ActionInterface *  getDefaultAction();
+               void setCurrentAction(ActionInterface * action);
+               ActionInterface * getCurrentAction();
 
                void killSelectActions();
                void killAllActions();
@@ -196,14 +194,6 @@ class GraphicView
                void setSimulationRapid(bool r);
                bool getSimulationRapid();
 
-               //this is here because of crappy braindead infrastructure
-               void SetPreviewMode(bool mode = true);
-               void SetPreviewEntity(RS_Preview *);
-               void SetPreviewOffset(Vector);
-//We can remove this now...
-//             void SetSnapperDraw(bool);
-//             void SetSnapperVars(Vector snapSpot, Vector snapCoord, bool showCrosshairs);
-
        protected:
                RS_EntityContainer * container;
                RS_EventHandler * eventHandler;
@@ -287,16 +277,6 @@ class GraphicView
                RS_Snapper snapper;
                RS_Preview preview;
 
-       protected:
-               // crap to make painting with update() possible
-               RS_Preview * previewEntity;
-               bool previewMode;
-               Vector previewOffset;
-//             bool snapperDraw;
-//             Vector snapSpot1;
-//             Vector snapCoord1;
-//             bool showCrosshairs1;
-
 //QG
        protected:
                int lastWidth;
@@ -305,8 +285,6 @@ class GraphicView
                QScrollBar * hScrollBar;
                //! Vertical scrollbar.
                QScrollBar * vScrollBar;
-//             //! Layout used to fit in the view and the scrollbars.
-//             QGridLayout * layout;
                //! Label for grid spacing.
                QLabel * gridStatus;
                //! CAD mouse cursor
@@ -320,7 +298,7 @@ class GraphicView
                //! Hand mouse cursor
                QCursor * curHand;
 
-//QC
+//QC was merged with QG
 };
 
 #endif // __GRAPHICVIEW_H__
index 2ddc8eba284c1e3fb8c05b7391e62746707664d2..de23f922cdd5a9122383bc2e4e48dea21da3a8a6 100644 (file)
 
 #include "rs_commandevent.h"
 #include "commands.h"
-#include "rs_actionblocksadd.h"
-#include "rs_actionblocksattributes.h"
-#include "rs_actionblockscreate.h"
-#include "rs_actionblocksedit.h"
-#include "rs_actionblocksexplode.h"
-#include "rs_actionblocksfreezeall.h"
-#include "rs_actionblocksinsert.h"
-#include "rs_actionblocksremove.h"
-#include "rs_actionblockstoggleview.h"
-#include "rs_actiondimaligned.h"
-#include "rs_actiondimangular.h"
-#include "rs_actiondimdiametric.h"
-#include "rs_actiondimleader.h"
-#include "rs_actiondimlinear.h"
-#include "rs_actiondimradial.h"
-#include "rs_actiondrawarc.h"
-#include "rs_actiondrawarc3p.h"
-#include "rs_actiondrawarctangential.h"
-#include "rs_actiondrawcircle.h"
-#include "rs_actiondrawcircle2p.h"
-#include "rs_actiondrawcircle3p.h"
-#include "rs_actiondrawcirclecr.h"
-#include "rs_actiondrawellipseaxis.h"
-#include "rs_actiondrawhatch.h"
-#include "rs_actiondrawimage.h"
-#include "rs_actiondrawline.h"
-#include "rs_actiondrawlineangle.h"
-#include "rs_actiondrawlinebisector.h"
-#include "rs_actiondrawlinefree.h"
-#include "rs_actiondrawlinehorvert.h"
-#include "rs_actiondrawlineparallel.h"
-#include "rs_actiondrawlineparallelthrough.h"
-#include "rs_actiondrawlinepolygon.h"
-#include "rs_actiondrawlinepolygon2.h"
-#include "rs_actiondrawlinerectangle.h"
-#include "rs_actiondrawlinerelangle.h"
-#include "rs_actiondrawlinetangent1.h"
-#include "rs_actiondrawlinetangent2.h"
-#include "rs_actiondrawpoint.h"
-#include "rs_actiondrawspline.h"
-#include "rs_actiondrawtext.h"
-#include "rs_actioneditcopy.h"
-#include "rs_actioneditpaste.h"
-#include "rs_actioneditundo.h"
-#include "rs_actionfileopen.h"
-#include "rs_actionfilesaveas.h"
-#include "rs_actioninfoangle.h"
-#include "rs_actioninfoarea.h"
-#include "rs_actioninfodist.h"
-#include "rs_actioninfodist2.h"
-#include "rs_actioninfoinside.h"
-#include "rs_actioninfototallength.h"
-#include "rs_actioninterface.h"
-#include "rs_actionlayersadd.h"
-#include "rs_actionlayersedit.h"
-#include "rs_actionlayersfreezeall.h"
-#include "rs_actionlayersremove.h"
-#include "rs_actionlayerstogglelock.h"
-#include "rs_actionlayerstoggleview.h"
-#include "rs_actionlibraryinsert.h"
-#include "rs_actionlockrelativezero.h"
-#include "rs_actionmodifyattributes.h"
-#include "rs_actionmodifybevel.h"
-#include "rs_actionmodifycut.h"
-#include "rs_actionmodifydelete.h"
-#include "rs_actionmodifydeletefree.h"
-#include "rs_actionmodifydeletequick.h"
-#include "rs_actionmodifyentity.h"
-#include "rs_actionmodifyexplodetext.h"
-#include "rs_actionmodifymirror.h"
-#include "rs_actionmodifymove.h"
-#include "rs_actionmodifymoverotate.h"
-#include "rs_actionmodifyrotate.h"
-#include "rs_actionmodifyrotate2.h"
-#include "rs_actionmodifyround.h"
-#include "rs_actionmodifyscale.h"
-#include "rs_actionmodifystretch.h"
-#include "rs_actionmodifytrim.h"
-#include "rs_actionmodifytrimamount.h"
-#include "rs_actionoptionsdrawing.h"
-#include "rs_actionselect.h"
-#include "rs_actionselectall.h"
-#include "rs_actionselectcontour.h"
-#include "rs_actionselectintersected.h"
-#include "rs_actionselectinvert.h"
-#include "rs_actionselectlayer.h"
-#include "rs_actionselectsingle.h"
-#include "rs_actionselectwindow.h"
-#include "rs_actionsetrelativezero.h"
-#include "rs_actionsetsnapmode.h"
-#include "rs_actionsetsnaprestriction.h"
-#include "rs_actionsnapintersectionmanual.h"
-#include "rs_actiontoolregeneratedimensions.h"
-#include "rs_actionzoomauto.h"
-#include "rs_actionzoomin.h"
-#include "rs_actionzoompan.h"
-#include "rs_actionzoomprevious.h"
-#include "rs_actionzoomredraw.h"
-#include "rs_actionzoomwindow.h"
+#include "actionblocksadd.h"
+#include "actionblocksattributes.h"
+#include "actionblockscreate.h"
+#include "actionblocksedit.h"
+#include "actionblocksexplode.h"
+#include "actionblocksfreezeall.h"
+#include "actionblocksinsert.h"
+#include "actionblocksremove.h"
+#include "actionblockstoggleview.h"
+#include "actiondimaligned.h"
+#include "actiondimangular.h"
+#include "actiondimdiametric.h"
+#include "actiondimleader.h"
+#include "actiondimlinear.h"
+#include "actiondimradial.h"
+#include "actiondrawarc.h"
+#include "actiondrawarc3p.h"
+#include "actiondrawarctangential.h"
+#include "actiondrawcircle.h"
+#include "actiondrawcircle2p.h"
+#include "actiondrawcircle3p.h"
+#include "actiondrawcirclecr.h"
+#include "actiondrawellipseaxis.h"
+#include "actiondrawhatch.h"
+#include "actiondrawimage.h"
+#include "actiondrawline.h"
+#include "actiondrawlineangle.h"
+#include "actiondrawlinebisector.h"
+#include "actiondrawlinefree.h"
+#include "actiondrawlinehorvert.h"
+#include "actiondrawlineparallel.h"
+#include "actiondrawlineparallelthrough.h"
+#include "actiondrawlinepolygon.h"
+#include "actiondrawlinepolygon2.h"
+#include "actiondrawlinerectangle.h"
+#include "actiondrawlinerelangle.h"
+#include "actiondrawlinetangent1.h"
+#include "actiondrawlinetangent2.h"
+#include "actiondrawpoint.h"
+#include "actiondrawspline.h"
+#include "actiondrawtext.h"
+#include "actioneditcopy.h"
+#include "actioneditpaste.h"
+#include "actioneditundo.h"
+#include "actionfileopen.h"
+#include "actionfilesaveas.h"
+#include "actioninfoangle.h"
+#include "actioninfoarea.h"
+#include "actioninfodist.h"
+#include "actioninfodist2.h"
+#include "actioninfoinside.h"
+#include "actioninfototallength.h"
+#include "actioninterface.h"
+#include "actionlayersadd.h"
+#include "actionlayersedit.h"
+#include "actionlayersfreezeall.h"
+#include "actionlayersremove.h"
+#include "actionlayerstogglelock.h"
+#include "actionlayerstoggleview.h"
+#include "actionlibraryinsert.h"
+#include "actionlockrelativezero.h"
+#include "actionmodifyattributes.h"
+#include "actionmodifybevel.h"
+#include "actionmodifycut.h"
+#include "actionmodifydelete.h"
+#include "actionmodifydeletefree.h"
+#include "actionmodifydeletequick.h"
+#include "actionmodifyentity.h"
+#include "actionmodifyexplodetext.h"
+#include "actionmodifymirror.h"
+#include "actionmodifymove.h"
+#include "actionmodifymoverotate.h"
+#include "actionmodifyrotate.h"
+#include "actionmodifyrotate2.h"
+#include "actionmodifyround.h"
+#include "actionmodifyscale.h"
+#include "actionmodifystretch.h"
+#include "actionmodifytrim.h"
+#include "actionmodifytrimamount.h"
+#include "actionoptionsdrawing.h"
+#include "actionselect.h"
+#include "actionselectall.h"
+#include "actionselectcontour.h"
+#include "actionselectintersected.h"
+#include "actionselectinvert.h"
+#include "actionselectlayer.h"
+#include "actionselectsingle.h"
+#include "actionselectwindow.h"
+#include "actionsetrelativezero.h"
+#include "actionsetsnapmode.h"
+#include "actionsetsnaprestriction.h"
+#include "actionsnapintersectionmanual.h"
+#include "actiontoolregeneratedimensions.h"
+#include "actionzoomauto.h"
+#include "actionzoomin.h"
+#include "actionzoompan.h"
+#include "actionzoomprevious.h"
+#include "actionzoomredraw.h"
+#include "actionzoomwindow.h"
 
 #warning "!!! Need to add polyline functionality !!!"
-#ifdef RS_PROF
-#include "rs_actiondrawpolyline.h"
-#include "rs_actionpolylineadd.h"
-#include "rs_actionpolylineappend.h"
-#include "rs_actionpolylinedel.h"
-#include "rs_actionpolylinedelbetween.h"
-#include "rs_actionpolylinetrim.h"
+#if 0
+#include "actiondrawpolyline.h"
+#include "actionpolylineadd.h"
+#include "actionpolylineappend.h"
+#include "actionpolylinedel.h"
+#include "actionpolylinedelbetween.h"
+#include "actionpolylinetrim.h"
 #endif
 
 #ifdef RS_CAM
@@ -183,7 +183,7 @@ void QG_ActionHandler::killSelectActions()
 /**
  * @return Current action or NULL.
  */
-RS_ActionInterface * QG_ActionHandler::getCurrentAction()
+ActionInterface * QG_ActionHandler::getCurrentAction()
 {
        GraphicView * gv = mainWindow->getGraphicView();
 
@@ -195,7 +195,7 @@ RS_ActionInterface * QG_ActionHandler::getCurrentAction()
 
 #if 0
 Instead of the following giant switch statement, you could something like the following:
-RS_ActionInterface * QG_ActionHandler::setCurrentAction(RS_ActionInterface * action)
+ActionInterface * QG_ActionHandler::setCurrentAction(ActionInterface * action)
 {
        GraphicView * gv = mainWindow->getGraphicView();
        RS_Document * doc = mainWindow->getDocument();
@@ -212,7 +212,7 @@ RS_ActionInterface * QG_ActionHandler::setCurrentAction(RS_ActionInterface * act
        return action;
 }
 Then you'd call it with:
-               a = new RS_ActionEditUndo(true, *doc, *gv);
+               a = new ActionEditUndo(true, *doc, *gv);
 
 Hmmm.... We need gv & doc *before* we call this...
 
@@ -229,13 +229,13 @@ Well... The problem is the action, they're all different...
  *
  * @return Pointer to the created action or NULL.
  */
-RS_ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
+ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
 {
        RS_DEBUG->print("QG_ActionHandler::setCurrentAction()");
 
        GraphicView * gv = mainWindow->getGraphicView();
        RS_Document * doc = mainWindow->getDocument();
-       RS_ActionInterface * a = NULL;
+       ActionInterface * a = NULL;
 
        // only global options are allowed without a document:
        if (gv == NULL || doc == NULL)
@@ -248,527 +248,527 @@ RS_ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
        switch (id)
        {
                //case RS2::ActionFileNew:
-               //    a = new RS_ActionFileNew(*doc, *gv);
+               //    a = new ActionFileNew(*doc, *gv);
                //      break;
                //case RS2::ActionFileSave:
-               //    a = new RS_ActionFileSave(*doc, *gv);
+               //    a = new ActionFileSave(*doc, *gv);
                //      break;
                //case RS2::ActionFileClose:
-               //    //a = new RS_ActionFileClose(*doc, *gv);
+               //    //a = new ActionFileClose(*doc, *gv);
                //      break;
                //case RS2::ActionFileQuit:
-               //    //a = new RS_ActionFileQuit(*doc, *gv);
+               //    //a = new ActionFileQuit(*doc, *gv);
                //      break;
        case RS2::ActionFileOpen:
-               a = new RS_ActionFileOpen(*doc, *gv);
+               a = new ActionFileOpen(*doc, *gv);
                break;
        case RS2::ActionFileSaveAs:
-               a = new RS_ActionFileSaveAs(*doc, *gv);
+               a = new ActionFileSaveAs(*doc, *gv);
                break;
 
                // Editing actions:
                //
        case RS2::ActionEditUndo:
-               a = new RS_ActionEditUndo(true, *doc, *gv);
+               a = new ActionEditUndo(true, *doc, *gv);
                break;
        case RS2::ActionEditRedo:
-               a = new RS_ActionEditUndo(false, *doc, *gv);
+               a = new ActionEditUndo(false, *doc, *gv);
                break;
        case RS2::ActionEditCut:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionEditCutNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionEditCutNoSelect);
                break;
        case RS2::ActionEditCutNoSelect:
-               a = new RS_ActionEditCopy(false, *doc, *gv);
+               a = new ActionEditCopy(false, *doc, *gv);
                break;
        case RS2::ActionEditCopy:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionEditCopyNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionEditCopyNoSelect);
                break;
        case RS2::ActionEditCopyNoSelect:
-               a = new RS_ActionEditCopy(true, *doc, *gv);
+               a = new ActionEditCopy(true, *doc, *gv);
                break;
        case RS2::ActionEditPaste:
-               a = new RS_ActionEditPaste(*doc, *gv);
+               a = new ActionEditPaste(*doc, *gv);
                break;
 
                // Selecting actions:
                //
        case RS2::ActionSelectSingle:
                gv->killSelectActions();
-               a = new RS_ActionSelectSingle(*doc, *gv);
+               a = new ActionSelectSingle(*doc, *gv);
                break;
        case RS2::ActionSelectContour:
                gv->killSelectActions();
-               a = new RS_ActionSelectContour(*doc, *gv);
+               a = new ActionSelectContour(*doc, *gv);
                break;
        case RS2::ActionSelectAll:
-               a = new RS_ActionSelectAll(*doc, *gv, true);
+               a = new ActionSelectAll(*doc, *gv, true);
                break;
        case RS2::ActionDeselectAll:
-               a = new RS_ActionSelectAll(*doc, *gv, false);
+               a = new ActionSelectAll(*doc, *gv, false);
                break;
        case RS2::ActionSelectWindow:
                gv->killSelectActions();
-               a = new RS_ActionSelectWindow(*doc, *gv, true);
+               a = new ActionSelectWindow(*doc, *gv, true);
                break;
        case RS2::ActionDeselectWindow:
                gv->killSelectActions();
-               a = new RS_ActionSelectWindow(*doc, *gv, false);
+               a = new ActionSelectWindow(*doc, *gv, false);
                break;
        case RS2::ActionSelectInvert:
-               a = new RS_ActionSelectInvert(*doc, *gv);
+               a = new ActionSelectInvert(*doc, *gv);
                break;
        case RS2::ActionSelectIntersected:
                gv->killSelectActions();
-               a = new RS_ActionSelectIntersected(*doc, *gv, true);
+               a = new ActionSelectIntersected(*doc, *gv, true);
                break;
        case RS2::ActionDeselectIntersected:
                gv->killSelectActions();
-               a = new RS_ActionSelectIntersected(*doc, *gv, false);
+               a = new ActionSelectIntersected(*doc, *gv, false);
                break;
        case RS2::ActionSelectLayer:
                gv->killSelectActions();
-               a = new RS_ActionSelectLayer(*doc, *gv);
+               a = new ActionSelectLayer(*doc, *gv);
                break;
 
                // Tool actions:
                //
        case RS2::ActionToolRegenerateDimensions:
-               a = new RS_ActionToolRegenerateDimensions(*doc, *gv);
+               a = new ActionToolRegenerateDimensions(*doc, *gv);
                break;
 
                // Zooming actions:
                //
        case RS2::ActionZoomIn:
-               a = new RS_ActionZoomIn(*doc, *gv, RS2::In, RS2::Both);
+               a = new ActionZoomIn(*doc, *gv, RS2::In, RS2::Both);
                break;
        case RS2::ActionZoomOut:
-               a = new RS_ActionZoomIn(*doc, *gv, RS2::Out, RS2::Both);
+               a = new ActionZoomIn(*doc, *gv, RS2::Out, RS2::Both);
                break;
        case RS2::ActionZoomAuto:
-               a = new RS_ActionZoomAuto(*doc, *gv);
+               a = new ActionZoomAuto(*doc, *gv);
                break;
        case RS2::ActionZoomWindow:
-               a = new RS_ActionZoomWindow(*doc, *gv);
+               a = new ActionZoomWindow(*doc, *gv);
                break;
        case RS2::ActionZoomPan:
-               a = new RS_ActionZoomPan(*doc, *gv);
+               a = new ActionZoomPan(*doc, *gv);
                break;
        case RS2::ActionZoomPrevious:
-               a = new RS_ActionZoomPrevious(*doc, *gv);
+               a = new ActionZoomPrevious(*doc, *gv);
                break;
        case RS2::ActionZoomRedraw:
-               a = new RS_ActionZoomRedraw(*doc, *gv);
+               a = new ActionZoomRedraw(*doc, *gv);
                break;
 
                // Drawing actions:
                //
        case RS2::ActionDrawPoint:
-               a = new RS_ActionDrawPoint(*doc, *gv);
+               a = new ActionDrawPoint(*doc, *gv);
                break;
        case RS2::ActionDrawLine:
-               a = new RS_ActionDrawLine(*doc, *gv);
+               a = new ActionDrawLine(*doc, *gv);
                break;
        case RS2::ActionDrawLineAngle:
-               a = new RS_ActionDrawLineAngle(*doc, *gv, 0.0, false);
+               a = new ActionDrawLineAngle(*doc, *gv, 0.0, false);
                break;
        case RS2::ActionDrawLineHorizontal:
-               a = new RS_ActionDrawLineAngle(*doc, *gv, 0.0, true);
+               a = new ActionDrawLineAngle(*doc, *gv, 0.0, true);
                break;
        case RS2::ActionDrawLineHorVert:
-               a = new RS_ActionDrawLineHorVert(*doc, *gv);
+               a = new ActionDrawLineHorVert(*doc, *gv);
                break;
        case RS2::ActionDrawLineVertical:
-               a = new RS_ActionDrawLineAngle(*doc, *gv, M_PI/2.0, true);
+               a = new ActionDrawLineAngle(*doc, *gv, M_PI / 2.0, true);
                break;
        case RS2::ActionDrawLineFree:
-               a = new RS_ActionDrawLineFree(*doc, *gv);
+               a = new ActionDrawLineFree(*doc, *gv);
                break;
        case RS2::ActionDrawLineParallel:
-               a = new RS_ActionDrawLineParallel(*doc, *gv);
+               a = new ActionDrawLineParallel(*doc, *gv);
                break;
        case RS2::ActionDrawLineParallelThrough:
-               a = new RS_ActionDrawLineParallelThrough(*doc, *gv);
+               a = new ActionDrawLineParallelThrough(*doc, *gv);
                break;
        case RS2::ActionDrawLineRectangle:
-               a = new RS_ActionDrawLineRectangle(*doc, *gv);
+               a = new ActionDrawLineRectangle(*doc, *gv);
                break;
        case RS2::ActionDrawLineBisector:
-               a = new RS_ActionDrawLineBisector(*doc, *gv);
+               a = new ActionDrawLineBisector(*doc, *gv);
                break;
        case RS2::ActionDrawLineTangent1:
-               a = new RS_ActionDrawLineTangent1(*doc, *gv);
+               a = new ActionDrawLineTangent1(*doc, *gv);
                break;
        case RS2::ActionDrawLineTangent2:
-               a = new RS_ActionDrawLineTangent2(*doc, *gv);
+               a = new ActionDrawLineTangent2(*doc, *gv);
                break;
        case RS2::ActionDrawLineOrthogonal:
-               a = new RS_ActionDrawLineRelAngle(*doc, *gv, M_PI / 2.0, true);
+               a = new ActionDrawLineRelAngle(*doc, *gv, M_PI / 2.0, true);
                break;
        case RS2::ActionDrawLineRelAngle:
-               a = new RS_ActionDrawLineRelAngle(*doc, *gv, M_PI / 2.0, false);
+               a = new ActionDrawLineRelAngle(*doc, *gv, M_PI / 2.0, false);
                break;
 #warning "!!! Need to add polyline functionality !!!"
 #ifdef RS_PROF
        case RS2::ActionDrawPolyline:
-               a = new RS_ActionDrawPolyline(*doc, *gv);
+               a = new ActionDrawPolyline(*doc, *gv);
                break;
        case RS2::ActionPolylineAdd:
-               a = new RS_ActionPolylineAdd(*doc, *gv);
+               a = new ActionPolylineAdd(*doc, *gv);
                break;
        case RS2::ActionPolylineAppend:
-               a = new RS_ActionPolylineAppend(*doc, *gv);
+               a = new ActionPolylineAppend(*doc, *gv);
                break;
        case RS2::ActionPolylineDel:
-               a = new RS_ActionPolylineDel(*doc, *gv);
+               a = new ActionPolylineDel(*doc, *gv);
                break;
        case RS2::ActionPolylineDelBetween:
-               a = new RS_ActionPolylineDelBetween(*doc, *gv);
+               a = new ActionPolylineDelBetween(*doc, *gv);
                break;
        case RS2::ActionPolylineTrim:
-               a = new RS_ActionPolylineTrim(*doc, *gv);
+               a = new ActionPolylineTrim(*doc, *gv);
                break;
 #endif
        case RS2::ActionDrawLinePolygon:
-               a = new RS_ActionDrawLinePolygon(*doc, *gv);
+               a = new ActionDrawLinePolygon(*doc, *gv);
                break;
        case RS2::ActionDrawLinePolygon2:
-               a = new RS_ActionDrawLinePolygon2(*doc, *gv);
+               a = new ActionDrawLinePolygon2(*doc, *gv);
                break;
        case RS2::ActionDrawCircle:
-               a = new RS_ActionDrawCircle(*doc, *gv);
+               a = new ActionDrawCircle(*doc, *gv);
                break;
        case RS2::ActionDrawCircleCR:
-               a = new RS_ActionDrawCircleCR(*doc, *gv);
+               a = new ActionDrawCircleCR(*doc, *gv);
                break;
        case RS2::ActionDrawCircle2P:
-               a = new RS_ActionDrawCircle2P(*doc, *gv);
+               a = new ActionDrawCircle2P(*doc, *gv);
                break;
        case RS2::ActionDrawCircle3P:
-               a = new RS_ActionDrawCircle3P(*doc, *gv);
+               a = new ActionDrawCircle3P(*doc, *gv);
                break;
        case RS2::ActionDrawCircleParallel:
-               a = new RS_ActionDrawLineParallel(*doc, *gv);
+               a = new ActionDrawLineParallel(*doc, *gv);
                break;
        case RS2::ActionDrawArc:
-               a = new RS_ActionDrawArc(*doc, *gv);
+               a = new ActionDrawArc(*doc, *gv);
                break;
        case RS2::ActionDrawArc3P:
-               a = new RS_ActionDrawArc3P(*doc, *gv);
+               a = new ActionDrawArc3P(*doc, *gv);
                break;
        case RS2::ActionDrawArcParallel:
-               a = new RS_ActionDrawLineParallel(*doc, *gv);
+               a = new ActionDrawLineParallel(*doc, *gv);
                break;
        case RS2::ActionDrawArcTangential:
-               a = new RS_ActionDrawArcTangential(*doc, *gv);
+               a = new ActionDrawArcTangential(*doc, *gv);
                break;
        case RS2::ActionDrawEllipseAxis:
-               a = new RS_ActionDrawEllipseAxis(*doc, *gv, false);
+               a = new ActionDrawEllipseAxis(*doc, *gv, false);
                break;
        case RS2::ActionDrawEllipseArcAxis:
-               a = new RS_ActionDrawEllipseAxis(*doc, *gv, true);
+               a = new ActionDrawEllipseAxis(*doc, *gv, true);
                break;
        case RS2::ActionDrawSpline:
-               a = new RS_ActionDrawSpline(*doc, *gv);
+               a = new ActionDrawSpline(*doc, *gv);
                break;
        case RS2::ActionDrawText:
-               a = new RS_ActionDrawText(*doc, *gv);
+               a = new ActionDrawText(*doc, *gv);
                break;
        case RS2::ActionDrawHatch:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionDrawHatchNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionDrawHatchNoSelect);
                break;
        case RS2::ActionDrawHatchNoSelect:
-               a = new RS_ActionDrawHatch(*doc, *gv);
+               a = new ActionDrawHatch(*doc, *gv);
                break;
        case RS2::ActionDrawImage:
-               a = new RS_ActionDrawImage(*doc, *gv);
+               a = new ActionDrawImage(*doc, *gv);
                break;
 
                // Dimensioning actions:
                //
        case RS2::ActionDimAligned:
-               a = new RS_ActionDimAligned(*doc, *gv);
+               a = new ActionDimAligned(*doc, *gv);
                break;
        case RS2::ActionDimLinear:
-               a = new RS_ActionDimLinear(*doc, *gv);
+               a = new ActionDimLinear(*doc, *gv);
                break;
        case RS2::ActionDimLinearHor:
-               a = new RS_ActionDimLinear(*doc, *gv, 0.0, true);
+               a = new ActionDimLinear(*doc, *gv, 0.0, true);
                break;
        case RS2::ActionDimLinearVer:
-               a = new RS_ActionDimLinear(*doc, *gv, M_PI / 2.0, true);
+               a = new ActionDimLinear(*doc, *gv, M_PI / 2.0, true);
                break;
        case RS2::ActionDimRadial:
-               a = new RS_ActionDimRadial(*doc, *gv);
+               a = new ActionDimRadial(*doc, *gv);
                break;
        case RS2::ActionDimDiametric:
-               a = new RS_ActionDimDiametric(*doc, *gv);
+               a = new ActionDimDiametric(*doc, *gv);
                break;
        case RS2::ActionDimAngular:
-               a = new RS_ActionDimAngular(*doc, *gv);
+               a = new ActionDimAngular(*doc, *gv);
                break;
        case RS2::ActionDimLeader:
-               a = new RS_ActionDimLeader(*doc, *gv);
+               a = new ActionDimLeader(*doc, *gv);
                break;
 
                // Modifying actions:
                //
        case RS2::ActionModifyAttributes:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyAttributesNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyAttributesNoSelect);
                break;
        case RS2::ActionModifyAttributesNoSelect:
-               a = new RS_ActionModifyAttributes(*doc, *gv);
+               a = new ActionModifyAttributes(*doc, *gv);
                break;
        case RS2::ActionModifyDelete:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyDeleteNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyDeleteNoSelect);
                break;
        case RS2::ActionModifyDeleteNoSelect:
-               a = new RS_ActionModifyDelete(*doc, *gv);
+               a = new ActionModifyDelete(*doc, *gv);
                break;
        case RS2::ActionModifyDeleteQuick:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyDeleteQuick);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyDeleteQuick);
                break;
        case RS2::ActionModifyDeleteFree:
-               a = new RS_ActionModifyDeleteFree(*doc, *gv);
+               a = new ActionModifyDeleteFree(*doc, *gv);
                break;
        case RS2::ActionModifyMove:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyMoveNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyMoveNoSelect);
                break;
        case RS2::ActionModifyMoveNoSelect:
-               a = new RS_ActionModifyMove(*doc, *gv);
+               a = new ActionModifyMove(*doc, *gv);
                break;
        case RS2::ActionModifyRotate:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyRotateNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyRotateNoSelect);
                break;
        case RS2::ActionModifyRotateNoSelect:
-               a = new RS_ActionModifyRotate(*doc, *gv);
+               a = new ActionModifyRotate(*doc, *gv);
                break;
        case RS2::ActionModifyScale:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyScaleNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyScaleNoSelect);
                break;
        case RS2::ActionModifyScaleNoSelect:
-               a = new RS_ActionModifyScale(*doc, *gv);
+               a = new ActionModifyScale(*doc, *gv);
                break;
        case RS2::ActionModifyMirror:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyMirrorNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyMirrorNoSelect);
                break;
        case RS2::ActionModifyMirrorNoSelect:
-               a = new RS_ActionModifyMirror(*doc, *gv);
+               a = new ActionModifyMirror(*doc, *gv);
                break;
        case RS2::ActionModifyMoveRotate:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyMoveRotateNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyMoveRotateNoSelect);
                break;
        case RS2::ActionModifyMoveRotateNoSelect:
-               a = new RS_ActionModifyMoveRotate(*doc, *gv);
+               a = new ActionModifyMoveRotate(*doc, *gv);
                break;
        case RS2::ActionModifyRotate2:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyRotate2NoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyRotate2NoSelect);
                break;
        case RS2::ActionModifyRotate2NoSelect:
-               a = new RS_ActionModifyRotate2(*doc, *gv);
+               a = new ActionModifyRotate2(*doc, *gv);
                break;
        case RS2::ActionModifyEntity:
-               a = new RS_ActionModifyEntity(*doc, *gv);
+               a = new ActionModifyEntity(*doc, *gv);
                break;
        case RS2::ActionModifyTrim:
-               a = new RS_ActionModifyTrim(*doc, *gv, false);
+               a = new ActionModifyTrim(*doc, *gv, false);
                break;
        case RS2::ActionModifyTrim2:
-               a = new RS_ActionModifyTrim(*doc, *gv, true);
+               a = new ActionModifyTrim(*doc, *gv, true);
                break;
        case RS2::ActionModifyTrimAmount:
-               a = new RS_ActionModifyTrimAmount(*doc, *gv);
+               a = new ActionModifyTrimAmount(*doc, *gv);
                break;
        case RS2::ActionModifyCut:
-               a = new RS_ActionModifyCut(*doc, *gv);
+               a = new ActionModifyCut(*doc, *gv);
                break;
        case RS2::ActionModifyStretch:
-               a = new RS_ActionModifyStretch(*doc, *gv);
+               a = new ActionModifyStretch(*doc, *gv);
                break;
        case RS2::ActionModifyBevel:
-               a = new RS_ActionModifyBevel(*doc, *gv);
+               a = new ActionModifyBevel(*doc, *gv);
                break;
        case RS2::ActionModifyRound:
-               a = new RS_ActionModifyRound(*doc, *gv);
+               a = new ActionModifyRound(*doc, *gv);
                break;
        case RS2::ActionModifyExplodeText:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionModifyExplodeTextNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionModifyExplodeTextNoSelect);
                break;
        case RS2::ActionModifyExplodeTextNoSelect:
-               a = new RS_ActionModifyExplodeText(*doc, *gv);
+               a = new ActionModifyExplodeText(*doc, *gv);
                break;
 
                // Snapping actions:
                //
        case RS2::ActionSnapFree:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapFree);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapFree);
                break;
        case RS2::ActionSnapGrid:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapGrid);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapGrid);
                break;
        case RS2::ActionSnapEndpoint:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapEndpoint);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapEndpoint);
                break;
        case RS2::ActionSnapOnEntity:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapOnEntity);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapOnEntity);
                break;
        case RS2::ActionSnapCenter:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapCenter);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapCenter);
                break;
        case RS2::ActionSnapMiddle:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapMiddle);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapMiddle);
                break;
        case RS2::ActionSnapDist:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapDist);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapDist);
                break;
        case RS2::ActionSnapIntersection:
-               a = new RS_ActionSetSnapMode(*doc, *gv, RS2::SnapIntersection);
+               a = new ActionSetSnapMode(*doc, *gv, RS2::SnapIntersection);
                break;
        case RS2::ActionSnapIntersectionManual:
-               a = new RS_ActionSnapIntersectionManual(*doc, *gv);
+               a = new ActionSnapIntersectionManual(*doc, *gv);
                break;
 
                // Snap restriction actions:
                //
        case RS2::ActionRestrictNothing:
-               a = new RS_ActionSetSnapRestriction(*doc, *gv, RS2::RestrictNothing);
+               a = new ActionSetSnapRestriction(*doc, *gv, RS2::RestrictNothing);
                break;
        case RS2::ActionRestrictOrthogonal:
-               a = new RS_ActionSetSnapRestriction(*doc, *gv,
+               a = new ActionSetSnapRestriction(*doc, *gv,
                                                                                        RS2::RestrictOrthogonal);
                break;
        case RS2::ActionRestrictHorizontal:
-               a = new RS_ActionSetSnapRestriction(*doc, *gv,
+               a = new ActionSetSnapRestriction(*doc, *gv,
                                                                                        RS2::RestrictHorizontal);
                break;
        case RS2::ActionRestrictVertical:
-               a = new RS_ActionSetSnapRestriction(*doc, *gv,
+               a = new ActionSetSnapRestriction(*doc, *gv,
                                                                                        RS2::RestrictVertical);
                break;
 
                // Relative zero:
                //
        case RS2::ActionSetRelativeZero:
-               a = new RS_ActionSetRelativeZero(*doc, *gv);
+               a = new ActionSetRelativeZero(*doc, *gv);
                break;
        case RS2::ActionLockRelativeZero:
-               a = new RS_ActionLockRelativeZero(*doc, *gv, true);
+               a = new ActionLockRelativeZero(*doc, *gv, true);
                break;
        case RS2::ActionUnlockRelativeZero:
-               a = new RS_ActionLockRelativeZero(*doc, *gv, false);
+               a = new ActionLockRelativeZero(*doc, *gv, false);
                break;
 
                // Info actions:
                //
        case RS2::ActionInfoInside:
-               a = new RS_ActionInfoInside(*doc, *gv);
+               a = new ActionInfoInside(*doc, *gv);
                break;
        case RS2::ActionInfoDist:
-               a = new RS_ActionInfoDist(*doc, *gv);
+               a = new ActionInfoDist(*doc, *gv);
                break;
        case RS2::ActionInfoDist2:
-               a = new RS_ActionInfoDist2(*doc, *gv);
+               a = new ActionInfoDist2(*doc, *gv);
                break;
        case RS2::ActionInfoAngle:
-               a = new RS_ActionInfoAngle(*doc, *gv);
+               a = new ActionInfoAngle(*doc, *gv);
                break;
        case RS2::ActionInfoTotalLength:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionInfoTotalLengthNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionInfoTotalLengthNoSelect);
                break;
        case RS2::ActionInfoTotalLengthNoSelect:
-               a = new RS_ActionInfoTotalLength(*doc, *gv);
+               a = new ActionInfoTotalLength(*doc, *gv);
                break;
        case RS2::ActionInfoArea:
-               a = new RS_ActionInfoArea(*doc, *gv);
+               a = new ActionInfoArea(*doc, *gv);
                break;
 
                // Layer actions:
                //
        case RS2::ActionLayersDefreezeAll:
-               a = new RS_ActionLayersFreezeAll(false, *doc, *gv);
+               a = new ActionLayersFreezeAll(false, *doc, *gv);
                break;
        case RS2::ActionLayersFreezeAll:
-               a = new RS_ActionLayersFreezeAll(true, *doc, *gv);
+               a = new ActionLayersFreezeAll(true, *doc, *gv);
                break;
        case RS2::ActionLayersAdd:
-               a = new RS_ActionLayersAdd(*doc, *gv);
+               a = new ActionLayersAdd(*doc, *gv);
                break;
        case RS2::ActionLayersRemove:
-               a = new RS_ActionLayersRemove(*doc, *gv);
+               a = new ActionLayersRemove(*doc, *gv);
                break;
        case RS2::ActionLayersEdit:
-               a = new RS_ActionLayersEdit(*doc, *gv);
+               a = new ActionLayersEdit(*doc, *gv);
                break;
        case RS2::ActionLayersToggleView:
-               a = new RS_ActionLayersToggleView(*doc, *gv);
+               a = new ActionLayersToggleView(*doc, *gv);
                break;
        case RS2::ActionLayersToggleLock:
-               a = new RS_ActionLayersToggleLock(*doc, *gv);
+               a = new ActionLayersToggleLock(*doc, *gv);
                break;
 
                // Block actions:
                //
        case RS2::ActionBlocksDefreezeAll:
-               a = new RS_ActionBlocksFreezeAll(false, *doc, *gv);
+               a = new ActionBlocksFreezeAll(false, *doc, *gv);
                break;
        case RS2::ActionBlocksFreezeAll:
-               a = new RS_ActionBlocksFreezeAll(true, *doc, *gv);
+               a = new ActionBlocksFreezeAll(true, *doc, *gv);
                break;
        case RS2::ActionBlocksAdd:
-               a = new RS_ActionBlocksAdd(*doc, *gv);
+               a = new ActionBlocksAdd(*doc, *gv);
                break;
        case RS2::ActionBlocksRemove:
-               a = new RS_ActionBlocksRemove(*doc, *gv);
+               a = new ActionBlocksRemove(*doc, *gv);
                break;
        case RS2::ActionBlocksAttributes:
-               a = new RS_ActionBlocksAttributes(*doc, *gv);
+               a = new ActionBlocksAttributes(*doc, *gv);
                break;
        case RS2::ActionBlocksEdit:
-               a = new RS_ActionBlocksEdit(*doc, *gv);
+               a = new ActionBlocksEdit(*doc, *gv);
                break;
        case RS2::ActionBlocksInsert:
-               a = new RS_ActionBlocksInsert(*doc, *gv);
+               a = new ActionBlocksInsert(*doc, *gv);
                break;
        case RS2::ActionBlocksToggleView:
-               a = new RS_ActionBlocksToggleView(*doc, *gv);
+               a = new ActionBlocksToggleView(*doc, *gv);
                break;
        case RS2::ActionBlocksCreate:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionBlocksCreateNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionBlocksCreateNoSelect);
                break;
        case RS2::ActionBlocksCreateNoSelect:
-               a = new RS_ActionBlocksCreate(*doc, *gv);
+               a = new ActionBlocksCreate(*doc, *gv);
                break;
        case RS2::ActionBlocksExplode:
-               a = new RS_ActionSelect(*doc, *gv, RS2::ActionBlocksExplodeNoSelect);
+               a = new ActionSelect(*doc, *gv, RS2::ActionBlocksExplodeNoSelect);
                break;
        case RS2::ActionBlocksExplodeNoSelect:
-               a = new RS_ActionBlocksExplode(*doc, *gv);
+               a = new ActionBlocksExplode(*doc, *gv);
                break;
 
 
                // library browser:
                //
        case RS2::ActionLibraryInsert:
-               a = new RS_ActionLibraryInsert(*doc, *gv);
+               a = new ActionLibraryInsert(*doc, *gv);
                break;
 
                // options:
                //
                //case RS2::ActionOptionsGeneral:
-               //    a = new RS_ActionOptionsGeneral(*doc, *gv);
+               //    a = new ActionOptionsGeneral(*doc, *gv);
                //      break;
 
        case RS2::ActionOptionsDrawing:
-               a = new RS_ActionOptionsDrawing(*doc, *gv);
+               a = new ActionOptionsDrawing(*doc, *gv);
                break;
 
                // cam:
                //
 #ifdef RS_CAM
        case RS2::ActionCamExportAuto:
-               a = new RS_ActionCamExportAuto(*doc, *gv);
+               a = new ActionCamExportAuto(*doc, *gv);
                break;
        case RS2::ActionCamReorder:
-               a = new RS_ActionCamReorder(*doc, *gv);
+               a = new ActionCamReorder(*doc, *gv);
                break;
 #endif
 
@@ -791,7 +791,7 @@ RS_ActionInterface * QG_ActionHandler::setCurrentAction(RS2::ActionType id)
  */
 QStringList QG_ActionHandler::getAvailableCommands()
 {
-       RS_ActionInterface * currentAction = getCurrentAction();
+       ActionInterface * currentAction = getCurrentAction();
 
        if (currentAction)
                return currentAction->getAvailableCommands();
index 3126a37818cbabfb811ee9f5ca0734067613be06..ba86f020aa25900f9530f38c9082de40fab47d96 100644 (file)
@@ -6,7 +6,7 @@
 
 class QG_MainWindowInterface;
 class CadToolBarSnap;
-class RS_ActionInterface;
+class ActionInterface;
 
 /**
  * This class can trigger actions (from menus, buttons, ...).
@@ -19,8 +19,8 @@ class QG_ActionHandler: public QObject
                QG_ActionHandler(QG_MainWindowInterface * mw);
                virtual ~QG_ActionHandler();
 
-               RS_ActionInterface * getCurrentAction();
-               RS_ActionInterface * setCurrentAction(RS2::ActionType id);
+               ActionInterface * getCurrentAction();
+               ActionInterface * setCurrentAction(RS2::ActionType id);
                void killSelectActions();
 
                bool keycode(const QString & code);
index 9c857a0cac00177a1f0ff38749df33def91ee963..16ad8be4fe00f3dbefc3b8a03107720f0f2d9e0d 100644 (file)
@@ -17,8 +17,8 @@
 #include "graphicview.h"
 #include "qg_layerwidget.h"
 #include "qg_mainwindowinterface.h"
-#include "rs_actiondimlinear.h"
-#include "rs_actioninterface.h"
+#include "actiondimlinear.h"
+#include "actioninterface.h"
 #include "rs_blocklist.h"
 #include "rs_document.h"
 #include "rs_hatch.h"
@@ -707,7 +707,7 @@ QString QG_DialogFactory::requestImageOpenDialog()
        return fn;
 }
 
-void QG_DialogFactory::requestOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestOptions(ActionInterface * action, bool on, bool update)
 {
        RS_DEBUG->print("QG_DialogFactory::requestOptions");
 
@@ -796,7 +796,7 @@ void QG_DialogFactory::requestOptions(RS_ActionInterface * action, bool on, bool
     case RS2::ActionDimLinear:
         requestDimensionOptions(action, on, update);
 
-               if (((RS_ActionDimLinear *)action)->hasFixedAngle() == false)
+               if (((ActionDimLinear *)action)->hasFixedAngle() == false)
             requestDimLinearOptions(action, on, update);
 
                break;
@@ -843,7 +843,7 @@ void QG_DialogFactory::requestOptions(RS_ActionInterface * action, bool on, bool
 /**
  * Shows a widget for options for the action: "print preview"
  */
-void QG_DialogFactory::requestPrintPreviewOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestPrintPreviewOptions(ActionInterface * action, bool on, bool update)
 {
        static PrintPreviewOptions * toolWidget = NULL;
 
@@ -866,7 +866,7 @@ void QG_DialogFactory::requestPrintPreviewOptions(RS_ActionInterface * action, b
 /**
  * Shows a widget for options for the action: "draw line"
  */
-void QG_DialogFactory::requestLineOptions(RS_ActionInterface * action, bool on)
+void QG_DialogFactory::requestLineOptions(ActionInterface * action, bool on)
 {
 /*
 The way I see it, this is failure. We're constantly creating & deleting
@@ -899,7 +899,7 @@ them over and over. May need to do some more refactoring based on this idea...
 /**
  * Shows a widget for options for the action: "draw polyline"
  */
-void QG_DialogFactory::requestPolylineOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestPolylineOptions(ActionInterface * action, bool on, bool update)
 {
 #ifdef RS_PROF
        static PolylineOptions * toolWidget = NULL;
@@ -924,7 +924,7 @@ void QG_DialogFactory::requestPolylineOptions(RS_ActionInterface * action, bool
 /**
  * Shows a widget for options for the action: "draw line parallel"
  */
-void QG_DialogFactory::requestLineParallelOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLineParallelOptions(ActionInterface * action, bool on, bool update)
 {
     static LineParallelOptions * toolWidget = NULL;
 
@@ -946,7 +946,7 @@ void QG_DialogFactory::requestLineParallelOptions(RS_ActionInterface * action, b
 /**
  * Shows a widget for options for the action: "draw line parallel through"
  */
-void QG_DialogFactory::requestLineParallelThroughOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLineParallelThroughOptions(ActionInterface * action, bool on, bool update)
 {
     static LineParallelThroughOptions * toolWidget = NULL;
 
@@ -965,7 +965,7 @@ void QG_DialogFactory::requestLineParallelThroughOptions(RS_ActionInterface * ac
 /**
  * Shows a widget for options for the action: "line angle"
  */
-void QG_DialogFactory::requestLineAngleOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLineAngleOptions(ActionInterface * action, bool on, bool update)
 {
        static LineAngleOptions * toolWidget = NULL;
 
@@ -988,7 +988,7 @@ void QG_DialogFactory::requestLineAngleOptions(RS_ActionInterface * action, bool
 /**
  * Shows a widget for options for the action: "line relative angle"
  */
-void QG_DialogFactory::requestLineRelAngleOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLineRelAngleOptions(ActionInterface * action, bool on, bool update)
 {
        static LineRelAngleOptions * toolWidget = NULL;
 
@@ -1011,7 +1011,7 @@ void QG_DialogFactory::requestLineRelAngleOptions(RS_ActionInterface * action, b
 /**
  * Shows a widget for options for the action: "line angle"
  */
-void QG_DialogFactory::requestLineBisectorOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLineBisectorOptions(ActionInterface * action, bool on, bool update)
 {
     static LineBisectorOptions * toolWidget = NULL;
 
@@ -1030,7 +1030,7 @@ void QG_DialogFactory::requestLineBisectorOptions(RS_ActionInterface * action, b
 /**
  * Shows a widget for options for the action: "draw polygon"
  */
-void QG_DialogFactory::requestLinePolygonOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLinePolygonOptions(ActionInterface * action, bool on, bool update)
 {
     static LinePolygonOptions * toolWidget = NULL;
 
@@ -1049,7 +1049,7 @@ void QG_DialogFactory::requestLinePolygonOptions(RS_ActionInterface * action, bo
 /**
  * Shows a widget for options for the action: "draw polygon2"
  */
-void QG_DialogFactory::requestLinePolygon2Options(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLinePolygon2Options(ActionInterface * action, bool on, bool update)
 {
     static LinePolygon2Options * toolWidget = NULL;
 
@@ -1068,7 +1068,7 @@ void QG_DialogFactory::requestLinePolygon2Options(RS_ActionInterface * action, b
 /**
  * Shows a widget for arc options.
  */
-void QG_DialogFactory::requestArcOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestArcOptions(ActionInterface * action, bool on, bool update)
 {
        static ArcOptions * toolWidget = NULL;
 
@@ -1092,7 +1092,7 @@ void QG_DialogFactory::requestArcOptions(RS_ActionInterface * action, bool on, b
 /**
  * Shows a widget for tangential arc options.
  */
-void QG_DialogFactory::requestArcTangentialOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestArcTangentialOptions(ActionInterface * action, bool on, bool update)
 {
        static ArcTangentialOptions * toolWidget = NULL;
 
@@ -1116,7 +1116,7 @@ void QG_DialogFactory::requestArcTangentialOptions(RS_ActionInterface * action,
 /**
  * Shows a widget for circle options.
  */
-void QG_DialogFactory::requestCircleOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestCircleOptions(ActionInterface * action, bool on, bool update)
 {
     static CircleOptions * toolWidget = NULL;
 
@@ -1139,26 +1139,30 @@ void QG_DialogFactory::requestCircleOptions(RS_ActionInterface * action, bool on
 /**
  * Shows a widget for spline options.
  */
-void QG_DialogFactory::requestSplineOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestSplineOptions(ActionInterface * action, bool on, bool update)
 {
        static SplineOptions * toolWidget = NULL;
 
-       if (optionWidget!=NULL) {
-               if (toolWidget!=NULL) {
-                       delete toolWidget;
-                       toolWidget = NULL;
-               }
-               if (on==true && toolWidget==NULL) {
-                       toolWidget = new SplineOptions(optionWidget);
-                       toolWidget->setAction(action, update);
-               }
+       if (!optionWidget)
+               return;
+
+       if (toolWidget)
+       {
+               delete toolWidget;
+               toolWidget = NULL;
+       }
+
+       if (on)
+       {
+               toolWidget = new SplineOptions(optionWidget);
+               toolWidget->setAction(action, update);
        }
 }
 
 /**
  * Shows a widget for text options.
  */
-void QG_DialogFactory::requestTextOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestTextOptions(ActionInterface * action, bool on, bool update)
 {
        static TextOptions * toolWidget = NULL;
 
@@ -1181,7 +1185,7 @@ void QG_DialogFactory::requestTextOptions(RS_ActionInterface * action, bool on,
 /**
  * Shows a widget for insert options.
  */
-void QG_DialogFactory::requestInsertOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestInsertOptions(ActionInterface * action, bool on, bool update)
 {
     static InsertOptions * toolWidget = NULL;
 
@@ -1200,7 +1204,7 @@ void QG_DialogFactory::requestInsertOptions(RS_ActionInterface * action, bool on
 /**
  * Shows a widget for image options.
  */
-void QG_DialogFactory::requestImageOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestImageOptions(ActionInterface * action, bool on, bool update)
 {
     static ImageOptions * toolWidget = NULL;
 
@@ -1219,7 +1223,7 @@ void QG_DialogFactory::requestImageOptions(RS_ActionInterface * action, bool on,
 /**
  * Shows a widget for dimension options.
  */
-void QG_DialogFactory::requestDimensionOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestDimensionOptions(ActionInterface * action, bool on, bool update)
 {
     static DimOptions * toolWidget = NULL;
 
@@ -1238,7 +1242,7 @@ void QG_DialogFactory::requestDimensionOptions(RS_ActionInterface * action, bool
 /**
  * Shows a widget for linear dimension options.
  */
-void QG_DialogFactory::requestDimLinearOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestDimLinearOptions(ActionInterface * action, bool on, bool update)
 {
        static DimLinearOptions * toolWidget = NULL;
 
@@ -1284,7 +1288,7 @@ void QG_DialogFactory::requestSnapDistOptions(double & dist, bool on)
 /**
  * Shows a widget for 'snap to a point with a given distance' options.
  */
-void QG_DialogFactory::requestMoveRotateOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestMoveRotateOptions(ActionInterface * action, bool on, bool update)
 {
        static MoveRotateOptions * toolWidget = NULL;
 
@@ -1307,7 +1311,7 @@ void QG_DialogFactory::requestMoveRotateOptions(RS_ActionInterface * action, boo
 /**
  * Shows a widget for 'trim amount' options.
  */
-void QG_DialogFactory::requestTrimAmountOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestTrimAmountOptions(ActionInterface * action, bool on, bool update)
 {
        static TrimAmountOptions * toolWidget = NULL;
 
@@ -1330,7 +1334,7 @@ void QG_DialogFactory::requestTrimAmountOptions(RS_ActionInterface * action, boo
 /**
  * Shows a widget for beveling options.
  */
-void QG_DialogFactory::requestBevelOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestBevelOptions(ActionInterface * action, bool on, bool update)
 {
     static BevelOptions * toolWidget = NULL;
 
@@ -1353,7 +1357,7 @@ void QG_DialogFactory::requestBevelOptions(RS_ActionInterface * action, bool on,
 /**
  * Shows a widget for rounding options.
  */
-void QG_DialogFactory::requestRoundOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestRoundOptions(ActionInterface * action, bool on, bool update)
 {
        static RoundOptions * toolWidget = NULL;
 
@@ -1376,7 +1380,7 @@ void QG_DialogFactory::requestRoundOptions(RS_ActionInterface * action, bool on,
 /**
  * Shows a widget for library insert options.
  */
-void QG_DialogFactory::requestLibraryInsertOptions(RS_ActionInterface * action, bool on, bool update)
+void QG_DialogFactory::requestLibraryInsertOptions(ActionInterface * action, bool on, bool update)
 {
        static LibraryInsertOptions * toolWidget = NULL;
 
@@ -1408,7 +1412,7 @@ void QG_DialogFactory::requestToolBar(RS2::ToolBarId id)
 /**
  * Shows the select toolbar with the given action to launch.
  */
-void QG_DialogFactory::requestToolBarSelect(RS_ActionInterface * selectAction,
+void QG_DialogFactory::requestToolBarSelect(ActionInterface * selectAction,
         RS2::ActionType nextAction)
 {
        if (cadToolBar != NULL)
@@ -1836,10 +1840,10 @@ void QG_DialogFactory::updateCoordinateWidget(const Vector & abs,
  */
 void QG_DialogFactory::updateMouseWidget(const QString & left, const QString & right)
 {
-       if (mouseWidget != NULL)
+       if (mouseWidget)
                mouseWidget->setHelp(left, right);
 
-       if (commandWidget != NULL)
+       if (commandWidget)
                commandWidget->setCommand(left);
 }
 
index 8696e997811fbe64b53836fbfec1a381cd478c2a..c2d08c64d20092be9594ead5c50192201e81bdfe 100644 (file)
@@ -6,6 +6,7 @@
 #include "vector.h"
 #include "rs_debug.h"
 
+class ActionInterface;
 class CadToolBar;
 class CommandWidget;
 class CoordinateWidget;
@@ -15,7 +16,7 @@ class QG_MainWindowInterface;
 class MouseWidget;
 class SelectionWidget;
 
-#define QG_DIALOGFACTORY (RS_DialogFactory::instance()->getFactoryObject()->isAdapter()==false ? ((QG_DialogFactory*)RS_DialogFactory::instance()->getFactoryObject()) : NULL)
+#define QG_DIALOGFACTORY (RS_DialogFactory::instance()->getFactoryObject()->isAdapter() == false ? ((QG_DialogFactory *)RS_DialogFactory::instance()->getFactoryObject()) : NULL)
 
 // !A_WIDGET
 /**
@@ -59,40 +60,40 @@ class QG_DialogFactory: public RS_DialogFactoryInterface
                //virtual QString requestFileOpenDialog();
 
                virtual QString requestImageOpenDialog();
-               virtual void requestOptions(RS_ActionInterface * action, bool on, bool update = false);
+               virtual void requestOptions(ActionInterface * action, bool on, bool update = false);
 
        protected:
-               virtual void requestPrintPreviewOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineOptions(RS_ActionInterface * action, bool on);
-               virtual void requestPolylineOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineAngleOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineRelAngleOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineParallelOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineParallelThroughOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLineBisectorOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLinePolygonOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLinePolygon2Options(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestArcOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestArcTangentialOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestCircleOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestSplineOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestTextOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestDimensionOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestDimLinearOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestInsertOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestImageOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestTrimAmountOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestMoveRotateOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestBevelOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestRoundOptions(RS_ActionInterface * action, bool on, bool update);
-               virtual void requestLibraryInsertOptions(RS_ActionInterface * action, bool on, bool update);
+               virtual void requestPrintPreviewOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineOptions(ActionInterface * action, bool on);
+               virtual void requestPolylineOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineAngleOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineRelAngleOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineParallelOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineParallelThroughOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLineBisectorOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLinePolygonOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLinePolygon2Options(ActionInterface * action, bool on, bool update);
+               virtual void requestArcOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestArcTangentialOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestCircleOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestSplineOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestTextOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestDimensionOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestDimLinearOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestInsertOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestImageOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestTrimAmountOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestMoveRotateOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestBevelOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestRoundOptions(ActionInterface * action, bool on, bool update);
+               virtual void requestLibraryInsertOptions(ActionInterface * action, bool on, bool update);
 
        public:
                virtual void requestSnapDistOptions(double& dist, bool on);
 
        public:
                virtual void requestToolBar(RS2::ToolBarId id);
-               virtual void requestToolBarSelect(RS_ActionInterface * selectAction, RS2::ActionType nextAction);
+               virtual void requestToolBarSelect(ActionInterface * selectAction, RS2::ActionType nextAction);
 
                virtual bool requestAttributesDialog(RS_AttributesData & data, RS_LayerList & layerList);
                virtual bool requestMoveDialog(RS_MoveData & data);
index 3c825c780fae70271f1b72ada736d0f31619bac1..9e68c5df957d12cf19b0cf2b31b4960bbbd5204b 100644 (file)
 
 #include "qg_graphicview.h"
 
-#include "rs_actiondefault.h"
-#include "rs_actionzoomin.h"
-#include "rs_actionzoompan.h"
-#include "rs_actionzoomscroll.h"
-#include "rs_actionmodifydelete.h"
-#include "rs_actionselectsingle.h"
+#include "qg_dialogfactory.h"
+#include "actiondefault.h"
+#include "actionzoomin.h"
+#include "actionzoompan.h"
+#include "actionzoomscroll.h"
+#include "actionmodifydelete.h"
+#include "actionselectsingle.h"
+#include "cadtoolbar.h"
 #include "rs_dialogfactory.h"
+#include "drawing.h"
 #include "graphicview.h"
+#include "rs_patternlist.h"
+#include "paintinterface.h"
 #include "rs_preview.h"
-#include "drawing.h"
 #include "settings.h"
 #include "rs_system.h"
-#include "rs_patternlist.h"
-#include "cadtoolbar.h"
-#include "paintintf.h"
-#include "qg_dialogfactory.h"
 
 #define QG_SCROLLMARGIN 400
 
@@ -65,7 +65,7 @@ QG_GraphicView::QG_GraphicView(RS_Document * doc, QWidget * parent)
        setBorders(10, 10, 10, 10);
 
        if (doc)
-               setDefaultAction(new RS_ActionDefault(*doc, *this));
+               setDefaultAction(new ActionDefault(*doc, *this));
 }
 
 void QG_GraphicView::CommonInitialization(void)
@@ -402,7 +402,7 @@ void QG_GraphicView::mousePressEvent(QMouseEvent * e)
 {
        // pan zoom with middle mouse button
        if (e->button() == Qt::MidButton /*|| (e->state()==Qt::LeftButton|Qt::AltButton)*/)
-               setCurrentAction(new RS_ActionZoomPan(*container, *this));
+               setCurrentAction(new ActionZoomPan(*container, *this));
 
        GraphicView::mousePressEvent(e);
        QWidget::mousePressEvent(e);
@@ -428,20 +428,8 @@ void QG_GraphicView::mouseReleaseEvent(QMouseEvent * e)
 
 void QG_GraphicView::mouseMoveEvent(QMouseEvent * e)
 {
-       //RS_DEBUG->print("QG_GraphicView::mouseMoveEvent begin");
-       //QMouseEvent rsm = QG_Qt2Rs::mouseEvent(e);
-
        GraphicView::mouseMoveEvent(e);
        QWidget::mouseMoveEvent(e);
-
-//What kind of cacamamie crap is this???
-//#ifdef Q_OS_WIN32
-//     // make sure that we can still use hotkeys and the mouse wheel
-//     if (parent() != NULL)
-//             ((QWidget *)parent())->setFocus();
-//#endif
-
-       //RS_DEBUG->print("QG_GraphicView::mouseMoveEvent end");
 }
 
 /**
@@ -459,7 +447,7 @@ void QG_GraphicView::tabletEvent(QTabletEvent * e)
                        {
                                if (container != NULL)
                                {
-                                       RS_ActionSelectSingle * a = new RS_ActionSelectSingle(*container, *this);
+                                       ActionSelectSingle * a = new ActionSelectSingle(*container, *this);
                                        setCurrentAction(a);
 #warning "!!! !!!"
 //                                     QMouseEvent ev(QEvent::MouseButtonRelease, e->pos(), Qt::LeftButton, Qt::LeftButton);
@@ -467,7 +455,7 @@ void QG_GraphicView::tabletEvent(QTabletEvent * e)
                                        a->finish();
 
                                        if (container->countSelected() > 0)
-                                               setCurrentAction(new RS_ActionModifyDelete(*container, *this));
+                                               setCurrentAction(new ActionModifyDelete(*container, *this));
                                }
                        }
                        break;
@@ -588,15 +576,15 @@ void QG_GraphicView::wheelEvent(QWheelEvent * e)
        }
 
        if (scroll)
-               setCurrentAction(new RS_ActionZoomScroll(direction, *container, *this));
+               setCurrentAction(new ActionZoomScroll(direction, *container, *this));
        // zoom in / out:
 //     else if (e->state() == 0)
        else if (keyState == 0)
        {
                if (e->delta() > 0)
-                       setCurrentAction(new RS_ActionZoomIn(*container, *this, RS2::In, RS2::Both, mouse));
+                       setCurrentAction(new ActionZoomIn(*container, *this, RS2::In, RS2::Both, mouse));
                else
-                       setCurrentAction(new RS_ActionZoomIn(*container, *this, RS2::Out, RS2::Both, mouse));
+                       setCurrentAction(new ActionZoomIn(*container, *this, RS2::Out, RS2::Both, mouse));
        }
 
        e->accept();
@@ -634,7 +622,7 @@ void QG_GraphicView::keyPressEvent(QKeyEvent * e)
        }
 
        if (scroll)
-               setCurrentAction(new RS_ActionZoomScroll(direction, *container, *this));
+               setCurrentAction(new ActionZoomScroll(direction, *container, *this));
 
        GraphicView::keyPressEvent(e);
 }
@@ -839,6 +827,7 @@ of VectorWorks & etc. as well...
                snapper.Draw(this, painter);
 
        if (preview.Visible())
+#if 0
        {
                painter->setPen(RS_Pen(RS_Color(60, 255, 80), RS2::Width00, RS2::SolidLine));
                painter->setOffset(preview.Offset());
@@ -853,6 +842,9 @@ of VectorWorks & etc. as well...
 
                painter->setOffset(Vector(0, 0));
        }
+#else
+               preview.Draw(this, painter);
+#endif
 
        delete painter;
        painter = NULL;