summaryrefslogtreecommitdiff
path: root/src/frontEnd/ViewManagement.py
diff options
context:
space:
mode:
authorfahim2015-02-05 15:44:25 +0530
committerfahim2015-02-05 15:44:25 +0530
commite91a76c90a2ee829c337251e9adc33767c808b51 (patch)
treedba2698c0ff969a45778ab93332da38971c91f8b /src/frontEnd/ViewManagement.py
downloadeSim-e91a76c90a2ee829c337251e9adc33767c808b51.tar.gz
eSim-e91a76c90a2ee829c337251e9adc33767c808b51.tar.bz2
eSim-e91a76c90a2ee829c337251e9adc33767c808b51.zip
Subject: First commit
Description: It incluse initial gui to be used in new flow of FreeEDA.
Diffstat (limited to 'src/frontEnd/ViewManagement.py')
-rwxr-xr-xsrc/frontEnd/ViewManagement.py76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/frontEnd/ViewManagement.py b/src/frontEnd/ViewManagement.py
new file mode 100755
index 00000000..dd24d13b
--- /dev/null
+++ b/src/frontEnd/ViewManagement.py
@@ -0,0 +1,76 @@
+
+#===============================================================================
+#
+# FILE: ViewManagement.py
+#
+# USAGE: ---
+#
+# DESCRIPTION: It contain all the view for main Application
+#
+# OPTIONS: ---
+# REQUIREMENTS: ---
+# BUGS: ---
+# NOTES: ---
+# AUTHOR: Fahim Khan, fahim.elex@gmail.com
+# ORGANIZATION: ecSim team at FOSSEE, IIT Bombay.
+# CREATED: Wednesday 27 January 2015
+# REVISION: ---
+#===============================================================================
+
+
+
+from PyQt4 import QtCore
+from PyQt4 import QtGui
+
+
+class ViewManagement(QtGui.QSplitter):
+
+ def __init__(self, *args):
+ # call init method of superclass
+ QtGui.QSplitter.__init__(self, *args)
+ # Creating dictionary which hold all the views
+ self.views = {}
+
+ # define the basic framework of view areas for the
+ # application
+ self.createView()
+ self.setupView()
+
+ def createView(self):
+ #Adding view into views dictionary
+ self.addView(QtGui.QTextEdit, 'test1')
+ self.addView(QtGui.QTextEdit, 'test2')
+ self.addView(QtGui.QTextEdit, 'test3')
+
+ def setupView(self):
+
+ #setup views to define various areas, such as placement of individual views
+
+ # the right segment also is a splitter, but with vertical orientation
+ right = QtGui.QSplitter()
+ right.setOrientation(QtCore.Qt.Vertical)
+
+ # bind the top level views into the framework
+ self.views['test1'].setParent(self)
+
+ right.setParent(self)
+
+ self.views['test2'].setParent(right)
+ self.views['test3'].setParent(right)
+ right.setSizes([20, 5])
+ self.setSizes([5, 20])
+
+ def addView(self, settype, name):
+
+ #Adding views to dictionary
+ #parameters:
+ #settype <class>
+ #name <string>
+
+ self.views[name] = settype()
+
+
+
+
+
+