summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/frontEnd/Application.py58
-rw-r--r--src/frontEnd/Workspace.py42
2 files changed, 84 insertions, 16 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index a90dd1a7..615c3f5f 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -33,6 +33,7 @@ from PyQt4.Qt import QSize
class Application(QtGui.QMainWindow):
+ global project_name
"""
Its our main window of application
"""
@@ -59,7 +60,7 @@ class Application(QtGui.QMainWindow):
self.obj_appconfig._app_heigth)
self.setWindowTitle(self.obj_appconfig._APPLICATION)
self.showMaximized()
- self.show()
+ #self.show()
def initToolBar(self):
@@ -291,32 +292,61 @@ def main(args):
"""
print "Starting eSim......"
app = QtGui.QApplication(args)
-
- """
- splash_pix = QtGui.QPixmap('../images/FreeEDAlogo.jpg')
+
+ splash_pix = QtGui.QPixmap('../../images/splash_screen_esim.png')
+ splash = QtGui.QSplashScreen(splash_pix,QtCore.Qt.WindowStaysOnTopHint)
+ splash.setMask(splash_pix.mask())
+ splash.show()
+ #QtGui.QApplication.setStyle(QtGui.QStyleFactory.create("Cleanlooks"))
+ appView = Application()
+ appView.spl=splash
+ appView.obj_workspace.returnWhetherClickedOrNot(appView)
+ appView.hide()
+ appView.obj_workspace.show()
+ sys.exit(app.exec_())
+ #appView.hide()
+ ########################################################################################################################################
+
+ """splash_pix = QtGui.QPixmap('../images/splash_screen_esim.png')
splash = QtGui.QSplashScreen(splash_pix,QtCore.Qt.WindowStaysOnTopHint)
- progressBar = QtGui.QProgressBar(splash)
+ progressBar = QtGui.QProgressBar(splash)
+ progressBar.setGeometry(0,470,1004,20)
splash.setMask(splash_pix.mask())
splash.show()
for i in range(0, 100):
progressBar.setValue(i)
- t = time.time()
+ #cond=threading.Condition()
+ if i==50:
+
+ appView = Application()
+ appView.hide()
+ #appView.obj_workspace.returnWhetherClickedOrNot(appView)
+ appView.obj_workspace.show()
+ #appView.obj_workspace.show()
+ appView.obj_workspace.calledFromApplicationToAssignSysAndApp(sys,app)#`11 ,cond)
+ #with cond:
+ #cond.wait()
+
+ t = time.time()
while time.time() < t + 0.1:
app.processEvents()
- time.sleep(2)
+ #time.sleep(2)
- appView = Application()
- appView.show()
+ #appView = Application()
+ #appView.hide()
splash.finish(appView)
- sys.exit(app.exec_())
- """
- appView = Application()
+ #sys.exit(app.exec_())
+
#QtGui.QApplication.setStyle(QtGui.QStyleFactory.create("Cleanlooks"))
- appView.show()
- sys.exit(app.exec_())
+ #appView.obj_workspace.returnWhetherClickedOrNot(appView)
+ #appView.obj_workspace.show()
+ #appView.hide()
+ appView.show()
+ sys.exit(app.exec_())"""
+######################################################################################################################################################
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py
index 035a8688..aceac6a5 100644
--- a/src/frontEnd/Workspace.py
+++ b/src/frontEnd/Workspace.py
@@ -48,7 +48,9 @@ class Workspace(QtGui.QWidget):
self.note.append(self.obj_appconfig.workspace_text)
self.workspace_label.setText("Workspace:")
self.workspace_loc.setText(self.obj_appconfig.home)
-
+ self.imp_var=0
+ self.close_var=0
+ self.window_open_close=0
#Buttons
self.browsebtn = QtGui.QPushButton('Browse')
self.browsebtn.clicked.connect(self.browseLocation)
@@ -76,8 +78,38 @@ class Workspace(QtGui.QWidget):
def defaultWorkspace(self):
print "Default location selected"
+ self.imp_var=1
self.obj_appconfig.print_info('Default workspace selected : ' + self.obj_appconfig.default_workspace["workspace"])
self.close()
+ var_appView.show()
+ def calledFromApplicationToAssignSysAndApp(self,sys,app):
+ global var_sys,var_app
+ var_sys=sys
+ var_app=app
+
+
+ #var_sys.exit(var_app.exec_())
+ """def closeEvent(self, event):
+ if self.imp_var==0:
+ self.close_var=1
+ self.destroy()
+ event.accept()
+ self.window_open_close=1"""
+
+
+ def close(self, *args, **kwargs):
+ self.window_open_close=1
+ self.close_var=1
+ #with var_cond:
+ # var_cond.notify()
+ return QtGui.QWidget.close(self, *args, **kwargs)
+
+
+ def returnWhetherClickedOrNot(self,appView):
+ global var_appView
+ var_appView=appView
+
+
def createWorkspace(self):
print "Create workspace is called"
@@ -91,7 +123,13 @@ class Workspace(QtGui.QWidget):
else:
os.mkdir(self.create_workspace)
self.obj_appconfig.default_workspace["workspace"] = self.create_workspace
- self.close()
+ self.imp_var=1
+ self.close()
+ var_appView.show()
+ """var_appView.obj_Mainview.setVisible(True)
+ var_appView.obj_appconfig.setVisible(True)
+ super.topToolbar.setVisible(True)
+ super.lefttoolbar.setVisible(True)"""
def browseLocation(self):
print "Browse Location called"