wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
MainWindowHost.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10#include <QDir>
11#include <QFileInfo>
12
13class DolphinHost;
14class ElementPalette;
15class QString;
16class QWidget;
17class WorkSpace;
18
29{
30public:
31 virtual ~MainWindowHost() = default;
32
34 virtual WorkSpace *currentTab() const = 0;
35
37 virtual QFileInfo currentFile() const = 0;
38
40 virtual QDir currentDir() const = 0;
41
43 virtual QFileInfo icListFile() const = 0;
44
46 virtual ElementPalette *palette() const = 0;
47
49 virtual QWidget *widget() = 0;
50
52 virtual DolphinHost *dolphinHost() = 0;
53
55 virtual void showStatusMessage(const QString &message, int timeout) = 0;
56
58 virtual void requestSave() = 0;
59
61 virtual void setICButtonsVisible(bool visible) = 0;
62
64 virtual void refreshICButtonsEnabled() = 0;
65};
Interface the host application (MainWindow) provides to BewavedDolphin.
Definition DolphinHost.h:24
Controller for the left-panel element palette, IC list, and search tab.
Interface MainWindow provides to its extracted controllers (export, IC, …).
virtual void refreshICButtonsEnabled()=0
Re-evaluates the enabled state of the Add-IC button against the current tab.
virtual DolphinHost * dolphinHost()=0
The host's DolphinHost facet, used to drive headless beWavedDolphin exports.
virtual void setICButtonsVisible(bool visible)=0
Shows or hides the IC management tool buttons (Add / Remove / Make-self-contained).
virtual QDir currentDir() const =0
Directory of the currently active .panda file.
virtual WorkSpace * currentTab() const =0
Currently visible WorkSpace tab, or nullptr when none is open.
virtual ~MainWindowHost()=default
virtual QFileInfo currentFile() const =0
QFileInfo of the currently active .panda file.
virtual ElementPalette * palette() const =0
The element palette panel (file-based and embedded IC lists live here).
virtual QFileInfo icListFile() const =0
File info used to populate the file-based IC palette (parent workspace for inline IC tabs).
virtual void showStatusMessage(const QString &message, int timeout)=0
Shows message in the host's status bar for timeout milliseconds.
virtual void requestSave()=0
Saves the current tab (equivalent to triggering the Save action).
virtual QWidget * widget()=0
Widget used to parent modal dialogs spawned by a controller.
A widget containing a complete circuit editing environment.
Definition Workspace.h:33