59 void openICInTab(
const QString &blobName,
int icElementId,
const QByteArray &blob);
60 void save(
const QString &fileName = {});
94 bool eventFilter(QObject *watched, QEvent *event)
override;
98 [[nodiscard]]
int findTabWithFile(
const QString &fileName)
const;
103 [[nodiscard]] QString displayName(
const WorkSpace *ws,
const QFileInfo &fileInfo)
const;
107 [[nodiscard]] QString nextUntitledTitle()
const;
111 bool warnIfOpenInAnotherTab(
const QString &fileName);
116 void onBlobRenamed(
const QString &oldName,
const QString &newName);
122 QString promptSavePath(
const QString &fileName);
128 QTabBar *m_tabBar =
nullptr;
Interface MainWindow provides to its extracted controllers (export, IC, …).
A widget containing a complete circuit editing environment.
void recentFileAdded(const QString &filePath)
Emitted when a file-backed tab is (re)named, to feed the recent-files list.
QString currentTabName() const
int confirmSave(bool multiple)
QFileInfo currentFile() const
bool closeTab(int tabIndex)
Closes the tab at tabIndex (prompting to save if needed). Returns false if cancelled.
void setDolphinFileName(const QString &fileName)
WorkspaceManager(QTabWidget *tab, MainWindowHost &host, QObject *parent=nullptr)
QString dolphinFileName() const
bool eventFilter(QObject *watched, QEvent *event) override
Closes the tab under the cursor when its tab bar is middle-clicked.
void openICInTab(const QString &blobName, int icElementId, const QByteArray &blob)
void onCurrentIndexChanged(int newIndex)
Reacts to QTabWidget::currentChanged: updates the current tab and emits currentTabChanged.
void save(const QString &fileName={})
void currentTabChanged(WorkSpace *tab)
Emitted when the active tab changes (or becomes null); the shell rebinds the chrome.
QFileInfo icListFile() const
WorkSpace * currentTab() const
void setCurrentFile(const QFileInfo &fileInfo)
Updates the tab title / tooltip / recent files for the workspace that emitted fileChanged.
void loadPandaFile(const QString &fileName)