From 3e134d4e2826699656d7b7b4c8edb1f7ba89aed9 Mon Sep 17 00:00:00 2001
From: komalsheth236
Date: Wed, 13 May 2015 13:36:24 +0530
Subject: Project Explorer Compeleted
---
src/frontEnd/Application.py | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
(limited to 'src/frontEnd/Application.py')
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index a1560c9b..dd2e2264 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -29,9 +29,8 @@ import Workspace
import sys
import time
import subprocess
-from frontEnd import ProjectExplorer
import DockArea
-
+from frontEnd import ProjectExplorer
class Application(QtGui.QMainWindow):
"""
@@ -69,6 +68,7 @@ class Application(QtGui.QMainWindow):
self.newproj = QtGui.QAction(QtGui.QIcon('../images/newProject.png'),'New Project',self)
self.newproj.setShortcut('Ctrl+N')
self.newproj.triggered.connect(self.new_project)
+
#self.newproj.connect(self.newproj,QtCore.SIGNAL('triggered()'),self,QtCore.SLOT(self.new_project()))
self.openproj = QtGui.QAction(QtGui.QIcon('../images/openProject.png'),'Open Project',self)
@@ -129,8 +129,10 @@ class Application(QtGui.QMainWindow):
if ok:
self.projname = (str(text))
self.project = NewProjectInfo()
- self.project.createProject(self.projname)
- #self.setCentralWidget(self.obj_Mainview)
+ directory, filelist =self.project.createProject(self.projname)
+
+ self.obj_Mainview.obj_projectExplorer.addTreeNode(directory, filelist)
+ #self.setCentralWidget(self.obj_Mainview.obj_projectExplorer)
else:
print "No project created"
@@ -141,8 +143,12 @@ class Application(QtGui.QMainWindow):
"""
print "Open Project called"
self.project = OpenProjectInfo()
- self.project.body()
- print "init main view in open proj"
+
+ try:
+ directory, filelist = self.project.body()
+ self.obj_Mainview.obj_projectExplorer.addTreeNode(directory, filelist)
+ except:
+ pass
#self.setCentralWidget(self.obj_Mainview)
@@ -167,7 +173,6 @@ class Application(QtGui.QMainWindow):
self.obj_Mainview.obj_dockarea.createTestEditor()
-
def testing(self):
print "Success hit kicad button"
@@ -189,7 +194,7 @@ class MainView(QtGui.QWidget):
self.noteArea = QtGui.QTextEdit()
self.obj_dockarea = DockArea.DockArea()
self.obj_projectExplorer = ProjectExplorer.ProjectExplorer()
- self.projectExplorer = self.obj_projectExplorer.maketree()
+
#Adding content to vertical middle Split.
self.middleSplit.setOrientation(QtCore.Qt.Vertical)
@@ -201,9 +206,9 @@ class MainView(QtGui.QWidget):
self.middleContainer.setLayout(self.middleContainerLayout)
#Adding content of left split
- self.leftSplit.addWidget(self.projectExplorer)
+ self.leftSplit.addWidget(self.obj_projectExplorer)
self.leftSplit.addWidget(self.middleContainer)
-
+
#Adding to main Layout
self.mainLayout.addWidget(self.leftSplit)
--
cgit