diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt
index 848159391..3330391c2 100644
--- a/src/Mod/Path/CMakeLists.txt
+++ b/src/Mod/Path/CMakeLists.txt
@@ -58,6 +58,7 @@ SET(PathScripts_SRCS
PathScripts/PathSimpleCopy.py
PathScripts/PathEngrave.py
PathScripts/PathSurface.py
+ PathScripts/PathRemote.py
)
diff --git a/src/Mod/Path/Gui/CMakeLists.txt b/src/Mod/Path/Gui/CMakeLists.txt
index 6a39864e1..a20a450df 100644
--- a/src/Mod/Path/Gui/CMakeLists.txt
+++ b/src/Mod/Path/Gui/CMakeLists.txt
@@ -87,7 +87,6 @@ SET(PathGui_SRCS
add_library(PathGui SHARED ${PathGui_SRCS})
target_link_libraries(PathGui ${PathGui_LIBS})
-
fc_target_copy_resource(PathGui
${CMAKE_SOURCE_DIR}/src/Mod/Path
${CMAKE_BINARY_DIR}/Mod/Path
diff --git a/src/Mod/Path/Gui/Resources/Path.qrc b/src/Mod/Path/Gui/Resources/Path.qrc
index 9da94a228..1b996e964 100644
--- a/src/Mod/Path/Gui/Resources/Path.qrc
+++ b/src/Mod/Path/Gui/Resources/Path.qrc
@@ -1,5 +1,5 @@
-
+
icons/preferences-path.svg
icons/Path-Toolpath.svg
icons/Path-Compound.svg
@@ -59,6 +59,11 @@
translations/Path_sk.qm
translations/Path_tr.qm
translations/Path_sl.qm
- ../EngraveEdit.ui
+ panels/EngraveEdit.ui
+ panels/DrillingEdit.ui
+ panels/PocketEdit.ui
+ panels/ProfileEdit.ui
+ panels/SurfaceEdit.ui
+ panels/RemoteEdit.ui
-
+
diff --git a/src/Mod/Path/Gui/Resources/icons/Path-Hamburger.svg b/src/Mod/Path/Gui/Resources/icons/Path-Hamburger.svg
new file mode 100644
index 000000000..02fa7803a
--- /dev/null
+++ b/src/Mod/Path/Gui/Resources/icons/Path-Hamburger.svg
@@ -0,0 +1,486 @@
+
+
+
+
diff --git a/src/Mod/Path/Gui/DrillingEdit.ui b/src/Mod/Path/Gui/Resources/panels/DrillingEdit.ui
similarity index 100%
rename from src/Mod/Path/Gui/DrillingEdit.ui
rename to src/Mod/Path/Gui/Resources/panels/DrillingEdit.ui
diff --git a/src/Mod/Path/Gui/EngraveEdit.ui b/src/Mod/Path/Gui/Resources/panels/EngraveEdit.ui
similarity index 100%
rename from src/Mod/Path/Gui/EngraveEdit.ui
rename to src/Mod/Path/Gui/Resources/panels/EngraveEdit.ui
diff --git a/src/Mod/Path/Gui/PocketEdit.ui b/src/Mod/Path/Gui/Resources/panels/PocketEdit.ui
similarity index 100%
rename from src/Mod/Path/Gui/PocketEdit.ui
rename to src/Mod/Path/Gui/Resources/panels/PocketEdit.ui
diff --git a/src/Mod/Path/Gui/ProfileEdit.ui b/src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui
similarity index 100%
rename from src/Mod/Path/Gui/ProfileEdit.ui
rename to src/Mod/Path/Gui/Resources/panels/ProfileEdit.ui
diff --git a/src/Mod/Path/Gui/Resources/panels/RemoteEdit.ui b/src/Mod/Path/Gui/Resources/panels/RemoteEdit.ui
new file mode 100644
index 000000000..fada69b9c
--- /dev/null
+++ b/src/Mod/Path/Gui/Resources/panels/RemoteEdit.ui
@@ -0,0 +1,303 @@
+
+
+ TaskPanel
+
+
+
+ 0
+ 0
+ 352
+ 525
+
+
+
+
+ 0
+ 400
+
+
+
+ Remote
+
+
+ -
+
+
+ 0
+
+
+
+ true
+
+
+
+ 0
+ 0
+ 334
+ 387
+
+
+
+
+ :/icons/FreeCAD-default/scalable/accessories-calculator.svg:/icons/FreeCAD-default/scalable/accessories-calculator.svg
+
+
+ Base Geometry
+
+
+
-
+
+
+ Drag to reorder, then update.
+
+
+ QAbstractItemView::DragDrop
+
+
+ Qt::MoveAction
+
+
+ false
+
+
+
+ -
+
+
+ Add item selected in window.
+
+
+ add
+
+
+
+ -
+
+
+ Remove Item selected in list, then update.
+
+
+ Remove
+
+
+
+ -
+
+
+ Update the path with the removed and reordered items.
+
+
+ Update
+
+
+
+ -
+
+
+ All objects will be processed using the same operation properties.
+
+
+ Qt::AutoText
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 334
+ 387
+
+
+
+
+ :/icons/FreeCAD-default/scalable/Part_Measure_Clear_All.svg:/icons/FreeCAD-default/scalable/Part_Measure_Clear_All.svg
+
+
+ Depths
+
+
+ -
+
+
+ mm
+
+
+
+ -
+
+
+ Start Depth
+
+
+
+ -
+
+
+ mm
+
+
+
+ -
+
+
+ Final Depth
+
+
+
+ -
+
+
+ mm
+
+
+
+ -
+
+
+ Finish Depth
+
+
+
+ -
+
+
+ 3
+
+
+ 0.100000000000000
+
+
+ 1.000000000000000
+
+
+
+ -
+
+
+ Step Down
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 334
+ 387
+
+
+
+
+ :/icons/FreeCAD-default/scalable/document-open.svg:/icons/FreeCAD-default/scalable/document-open.svg
+
+
+ Heights
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+ -
+
+
+ mm
+
+
+
+ -
+
+
+ Safe Height
+
+
+
+ -
+
+
+ mm
+
+
+
+ -
+
+
+ Clearance Height
+
+
+
+
+
+
+
+
+ 0
+ 0
+ 334
+ 387
+
+
+
+
+ :/icons/Path-Hamburger.svg:/icons/Path-Hamburger.svg
+
+
+ Operation
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+ -
+
+
+
-
+
+
+ Remote Server URL
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+
+
+
+
+
+
+
+
+
+
+
+ Gui::InputField
+ QLineEdit
+
+
+
+
+
+
+
+
+
diff --git a/src/Mod/Path/Gui/SurfaceEdit.ui b/src/Mod/Path/Gui/Resources/panels/SurfaceEdit.ui
similarity index 99%
rename from src/Mod/Path/Gui/SurfaceEdit.ui
rename to src/Mod/Path/Gui/Resources/panels/SurfaceEdit.ui
index bbdaf94ed..bb45b8931 100644
--- a/src/Mod/Path/Gui/SurfaceEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/SurfaceEdit.ui
@@ -247,7 +247,7 @@
-
+
:/icons/Path-Hamburger.svg:/icons/Path-Hamburger.svg
diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py
index a9fc7edcc..c9c036f1f 100644
--- a/src/Mod/Path/PathScripts/PathDrilling.py
+++ b/src/Mod/Path/PathScripts/PathDrilling.py
@@ -224,8 +224,8 @@ class CommandPathDrilling:
class TaskPanel:
def __init__(self):
- self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/DrillingEdit.ui")
- #self.form = FreeCADGui.PySideUic.loadUi(":/DrillingEdit.ui")
+ #self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/DrillingEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/DrillingEdit.ui")
def accept(self):
self.getFields()
diff --git a/src/Mod/Path/PathScripts/PathEngrave.py b/src/Mod/Path/PathScripts/PathEngrave.py
index b74ec914f..6d3cef493 100644
--- a/src/Mod/Path/PathScripts/PathEngrave.py
+++ b/src/Mod/Path/PathScripts/PathEngrave.py
@@ -243,7 +243,7 @@ class CommandPathEngrave:
class TaskPanel:
def __init__(self):
#self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/EngraveEdit.ui")
- self.form = FreeCADGui.PySideUic.loadUi(":/EngraveEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/EngraveEdit.ui")
def accept(self):
self.getFields()
diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py
index 94814d88b..9a977d306 100644
--- a/src/Mod/Path/PathScripts/PathPocket.py
+++ b/src/Mod/Path/PathScripts/PathPocket.py
@@ -712,8 +712,8 @@ class CommandPathPocket:
class TaskPanel:
def __init__(self):
- self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/PocketEdit.ui")
- #self.form = FreeCADGui.PySideUic.loadUi(":/PocketEdit.ui")
+ #self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/PocketEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/PocketEdit.ui")
self.updating = False
diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py
index 42327dce3..a47a90909 100644
--- a/src/Mod/Path/PathScripts/PathProfile.py
+++ b/src/Mod/Path/PathScripts/PathProfile.py
@@ -448,8 +448,8 @@ class CommandPathProfile:
class TaskPanel:
def __init__(self):
- self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/ProfileEdit.ui")
- #self.form = FreeCADGui.PySideUic.loadUi(":/ProfileEdit.ui")
+ #self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/ProfileEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/ProfileEdit.ui")
self.updating = False
diff --git a/src/Mod/Path/PathScripts/PathRemote.py b/src/Mod/Path/PathScripts/PathRemote.py
index 03f27aed9..9583663d3 100644
--- a/src/Mod/Path/PathScripts/PathRemote.py
+++ b/src/Mod/Path/PathScripts/PathRemote.py
@@ -123,6 +123,14 @@ class ObjectRemote:
response = urllib2.urlopen(url)
except:
print "service not defined or not responding"
+ print "len: " + str(len(obj.proplist))
+ if len(obj.proplist) != 0:
+ for prop in obj.proplist:
+ print "removing: " + str(prop)
+ obj.removeProperty(prop)
+ pl = obj.proplist
+ pl = []
+ obj.proplist = pl
return
data = json.load(response)
@@ -298,8 +306,8 @@ class CommandPathRemote:
class TaskPanel:
def __init__(self):
- self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/RemoteEdit.ui")
- #self.form = FreeCADGui.PySideUic.loadUi(":/RemoteEdit.ui")
+ #self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/RemoteEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/RemoteEdit.ui")
def accept(self):
self.getFields()
@@ -317,6 +325,16 @@ class TaskPanel:
def getRemoteFields(self):
self.getFields()
self.obj.URL = self.form.remoteURL.text()
+ print "getRemote:320"
+
+ #self.form.label_a = QtGui.QLabel(self.form.remoteProperties)
+ #self.form.label_a.setObjectName("label_a")
+ #self.form.formLayoutREMOTE.setWidget(0, QtGui.QFormLayout.LabelRole, self.form.label_a)
+ #self.form.sampleLE = QtGui.QLineEdit(self.form.remoteProperties)
+ #self.form.sampleLE.setObjectName("sampleLE")
+ #self.form.formLayoutREMOTE.setWidget(0, QtGui.QFormLayout.FieldRole, self.form.sampleLE)
+ ##self.formLayout_2.setWidget(1, QtGui.QFormLayout.SpanningRole, self.remoteProperties)
+
def getFields(self):
if self.obj:
@@ -390,6 +408,19 @@ class TaskPanel:
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Ok)
+ def changeURL(self):
+ from urlparse import urlparse
+ t = self.form.remoteURL.text()
+ if t == '' and self.obj.URL != '': #if the url was deleted, cleanup.
+ self.obj.URL = ''
+
+ if urlparse(t).scheme != '' and t != self.obj.URL: #validate new url.
+ self.obj.URL = t
+ #next make sure the property fields reflect the current attached service
+ for p in self.obj.proplist:
+ print p
+
+
def setupUi(self):
self.form.startDepth.setText(str(self.obj.StartDepth))
self.form.finalDepth.setText(str(self.obj.FinalDepth))
@@ -405,13 +436,14 @@ class TaskPanel:
self.form.finalDepth.editingFinished.connect(self.getFields)
self.form.safeHeight.editingFinished.connect(self.getFields)
self.form.clearanceHeight.editingFinished.connect(self.getFields)
- self.form.remoteURL.editingFinished.connect(self.getRemoteFields)
self.form.addBase.clicked.connect(self.addBase)
+ self.form.baseList.itemSelectionChanged.connect(self.itemActivated)
self.form.deleteBase.clicked.connect(self.deleteBase)
self.form.reorderBase.clicked.connect(self.reorderBase)
- self.form.baseList.itemSelectionChanged.connect(self.itemActivated)
+ self.form.remoteURL.editingFinished.connect(self.changeURL)
+ #self.form.remoteURL.returnPressed.connect(self.testOne)
class SelObserver:
def __init__(self):
diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py
index a84070b27..f7d2b4463 100644
--- a/src/Mod/Path/PathScripts/PathSurface.py
+++ b/src/Mod/Path/PathScripts/PathSurface.py
@@ -399,8 +399,8 @@ class CommandPathSurfacing:
class TaskPanel:
def __init__(self):
- self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/SurfaceEdit.ui")
- #self.form = FreeCADGui.PySideUic.loadUi(":/SurfaceEdit.ui")
+ #self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/SurfaceEdit.ui")
+ self.form = FreeCADGui.PySideUic.loadUi(":/panels/SurfaceEdit.ui")
def accept(self):
self.getFields()