chore: archive QuickNav and ZTools into reference folder (#345)
All checks were successful
Build and Test / build (pull_request) Successful in 32m17s
All checks were successful
Build and Test / build (pull_request) Successful in 32m17s
Copy QuickNav and ZTools source trees into reference/ for developer reference during the UI/UX rework. These are plain directories (not submodules) and are not included in the build. - reference/quicknav/ — QuickNav addon source - reference/ztools/ — ZTools addon source Part of the UI/UX rework preparation. See #346.
This commit is contained in:
37
reference/quicknav/InitGui.py
Normal file
37
reference/quicknav/InitGui.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
|
||||
|
||||
class QuickNavWorkbench(Gui.Workbench):
|
||||
"""Invisible workbench that installs QuickNav on load.
|
||||
|
||||
QuickNav does not replace the active workbench -- it layers on top.
|
||||
Loading QuickNav installs the event filter and nav bar, then
|
||||
immediately re-activates the previously active workbench.
|
||||
"""
|
||||
|
||||
MenuText = "QuickNav"
|
||||
ToolTip = "Keyboard-driven command navigation"
|
||||
|
||||
def Initialize(self):
|
||||
from quicknav.core import QuickNavManager
|
||||
|
||||
QuickNavManager.instance().install()
|
||||
App.Console.PrintMessage("QuickNav workbench initialized\n")
|
||||
|
||||
def Activated(self):
|
||||
from quicknav.core import QuickNavManager
|
||||
|
||||
QuickNavManager.instance().handle_workbench_activated()
|
||||
|
||||
def Deactivated(self):
|
||||
pass
|
||||
|
||||
def GetClassName(self):
|
||||
return "Gui::PythonWorkbench"
|
||||
|
||||
|
||||
Gui.addWorkbench(QuickNavWorkbench())
|
||||
|
||||
# Eager command registration
|
||||
from quicknav.commands import QuickNav_Toggle # noqa: F401
|
||||
Reference in New Issue
Block a user