summaryrefslogtreecommitdiff
path: root/lyt/directorypackage.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/directorypackage.h
parentebcc95da4c26369511caa90d89c5ed06e1e4853a (diff)
downloadLayoutStudio-7a183cfa367db01413c001306741d06e1826d077.tar.gz
LayoutStudio-7a183cfa367db01413c001306741d06e1826d077.zip
might as well push all this. a massive amount of changes
Diffstat (limited to 'lyt/directorypackage.h')
-rw-r--r--lyt/directorypackage.h33
1 files changed, 13 insertions, 20 deletions
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 <http://www.gnu.org/licenses/>.
*******************************************************************************/
+// 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;
};