summaryrefslogtreecommitdiff
path: root/src/frontEnd/ProjectExplorer.py
diff options
context:
space:
mode:
authoranjalijaiswal082019-05-30 15:36:29 +0530
committernilshah982019-06-13 12:15:50 +0530
commitd0bb982da7dc3454ebc1e97d698ecff28d12fcb6 (patch)
tree7e7ef2b04109fdc917c3434df1cc844ac442e794 /src/frontEnd/ProjectExplorer.py
parenta0f738ba15264b69d9d51755569408bdd8e383b5 (diff)
downloadeSim-d0bb982da7dc3454ebc1e97d698ecff28d12fcb6.tar.gz
eSim-d0bb982da7dc3454ebc1e97d698ecff28d12fcb6.tar.bz2
eSim-d0bb982da7dc3454ebc1e97d698ecff28d12fcb6.zip
browser, frontEnd changes
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r--src/frontEnd/ProjectExplorer.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index 3ee66cd3..02d4c54c 100644
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -4,8 +4,16 @@ import json
from configuration.Appconfig import Appconfig
+# This is main class for Project Explorer Area.
class ProjectExplorer(QtGui.QWidget):
+ """ """
+
def __init__(self):
+ """
+ This method is doing following tasks:
+ a)initializing objects used in full program.
+ b)view of project explorer area.
+ """
QtGui.QWidget.__init__(self)
self.obj_appconfig = Appconfig()
self.treewidget = QtGui.QTreeWidget()
@@ -37,7 +45,7 @@ class ProjectExplorer(QtGui.QWidget):
os.path.join(parents)
if os.path.exists(parents):
pathlist = parents.split(os.sep)
- parentnode = QtGui.QTreeWidgetItem(
+ parentnode = QtGui.QTreeWidgetItem(function
self.treewidget, [pathlist[-1], parents])
for files in children:
QtGui.QTreeWidgetItem(
@@ -73,7 +81,6 @@ class ProjectExplorer(QtGui.QWidget):
indexes = self.treewidget.selectedIndexes()
if len(indexes) > 0:
-
level = 0
index = indexes[0]
while index.parent().isValid():
@@ -146,16 +153,21 @@ class ProjectExplorer(QtGui.QWidget):
self.obj_appconfig.current_project['ProjectName']]
) = []
+ # This function is enabling save button option.
def enable_save(self):
self.save.setEnabled(True)
+ # This function is saving data before it closes the given file.
def save_data(self):
self.fopen = open(self.filePath, 'w')
self.fopen.write(self.text.toPlainText())
self.fopen.close()
self.textwindow.close()
+ # This function removes the project in explorer area by right
+ # clicking on project and selecting remove option.
def removeProject(self):
+ """ """
self.indexItem = self.treewidget.currentIndex()
self.filePath = str(
self.indexItem.sibling(
@@ -171,7 +183,10 @@ class ProjectExplorer(QtGui.QWidget):
json.dump(self.obj_appconfig.project_explorer,
open(self.obj_appconfig.dictPath, 'w'))
+ # This function refresh the project in explorer area by right
+ # clicking on project and selecting refresh option.
def refreshProject(self):
+ """ """
self.indexItem = self.treewidget.currentIndex()
self.filePath = str(
self.indexItem.sibling(