From 7a183cfa367db01413c001306741d06e1826d077 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 3 Aug 2012 05:16:52 +0200 Subject: might as well push all this. a massive amount of changes --- lyt/directorypackage.h | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'lyt/directorypackage.h') diff --git a/lyt/directorypackage.h b/lyt/directorypackage.h index df8a50e..0d6ea19 100644 --- a/lyt/directorypackage.h +++ b/lyt/directorypackage.h @@ -15,40 +15,33 @@ along with this program. If not, see . *******************************************************************************/ +// Currently unmaintained. +// What this needs to be fixed up: +// -- Implement rename() +// -- Make it emit signals +// -- Add support to the LayoutStudio UI + #ifndef LYTDIRECTORYPACKAGE_H #define LYTDIRECTORYPACKAGE_H #include "packagebase.h" class LYTDirectoryPackage : public LYTPackageBase { + Q_OBJECT public: - LYTDirectoryPackage(QString path); - - QStringList listAnims() const; - QStringList listLayouts() const; - QStringList listTextures() const; - QStringList listFonts() const; - - QByteArray getAnim(QString name) const; - QByteArray getLayout(QString name) const; - QByteArray getTexture(QString name) const; - QByteArray getFont(QString name) const; + LYTDirectoryPackage(QString path, QObject *parent = 0); - bool writeAnim(QString name, QByteArray data); - bool writeLayout(QString name, QByteArray data); - bool writeTexture(QString name, QByteArray data); - bool writeFont(QString name, QByteArray data); + QStringList list(ItemType type) const; + QByteArray get(ItemType type, const QString &name) const; + bool write(ItemType type, const QString &name, const QByteArray &data); + bool remove(ItemType type, const QString &name); + bool needsExplicitSave() const { return false; } bool savePackage(); QString description() const; QString path() const; protected: - QStringList listSubDirIfExists(QString dirName) const; - QByteArray getFileFromSubDirIfExists(QString dirName, QString fileName) const; - bool writeFileToSubDir(QString dirName, QString fileName, QByteArray data); - - QString m_path; }; -- cgit v1.2.3