diff options
-rw-r--r-- | src/kicadtoNgspice/Analysis.py | 41 | ||||
-rw-r--r-- | src/kicadtoNgspice/Analysis.pyc | bin | 2932 -> 2965 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 61 | ||||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.pyc | bin | 1573 -> 2241 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/TabbedWidget.py | 2 | ||||
-rw-r--r-- | src/kicadtoNgspice/TabbedWidget.pyc | bin | 745 -> 740 bytes |
6 files changed, 63 insertions, 41 deletions
diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py index 2faedf1d..e1a71a2e 100644 --- a/src/kicadtoNgspice/Analysis.py +++ b/src/kicadtoNgspice/Analysis.py @@ -6,32 +6,63 @@ class Analysis(QtGui.QWidget): def __init__(self): QtGui.QWidget.__init__(self) - self.grid = QtGui.QGridLayout(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.grid = QtGui.QGridLayout() self.grid.addWidget(self.createACgroup(),0,0) self.grid.addWidget(self.createDCgroup(),1,0) self.grid.addWidget(self.createTRANgroup(),2,0) + ''' + self.grid.addWidget(self.createTRANgroup(),3,0) + self.grid.addWidget(self.createTRANgroup(),4,0) + self.grid.addWidget(self.createTRANgroup(),5,0) + self.grid.addWidget(self.createTRANgroup(),6,0) + self.grid.addWidget(self.createTRANgroup(),7,0) + self.grid.addWidget(self.createTRANgroup(),8,0) + self.grid.addWidget(self.createTRANgroup(),9,0) + self.grid.addWidget(self.createTRANgroup(),10,0) + self.grid.addWidget(self.createTRANgroup(),11,0) + self.grid.addWidget(self.createTRANgroup(),12,0) + self.grid.addWidget(self.createTRANgroup(),13,0) + self.grid.addWidget(self.createTRANgroup(),14,0) + self.grid.addWidget(self.createTRANgroup(),15,0) + self.grid.addWidget(self.createTRANgroup(),16,0) + self.grid.addWidget(self.createTRANgroup(),17,0) + self.grid.addWidget(self.createTRANgroup(),18,0) + self.grid.addWidget(self.createTRANgroup(),19,0) + self.grid.addWidget(self.createTRANgroup(),20,0) + ''' + self.setLayout(self.grid) + + + self.show() def createACgroup(self): self.acbox = QtGui.QGroupBox() - self.acbox.setTitle("AC") - + self.acbox.setTitle("AC Analysis") self.acgrid = QtGui.QGridLayout() self.btn1 = QtGui.QRadioButton("Radio button 1") self.btn2 = QtGui.QRadioButton("Radio button 2") self.acgrid.addWidget(self.btn1,0,0) self.acgrid.addWidget(self.btn2,0,1) + self.acbox.setStyleSheet(" \ QGroupBox { border: 1px solid gray; border-radius: 9px; margin-top: 0.5em; } \ QGroupBox::title { subcontrol-origin: margin; left: 10px; padding: 0 3px 0 3px; } \ ") + self.acbox.setLayout(self.acgrid) @@ -39,7 +70,7 @@ class Analysis(QtGui.QWidget): def createDCgroup(self): self.dcbox = QtGui.QGroupBox() - self.dcbox.setTitle("DC") + self.dcbox.setTitle("DC Analysis") self.dcgrid = QtGui.QGridLayout() self.btn3 = QtGui.QRadioButton("Radio button 3") @@ -58,7 +89,7 @@ class Analysis(QtGui.QWidget): def createTRANgroup(self): self.trbox = QtGui.QGroupBox() - self.trbox.setTitle("DC") + self.trbox.setTitle("Transient Analysis") self.trgrid = QtGui.QGridLayout() self.btn5 = QtGui.QRadioButton("Radio button 5") diff --git a/src/kicadtoNgspice/Analysis.pyc b/src/kicadtoNgspice/Analysis.pyc Binary files differindex 457c7058..ed607bff 100644 --- a/src/kicadtoNgspice/Analysis.pyc +++ b/src/kicadtoNgspice/Analysis.pyc diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index b3ee8886..00bba107 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -20,57 +20,48 @@ from PyQt4 import QtGui import TabbedWidget import Analysis -class MainWindow(QtGui.QMainWindow): +class MainWindow(QtGui.QWidget): def __init__(self): - QtGui.QMainWindow.__init__(self) + QtGui.QWidget.__init__(self) print "Init Kicad to Ngspice" + + self.grid = QtGui.QGridLayout(self) + self.grid.addWidget(self.createConvertWidget(),0,0) + 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 = QtGui.QWidget() - self.sourceTab = QtGui.QWidget() - self.modelTab = QtGui.QWidget() - ''' 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.tabs = QtGui.QTabWidget() - self.testpushBTN = QtGui.QPushButton("QPushButton 1") - - self.vbox = QtGui.QVBoxLayout() - self.vbox.addWidget(self.testpushBTN) + #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 + - - #Resize width and height - self.tabs.resize(600, 600) - - #Move QTabWidget to x:300,y:300 - self.tabs.move(300, 300) - - #Set Layout for Third Tab Page - self.modelTab.setLayout(self.vbox) - - self.tabs.addTab(self.analysisTab,"Analysis Inserter") - self.tabs.addTab(self.sourceTab,"Source Detail") - self.tabs.addTab(self.modelTab,"Model Details") - - self.tabs.setWindowTitle('Kicad to Ngspice Conversion') - self.tabs.show() - ''' - - - def main(): print "==================================" print "Kicad to Ngspice netlist converter " diff --git a/src/kicadtoNgspice/KicadtoNgspice.pyc b/src/kicadtoNgspice/KicadtoNgspice.pyc Binary files differindex 929a42de..5ce8eabb 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.pyc +++ b/src/kicadtoNgspice/KicadtoNgspice.pyc diff --git a/src/kicadtoNgspice/TabbedWidget.py b/src/kicadtoNgspice/TabbedWidget.py index f8a37ead..bfcd00cc 100644 --- a/src/kicadtoNgspice/TabbedWidget.py +++ b/src/kicadtoNgspice/TabbedWidget.py @@ -5,5 +5,5 @@ from PyQt4 import QtGui class TabbedWidget(QtGui.QTabWidget): def __init__(self): QtGui.QTabWidget.__init__(self) - self.setGeometry(300, 300, 800, 600) + self.setGeometry(300, 300, 600, 600) self.setWindowTitle('Kicad to Ngspice conversion') diff --git a/src/kicadtoNgspice/TabbedWidget.pyc b/src/kicadtoNgspice/TabbedWidget.pyc Binary files differindex 535fad1b..a97d1f7a 100644 --- a/src/kicadtoNgspice/TabbedWidget.pyc +++ b/src/kicadtoNgspice/TabbedWidget.pyc |