14 :
QWidget(parent), mGatelibReference(nullptr), mGuiPluginReference(nullptr)
18 mActionCreate =
new Action(
this);
19 mActionOpen =
new Action(
this);
20 mActionClose =
new Action(
this);
21 mActionSave =
new Action(
this);
22 mActionSaveAs =
new Action(
this);
31 new SettingsItemKeybind(
"HAL Shortcut 'Save File'",
"keybinds/project_save_file",
QKeySequence(
"Ctrl+S"),
"Keybindings:Global",
"Keybind for saving the currently opened file.");
33 "HAL Shortcut 'Create Empty Netlist'",
"keybinds/project_create_file",
QKeySequence(
"Ctrl+N"),
"Keybindings:Global",
"Keybind for creating a new and empty netlist in HAL.");
35 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 Q_UNUSED(gateLibraryAffected);
72 Q_UNUSED(gateLibraryAffected);
79 mGatelibReference = glcw;
80 mGuiPluginReference = plmgr;
86 if (mGatelibReference)
88 mActionCreate->
setText(
"New Gate Library");
89 mActionOpen->
setText(
"Open Gate Library");
90 mActionClose->
setText(
"Close Gate Lib Manager");
91 mActionSave->
setText(
"Save Gate Library");
92 mActionSaveAs->
setText(
"Save Gate Library As");
102 else if (mGuiPluginReference)
105 mActionOpen->
setText(
"Load HAL Plugin");
106 mActionClose->
setText(
"Close Plugin Manager");
118 mActionCreate->
setText(
"New Project");
120 mActionOpen->
setText(
"Open Project");
121 mActionClose->
setText(
"Close Project");
122 mActionSave->
setText(
"Save HAL Project");
123 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)
FileActions(QWidget *parent=nullptr)
void setup(GateLibraryManager *glcw=nullptr, GuiPluginManager *plmgr=nullptr)
void handleFileStatusChanged(bool gateLibraryAffected, bool isDirty)
void handleFileOpenChanged(bool gateLibraryAffected, bool isOpen)
void status_changed(bool gateLibraryAffected, bool isDirty)
bool modifiedFilesExisting() const
bool isGatelibModified() const
void open_changed(bool gateLibraryAffected, bool isOpen)
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