qeditor: rework modified indicator, register tab names depend on content

Because Qt doesn't support QObject multiple inherance, it is a bit tricky
to have a base class which interact with the UI. The register tab name
now display:
- file dump name (for dumps)
- hwstub device path (for hwstub)
And the register editor display the filename
Change-Id: If2579992098c02627c67d560c824f1668e73bc45
Reviewed-on: http://gerrit.rockbox.org/979
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
Amaury Pouly 2014-09-18 21:36:17 +02:00
parent dbb59291e7
commit 970c2482dd
7 changed files with 129 additions and 48 deletions

View file

@ -226,9 +226,7 @@ public:
RegEdit(Backend *backend, QWidget *parent = 0);
~RegEdit();
virtual bool Quit();
signals:
void OnModified(bool mod);
virtual QWidget *GetWidget();
protected slots:
void OnSocItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
@ -267,6 +265,7 @@ protected:
void CreateNewDeviceItem(QTreeWidgetItem *parent);
void CreateNewRegisterItem(QTreeWidgetItem *parent);
void CreateNewFieldItem(QTreeWidgetItem *parent);
void UpdateTabName();
QGroupBox *m_file_group;
QToolButton *m_file_open;