From b6d1dfeef3bf457d75f7e3aa27e5694db73aa351 Mon Sep 17 00:00:00 2001 From: mosfet80 Date: Sat, 21 Dec 2024 09:32:07 +0100 Subject: [PATCH] Delete obsoleted/freecad.cross directory Files are not needed --- obsoleted/freecad.cross/task_panel_link.py | 78 -------------------- obsoleted/freecad.cross/task_panel_robot.py | 80 --------------------- 2 files changed, 158 deletions(-) delete mode 100644 obsoleted/freecad.cross/task_panel_link.py delete mode 100644 obsoleted/freecad.cross/task_panel_robot.py diff --git a/obsoleted/freecad.cross/task_panel_link.py b/obsoleted/freecad.cross/task_panel_link.py deleted file mode 100644 index 4e95d45..0000000 --- a/obsoleted/freecad.cross/task_panel_link.py +++ /dev/null @@ -1,78 +0,0 @@ -import FreeCAD as fc - -import FreeCADGui as fcgui - -from PySide import QtCore # FreeCAD's PySide! -from PySide import QtGui # FreeCAD's PySide! - -from .utils import UI_PATH - -class TaskPanelLink: - """Dialog for the Task Panel to define a link.""" - def __init__(self, link: 'cross.link.Link'): - self.link = link - # The UI must be in self.form. - self.form = fcgui.PySideUic.loadUi(str(UI_PATH.joinpath('task_panel_link.ui'))) - - def accept(self): - gui_doc = fcgui.getDocument(self.link.Document) - gui_doc.resetEdit() - # #self.link.Assembly = self.assembly - # - fc.getDocument(self.link.Document.Name).recompute() - return True - - def reject(self): - self.form.close() - fcgui.Selection.removeObserver(self) - gui_doc = fcgui.getDocument(self.link.Document) - gui_doc.resetEdit() - return True - # - # def clicked(self, index): - # pass - # - # def open(self): - # pass - # - # def needsFullSpace(self): - # return False - # - # def isAllowedAlterSelection(self): - # return True - # - # def isAllowedAlterView(self): - # return False - # - # def isAllowedAlterDocument(self): - # return True - # - def getStandardButtons(self): - return int(QtGui.QDialogButtonBox.Cancel) - # - # def helpRequested(self): - # pass - - # def setupUi(self): - # mw = self.getMainWindow() - # form = mw.findChild(QtGui.QWidget, "TaskPanel") - # form.pushButton = form.findChild(QtGui.QPushButton, "pushButton") - # form.listWidget = form.findChild(QtGui.QListWidget, "listWidget") - # self.form = form - # #Connect Signals and Slots - # QtCore.QObject.connect(form.pushButton, QtCore.SIGNAL("clicked()"), self.addElement) - # pass - - def getMainWindow(self): - "returns the main window" - # using QtGui.QApplication.activeWindow() isn't very reliable because if another - # widget than the mainwindow is active (e.g. a dialog) the wrong widget is - # returned - toplevel = QtGui.QApplication.topLevelWidgets() - for i in toplevel: - if i.metaObject().className() == "Gui::MainWindow": - return i - raise RuntimeError("No main window found") - - def add_assembly(self): - pass diff --git a/obsoleted/freecad.cross/task_panel_robot.py b/obsoleted/freecad.cross/task_panel_robot.py deleted file mode 100644 index caa2324..0000000 --- a/obsoleted/freecad.cross/task_panel_robot.py +++ /dev/null @@ -1,80 +0,0 @@ -import FreeCAD as fc - -import FreeCADGui as fcgui - -from PySide import QtCore # FreeCAD's PySide! -from PySide import QtGui # FreeCAD's PySide! - -from .utils import UI_PATH - -class TaskPanelRobot: - """Dialog for the Task Panel to define a robot.""" - def __init__(self, robot: 'cross.robot.Robot'): - self.robot = robot - # The UI must be in self.form. - self.form = fcgui.PySideUic.loadUi(str(UI_PATH.joinpath('task_panel_robot.ui'))) - - self.form.add_button.clicked.connect(self.add_assembly) - - def accept(self): - gui_doc = fcgui.getDocument(self.robot.Document) - gui_doc.resetEdit() - # #self.robot.Assembly = self.assembly - # - fc.getDocument(self.robot.Document.Name).recompute() - return True - - def reject(self): - self.form.close() - fcgui.Selection.removeObserver(self) - gui_doc = fcgui.getDocument(self.robot.Document) - gui_doc.resetEdit() - return True - # - # def clicked(self, index): - # pass - # - # def open(self): - # pass - # - # def needsFullSpace(self): - # return False - # - # def isAllowedAlterSelection(self): - # return True - # - # def isAllowedAlterView(self): - # return False - # - # def isAllowedAlterDocument(self): - # return True - # - def getStandardButtons(self): - return int(QtGui.QDialogButtonBox.Cancel) - # - # def helpRequested(self): - # pass - - # def setupUi(self): - # mw = self.getMainWindow() - # form = mw.findChild(QtGui.QWidget, "TaskPanel") - # form.pushButton = form.findChild(QtGui.QPushButton, "pushButton") - # form.listWidget = form.findChild(QtGui.QListWidget, "listWidget") - # self.form = form - # #Connect Signals and Slots - # QtCore.QObject.connect(form.pushButton, QtCore.SIGNAL("clicked()"), self.addElement) - # pass - - def getMainWindow(self): - "returns the main window" - # using QtGui.QApplication.activeWindow() isn't very reliable because if another - # widget than the mainwindow is active (e.g. a dialog) the wrong widget is - # returned - toplevel = QtGui.QApplication.topLevelWidgets() - for i in toplevel: - if i.metaObject().className() == "Gui::MainWindow": - return i - raise RuntimeError("No main window found") - - def add_assembly(self): - pass