blob: b3ee888671234a7d9bcde7a8f7c73b9a066f9da3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#===============================================================================
#
# FILE: kicadtoNgspice.py
#
# USAGE: ---
#
# DESCRIPTION: This define all configuration used in Application.
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
# ORGANIZATION: eSim team at FOSSEE, IIT Bombay.
# CREATED: Wednesday 04 March 2015
# REVISION: ---
#===============================================================================
import sys
from PyQt4 import QtGui
import TabbedWidget
import Analysis
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
print "Init Kicad to Ngspice"
'''
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)
#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 "
print "=================================="
#kicadNetlist = sys.argv[1]
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
app.setApplicationName("KicadToNgspice")
app.setQuitOnLastWindowClosed(True)
window = MainWindow()
main()
sys.exit(app.exec_())
|