summaryrefslogtreecommitdiff
path: root/lyt/directorypackage.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
committerTreeki <treeki@gmail.com>2010-10-14 20:17:20 +0200
commitebcc95da4c26369511caa90d89c5ed06e1e4853a (patch)
tree6ed445f0204a6e6615088d135c4b29c4309077a4 /lyt/directorypackage.cpp
parentfdf8cfec2b795393d7ee901abaf747575067068b (diff)
downloadLayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.tar.gz
LayoutStudio-ebcc95da4c26369511caa90d89c5ed06e1e4853a.zip
brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs)
Diffstat (limited to 'lyt/directorypackage.cpp')
-rw-r--r--lyt/directorypackage.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lyt/directorypackage.cpp b/lyt/directorypackage.cpp
index e8f31b9..dd8c39d 100644
--- a/lyt/directorypackage.cpp
+++ b/lyt/directorypackage.cpp
@@ -26,7 +26,7 @@ LYTDirectoryPackage::LYTDirectoryPackage(QString path) : LYTPackageBase() {
-QStringList LYTDirectoryPackage::listSubDirIfExists(QString dirName) {
+QStringList LYTDirectoryPackage::listSubDirIfExists(QString dirName) const {
QDir search(m_path);
if (search.cd(dirName)) {
@@ -37,7 +37,7 @@ QStringList LYTDirectoryPackage::listSubDirIfExists(QString dirName) {
}
-QByteArray LYTDirectoryPackage::getFileFromSubDirIfExists(QString dirName, QString fileName) {
+QByteArray LYTDirectoryPackage::getFileFromSubDirIfExists(QString dirName, QString fileName) const {
QDir search(m_path);
if (search.cd(dirName)) {
@@ -71,37 +71,37 @@ bool LYTDirectoryPackage::writeFileToSubDir(QString dirName, QString fileName, Q
-QStringList LYTDirectoryPackage::listAnims() {
+QStringList LYTDirectoryPackage::listAnims() const {
return this->listSubDirIfExists("anim");
}
-QStringList LYTDirectoryPackage::listLayouts() {
+QStringList LYTDirectoryPackage::listLayouts() const {
return this->listSubDirIfExists("blyt");
}
-QStringList LYTDirectoryPackage::listTextures() {
+QStringList LYTDirectoryPackage::listTextures() const {
return this->listSubDirIfExists("timg");
}
-QStringList LYTDirectoryPackage::listFonts() {
+QStringList LYTDirectoryPackage::listFonts() const {
return this->listSubDirIfExists("font");
}
-QByteArray LYTDirectoryPackage::getAnim(QString name) {
+QByteArray LYTDirectoryPackage::getAnim(QString name) const {
return this->getFileFromSubDirIfExists("anim", name);
}
-QByteArray LYTDirectoryPackage::getLayout(QString name) {
+QByteArray LYTDirectoryPackage::getLayout(QString name) const {
return this->getFileFromSubDirIfExists("blyt", name);
}
-QByteArray LYTDirectoryPackage::getTexture(QString name) {
+QByteArray LYTDirectoryPackage::getTexture(QString name) const {
return this->getFileFromSubDirIfExists("timg", name);
}
-QByteArray LYTDirectoryPackage::getFont(QString name) {
+QByteArray LYTDirectoryPackage::getFont(QString name) const {
return this->getFileFromSubDirIfExists("font", name);
}
@@ -131,6 +131,6 @@ bool LYTDirectoryPackage::savePackage() {
}
-QString LYTDirectoryPackage::description() {
+QString LYTDirectoryPackage::description() const {
return m_path;
}