Update: app/xtreewidget.h
This commit is contained in:
parent
ce5c98b78d
commit
39cd33efd4
@ -1,66 +1,67 @@
|
||||
#ifndef XTREEWIDGET_H
|
||||
#define XTREEWIDGET_H
|
||||
|
||||
#include "d3dbsp_structs.h"
|
||||
#include "ddsfile.h"
|
||||
#include "iwifile.h"
|
||||
#include "fastfile.h"
|
||||
#include "xtreewidgetitem.h"
|
||||
#include "zonefile.h"
|
||||
#include "xrawfile.h"
|
||||
#include "gfximage.h"
|
||||
#include "xstringtable.h"
|
||||
#include "menudef.h"
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QFileDialog>
|
||||
|
||||
class XTreeWidget : public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit XTreeWidget(QWidget *parent = nullptr);
|
||||
~XTreeWidget();
|
||||
|
||||
void AddFastFile(std::shared_ptr<FastFile> aFastFile);
|
||||
void AddZoneFile(std::shared_ptr<ZoneFile> aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
|
||||
void AddIWIFile(std::shared_ptr<IWIFile> aIWIFile);
|
||||
void AddDDSFile(std::shared_ptr<DDSFile> aDDSFile);
|
||||
|
||||
std::shared_ptr<ZoneFile> FindZoneFile(const QString aStem);
|
||||
std::shared_ptr<FastFile> FindFastFile(const QString aStem);
|
||||
|
||||
bool HasZoneFile(const QString aStem);
|
||||
bool HasFastFile(const QString aStem);
|
||||
|
||||
void CloseFastFile(const QString aFFName);
|
||||
signals:
|
||||
void DDSFileSelected(std::shared_ptr<DDSFile> aDDSFile, const QString aParentName);
|
||||
void IWIFileSelected(std::shared_ptr<IWIFile> aIWIFile, const QString aParentName);
|
||||
void FastFileSelected(std::shared_ptr<FastFile> aFastFile, const QString aParentName);
|
||||
void ZoneFileSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
|
||||
void LocalStringSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
|
||||
void RawFileSelected(std::shared_ptr<RawFile> aRawFile, const QString aParentName);
|
||||
void ImageSelected(std::shared_ptr<GfxImage> aImage, const QString aParentName);
|
||||
void TechSetSelected(std::shared_ptr<MaterialTechSet> aZoneFile, const QString aParentName);
|
||||
void StrTableSelected(std::shared_ptr<StringTable> aStrTable, const QString aParentName);
|
||||
void MenuSelected(std::shared_ptr<MenuDef> aMenu, const QString aParentName);
|
||||
void SoundSelected(std::shared_ptr<LoadedSound> aSound, const QString aParentName);
|
||||
void MaterialSelected(std::shared_ptr<Material> aMaterial, const QString aParentName);
|
||||
void ItemSelected(const QString itemText);
|
||||
|
||||
void ItemClosed(const QString itemText);
|
||||
void Cleared();
|
||||
|
||||
protected:
|
||||
void ItemSelectionChanged();
|
||||
void PrepareContextMenu(const QPoint &pos);
|
||||
|
||||
private:
|
||||
QMap<QString, std::shared_ptr<FastFile>> mFastFiles;
|
||||
QMap<QString, std::shared_ptr<ZoneFile>> mZoneFiles;
|
||||
QMap<QString, std::shared_ptr<DDSFile>> mDDSFiles;
|
||||
QMap<QString, std::shared_ptr<IWIFile>> mIWIFiles;
|
||||
};
|
||||
|
||||
#endif // XTREEWIDGET_H
|
||||
#ifndef XTREEWIDGET_H
|
||||
#define XTREEWIDGET_H
|
||||
|
||||
#include "d3dbsp_structs.h"
|
||||
#include "ddsfile.h"
|
||||
#include "iwifile.h"
|
||||
#include "fastfile.h"
|
||||
#include "xloadedsound.h"
|
||||
#include "xtreewidgetitem.h"
|
||||
#include "zonefile.h"
|
||||
#include "xrawfile.h"
|
||||
#include "xgfximage.h"
|
||||
#include "xstringtable.h"
|
||||
#include "xmenudef.h"
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QFileDialog>
|
||||
|
||||
class XTreeWidget : public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit XTreeWidget(QWidget *parent = nullptr);
|
||||
~XTreeWidget();
|
||||
|
||||
void AddFastFile(FastFile* aFastFile);
|
||||
void AddZoneFile(const ZoneFile *aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
|
||||
void AddIWIFile(IWIFile* aIWIFile);
|
||||
void AddDDSFile(DDSFile* aDDSFile);
|
||||
|
||||
const ZoneFile *FindZoneFile(const QString aStem);
|
||||
const FastFile* FindFastFile(const QString aStem);
|
||||
|
||||
bool HasZoneFile(const QString aStem);
|
||||
bool HasFastFile(const QString aStem);
|
||||
|
||||
void CloseFastFile(const QString aFFName);
|
||||
signals:
|
||||
void DDSFileSelected(const DDSFile* aDDSFile, const QString aParentName);
|
||||
void IWIFileSelected(const IWIFile* aIWIFile, const QString aParentName);
|
||||
void FastFileSelected(const FastFile* aFastFile, const QString aParentName);
|
||||
void ZoneFileSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
||||
void LocalStringSelected(const ZoneFile* aZoneFile, const QString aParentName);
|
||||
void RawFileSelected(const XRawFile* aRawFile, const QString aParentName);
|
||||
void ImageSelected(const XGfxImage* aImage, const QString aParentName);
|
||||
void TechSetSelected(const XMaterialTechniqueSet* aZoneFile, const QString aParentName);
|
||||
void StrTableSelected(const XStringTable* aStrTable, const QString aParentName);
|
||||
void MenuSelected(const XMenuDef* aMenu, const QString aParentName);
|
||||
void SoundSelected(const XLoadedSound* aSound, const QString aParentName);
|
||||
void MaterialSelected(const XMaterial* aMaterial, const QString aParentName);
|
||||
void ItemSelected(const QString itemText);
|
||||
|
||||
void ItemClosed(const QString itemText);
|
||||
void Cleared();
|
||||
|
||||
protected:
|
||||
void ItemSelectionChanged();
|
||||
void PrepareContextMenu(const QPoint &pos);
|
||||
|
||||
private:
|
||||
QMap<QString, const FastFile*> mFastFiles;
|
||||
QMap<QString, const ZoneFile*> mZoneFiles;
|
||||
QMap<QString, const DDSFile*> mDDSFiles;
|
||||
QMap<QString, const IWIFile*> mIWIFiles;
|
||||
};
|
||||
|
||||
#endif // XTREEWIDGET_H
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user