summaryrefslogtreecommitdiff
path: root/lyt/archivepackage.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-03 05:16:52 +0200
committerTreeki <treeki@gmail.com>2012-08-03 05:16:52 +0200
commit7a183cfa367db01413c001306741d06e1826d077 (patch)
treee50e2e222ddf924e4d868e79ed87a0ced85d01e1 /lyt/archivepackage.h
parentebcc95da4c26369511caa90d89c5ed06e1e4853a (diff)
downloadLayoutStudio-7a183cfa367db01413c001306741d06e1826d077.tar.gz
LayoutStudio-7a183cfa367db01413c001306741d06e1826d077.zip
might as well push all this. a massive amount of changes
Diffstat (limited to '')
-rw-r--r--lyt/archivepackage.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/lyt/archivepackage.h b/lyt/archivepackage.h
index e2d5f25..786d962 100644
--- a/lyt/archivepackage.h
+++ b/lyt/archivepackage.h
@@ -22,39 +22,29 @@
#include "wii/archiveu8.h"
class LYTArchivePackage : public LYTPackageBase {
+ Q_OBJECT
public:
- LYTArchivePackage();
- LYTArchivePackage(QString filename);
+ LYTArchivePackage(QObject *parent = 0);
+ LYTArchivePackage(QString filename, QObject *parent = 0);
~LYTArchivePackage();
- 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;
-
- 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 rename(ItemType type, const QString &from, const QString &to);
+ bool remove(ItemType type, const QString &name);
+ bool needsExplicitSave() const { return true; }
bool savePackage();
QString description() const;
WiiArchiveU8 *archive() const;
QString filename() const;
+ void setFilename(QString path);
protected:
- QStringList listSubDirIfExists(QString dirName) const;
- QByteArray getFileFromSubDirIfExists(QString dirName, QString fileName) const;
- bool writeFileToSubDir(QString dirName, QString fileName, QByteArray data);
-
WiiArchiveU8 *m_archive;
QString m_filename;
};