Skip to content

Commit

Permalink
Add open project button top left
Browse files Browse the repository at this point in the history
  • Loading branch information
ermannolocascio committed Sep 3, 2024
1 parent 22c639d commit 2ccfe4f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 8 additions & 7 deletions spinetoolbox/ui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,19 @@ def __init__(self):
self._disable_project_actions()
self.connect_signals()


#startbox = StartUpMainWindow(self)
#startbox.project_load_requested.connect(self.restore_project)
#startbox.show()

# Start Up box Widget
self.startup_box_widget = StartupBoxWidget(self)
# Connect to restore_project the function in the start_up_box.py
self.startup_box_widget.project_load_requested.connect(self.restore_project)
# Connect to open_project the function in the start_up_box.py
self.startup_box_widget.project_opener.connect(self.open_project)
# Show the Start Up box
self.startup_box_widget.show()

# Get the changelog differences
diff = get_changelog_diff(self._qsettings)
print(diff)
# Assuming you create StartupBoxWidget somewhere in ui_main.py

# Connect to set_changelog_diff the function in the start_up_box.py
self.startup_box_widget.set_changelog_diff(diff)

def eventFilter(self, obj, ev):
Expand Down
5 changes: 4 additions & 1 deletion spinetoolbox/widgets/startup_box_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from PySide6.QtWidgets import QWidget, QPushButton
from PySide6.QtCore import Qt, Slot, Signal
from spinetoolbox.ui.startup_box import Ui_Form

from PySide6.QtWidgets import QListWidgetItem


class StartupBoxWidget(QWidget):
project_load_requested = Signal(str)
project_opener = Signal(str)
Expand All @@ -27,6 +27,9 @@ def __init__(self, parent=None):
self._ui = Ui_Form()
self._ui.setupUi(self)




# Connect the clicked signal of open project button
self._ui.pushButton_8.clicked.connect(self.open_project_startbox)

Expand Down

0 comments on commit 2ccfe4f

Please sign in to comment.