summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r--src/kicadtoNgspice/Analysis.py26
-rw-r--r--src/kicadtoNgspice/Analysis.pycbin2965 -> 2965 bytes
-rw-r--r--src/kicadtoNgspice/GroupBox.pycbin634 -> 0 bytes
-rw-r--r--src/kicadtoNgspice/KicadtoNgspice.py63
-rw-r--r--src/kicadtoNgspice/KicadtoNgspice.pycbin2241 -> 3090 bytes
-rw-r--r--src/kicadtoNgspice/TabbedWidget.py9
-rw-r--r--src/kicadtoNgspice/TabbedWidget.pycbin740 -> 0 bytes
7 files changed, 51 insertions, 47 deletions
diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py
index e1a71a2e..84c279c6 100644
--- a/src/kicadtoNgspice/Analysis.py
+++ b/src/kicadtoNgspice/Analysis.py
@@ -6,12 +6,23 @@ class Analysis(QtGui.QWidget):
def __init__(self):
QtGui.QWidget.__init__(self)
- #elf.scrollArea = QtGui.QScrollArea()
- #self.scrollArea.setWidgetResizable(True)
- #self.scrollAreaWidgetContents = QtGui.QWidget()
- #self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 100, 100))
- #self.hlayout = QtGui.QHBoxLayout(self.scrollAreaWidgetContents)
-
+ '''
+ self.scrolllayout = QtGui.QVBoxLayout()
+ self.scrollwidget = QtGui.QWidget()
+ self.scrollwidget.setLayout(self.scrolllayout)
+
+ self.scroll = QtGui.QScrollArea()
+ self.scroll.setWidgetResizable(True) # Set to make the inner widget resize with scroll area
+ self.scroll.setWidget(self.scrollwidget)
+
+ self.hlayout = QtGui.QHBoxLayout()
+ self.hlayout.addWidget(self.scroll)
+ self.hlayout.addWidget(self.createACgroup())
+ self.hlayout.addWidget(self.createDCgroup())
+ self.hlayout.addWidget(self.createTRANgroup())
+ self.setLayout(self.hlayout)
+ '''
+
self.grid = QtGui.QGridLayout()
self.grid.addWidget(self.createACgroup(),0,0)
self.grid.addWidget(self.createDCgroup(),1,0)
@@ -39,9 +50,6 @@ class Analysis(QtGui.QWidget):
'''
self.setLayout(self.grid)
-
-
-
self.show()
diff --git a/src/kicadtoNgspice/Analysis.pyc b/src/kicadtoNgspice/Analysis.pyc
index ed607bff..38e29695 100644
--- a/src/kicadtoNgspice/Analysis.pyc
+++ b/src/kicadtoNgspice/Analysis.pyc
Binary files differ
diff --git a/src/kicadtoNgspice/GroupBox.pyc b/src/kicadtoNgspice/GroupBox.pyc
deleted file mode 100644
index 06e46189..00000000
--- a/src/kicadtoNgspice/GroupBox.pyc
+++ /dev/null
Binary files differ
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py
index 00bba107..aeae1210 100644
--- a/src/kicadtoNgspice/KicadtoNgspice.py
+++ b/src/kicadtoNgspice/KicadtoNgspice.py
@@ -17,7 +17,6 @@
#===============================================================================
import sys
from PyQt4 import QtGui
-import TabbedWidget
import Analysis
class MainWindow(QtGui.QWidget):
@@ -26,41 +25,47 @@ class MainWindow(QtGui.QWidget):
print "Init Kicad to Ngspice"
self.grid = QtGui.QGridLayout(self)
- self.grid.addWidget(self.createConvertWidget(),0,0)
+ self.convertbtn = QtGui.QPushButton("Convert")
+ self.cancelbtn = QtGui.QPushButton("Cancel")
+ self.grid.addWidget(self.createcreateConvertWidget(),0,0)
+ self.grid.addWidget(self.convertbtn,1,1)
+ self.grid.addWidget(self.cancelbtn,1,2)
self.setGeometry(500, 500, 600, 600)
self.setLayout(self.grid)
self.show()
- def createConvertWidget(self):
- self.convertbox = QtGui.QGroupBox()
- self.convertgrid = QtGui.QGridLayout()
-
- self.convertbtn = QtGui.QPushButton("Convert")
- self.cancelbtn = QtGui.QPushButton("Cancel")
-
- self.analysisTab = Analysis.Analysis()
- self.sourceTab = QtGui.QWidget()
- self.modelTab = QtGui.QWidget()
-
- self.td = TabbedWidget.TabbedWidget()
- self.td.addTab(self.analysisTab, 'Analysis Inserter')
- self.td.addTab(self.sourceTab, 'Source Detail')
- self.td.addTab(self.modelTab, 'Model Detail')
-
-
-
- #self.td.show()
-
- self.convertgrid.addWidget(self.td,0,0)
- self.convertgrid.addWidget(self.convertbtn,1,1)
- self.convertgrid.addWidget(self.cancelbtn,1,2)
-
- self.convertbox.setLayout(self.convertgrid)
-
- return self.convertbox
+
+ def createcreateConvertWidget(self):
+ self.convertWindow = QtGui.QWidget()
+
+ self.analysisTab = QtGui.QScrollArea()
+ self.analysisTab.setWidget(Analysis.Analysis())
+ self.analysisTabLayout = QtGui.QVBoxLayout(self.analysisTab.widget())
+ self.analysisTab.setWidgetResizable(True)
+ self.sourceTab = QtGui.QScrollArea()
+ self.sourceTab.setWidget(QtGui.QWidget())
+ self.sourceTabLayout = QtGui.QVBoxLayout(self.sourceTab.widget())
+ self.sourceTab.setWidgetResizable(True)
+ self.modelTab = QtGui.QScrollArea()
+ self.modelTab.setWidget(QtGui.QWidget())
+ self.modelTabLayout = QtGui.QVBoxLayout(self.modelTab.widget())
+ self.modelTab.setWidgetResizable(True)
+
+ self.tabWidget = QtGui.QTabWidget()
+ self.tabWidget.addTab(self.analysisTab,"Analysis Tab")
+ self.tabWidget.addTab(self.sourceTab,"Source Tab")
+ self.tabWidget.addTab(self.modelTab,"Model Tab")
+ self.mainLayout = QtGui.QVBoxLayout()
+ self.mainLayout.addWidget(self.tabWidget)
+ #self.mainLayout.addStretch(1)
+ self.convertWindow.setLayout(self.mainLayout)
+ self.convertWindow.show()
+
+ return self.convertWindow
+
def main():
print "=================================="
diff --git a/src/kicadtoNgspice/KicadtoNgspice.pyc b/src/kicadtoNgspice/KicadtoNgspice.pyc
index 5ce8eabb..a5f370c5 100644
--- a/src/kicadtoNgspice/KicadtoNgspice.pyc
+++ b/src/kicadtoNgspice/KicadtoNgspice.pyc
Binary files differ
diff --git a/src/kicadtoNgspice/TabbedWidget.py b/src/kicadtoNgspice/TabbedWidget.py
deleted file mode 100644
index bfcd00cc..00000000
--- a/src/kicadtoNgspice/TabbedWidget.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from PyQt4 import QtGui
-
-
-
-class TabbedWidget(QtGui.QTabWidget):
- def __init__(self):
- QtGui.QTabWidget.__init__(self)
- self.setGeometry(300, 300, 600, 600)
- self.setWindowTitle('Kicad to Ngspice conversion')
diff --git a/src/kicadtoNgspice/TabbedWidget.pyc b/src/kicadtoNgspice/TabbedWidget.pyc
deleted file mode 100644
index a97d1f7a..00000000
--- a/src/kicadtoNgspice/TabbedWidget.pyc
+++ /dev/null
Binary files differ