summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfahim2015-02-11 16:34:48 +0530
committerfahim2015-02-11 16:34:48 +0530
commit74d560add00621421d366759bcc80900d8e14d8a (patch)
treea59a72c77b4651dbf88933e9b0dfbd2ce1e9918d /src
parent775f9c18568ad2f7c480fad271e281dbc235e796 (diff)
downloadeSim-74d560add00621421d366759bcc80900d8e14d8a.tar.gz
eSim-74d560add00621421d366759bcc80900d8e14d8a.tar.bz2
eSim-74d560add00621421d366759bcc80900d8e14d8a.zip
Subject: Added splash screen
Description: Added basic splash screen codewith default image which need to modified in future.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontEnd/Application.py36
-rwxr-xr-xsrc/frontEnd/ViewManagement.py11
-rw-r--r--src/frontEnd/ViewManagement.pycbin2287 -> 2519 bytes
-rw-r--r--src/frontEnd/Workspace.py31
-rw-r--r--src/frontEnd/Workspace.pycbin3433 -> 3466 bytes
-rw-r--r--src/images/close.jpegbin5605 -> 0 bytes
-rw-r--r--src/images/close.pngbin47906 -> 0 bytes
-rw-r--r--src/images/help.jpegbin4737 -> 0 bytes
-rw-r--r--src/images/help.pngbin43181 -> 0 bytes
-rw-r--r--src/images/newproj.jpegbin2236 -> 0 bytes
-rw-r--r--src/images/newproj.pngbin11544 -> 0 bytes
-rw-r--r--src/images/openproj.jpegbin4425 -> 0 bytes
-rw-r--r--src/images/openproj.pngbin31199 -> 0 bytes
13 files changed, 51 insertions, 27 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index 7f783ff3..ccc08248 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -18,12 +18,12 @@
#===============================================================================
-from PyQt4 import QtGui
+from PyQt4 import QtGui, QtCore
from configuration.Appconfig import Appconfig
import ViewManagement
import Workspace
import sys
-
+import time
class Application(QtGui.QMainWindow):
"""
@@ -111,26 +111,38 @@ def main(args):
"""
It is main function of the module.It starts the application
"""
- app = QtGui.QApplication(args)
+ print "Hello Main"
+ app = QtGui.QApplication(sys.argv)
+
+ splash_pix = QtGui.QPixmap('../images/FreeEDAlogo.jpg')
+ splash = QtGui.QSplashScreen(splash_pix,QtCore.Qt.WindowStaysOnTopHint)
+ progressBar = QtGui.QProgressBar(splash)
+ splash.setMask(splash_pix.mask())
+ splash.show()
+
+ for i in range(0, 100):
+ progressBar.setValue(i)
+ t = time.time()
+ while time.time() < t + 0.1:
+ app.processEvents()
+
+ time.sleep(2)
+
appView = Application()
appView.show()
+ splash.finish(appView)
sys.exit(app.exec_())
"""
- while 1:
- print work_space.status_label.text()
- if work_space.status_label.text() == 'OK':
- print "OK"
- appView.show()
- break
- else:
- pass
-
+ appView = Application()
+ appView.show()
+ sys.exit(app.exec_())
"""
# Call main function
if __name__ == '__main__':
+ # Create and display the splash screen
main(sys.argv)
diff --git a/src/frontEnd/ViewManagement.py b/src/frontEnd/ViewManagement.py
index fac383bc..27d9ecba 100755
--- a/src/frontEnd/ViewManagement.py
+++ b/src/frontEnd/ViewManagement.py
@@ -68,6 +68,17 @@ class ViewManagement(QtGui.QSplitter):
self.ngspice_btn.setIcon(QtGui.QIcon('../images/default.png'))
self.ngspice_btn.setIconSize(QtCore.QSize(50,50))
self.grid.addWidget(self.ngspice_btn,0,2)
+
+ self.footprint_btn = QtGui.QPushButton()
+ self.footprint_btn.setIcon(QtGui.QIcon('../images/default.png'))
+ self.footprint_btn.setIconSize(QtCore.QSize(50,50))
+ self.grid.addWidget(self.footprint_btn,1,0)
+
+ self.pcb_btn = QtGui.QPushButton()
+ self.pcb_btn.setIcon(QtGui.QIcon('../images/default.png'))
+ self.pcb_btn.setIconSize(QtCore.QSize(50,50))
+ self.grid.addWidget(self.pcb_btn,1,1)
+
diff --git a/src/frontEnd/ViewManagement.pyc b/src/frontEnd/ViewManagement.pyc
index b7023ebd..d7b30b5e 100644
--- a/src/frontEnd/ViewManagement.pyc
+++ b/src/frontEnd/ViewManagement.pyc
Binary files differ
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py
index 95c19942..0db3fbd7 100644
--- a/src/frontEnd/Workspace.py
+++ b/src/frontEnd/Workspace.py
@@ -39,14 +39,14 @@ class Workspace(QtGui.QWidget):
def initWorkspace(self):
print "Calling workspace"
- self.tedit = QtGui.QTextEdit(self)
- self.label = QtGui.QLabel(self)
- self.ledit = QtGui.QLineEdit(self)
+ self.note = QtGui.QTextEdit(self)
+ self.workspace_label = QtGui.QLabel(self)
+ self.worspace_loc = QtGui.QLineEdit(self)
#Add text to text edit,label and line edit
- self.tedit.append(self.obj.workspace_text)
- self.label.setText("Workspace:")
- self.ledit.setText(self.obj.home)
+ self.note.append(self.obj.workspace_text)
+ self.workspace_label.setText("Workspace:")
+ self.worspace_loc.setText(self.obj.home)
#Buttons
self.browsebtn = QtGui.QPushButton('Browse')
@@ -57,9 +57,9 @@ class Workspace(QtGui.QWidget):
self.cancelbtn.clicked.connect(self.defaultWorkspace)
#Set Geometry
- self.tedit.setGeometry(QtCore.QRect(0, 0, 400, 100))
- self.label.setGeometry(QtCore.QRect(10, 130, 81, 17))
- self.ledit.setGeometry(QtCore.QRect(100, 150, 200, 100))
+ self.note.setGeometry(QtCore.QRect(0, 0, 400, 100))
+ self.workspace_label.setGeometry(QtCore.QRect(10, 130, 81, 17))
+ self.worspace_loc.setGeometry(QtCore.QRect(100, 150, 200, 100))
self.browsebtn.setGeometry(QtCore.QRect(290, 120, 98, 27))
self.okbtn.setGeometry(QtCore.QRect(290, 250, 98, 27))
self.cancelbtn.setGeometry(QtCore.QRect(180, 250, 98, 27))
@@ -68,14 +68,14 @@ class Workspace(QtGui.QWidget):
#Layout
self.hbox = QtGui.QHBoxLayout()
- self.hbox.addWidget(self.tedit)
+ self.hbox.addWidget(self.note)
self.grid = QtGui.QGridLayout()
self.grid.addChildLayout(self.hbox)
- self.grid.addWidget(self.label,2,0)
- self.grid.addWidget(self.ledit, 2, 1)
+ self.grid.addWidget(self.workspace_label,2,0)
+ self.grid.addWidget(self.worspace_loc, 2, 1)
self.grid.addWidget(self.browsebtn, 2, 2)
self.grid.addWidget(self.okbtn,3,2)
self.grid.addWidget(self.cancelbtn,3,3)
@@ -85,7 +85,7 @@ class Workspace(QtGui.QWidget):
self.setWindowTitle("Workspace Launcher")
#self.setWindowIcon(QtGui.QIcon('logo.png'))
self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
- self.tedit.setReadOnly(True)
+ self.note.setReadOnly(True)
self.show()
@@ -95,7 +95,7 @@ class Workspace(QtGui.QWidget):
def createWorkspace(self):
print "Create workspace is called"
- self.create_workspace = str(self.ledit.text())
+ self.create_workspace = str(self.worspace_loc.text())
if os.path.isdir(self.create_workspace):
pass
@@ -105,6 +105,7 @@ class Workspace(QtGui.QWidget):
else:
os.mkdir(self.create_workspace)
self.obj.default_workspace["workspace"] = self.create_workspace
+ self.close()
@@ -112,5 +113,5 @@ class Workspace(QtGui.QWidget):
print "Browse Location called"
self.workspace_directory = QtGui.QFileDialog.getExistingDirectory()
print "Path file :", self.workspace_directory
- self.ledit.setText(self.workspace_directory)
+ self.worspace_loc.setText(self.workspace_directory)
\ No newline at end of file
diff --git a/src/frontEnd/Workspace.pyc b/src/frontEnd/Workspace.pyc
index 7492f39a..8da188bc 100644
--- a/src/frontEnd/Workspace.pyc
+++ b/src/frontEnd/Workspace.pyc
Binary files differ
diff --git a/src/images/close.jpeg b/src/images/close.jpeg
deleted file mode 100644
index ae1224d2..00000000
--- a/src/images/close.jpeg
+++ /dev/null
Binary files differ
diff --git a/src/images/close.png b/src/images/close.png
deleted file mode 100644
index 952e1a53..00000000
--- a/src/images/close.png
+++ /dev/null
Binary files differ
diff --git a/src/images/help.jpeg b/src/images/help.jpeg
deleted file mode 100644
index 843cc08e..00000000
--- a/src/images/help.jpeg
+++ /dev/null
Binary files differ
diff --git a/src/images/help.png b/src/images/help.png
deleted file mode 100644
index ddb893d4..00000000
--- a/src/images/help.png
+++ /dev/null
Binary files differ
diff --git a/src/images/newproj.jpeg b/src/images/newproj.jpeg
deleted file mode 100644
index 13238844..00000000
--- a/src/images/newproj.jpeg
+++ /dev/null
Binary files differ
diff --git a/src/images/newproj.png b/src/images/newproj.png
deleted file mode 100644
index 0b3b368f..00000000
--- a/src/images/newproj.png
+++ /dev/null
Binary files differ
diff --git a/src/images/openproj.jpeg b/src/images/openproj.jpeg
deleted file mode 100644
index 86114b8a..00000000
--- a/src/images/openproj.jpeg
+++ /dev/null
Binary files differ
diff --git a/src/images/openproj.png b/src/images/openproj.png
deleted file mode 100644
index c903aa48..00000000
--- a/src/images/openproj.png
+++ /dev/null
Binary files differ