2019-12-21 18:36:40 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QMdiArea>
|
|
|
|
#include <QMdiSubWindow>
|
|
|
|
#include <QTreeWidget>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
|
|
#include "ELF.h"
|
|
|
|
#include "ELFHeaderView.h"
|
|
|
|
#include "ELFSymbolView.h"
|
|
|
|
#include "ELFSectionView.h"
|
|
|
|
#include "ELFProgramView.h"
|
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
template <typename ElfType>
|
2019-12-21 18:36:40 +00:00
|
|
|
class CELFView : public QMdiSubWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CELFView(QMdiArea*);
|
2020-02-06 14:12:26 +00:00
|
|
|
~CELFView() = default;
|
2019-12-21 18:36:40 +00:00
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
void SetELF(ElfType*);
|
2019-12-21 18:36:40 +00:00
|
|
|
void Reset();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
|
2023-03-15 09:25:50 -04:00
|
|
|
void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
|
2019-12-21 18:36:40 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void PopulateList();
|
|
|
|
void itemSelectionChanged();
|
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
ElfType* m_pELF = nullptr;
|
2019-12-21 18:36:40 +00:00
|
|
|
QWidget* m_centralwidget;
|
|
|
|
QHBoxLayout* m_layout;
|
|
|
|
QTreeWidget* m_treeWidget;
|
|
|
|
QGroupBox* m_groupBox;
|
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
CELFHeaderView<ElfType>* m_pHeaderView;
|
|
|
|
CELFSymbolView<ElfType>* m_pSymbolView;
|
|
|
|
CELFSectionView<ElfType>* m_pSectionView;
|
|
|
|
CELFProgramView<ElfType>* m_pProgramView;
|
2019-12-21 18:36:40 +00:00
|
|
|
|
|
|
|
std::vector<QLineEdit*> m_editFields;
|
|
|
|
bool m_hasPrograms = false;
|
|
|
|
bool m_hasSymbols = false;
|
|
|
|
};
|