-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpschem.py
executable file
·61 lines (43 loc) · 1.69 KB
/
pschem.py
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009 PSchem Contributors (see CONTRIBUTORS for details)
# This file is part of PSchem.
# PSchem is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# PSchem is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with PSchem. If not, see <http://www.gnu.org/licenses/>.
import sys
#import cProfile
#import pstats
import Globals
Qt = __import__(Globals.UI, globals(), locals(), ['QtCore', 'QtGui'])
QtCore = Qt.QtCore
QtGui = Qt.QtGui
#from PyQt4 import QtCore, QtGui
from PSchem import PWindow
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
def main():
#QtGui.QApplication.setGraphicsSystem('raster')
app = QtGui.QApplication(sys.argv)
sf = QtGui.QStyleFactory()
print list(sf.keys())
print QtGui.qApp.style().metaObject().className()
QtGui.qApp.setStyle(sf.create('windowsxp'))
#QtGui.qApp.setStyle(sf.create('cleanlooks'))
#QtGui.qApp.setStyle(sf.create('motif'))
QtCore.qsrand(QtCore.QTime(0,0,0).secsTo(QtCore.QTime.currentTime()))
window = PWindow.PWindow()
window.show()
sys.exit(app.exec_())
#cProfile.run('app.exec_()', 'profdata')
#p = pstats.Stats('profdata')
#p.sort_stats('time').print_stats()
if __name__ == "__main__":
main()