Skip to content

Commit

Permalink
Merge pull request #36 from WandererFan/IconsToTango
Browse files Browse the repository at this point in the history
A2plus Icons to tango
  • Loading branch information
kbwbe authored Aug 6, 2018
2 parents 53c1594 + c9d364a commit d1b2732
Show file tree
Hide file tree
Showing 42 changed files with 4,845 additions and 4,120 deletions.
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# file types to ignore

*.pyc
*.obj
*.lib
*.pch
*.vcproj
*.exp
*.dep
*.manifest
qrc_*.cpp
BuildLog.htm
cmake_install.cmake
*~
CMakeFiles/
*qrc.depends
ui_*.h
moc_*.cpp
Makefile
CMakeCache.txt
config.h
install_manifest.txt
/bin/
/ALL_BUILD.dir/
/doc/
/lib/
/Mod/
/ZERO_CHECK.dir/
/build/
/src/Tools/offlinedoc/localwiki/
/src/Tools/offlinedoc/*.txt
OpenSCAD_rc.py
.subuser-dev
/\.idea/
.tags
tags
58 changes: 48 additions & 10 deletions InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,76 @@ def Initialize(self):
import a2p_solversystem
import a2p_MuxAssembly

commandslist = [
partCommands = [
'a2p_ImportPart',
'a2p_updateImportedParts',
'a2p_movePart',
'a2p_duplicatePart',
'a2p_editImportedPart',
]
constraintCommands = [
'a2p_PointIdentityConnectionCommand',
'a2p_PointOnLineConstraintCommand',
'a2p_PointOnPlaneConstraintCommand',
'a2p_CircularEdgeConnection',
'a2p_AxialConnection',
'a2p_PlanesParallelConnectionCommand',
'a2p_PlaneConnection',
'a2p_AxialConnection',
'a2p_AngledPlanesCommand',
'a2p_SphericalConnection',
'a2p_SolverCommand',
'a2p_DeleteConnectionsCommand',
]
solverCommands = [
'a2p_SolverCommand',
'a2p_ToggleAutoSolveCommand',
'a2p_TogglePartialProcessingCommand',
]
viewCommands = [
'a2p_ViewConnectionsCommand',
'a2p_SimpleAssemblyShapeCommand',
'a2p_ToggleTransparencyCommand',
'a2p_isolateCommand',
'a2p_ToggleAutoSolveCommand',
'a2p_TogglePartialProcessingCommand',
'a2p_repairTreeViewCommand'
]
menuEntries = [
miscCommands = [
'a2p_SimpleAssemblyShapeCommand',
'a2p_repairTreeViewCommand'
]

self.appendToolbar(
'A2p',
commandslist
'A2p_Part',
partCommands
)
self.appendToolbar(
'A2p_Constraint',
constraintCommands
)
self.appendToolbar(
'A2p_Solver',
solverCommands
)
self.appendToolbar(
'A2p_View',
viewCommands
)
self.appendToolbar(
'A2p_Misc',
miscCommands
)

commandslist = list()
commandslist.extend(partCommands)
commandslist.extend(constraintCommands)
commandslist.extend(solverCommands)
commandslist.extend(viewCommands)
commandslist.extend(miscCommands)

self.appendMenu(
'A2p',
commandslist
)

menuEntries = [
'a2p_repairTreeViewCommand'
]
self.appendMenu(
'A2p',
menuEntries
Expand Down
4 changes: 2 additions & 2 deletions a2p_AxialConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_axialConstraint.svg',
path_a2p + '/icons/a2p_AxialConstraint.svg',
True,
cParms[1][2],
cParms[0][2]
Expand Down Expand Up @@ -130,7 +130,7 @@ def Activated(self):
)
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_axialConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_AxialConstraint.svg',
'MenuText': 'Add axial constraint',
'ToolTip': toolTipText
}
Expand Down
4 changes: 2 additions & 2 deletions a2p_CircularEdgeConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def parseSelection(selection, objectToUpdate=None, callSolveConstraints=True, lo
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_circularEdgeConstraint.svg',
path_a2p + '/icons/a2p_CircularEdgeConstraint.svg',
True,
cParms[1][2],
cParms[0][2]
Expand Down Expand Up @@ -141,7 +141,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_circularEdgeConstraint.svg' ,
'Pixmap' : path_a2p + '/icons/a2p_CircularEdgeConstraint.svg' ,
'MenuText': 'Add circular edge connection',
'ToolTip': toolTipText
}
Expand Down
4 changes: 2 additions & 2 deletions a2p_MuxAssembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __setstate__(self, state):
return None

def getIcon(self):
return a2plib.path_a2p + '/icons/simpleAssemblyShape.svg'
return a2plib.path_a2p + '/icons/SimpleAssemblyShape.svg'

def attach(self, obj):
self.object_Name = obj.Object.Name
Expand Down Expand Up @@ -172,7 +172,7 @@ class a2p_SimpleAssemblyShapeCommand():

def GetResources(self):
import a2plib
return {'Pixmap' : a2plib.path_a2p +'/icons/a2p_simpleAssemblyShape.svg',
return {'Pixmap' : a2plib.path_a2p +'/icons/a2p_SimpleAssemblyShape.svg',
'MenuText': "create or refresh simple Shape of complete Assembly",
'ToolTip': "create or refresh simple Shape of complete Assembly"
}
Expand Down
4 changes: 2 additions & 2 deletions a2p_angleConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p +'/icons/a2p_angleConstraint.svg',
path_a2p +'/icons/a2p_AngleConstraint.svg',
True,
cParms[1][2],
cParms[0][2]
Expand Down Expand Up @@ -157,7 +157,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_angleConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_AngleConstraint.svg',
'MenuText': 'angle between planes constraint',
'ToolTip': toolTipText,
}
Expand Down
14 changes: 7 additions & 7 deletions a2p_importpart.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : a2plib.path_a2p + '/icons/a2p_importPart_update.svg',
'Pixmap' : a2plib.path_a2p + '/icons/a2p_ImportPart_Update.svg',
'MenuText': 'Update parts imported into the assembly',
'ToolTip': 'Update parts imported into the assembly'
}
Expand Down Expand Up @@ -466,8 +466,8 @@ def Activated(self):

def GetResources(self):
return {
#'Pixmap' : ':/assembly2/icons/Draft_Move.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_Draft_Move.svg',
#'Pixmap' : ':/assembly2/icons/MovePart.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_MovePart.svg',
'MenuText': 'move',
'ToolTip': 'move part ( shift+click to copy )'
}
Expand Down Expand Up @@ -498,7 +498,7 @@ def Activated(self):
a2plib.removeConstraint(c)
def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_deleteConnections.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_DeleteConnections.svg',
'MenuText': 'delete constraints',
}
FreeCADGui.addCommand('a2p_DeleteConnectionsCommand', DeleteConnectionsCommand())
Expand Down Expand Up @@ -530,7 +530,7 @@ def IsActive(self):

def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_viewConnection.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ViewConnection.svg',
'MenuText': 'show connected elements',
'ToolTip': 'show connected elements',
}
Expand Down Expand Up @@ -588,7 +588,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_isolate.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_Isolate_Element.svg',
'MenuText': 'show only selected elements, or all if none is selected',
'ToolTip': 'show only selected elements, or all if none is selected'
}
Expand All @@ -611,7 +611,7 @@ def IsChecked(self):

def GetResources(self):
return {
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_glasses.svg',
'Pixmap' : a2plib.pathOfModule()+'/icons/a2p_ToggleTranparency.svg',
'MenuText': 'toggle transparency of assembly',
'ToolTip': 'toggle transparency of assembly',
'Checkable': self.IsChecked()
Expand Down
4 changes: 2 additions & 2 deletions a2p_planeConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_planeConstraint.svg',
path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
True, cParms[1][2],
cParms[0][2],
extraText
Expand Down Expand Up @@ -137,7 +137,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_planeConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
'MenuText': 'Add plane constraint',
'ToolTip': toolTipText
}
Expand Down
4 changes: 2 additions & 2 deletions a2p_planesParallelConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_planesParallelConstraint.svg',
path_a2p + '/icons/a2p_PlanesParallelConstraint.svg',
True, cParms[1][2],
cParms[0][2],
extraText
Expand Down Expand Up @@ -140,7 +140,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_planesParallelConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_PlanesParallelConstraint.svg',
'MenuText': 'Add planesParallel constraint',
'ToolTip': toolTipText
}
Expand Down
6 changes: 3 additions & 3 deletions a2p_pointIdentityConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_pointIdentity.svg',
path_a2p + '/icons/a2p_PointIdentity.svg',
True,
cParms[1][2],
cParms[0][2]
Expand Down Expand Up @@ -117,12 +117,12 @@ def Activated(self):
parseSelection,
taskDialog_title ='add point Identity constraint',
#taskDialog_iconPath = self.GetResources()['Pixmap'],
taskDialog_iconPath = path_a2p + '/icons/a2p_pointIdentity.svg',
taskDialog_iconPath = path_a2p + '/icons/a2p_PointIdentity.svg',
taskDialog_text = selection_text
)
def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_pointIdentity.svg',
'Pixmap' : path_a2p + '/icons/a2p_PointIdentity.svg',
'MenuText': 'Add PointIdentity Constraint',
'ToolTip': toolTipText
}
Expand Down
6 changes: 3 additions & 3 deletions a2p_pointOnLineConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_pointOnLineConstraint.svg',
path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
True,
cParms[1][2],
cParms[0][2],
Expand Down Expand Up @@ -124,13 +124,13 @@ def Activated(self):
PointOnLineSelectionGate(),
parseSelection,
taskDialog_title ='add PointOnLine constraint',
taskDialog_iconPath = path_a2p + '/icons/a2p_pointOnLineConstraint.svg',
taskDialog_iconPath = path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
taskDialog_text = selection_text,
secondSelectionGate = PointOnLineSelectionGate2() )

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_pointOnLineConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_PointOnLineConstraint.svg',
'MenuText': 'Add PointOnPlane constraint',
'ToolTip': toolTipText
}
Expand Down
6 changes: 3 additions & 3 deletions a2p_pointOnPlaneConstraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_pointOnPlaneConstraint.svg',
path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
True,
cParms[1][2],
cParms[0][2],
Expand Down Expand Up @@ -125,13 +125,13 @@ def Activated(self):
PointOnPlaneSelectionGate(),
parseSelection,
taskDialog_title ='add pointOnPlane constraint',
taskDialog_iconPath = path_a2p + '/icons/a2p_pointOnPlaneConstraint.svg',
taskDialog_iconPath = path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
taskDialog_text = selection_text,
secondSelectionGate = PointOnPlaneSelectionGate2() )

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_pointOnPlaneConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_PointOnPlaneConstraint.svg',
'MenuText': 'Add PointOnPlane constraint',
'ToolTip': toolTipText
}
Expand Down
4 changes: 2 additions & 2 deletions a2p_sphericalConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def parseSelection(selection, objectToUpdate=None):
c.Proxy = ConstraintObjectProxy()
c.ViewObject.Proxy = ConstraintViewProviderProxy(
c,
path_a2p + '/icons/a2p_sphericalSurfaceConstraint.svg',
path_a2p + '/icons/a2p_SphericalSurfaceConstraint.svg',
True, cParms[1][2],
cParms[0][2]
)
Expand Down Expand Up @@ -133,7 +133,7 @@ def Activated(self):

def GetResources(self):
return {
'Pixmap' : path_a2p + '/icons/a2p_sphericalSurfaceConstraint.svg',
'Pixmap' : path_a2p + '/icons/a2p_SphericalSurfaceConstraint.svg',
'MenuText': 'Add a spherical constraint',
'ToolTip': toolTipText
}
Expand Down
Loading

0 comments on commit d1b2732

Please sign in to comment.