15 :
QWidget(parent), mGatelibReference(nullptr), mGuiPluginReference(nullptr)
19 mActionCreate =
new Action(
this);
20 mActionOpen =
new Action(
this);
21 mActionClose =
new Action(
this);
22 mActionSave =
new Action(
this);
23 mActionSaveAs =
new Action(
this);
32 new SettingsItemKeybind(
"HAL Shortcut 'Save File'",
"keybinds/project_save_file",
QKeySequence(
"Ctrl+S"),
"Keybindings:Global",
"Keybind for saving the currently opened file.");
34 "HAL Shortcut 'Create Empty Netlist'",
"keybinds/project_create_file",
QKeySequence(
"Ctrl+N"),
"Keybindings:Global",
"Keybind for creating a new and empty netlist in HAL.");
36 mSettingOpenFile =
new SettingsItemKeybind(
"HAL Shortcut 'Open File'",
"keybinds/project_open_file",
QKeySequence(
"Ctrl+O"),
"Keybindings:Global",
"Keybind for opening a new File in HAL.");
65 if (gateLibrary == (mGatelibReference==
nullptr))
return;
73 mGatelibReference = glcw;
74 mGuiPluginReference = plmgr;
80 if (mGatelibReference)
82 mActionCreate->
setText(
"New Gate Library");
83 mActionOpen->
setText(
"Open Gate Library");
84 mActionClose->
setText(
"Close Gate Lib Manager");
85 mActionSave->
setText(
"Save Gate Library");
86 mActionSaveAs->
setText(
"Save Gate Library As");
97 else if (mGuiPluginReference)
100 mActionOpen->
setText(
"Load HAL Plugin");
101 mActionClose->
setText(
"Close Plugin Manager");
113 mActionCreate->
setText(
"New Project");
115 mActionOpen->
setText(
"Open Project");
116 mActionClose->
setText(
"Close Project");
117 mActionSave->
setText(
"Save HAL Project");
118 mActionSaveAs->
setText(
"Save HAL Project As");
Provides an interface for triggerable functionality that can be inserted into widgets and also connec...
void setText(const QString &text)
void handleFileStatusChanged(bool gateLibrary, bool isDirty)
FileActions(QWidget *parent=nullptr)
void setup(GateLibraryManager *glcw=nullptr, GuiPluginManager *plmgr=nullptr)
bool modifiedFilesExisting() const
bool isGatelibModified() const
void status_changed(bool gateLibrary, bool isDirty)
void handleCancelClicked()
void handleCreateAction()
void handleSaveAsAction()
void handleLoadExternalPlugin()
void handleButtonCancel()
void handleActionOpenProject()
void handleActionGatelibraryManager()
void handleSaveAsTriggered()
void handleActionCloseFile()
void handleSaveTriggered()
A SettingsItem to modify keybinds.
void keySequenceChanged(QKeySequence value)
virtual QVariant value() const override
QIcon getStyledSvgIcon(const QString &from_to_colors_enabled, const QString &svg_path, QString from_to_colors_disabled=QString())
FileStatusManager * gFileStatusManager
void setIcon(const QIcon &icon)
void triggered(bool checked)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
QObject * parent() const const
void setKey(const QKeySequence &key)
virtual void polish(QWidget *widget)
virtual void unpolish(QWidget *widget)
QString toString() const const