SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
macoswindowutils.mm File Reference

macOS implementation of attachAsChildWindow (see header). More...

#include "platform/macoswindowutils.h"
#include <QDialog>
#include <QGuiApplication>
#include <QWidget>
import <AppKit/AppKit.h>
Include dependency graph for macoswindowutils.mm:

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::platform
 

Functions

void openswmmvis::platform::attachAsChildWindow (QWidget *dialog)
 Attach dialog as an NSWindow child window of the nearest non-dialog top-level window above it (the main / project window).
 
void openswmmvis::platform::detachFromParentWindow (QWidget *dialog)
 Detach dialog from its parent NSWindow (inverse of attachAsChildWindow).
 
void openswmmvis::platform::beginSimulationActivity ()
 Hold a user-initiated NSProcessInfo activity while a simulation runs, so App Nap does not throttle a backgrounded run (a run the user Cmd-Tabbed away from could take far longer than the same deck in a terminal). Reference counted: nested begin/end pairs from overlapping runs hold one activity. Idle system sleep stays allowed. Only defined on macOS — callers must guard with Q_OS_MACOS.
 
void openswmmvis::platform::endSimulationActivity ()
 Release the activity taken by beginSimulationActivity(); ends it when the last overlapping run finishes. Extra calls are ignored.
 

Detailed Description

macOS implementation of attachAsChildWindow (see header).

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later