From 71851a2df657bd166d6ee81eb00dae0fda2ef3a4 Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Fri, 21 Jun 2019 16:15:02 +0530
Subject: Issue #82 solved: Renaming project added
---
src/subcircuit/Subcircuit.py | 11 +++++++++++
src/subcircuit/convertSub.py | 8 ++++----
src/subcircuit/newSub.py | 5 ++++-
src/subcircuit/openSub.py | 6 +++---
4 files changed, 22 insertions(+), 8 deletions(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index d2e7ec5a..9f161b97 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -4,6 +4,7 @@ from projManagement.Validation import Validation
from subcircuit.newSub import NewSub
from subcircuit.openSub import openSub
from subcircuit.convertSub import convertSub
+from subcircuit.uploadSub import UploadSub
# This class creates Subcircuit GUI.
@@ -41,11 +42,17 @@ class Subcircuit(QtGui.QWidget):
'To convert Subcircuit Kicad Netlist to Ngspice Netlist')
self.convertbtn.setFixedSize(200, 40)
self.convertbtn.clicked.connect(self.convertsch)
+ self.uploadbtn = QtGui.QPushButton('Upload a Subcircuit')
+ self.uploadbtn.setToolTip(
+ 'To Upload a subcircuit')
+ self.uploadbtn.setFixedSize(180, 38)
+ self.uploadbtn.clicked.connect(self.uploadSub)
self.hbox = QtGui.QHBoxLayout()
self.hbox.addWidget(self.newbtn)
self.hbox.addWidget(self.editbtn)
self.hbox.addWidget(self.convertbtn)
+ self.hbox.addWidget(self.uploadbtn)
self.hbox.addStretch(1)
self.vbox = QtGui.QVBoxLayout()
@@ -73,3 +80,7 @@ class Subcircuit(QtGui.QWidget):
def convertsch(self):
self.obj_convertsubcircuit = convertSub(self.obj_dockarea)
self.obj_convertsubcircuit.createSub()
+
+ def uploadSub(self):
+ self.obj_uploadsubcircuit = UploadSub()
+ self.obj_uploadsubcircuit.upload()
diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py
index 49f5a54f..3e32f9b2 100644
--- a/src/subcircuit/convertSub.py
+++ b/src/subcircuit/convertSub.py
@@ -44,12 +44,12 @@ class convertSub(QtGui.QWidget):
else:
self.msg = QtGui.QErrorMessage(None)
self.msg.showMessage(
- 'The subcircuit does not contain any Kicad netlist\
- file for conversion.')
+ 'The subcircuit does not contain any Kicad netlist file'
+ + 'for conversion.')
self.msg.setWindowTitle("Error Message")
else:
self.msg = QtGui.QErrorMessage(None)
self.msg.showMessage(
- 'Please select the subcircuit first. You can either create \
- new subcircuit or open existing subcircuit')
+ 'Please select the subcircuit first. You can either create'
+ + 'new subcircuit or open existing subcircuit')
self.msg.setWindowTitle("Error Message")
diff --git a/src/subcircuit/newSub.py b/src/subcircuit/newSub.py
index 678b023d..b44e71ca 100644
--- a/src/subcircuit/newSub.py
+++ b/src/subcircuit/newSub.py
@@ -8,7 +8,10 @@ import os
# This class is called when User create new Project.
class NewSub(QtGui.QWidget):
"""
- Contains functions to create directory and validate file names.
+ Contains funstions to check :
+ - Name of project should not be blank.
+ - Name should not contain space between them.
+ - Name does not match with existing project.
"""
def __init__(self):
diff --git a/src/subcircuit/openSub.py b/src/subcircuit/openSub.py
index bebd28a1..dd6e31ac 100644
--- a/src/subcircuit/openSub.py
+++ b/src/subcircuit/openSub.py
@@ -21,9 +21,9 @@ class openSub(QtGui.QWidget):
None, "Open File", "../SubcircuitLibrary"))
if self.editfile:
self.obj_Appconfig = Appconfig()
- self.obj_Appconfig.current_subcircuit['SubcircuitName'] = (
- self.editfile
- )
+ 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 "
--
cgit
From aacc02fd7b0117912ce15a650dbae6bf56238dfb Mon Sep 17 00:00:00 2001
From: Anjali Jaiswal
Date: Wed, 26 Jun 2019 03:17:05 +0530
Subject: Update Subcircuit.py
---
src/subcircuit/Subcircuit.py | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index 9f161b97..a79bfc37 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -4,7 +4,6 @@ from projManagement.Validation import Validation
from subcircuit.newSub import NewSub
from subcircuit.openSub import openSub
from subcircuit.convertSub import convertSub
-from subcircuit.uploadSub import UploadSub
# This class creates Subcircuit GUI.
@@ -42,17 +41,11 @@ class Subcircuit(QtGui.QWidget):
'To convert Subcircuit Kicad Netlist to Ngspice Netlist')
self.convertbtn.setFixedSize(200, 40)
self.convertbtn.clicked.connect(self.convertsch)
- self.uploadbtn = QtGui.QPushButton('Upload a Subcircuit')
- self.uploadbtn.setToolTip(
- 'To Upload a subcircuit')
- self.uploadbtn.setFixedSize(180, 38)
- self.uploadbtn.clicked.connect(self.uploadSub)
-
+
self.hbox = QtGui.QHBoxLayout()
self.hbox.addWidget(self.newbtn)
self.hbox.addWidget(self.editbtn)
self.hbox.addWidget(self.convertbtn)
- self.hbox.addWidget(self.uploadbtn)
self.hbox.addStretch(1)
self.vbox = QtGui.QVBoxLayout()
@@ -80,7 +73,3 @@ class Subcircuit(QtGui.QWidget):
def convertsch(self):
self.obj_convertsubcircuit = convertSub(self.obj_dockarea)
self.obj_convertsubcircuit.createSub()
-
- def uploadSub(self):
- self.obj_uploadsubcircuit = UploadSub()
- self.obj_uploadsubcircuit.upload()
--
cgit
From 053f70ac84399f7234df9e9fcecb3ef42b478370 Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Wed, 26 Jun 2019 03:29:06 +0530
Subject: Removed unwanted code
---
src/subcircuit/Subcircuit.py | 10 ----------
1 file changed, 10 deletions(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index 9f161b97..409f7210 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -4,7 +4,6 @@ from projManagement.Validation import Validation
from subcircuit.newSub import NewSub
from subcircuit.openSub import openSub
from subcircuit.convertSub import convertSub
-from subcircuit.uploadSub import UploadSub
# This class creates Subcircuit GUI.
@@ -42,11 +41,6 @@ class Subcircuit(QtGui.QWidget):
'To convert Subcircuit Kicad Netlist to Ngspice Netlist')
self.convertbtn.setFixedSize(200, 40)
self.convertbtn.clicked.connect(self.convertsch)
- self.uploadbtn = QtGui.QPushButton('Upload a Subcircuit')
- self.uploadbtn.setToolTip(
- 'To Upload a subcircuit')
- self.uploadbtn.setFixedSize(180, 38)
- self.uploadbtn.clicked.connect(self.uploadSub)
self.hbox = QtGui.QHBoxLayout()
self.hbox.addWidget(self.newbtn)
@@ -80,7 +74,3 @@ class Subcircuit(QtGui.QWidget):
def convertsch(self):
self.obj_convertsubcircuit = convertSub(self.obj_dockarea)
self.obj_convertsubcircuit.createSub()
-
- def uploadSub(self):
- self.obj_uploadsubcircuit = UploadSub()
- self.obj_uploadsubcircuit.upload()
--
cgit
From 6dbded9cd04e01b2080282085b4f99018899f49d Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Wed, 26 Jun 2019 03:34:13 +0530
Subject: Removed unwanted code
---
src/subcircuit/Subcircuit.py | 1 -
1 file changed, 1 deletion(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index 409f7210..d2e7ec5a 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -46,7 +46,6 @@ class Subcircuit(QtGui.QWidget):
self.hbox.addWidget(self.newbtn)
self.hbox.addWidget(self.editbtn)
self.hbox.addWidget(self.convertbtn)
- self.hbox.addWidget(self.uploadbtn)
self.hbox.addStretch(1)
self.vbox = QtGui.QVBoxLayout()
--
cgit
From 55871b148c5a6de080b3133acc5eda754736f3ee Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Wed, 26 Jun 2019 11:05:16 +0530
Subject: Made pep8 compliance
---
src/subcircuit/convertSub.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py
index 3e32f9b2..7bdccfb2 100644
--- a/src/subcircuit/convertSub.py
+++ b/src/subcircuit/convertSub.py
@@ -45,11 +45,11 @@ class convertSub(QtGui.QWidget):
self.msg = QtGui.QErrorMessage(None)
self.msg.showMessage(
'The subcircuit does not contain any Kicad netlist file'
- + 'for conversion.')
+ + ' for conversion.')
self.msg.setWindowTitle("Error Message")
else:
self.msg = QtGui.QErrorMessage(None)
self.msg.showMessage(
'Please select the subcircuit first. You can either create'
- + 'new subcircuit or open existing subcircuit')
+ + ' new subcircuit or open existing subcircuit')
self.msg.setWindowTitle("Error Message")
--
cgit
From 658e04f2da8dfd0de70e03cc30249da11863dd52 Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Wed, 26 Jun 2019 12:09:18 +0530
Subject: Few Changes
---
src/subcircuit/Subcircuit.py.orig | 79 ---------------------------------------
1 file changed, 79 deletions(-)
delete mode 100644 src/subcircuit/Subcircuit.py.orig
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py.orig b/src/subcircuit/Subcircuit.py.orig
deleted file mode 100644
index 50ec38ef..00000000
--- a/src/subcircuit/Subcircuit.py.orig
+++ /dev/null
@@ -1,79 +0,0 @@
-from PyQt4 import QtCore, QtGui
-from configuration.Appconfig import Appconfig
-from projManagement.Validation import Validation
-from subcircuit.newSub import NewSub
-from subcircuit.openSub import openSub
-from subcircuit.convertSub import convertSub
-
-
-# This class creates Subcircuit GUI.
-class Subcircuit(QtGui.QWidget):
- """
- Creates buttons for New project, Edit existing project and
- Kicad Netlist to Ngspice Netlist converter and link them with the
- methods defined for it in other files.
-
- - New Project(NewSub method of newSub).
- - Open Project(openSub method of openSub).
- - Kicad to Ngspice convertor(convertSub of convertSub).
- """
-
- def __init__(self, parent=None):
- super(Subcircuit, self).__init__()
- QtGui.QWidget.__init__(self)
- self.obj_appconfig = Appconfig()
- self.obj_validation = Validation()
- self.obj_dockarea = parent
- self.layout = QtGui.QVBoxLayout()
- self.splitter = QtGui.QSplitter()
- self.splitter.setOrientation(QtCore.Qt.Vertical)
-
- self.newbtn = QtGui.QPushButton('New Subcircuit Schematic')
- self.newbtn.setToolTip('To create new Subcircuit Schematic')
- self.newbtn.setFixedSize(200, 40)
- self.newbtn.clicked.connect(self.newsch)
- self.editbtn = QtGui.QPushButton('Edit Subcircuit Schematic')
- self.editbtn.setToolTip('To edit existing Subcircuit Schematic')
- self.editbtn.setFixedSize(200, 40)
- self.editbtn.clicked.connect(self.editsch)
- self.convertbtn = QtGui.QPushButton('Convert Kicad to Ngspice')
- self.convertbtn.setToolTip(
- 'To convert Subcircuit Kicad Netlist to Ngspice Netlist')
- self.convertbtn.setFixedSize(200, 40)
- self.convertbtn.clicked.connect(self.convertsch)
-<<<<<<< HEAD
-
-=======
-
->>>>>>> c6df3169a2016174514d5b3b4961024918e23ea2
- self.hbox = QtGui.QHBoxLayout()
- self.hbox.addWidget(self.newbtn)
- self.hbox.addWidget(self.editbtn)
- self.hbox.addWidget(self.convertbtn)
- self.hbox.addStretch(1)
-
- self.vbox = QtGui.QVBoxLayout()
- self.vbox.addLayout(self.hbox)
- self.vbox.addStretch(1)
-
- self.setLayout(self.vbox)
- self.show()
-
- def newsch(self):
- text, ok = QtGui.QInputDialog.getText(
- self, 'New Schematic', 'Enter Schematic Name:')
- if ok:
- self.schematic_name = (str(text))
- self.subcircuit = NewSub()
- self.subcircuit.createSubcircuit(self.schematic_name)
-
- else:
- print("Sub circuit creation cancelled")
-
- def editsch(self):
- self.obj_opensubcircuit = openSub()
- self.obj_opensubcircuit.body()
-
- def convertsch(self):
- self.obj_convertsubcircuit = convertSub(self.obj_dockarea)
- self.obj_convertsubcircuit.createSub()
--
cgit
From a4359ecb03580b59aec729e2381a76267a91a023 Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Thu, 27 Jun 2019 14:00:21 +0530
Subject: Pep8 done
---
src/subcircuit/Subcircuit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/Subcircuit.py b/src/subcircuit/Subcircuit.py
index a79bfc37..d2e7ec5a 100644
--- a/src/subcircuit/Subcircuit.py
+++ b/src/subcircuit/Subcircuit.py
@@ -41,7 +41,7 @@ class Subcircuit(QtGui.QWidget):
'To convert Subcircuit Kicad Netlist to Ngspice Netlist')
self.convertbtn.setFixedSize(200, 40)
self.convertbtn.clicked.connect(self.convertsch)
-
+
self.hbox = QtGui.QHBoxLayout()
self.hbox.addWidget(self.newbtn)
self.hbox.addWidget(self.editbtn)
--
cgit
From 360f41473a7d64e74ff071086f70176911c878ea Mon Sep 17 00:00:00 2001
From: anjalijaiswal08
Date: Thu, 27 Jun 2019 14:10:42 +0530
Subject: Speel errors removed
---
src/subcircuit/newSub.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/subcircuit')
diff --git a/src/subcircuit/newSub.py b/src/subcircuit/newSub.py
index b44e71ca..bd88064a 100644
--- a/src/subcircuit/newSub.py
+++ b/src/subcircuit/newSub.py
@@ -8,7 +8,7 @@ import os
# This class is called when User create new Project.
class NewSub(QtGui.QWidget):
"""
- Contains funstions to check :
+ Contains functions to check :
- Name of project should not be blank.
- Name should not contain space between them.
- Name does not match with existing project.
--
cgit