diff --git a/.DS_Store b/.DS_Store index bb845e2..571c9e0 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/graphical/icon_v1_file.jpg b/graphical/icon_v1_file.jpg new file mode 100644 index 0000000..7c36727 Binary files /dev/null and b/graphical/icon_v1_file.jpg differ diff --git a/version2/.DS_Store b/version2/.DS_Store index d3561fa..908cb59 100644 Binary files a/version2/.DS_Store and b/version2/.DS_Store differ diff --git a/version2/src/.DS_Store b/version2/src/.DS_Store index 915c663..e48addb 100644 Binary files a/version2/src/.DS_Store and b/version2/src/.DS_Store differ diff --git a/version2/src/__pycache__/MoleculeModelGenerating.cpython-311.pyc b/version2/src/__pycache__/MoleculeModelGenerating.cpython-311.pyc index 628696b..3cc0de3 100644 Binary files a/version2/src/__pycache__/MoleculeModelGenerating.cpython-311.pyc and b/version2/src/__pycache__/MoleculeModelGenerating.cpython-311.pyc differ diff --git a/version2/src/main.py b/version2/src/main.py index fa9a765..3d27483 100644 --- a/version2/src/main.py +++ b/version2/src/main.py @@ -15,8 +15,9 @@ from PyQt5.QtCore import Qt home_directory = Path.home() +current_directory = os.path.dirname(__file__) -class ChemicalInfoApp(QWidget): +class MultiColouredMoleculesSTLGenerator(QWidget): def __init__(self): super().__init__() @@ -35,7 +36,7 @@ def __init__(self): self.quality_slider = QSlider(Qt.Horizontal) self.quality_label = QLabel("Quality: 50") self.generate_model_button = QPushButton("Generate Model") - self.default_image_path = "/Users/jakubvavra/Documents/GitHub/3D-Print-Molecules/graphical/icon_v1.jpg" # Replace with the actual path to your default image + self.default_image_path = os.path.abspath(os.path.join(current_directory, "../../graphical/icon_v1.jpg")) # Replace with the actual path to your default image self.init_ui() @@ -157,7 +158,7 @@ def fetch_file_data(self): self.model_template = file_path print(self.model_template) - self.set_image("/Users/jakubvavra/Documents/GitHub/3D-Print-Molecules/graphical/icon_v1.jpg") + self.set_image(os.path.abspath(os.path.join(current_directory, "../../graphical/icon_v1_file.jpg"))) self.table.setItem(0, 1, QTableWidgetItem(file_path)) self.table.setItem(1, 1, QTableWidgetItem("Imported file")) self.table.setItem(2, 1, QTableWidgetItem(" ")) @@ -378,5 +379,5 @@ def generate_model(self): if __name__ == '__main__': app = QApplication(sys.argv) - chem_info_app = ChemicalInfoApp() + chem_info_app = MultiColouredMoleculesSTLGenerator() sys.exit(app.exec_())