summaryrefslogtreecommitdiff
path: root/src/frontEnd/ProjectExplorer.py
diff options
context:
space:
mode:
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(