diff --git a/src/Mod/Path/Gui/Resources/panels/ToolBitLibraryEdit.ui b/src/Mod/Path/Gui/Resources/panels/ToolBitLibraryEdit.ui
index b5cfdae83c..616fe0393a 100644
--- a/src/Mod/Path/Gui/Resources/panels/ToolBitLibraryEdit.ui
+++ b/src/Mod/Path/Gui/Resources/panels/ToolBitLibraryEdit.ui
@@ -15,105 +15,61 @@
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- <html><head/><body><p>Create a new library with an empty list of Tool Bits.</p></body></html>
-
-
- ...
-
-
-
- :/icons/document-new.svg:/icons/document-new.svg
-
-
-
- -
-
-
- <html><head/><body><p>Open an existing Tool Bit library.</p></body></html>
-
-
- ...
-
-
-
- :/icons/document-open.svg:/icons/document-open.svg
-
-
-
- -
-
-
- <html><head/><body><p>Save Tool Bit library.</p></body></html>
-
-
- ...
-
-
-
- :/icons/document-save.svg:/icons/document-save.svg
-
-
-
- -
-
-
- <html><head/><body><p>Save Tool Bit library under new name.</p></body></html>
-
-
- ...
-
-
-
- :/icons/document-save-as.svg:/icons/document-save-as.svg
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- <html><head/><body><p>Edit Tool Bit library editor settings.</p></body></html>
-
-
- ...
-
-
-
- :/icons/preferences-system.svg:/icons/preferences-system.svg
-
-
-
-
-
+
+ -
+
+
+ Create Toolbit
+
+
+
+ :/icons/document-new.svg:/icons/document-new.svg
+
+
+
+ -
+
+
+ <html><head/><body><p>Add another Tool Bit to this library.</p><p><br/></p></body></html>
+
+
+ Add Existing ...
+
+
+
+ :/icons/list-add.svg:/icons/list-add.svg
+
+
+
+ -
+
+
+ <html><head/><body><p>Delete selected Tool Bit(s) from the library.</p><p><br/></p></body></html>
+
+
+ Remove Selected
+
+
+
+ :/icons/list-remove.svg:/icons/list-remove.svg
+
+
+
+ -
+
+
+ <html><head/><body><p>Assigne numbers to each Tool Bit according to its current position in the library. The first Tool Bit is assigned the ID 1.</p></body></html>
+
+
+ Enumerate
+
+
+
+ :/icons/button_sort.svg:/icons/button_sort.svg
+
+
+
+
-
@@ -167,57 +123,6 @@
0
-
-
-
-
- <html><head/><body><p>Add another Tool Bit to this library.</p><p><br/></p></body></html>
-
-
- Add ...
-
-
-
- :/icons/list-add.svg:/icons/list-add.svg
-
-
-
- -
-
-
- <html><head/><body><p>Delete selected Tool Bit(s) from the library.</p><p><br/></p></body></html>
-
-
- Delete
-
-
-
- :/icons/list-remove.svg:/icons/list-remove.svg
-
-
-
- -
-
-
- <html><head/><body><p>Assigned numbers to each Tool Bit according to its current position in the library. The first Tool Bit is assigned the ID 1.</p></body></html>
-
-
- Enumerate
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 115
-
-
-
-
@@ -225,52 +130,81 @@
-
-
-
- Qt::Horizontal
+
+
+ Add Selected as Tool Controllers in the Job
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+ :/icons/edit-undo.svg:/icons/edit-undo.svg
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Open
+
+
+
+ :/icons/document-open.svg:/icons/document-open.svg
+
+
+
+ -
+
+
+ Cancel
+
+
+
+ :/icons/button_invalid.svg:/icons/button_invalid.svg
+
+
+
+ -
+
+
+ Save
+
+
+
+ :/icons/document-save.svg:/icons/document-save.svg
+
+
+
+ -
+
+
+ Save As...
+
+
+
+ :/icons/document-save-as.svg:/icons/document-save-as.svg
+
+
+
+
+
-
-
- buttonBox
- accepted()
- Dialog
- accept()
-
-
- 248
- 254
-
-
- 157
- 274
-
-
-
-
- buttonBox
- rejected()
- Dialog
- reject()
-
-
- 316
- 260
-
-
- 286
- 274
-
-
-
-
+
diff --git a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py
index 17b12638a2..de837062f7 100644
--- a/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py
+++ b/src/Mod/Path/PathScripts/PathToolBitLibraryGui.py
@@ -28,6 +28,7 @@ import PathScripts.PathLog as PathLog
import PathScripts.PathPreferences as PathPreferences
import PathScripts.PathToolBit as PathToolBit
import PathScripts.PathToolBitGui as PathToolBitGui
+import PathScripts.PathToolBitEdit as PathToolBitEdit
import PySide
import json
import os
@@ -255,6 +256,21 @@ class ToolBitLibrary(object):
def libraryNew(self):
self.libraryLoad(None)
+ def createToolBit(self):
+ tool = PathToolBit.ToolBitFactory().Create()
+
+ self.dialog = PySide.QtGui.QDialog(self.form)
+ layout = PySide.QtGui.QVBoxLayout(self.dialog)
+ self.editor = PathToolBitEdit.ToolBitEditor(tool, self.dialog)
+ self.editor.setupUI()
+ self.buttons = PySide.QtGui.QDialogButtonBox(
+ PySide.QtGui.QDialogButtonBox.Ok | PySide.QtGui.QDialogButtonBox.Cancel,
+ PySide.QtCore.Qt.Horizontal, self.dialog)
+ layout.addWidget(self.buttons)
+ #self.buttons.accepted.connect(accept)
+ #self.buttons.rejected.connect(reject)
+ print(self.dialog.exec_())
+
def librarySave(self):
library = {}
tools = []
@@ -295,11 +311,13 @@ class ToolBitLibrary(object):
self.form.toolAdd.clicked.connect(self.toolAdd)
self.form.toolDelete.clicked.connect(self.toolDelete)
self.form.toolEnumerate.clicked.connect(self.toolEnumerate)
+ self.form.createToolBit.clicked.connect(self.createToolBit)
- self.form.libraryNew.clicked.connect(self.libraryNew)
+ #self.form.libraryNew.clicked.connect(self.libraryNew)
self.form.libraryOpen.clicked.connect(self.libraryOpen)
self.form.librarySave.clicked.connect(self.librarySave)
self.form.librarySaveAs.clicked.connect(self.librarySaveAs)
+ #self.form.libraryCancel.clicked.connect(self.cancel)
self.toolSelect([], [])
self.updateToolbar()