1
0
Fork 0
forked from len0rd/rockbox

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

@ -99,6 +99,7 @@ public:
{ Q_UNUSED(addr); Q_UNUSED(value); Q_UNUSED(mode); return false; }
virtual bool IsDirty() { return m_dirty; }
virtual bool Commit();
QString GetFileName() { return m_filename; }
protected:
QString m_filename;
@ -164,6 +165,7 @@ public:
virtual bool WriteRegister(soc_addr_t addr, soc_word_t value, WriteMode mode);
virtual bool IsDirty() { return false; }
virtual bool Commit() { return true; }
HWStubDevice *GetDevice() { return m_dev; }
protected:
QString m_soc;