diff options
author | Fahim | 2015-05-13 17:26:28 +0530 |
---|---|---|
committer | Fahim | 2015-05-13 17:26:28 +0530 |
commit | a66a1ea6b9d9943db1ee534a1edb0585dbf92177 (patch) | |
tree | 83283a10ad005a4d4e06d9318c49e249e4179481 /src | |
parent | 3bbbc55fd1bc8c77c00315568e8fcf54c60ac25c (diff) | |
parent | a35df11fe3405fca786cb35bdf4d74f25d7bc4b0 (diff) | |
download | eSim-a66a1ea6b9d9943db1ee534a1edb0585dbf92177.tar.gz eSim-a66a1ea6b9d9943db1ee534a1edb0585dbf92177.tar.bz2 eSim-a66a1ea6b9d9943db1ee534a1edb0585dbf92177.zip |
Merge pull request #26 from komalsheth236/master
Workspace.py modified
Diffstat (limited to 'src')
-rw-r--r-- | src/frontEnd/Workspace.py | 58 | ||||
-rw-r--r-- | src/frontEnd/Workspace.pyc | bin | 3533 -> 3401 bytes |
2 files changed, 22 insertions, 36 deletions
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py index d759cff6..8ba6c60f 100644 --- a/src/frontEnd/Workspace.py +++ b/src/frontEnd/Workspace.py @@ -36,14 +36,19 @@ class Workspace(QtGui.QWidget): def initWorkspace(self): #print "Calling workspace" + + self.mainwindow = QtGui.QVBoxLayout() + self.split = QtGui.QSplitter() + self.split.setOrientation(QtCore.Qt.Vertical) + + self.grid = QtGui.QGridLayout() 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.workspace_loc = QtGui.QLineEdit(self) + self.note.append(self.obj_appconfig.workspace_text) self.workspace_label.setText("Workspace:") - self.worspace_loc.setText(self.obj_appconfig.home) + self.workspace_loc.setText(self.obj_appconfig.home) #Buttons self.browsebtn = QtGui.QPushButton('Browse') @@ -52,38 +57,21 @@ class Workspace(QtGui.QWidget): self.okbtn.clicked.connect(self.createWorkspace) self.cancelbtn = QtGui.QPushButton('Cancel') self.cancelbtn.clicked.connect(self.defaultWorkspace) - - #Set Geometry - #Need to set Geometry properly - 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)) - - - #Layout - self.hbox = QtGui.QHBoxLayout() - self.hbox.addWidget(self.note) - - self.grid = QtGui.QGridLayout() - self.grid.addChildLayout(self.hbox) - - - 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) - self.setLayout(self.grid) - - self.setGeometry(QtCore.QRect(200,200,400,400)) + self.grid.addWidget(self.note, 0,0,1,15) + self.grid.addWidget(self.workspace_label, 2,1) + self.grid.addWidget(self.workspace_loc,2,2,2,12) + self.grid.addWidget(self.browsebtn, 2,14) + self.grid.addWidget(self.okbtn, 4,13) + self.grid.addWidget(self.cancelbtn, 4,14) + + self.setGeometry(QtCore.QRect(400,200,400,400)) + self.setMaximumSize(4000, 200) self.setWindowTitle("Workspace Launcher") #self.setWindowIcon(QtGui.QIcon('logo.png')) self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.note.setReadOnly(True) + self.setLayout(self.grid) self.show() @@ -93,7 +81,7 @@ class Workspace(QtGui.QWidget): def createWorkspace(self): print "Create workspace is called" - self.create_workspace = str(self.worspace_loc.text()) + self.create_workspace = str(self.workspace_loc.text()) #Checking if Workspace already exist or not if os.path.isdir(self.create_workspace): print "Already present" @@ -102,13 +90,11 @@ class Workspace(QtGui.QWidget): else: os.mkdir(self.create_workspace) self.obj_appconfig.default_workspace["workspace"] = self.create_workspace - self.close() - - + self.close() def browseLocation(self): print "Browse Location called" self.workspace_directory = QtGui.QFileDialog.getExistingDirectory(self, "Browse Location",os.path.expanduser("~")) print "Path file :", self.workspace_directory - self.worspace_loc.setText(self.workspace_directory) + self.workspace_loc.setText(self.workspace_directory)
\ No newline at end of file diff --git a/src/frontEnd/Workspace.pyc b/src/frontEnd/Workspace.pyc Binary files differindex 7a5776b8..e1072b0e 100644 --- a/src/frontEnd/Workspace.pyc +++ b/src/frontEnd/Workspace.pyc |