summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyantra698Sumanto2025-06-29 17:11:57 +0530
committerEyantra698Sumanto2025-06-29 17:11:57 +0530
commit520780d560d8bbcb334ecce00ed614d52b0bf641 (patch)
treeb5aca746cff58a53c3719999ea403c171c9fe815
parent4239a55c3fea736990b4c5895d976674772e8c0a (diff)
downloadeSim-520780d560d8bbcb334ecce00ed614d52b0bf641.tar.gz
eSim-520780d560d8bbcb334ecce00ed614d52b0bf641.tar.bz2
eSim-520780d560d8bbcb334ecce00ed614d52b0bf641.zip
Revert "Merge pull request #353 from Anupkumarpandey1/Namespace_error_anup"
This reverts commit 95373a9d69d59d162d077fd924158612f931c693, reversing changes made to 4cc1482aaf2d7bd17b7bd1add2793dfc0ca10186.
-rw-r--r--requirements.txt2
-rwxr-xr-xsrc/frontEnd/ProjectExplorer.py44
-rw-r--r--src/projManagement/Validation.py8
-rw-r--r--src/projManagement/newProject.py8
4 files changed, 31 insertions, 31 deletions
diff --git a/requirements.txt b/requirements.txt
index 6af81602..3715e0d0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -23,4 +23,4 @@ python-dateutil==2.9.0.post0
scipy==1.10.1
six==1.17.0
watchdog==4.0.2
-zipp==3.20.2
+zipp==3.20.2 \ No newline at end of file
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index b91f162c..99772378 100755
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -32,27 +32,29 @@ class ProjectExplorer(QtWidgets.QWidget):
self.treewidget.setHeaderItem(header)
self.treewidget.setColumnHidden(1, True)
- # Apply dark theme to header and background to match 'Welcome' dock
- self.treewidget.setStyleSheet('''
- QHeaderView::section {
- background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
- stop:0 rgba(33, 37, 51, 0.95), stop:1 rgba(20, 25, 35, 0.9));
- color: #90caf9; /* Soft blue */
- font-weight: 700;
- font-size: 17px;
- border-radius: 0;
- padding: 12px 0px 12px 18px;
- letter-spacing: 0.5px;
-
- }
- QTreeWidget {
- background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
- stop:0 rgba(26, 29, 41, 0.98), stop:1 rgba(15, 20, 25, 0.95));
- color: #e8eaed;
- border: 1px solid rgba(255, 255, 255, 0.12);
- border-radius: 0 0 12px 12px;
- }
- ''')
+ # CSS
+ init_path = '../../'
+ if os.name == 'nt':
+ init_path = ''
+
+ self.treewidget.setStyleSheet(" \
+ QTreeView { border-radius: 15px; border: 1px \
+ solid gray; padding: 5px; width: 200px; height: 150px; }\
+ QTreeView::branch:has-siblings:!adjoins-item { \
+ border-image: url(" + init_path + "images/vline.png) 0;} \
+ QTreeView::branch:has-siblings:adjoins-item { \
+ border-image: url(" + init_path + "images/branch-more.png) 0; } \
+ QTreeView::branch:!has-children:!has-siblings:adjoins-item { \
+ border-image: url(" + init_path + "images/branch-end.png) 0; } \
+ QTreeView::branch:has-children:!has-siblings:closed, \
+ QTreeView::branch:closed:has-children:has-siblings { \
+ border-image: none; \
+ image: url(" + init_path + "images/branch-closed.png); } \
+ QTreeView::branch:open:has-children:!has-siblings, \
+ QTreeView::branch:open:has-children:has-siblings { \
+ border-image: none; \
+ image: url(" + init_path + "images/branch-open.png); } \
+ ")
for parents, children in list(
self.obj_appconfig.project_explorer.items()):
diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py
index 18b8a0aa..5f239163 100644
--- a/src/projManagement/Validation.py
+++ b/src/projManagement/Validation.py
@@ -61,8 +61,8 @@ class Validation:
:projDir => Contains path of the new projDir created
@return
- :"CHECKEXIST" => If same project name folder exists
- :"CHECKNAME" => If space is there in project name
+ :"CHECKEXIST" => If smae project name folder exists
+ :"CHECKNAME" => If space is there in name
:"VALID" => If valid project name given
"""
print("Function: Validating New Project Information")
@@ -72,9 +72,7 @@ class Validation:
return "CHECKEXIST" # Project with name already exist
else:
# Check Proper name for project. It should not have space
- # Extract only the project name (basename) from the full path
- projName = os.path.basename(projDir)
- if re.search(r"\s", projName):
+ if re.search(r"\s", projDir):
return "CHECKNAME"
else:
return "VALID"
diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py
index 2a443678..10fb0cb5 100644
--- a/src/projManagement/newProject.py
+++ b/src/projManagement/newProject.py
@@ -63,8 +63,8 @@ class NewProjectInfo(QtWidgets.QWidget):
self.projName = projName
self.workspace = self.obj_appconfig.default_workspace['workspace']
# self.projName = self.projEdit.text()
- # Remove leading and trailing spaces AND replace internal spaces with underscores
- self.projName = str(self.projName).strip().replace(" ", "_")
+ # Remove leading and trailing space
+ self.projName = str(self.projName).rstrip().lstrip()
self.projDir = os.path.join(self.workspace, str(self.projName))
@@ -144,5 +144,5 @@ class NewProjectInfo(QtWidgets.QWidget):
self.msg.exec_()
return None, None
-def cancelProject(self):
- self.close()
+ def cancelProject(self):
+ self.close()