diff --git a/README.md b/README.md index fb3ee09e2f38db7fa7cb428f74dbd5dcccddb2e3..e86058a0a758eb1eeb774aa817aea2ebb46ccf62 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ To generate the documentation, the following additional packages are required: - [Sphinx-Gallery](https://sphinx-gallery.github.io/) - [mplsignal](https://mplsignal.readthedocs.io/) - [jupyters-sphinx](https://jupyter-sphinx.readthedocs.io/) + - [qtgallery](https://github.com/ixjlyons/qtgallery) ### Using setuptools to create a package diff --git a/b_asic/scheduler_gui/main_window.py b/b_asic/scheduler_gui/main_window.py index a182ad2ee6ee1a52f7292862442c52892ce340c4..a2c81fa0353ec262acb4797bec695480fb11da99 100644 --- a/b_asic/scheduler_gui/main_window.py +++ b/b_asic/scheduler_gui/main_window.py @@ -577,7 +577,7 @@ class ScheduleMainWindow(QMainWindow, Ui_MainWindow): 'hide_exit_dialog' in settings. """ settings = QSettings() - hide_dialog = settings.value("scheduler/hide_exit_dialog", False, bool) + hide_dialog = settings.value("scheduler/hide_exit_dialog", True, bool) ret = QMessageBox.StandardButton.Yes if not hide_dialog: diff --git a/b_asic/scheduler_gui/main_window.ui b/b_asic/scheduler_gui/main_window.ui index 4bd2dd0c52ec4cacd2c4588b587ade4adae80b26..6b23022605ac6f0786f3383faf5ccc0a20ee9ef5 100644 --- a/b_asic/scheduler_gui/main_window.ui +++ b/b_asic/scheduler_gui/main_window.ui @@ -385,6 +385,9 @@ <property name="checkable"> <bool>true</bool> </property> + <property name="checked"> + <bool>true</bool> + </property> <property name="icon"> <iconset theme="view-close"> <normaloff>../../../.designer/backup</normaloff>../../../.designer/backup</iconset> diff --git a/b_asic/scheduler_gui/ui_main_window.py b/b_asic/scheduler_gui/ui_main_window.py index 1409e7fc1f82cb7bce01c77b8282698eb9e3e088..f636678e545f237c30f98dd0d17ae12abf6304c6 100644 --- a/b_asic/scheduler_gui/ui_main_window.py +++ b/b_asic/scheduler_gui/ui_main_window.py @@ -186,6 +186,7 @@ class Ui_MainWindow(object): self.menu_save_as.setObjectName("menu_save_as") self.menu_exit_dialog = QtWidgets.QAction(MainWindow) self.menu_exit_dialog.setCheckable(True) + self.menu_exit_dialog.setChecked(True) icon = QtGui.QIcon.fromTheme("view-close") self.menu_exit_dialog.setIcon(icon) self.menu_exit_dialog.setObjectName("menu_exit_dialog") diff --git a/docs_sphinx/conf.py b/docs_sphinx/conf.py index aae9c64e8b3dc5f825b6c1b58cb396b9a8d3634d..dc42428a9d9e8eddd7ce4a1251e3de592fe1c981 100644 --- a/docs_sphinx/conf.py +++ b/docs_sphinx/conf.py @@ -5,8 +5,11 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + import shutil +import qtgallery + project = 'B-ASIC' copyright = '2020-2023, Oscar Gustafsson et al' author = 'Oscar Gustafsson et al' @@ -25,6 +28,7 @@ extensions = [ 'sphinx_gallery.gen_gallery', 'numpydoc', # Needs to be loaded *after* autodoc. 'jupyter_sphinx', + 'qtgallery', ] templates_path = ['_templates'] @@ -66,4 +70,19 @@ sphinx_gallery_conf = { 'filename_pattern': '.', 'doc_module': ('b_asic',), 'reference_url': {'b_asic': None}, + 'image_scrapers': ( + 'matplotlib', + qtgallery.qtscraper, + ), + 'reset_modules': ( + 'matplotlib', + qtgallery.reset_qapp, + ), +} + +qtgallery_conf = { + "xvfb_size": (640, 480), + "xvfb_color_depth": 24, + "xfvb_use_xauth": False, + "xfvb_extra_args": [], } diff --git a/examples/secondorderdirectformiir.py b/examples/secondorderdirectformiir.py index e78a48f32e25b53cfa18f301de2aa2873379b1f1..cf4815981b182cbcdf9ead400742fd73959da4be 100644 --- a/examples/secondorderdirectformiir.py +++ b/examples/secondorderdirectformiir.py @@ -41,3 +41,7 @@ sfg.set_execution_time_of_type(Addition.type_name(), 1) schedule = Schedule(sfg, cyclic=True) schedule.show() + +# %% +# To edit the schedule in the GUI use: +schedule.edit() diff --git a/requirements_doc.txt b/requirements_doc.txt index 5112621bc53d459111ac351cf2d9648481a50e42..3bffd7ca2f8cebff758f71f041d8310c91dcf3c2 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -4,3 +4,4 @@ numpydoc sphinx-gallery mplsignal jupyter-sphinx +qtgallery