summaryrefslogtreecommitdiff
path: root/src/subcircuit/openSub.py
diff options
context:
space:
mode:
authorfossee2019-08-29 12:03:11 +0530
committerfossee2019-08-29 12:03:11 +0530
commitfe3bd934634bb2dae1cadf35e7c6d59facbedf66 (patch)
treeab841ad9ca3d56f7eb85cb3650f6608b80656027 /src/subcircuit/openSub.py
parentf7567ac99f21fb6c87d60f309f0aa71dee6ae975 (diff)
downloadeSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.tar.gz
eSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.tar.bz2
eSim-fe3bd934634bb2dae1cadf35e7c6d59facbedf66.zip
adding files
Diffstat (limited to 'src/subcircuit/openSub.py')
-rw-r--r--src/subcircuit/openSub.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/subcircuit/openSub.py b/src/subcircuit/openSub.py
new file mode 100644
index 00000000..fb349f0a
--- /dev/null
+++ b/src/subcircuit/openSub.py
@@ -0,0 +1,24 @@
+from PyQt4 import QtGui
+from configuration.Appconfig import Appconfig
+from projManagement.Worker import WorkerThread
+import os
+
+
+class openSub(QtGui.QWidget):
+ """
+ This class is called when User click on Open Project Button
+ """
+ def __init__(self):
+ super(openSub, self).__init__()
+ self.obj_appconfig = Appconfig()
+
+ def body(self):
+ self.editfile = str(QtGui.QFileDialog.getExistingDirectory(None,"Open File","../SubcircuitLibrary"))
+ if self.editfile:
+ self.obj_Appconfig = Appconfig()
+ self.obj_Appconfig.current_subcircuit['SubcircuitName'] = self.editfile
+ self.schname = os.path.basename(self.editfile)
+ self.editfile = os.path.join(self.editfile,self.schname)
+ self.cmd = "eeschema "+self.editfile+".sch "
+ self.obj_workThread = WorkerThread(self.cmd)
+ self.obj_workThread.start() \ No newline at end of file