summaryrefslogtreecommitdiff
path: root/lspackagemodel.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 /lspackagemodel.h
parentebcc95da4c26369511caa90d89c5ed06e1e4853a (diff)
downloadLayoutStudio-7a183cfa367db01413c001306741d06e1826d077.tar.gz
LayoutStudio-7a183cfa367db01413c001306741d06e1826d077.zip
might as well push all this. a massive amount of changes
Diffstat (limited to 'lspackagemodel.h')
-rw-r--r--lspackagemodel.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/lspackagemodel.h b/lspackagemodel.h
new file mode 100644
index 0000000..18911de
--- /dev/null
+++ b/lspackagemodel.h
@@ -0,0 +1,42 @@
+#ifndef LSPACKAGEMODEL_H
+#define LSPACKAGEMODEL_H
+
+#include <QAbstractItemModel>
+#include "lyt/packagebase.h"
+
+class LSPackageModel : public QAbstractItemModel {
+ Q_OBJECT
+public:
+ explicit LSPackageModel(LYTPackageBase *pkg, QObject *parent = 0);
+ ~LSPackageModel();
+
+ LYTPackageBase *package() const { return m_package; }
+
+ QModelIndex index(int row, int column, const QModelIndex &parent) const;
+ QModelIndex parent(const QModelIndex &child) const;
+ int rowCount(const QModelIndex &parent) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+signals:
+
+private slots:
+ //void handleAboutToAddFile(LYTPackageBase::ItemType type, QString name);
+ //void handleAboutToRemoveFile(LYTPackageBase::ItemType type, QString name);
+ //void handleAboutToRenameFile(LYTPackageBase::ItemType type, QString from, QString to);
+ //void handleAboutToModifyFile(LYTPackageBase::ItemType type, QString name);
+
+ void handleFileWasAdded(LYTPackageBase::ItemType type, QString name);
+ void handleFileWasRemoved(LYTPackageBase::ItemType type, QString name);
+ void handleFileWasRenamed(LYTPackageBase::ItemType type, QString from, QString to);
+ //void handleFileWasModified(LYTPackageBase::ItemType type, QString name);
+
+public slots:
+
+protected:
+ LYTPackageBase *m_package;
+
+ QStringList *m_caches;
+};
+
+#endif // LSPACKAGEMODEL_H