diff options
author | Sumanto Kar | 2025-06-08 20:41:58 +0530 |
---|---|---|
committer | GitHub | 2025-06-08 20:41:58 +0530 |
commit | 95373a9d69d59d162d077fd924158612f931c693 (patch) | |
tree | 59f14e80d6da53c151da7bf43b2df8b16c20183f | |
parent | 4cc1482aaf2d7bd17b7bd1add2793dfc0ca10186 (diff) | |
parent | abe1b8ce6196365d053cb0bf8c566589e5099104 (diff) | |
download | eSim-95373a9d69d59d162d077fd924158612f931c693.tar.gz eSim-95373a9d69d59d162d077fd924158612f931c693.tar.bz2 eSim-95373a9d69d59d162d077fd924158612f931c693.zip |
Merge pull request #353 from Anupkumarpandey1/Namespace_error_anup
Fixing this "New Project creation has "The project name should not contain space between them" even though there is no space. #283" error (Namespace error)
-rw-r--r-- | requirements.txt | 19 | ||||
-rw-r--r-- | src/frontEnd/Application.py | 2 | ||||
-rwxr-xr-x | src/frontEnd/ProjectExplorer.py | 44 | ||||
-rw-r--r-- | src/projManagement/Validation.py | 8 | ||||
-rw-r--r-- | src/projManagement/newProject.py | 8 |
5 files changed, 50 insertions, 31 deletions
diff --git a/requirements.txt b/requirements.txt index 5ff1f952..143c06af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,24 @@ +contourpy==1.1.1 +cycler==0.12.1 entrypoints==0.3 flake8==3.7.7 +fonttools==4.57.0 +hdlparse==1.0.4 +importlib_resources==6.4.5 +kiwisolver==1.4.7 +matplotlib==3.7.5 mccabe==0.6.1 +numpy==1.24.4 +packaging==25.0 +pillow==10.4.0 pycodestyle==2.5.0 pyflakes==2.1.1 +pyparsing==3.1.4 +PyQt5==5.15.7 +PyQt5-Qt5==5.15.17 +PyQt5_sip==12.15.0 +python-dateutil==2.9.0.post0 +scipy==1.10.1 +six==1.17.0 +watchdog==4.0.2 +zipp==3.20.2 diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 8ad5230d..0ea906c3 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -910,4 +910,4 @@ if __name__ == '__main__': try: main(sys.argv) except Exception as err: - print("Error: ", err) + print("Error: ", err)
\ No newline at end of file diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 99772378..b91f162c 100755 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -32,29 +32,27 @@ class ProjectExplorer(QtWidgets.QWidget): self.treewidget.setHeaderItem(header) self.treewidget.setColumnHidden(1, True) - # 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); } \ - ") + # 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; + } + ''') for parents, children in list( self.obj_appconfig.project_explorer.items()): diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py index 5f239163..18b8a0aa 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 smae project name folder exists - :"CHECKNAME" => If space is there in name + :"CHECKEXIST" => If same project name folder exists + :"CHECKNAME" => If space is there in project name :"VALID" => If valid project name given """ print("Function: Validating New Project Information") @@ -72,7 +72,9 @@ class Validation: return "CHECKEXIST" # Project with name already exist else: # Check Proper name for project. It should not have space - if re.search(r"\s", projDir): + # Extract only the project name (basename) from the full path + projName = os.path.basename(projDir) + if re.search(r"\s", projName): return "CHECKNAME" else: return "VALID" diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index 10fb0cb5..2a443678 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 space - self.projName = str(self.projName).rstrip().lstrip() + # Remove leading and trailing spaces AND replace internal spaces with underscores + self.projName = str(self.projName).strip().replace(" ", "_") 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() |