wiRedPanda
Home
About
Download
Try out
API Docs
wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
ICController.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 <QObject>
11
#include <QString>
12
13
class
IC
;
14
class
MainWindowHost
;
15
class
Scene
;
16
27
class
ICController
:
public
QObject
28
{
29
Q_OBJECT
30
31
public
:
32
explicit
ICController
(
MainWindowHost
&host, QObject *parent =
nullptr
);
33
34
public
slots:
36
void
addICFromFile
();
37
39
void
showRemoveICHint
();
40
42
void
removeICFile
(
const
QString &icFileName);
43
45
void
embedSelectedIC
();
46
48
void
extractSelectedIC
();
49
51
void
embedICByFile
(
const
QString &fileName);
52
54
void
extractICByBlobName
(
const
QString &blobName);
55
57
void
makeSelfContained
();
58
60
void
addEmbeddedICFromFile
();
61
63
void
removeEmbeddedIC
(
const
QString &blobName);
64
65
private
:
67
IC
*selectedIC()
const
;
68
70
QString resolveUniqueBlobName(
const
QString &initialName,
Scene
*scene);
71
76
bool
ensureProjectSaved(
Scene
*scene);
77
78
MainWindowHost
&m_host;
79
};
ICController::makeSelfContained
void makeSelfContained()
Embeds every file-based IC in the circuit so it becomes self-contained.
Definition
ICController.cpp:338
ICController::embedICByFile
void embedICByFile(const QString &fileName)
Embeds the file-based IC named fileName (drag-and-drop target).
Definition
ICController.cpp:265
ICController::extractICByBlobName
void extractICByBlobName(const QString &blobName)
Extracts the embedded IC blob blobName to a user-chosen .panda file.
Definition
ICController.cpp:302
ICController::addEmbeddedICFromFile
void addEmbeddedICFromFile()
Prompts for a .panda file and registers it as an embedded IC blob.
Definition
ICController.cpp:404
ICController::removeICFile
void removeICFile(const QString &icFileName)
Deletes icFileName from the project directory and any instances of it in the scene.
Definition
ICController.cpp:123
ICController::addICFromFile
void addICFromFile()
Copies a chosen .panda file (and its dependencies) into the project's IC directory.
Definition
ICController.cpp:56
ICController::embedSelectedIC
void embedSelectedIC()
Embeds the currently selected file-backed IC as a blob in the circuit.
Definition
ICController.cpp:200
ICController::removeEmbeddedIC
void removeEmbeddedIC(const QString &blobName)
Removes the embedded IC blob blobName from the current circuit.
Definition
ICController.cpp:433
ICController::showRemoveICHint
void showRemoveICHint()
Shows the "drag here to remove" hint for the file-based IC trash button.
Definition
ICController.cpp:115
ICController::extractSelectedIC
void extractSelectedIC()
Extracts the currently selected embedded IC back out to a .panda file.
Definition
ICController.cpp:233
ICController::ICController
ICController(MainWindowHost &host, QObject *parent=nullptr)
Definition
ICController.cpp:31
IC
Graphic element representing an Integrated Circuit (sub-circuit) box.
Definition
IC.h:31
MainWindowHost
Interface MainWindow provides to its extracted controllers (export, IC, …).
Definition
MainWindowHost.h:29
Scene
Main circuit editing scene.
Definition
Scene.h:56
App
UI
ICController.h
Generated by
1.16.1