naturtag.app.app module

Main Qt app window and entry point

class naturtag.app.app.MainWindow(app)

Bases: QMainWindow

check_first_run()

On the user’s first run, show the welcome/download dialog

check_for_updates()

Check GitHub for a newer release and show the result in a dialog.

closeEvent(_)

Stop background workers and save settings before closing the app

info(message, timeout=3000)

Show a message both in the status bar and in the logs

mousePressEvent(event)

Deselect focus from text edit fields when clicking anywhere else on the window

open_about()

Show an About dialog with basic app information

open_app_dir()

Open the native file explorer to the app data/config dir

open_bug_report()

Open the GitHub bug report template in a web browser

open_docs()

Open the documentation in a web browser

reload_qss()

Reload Qt stylesheet

reset_db()

Reset the database

show_settings()

Re-read settings from disk, rebuild the settings menu, and show it.

staticMetaObject = PySide6.QtCore.QMetaObject("MainWindow" inherits "QMainWindow": )
switch_tab_observations()
switch_tab_photos()
switch_tab_taxa()
toggle_fullscreen()

Toggle fullscreen, and change icon for toolbar fullscreen button

Return type:

bool

toggle_log_tab(checked=True)
class naturtag.app.app.NaturtagApp(*args, **kwargs)

Bases: QApplication

post_init()
staticMetaObject = PySide6.QtCore.QMetaObject("NaturtagApp" inherits "QApplication": )
naturtag.app.app.install_excepthook()

Install a custom sys.excepthook that logs unhandled exceptions and shows a dialog.

naturtag.app.app.main()