Skip to content

Commit

Permalink
details
Browse files Browse the repository at this point in the history
  • Loading branch information
KubiV committed Jan 24, 2024
1 parent b2b12d6 commit 03769e6
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added graphical/icon_v1_file.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified version2/.DS_Store
Binary file not shown.
Binary file modified version2/src/.DS_Store
Binary file not shown.
Binary file modified version2/src/__pycache__/MoleculeModelGenerating.cpython-311.pyc
Binary file not shown.
9 changes: 5 additions & 4 deletions version2/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__()

Expand All @@ -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()

Expand Down Expand Up @@ -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(" "))
Expand Down Expand Up @@ -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_())

0 comments on commit 03769e6

Please sign in to comment.