selectedItem.y.__dict__["cachedValue"] = Eaglepy.configuredToEagle( itemy, unitType) script += "MOVE " + selectedItem.name() + " (%f %f);" % (itemx, itemy) Eaglepy.executescr(script) def centerToWidget(self, target=None): if not target: rect = QApplication.desktop().availableGeometry( target if target != None else self) else: rect = target.geometry() center = rect.center() self.move(center.x() - self.width() * 0.5, center.y() - self.height() * 0.5) if __name__ == "__main__": Eaglepy.initialize() application = QApplication([]) dialog = AlignmentToolDialog() dialog.show() application.exec_() Eaglepy.shutdown()
""" (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com and others. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License (LGPL) version 2.1 which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl-2.1.html This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. Contributors: Rob Watson ( rmawatson [at] hotmail ) """ import Eaglepy import time print "1" Eaglepy.initialize() print "2" print Eaglepy.ULContext() print "3" Eaglepy.shutdown() print "4" time.sleep(10)
""" (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com and others. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License (LGPL) version 2.1 which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl-2.1.html This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. Contributors: Rob Watson ( rmawatson [at] hotmail ) """ import Eaglepy Eaglepy.initialize() selectedObjects = Eaglepy.selected() newGroup = Eaglepy.ULGroup() for objectItem in selectedObjects: newGroup.append(objectItem) Eaglepy.ULContext().groups().append(newGroup) Eaglepy.status("New Group %s created" % newGroup.name()) Eaglepy.shutdown()
""" (C) Copyright 2013 Rob Watson rmawatson [at] hotmail.com and others. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License (LGPL) version 2.1 which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl-2.1.html This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. Contributors: Rob Watson ( rmawatson [at] hotmail ) """ import Eaglepy import time print("1") Eaglepy.initialize() print("2") print Eaglepy.ULContext() print("3") Eaglepy.shutdown() print("4") time.sleep(10)