summaryrefslogtreecommitdiff
path: root/src/stamps/StampsModel.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-19 14:22:18 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-19 14:22:18 (GMT)
commitc4bace95bf97546ecb2fff4343fe82d0540d34ab (patch)
treea35378f9a3062041751606239d82fd45e92b7062 /src/stamps/StampsModel.h
parente9fc64eed6e5cbf5e750063e1ad2e30887840dbf (diff)
downloadpowder-c4bace95bf97546ecb2fff4343fe82d0540d34ab.zip
powder-c4bace95bf97546ecb2fff4343fe82d0540d34ab.tar.gz
Allow deleting of stamps
Diffstat (limited to 'src/stamps/StampsModel.h')
-rw-r--r--src/stamps/StampsModel.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stamps/StampsModel.h b/src/stamps/StampsModel.h
index cee158c..0356349 100644
--- a/src/stamps/StampsModel.h
+++ b/src/stamps/StampsModel.h
@@ -9,11 +9,13 @@
#define STAMPSMODEL_H_
#include <vector>
+#include <string>
#include <math.h>
#include "search/Save.h"
class StampsView;
class StampsModel {
+ vector<std::string> selected;
Save * stamp;
std::vector<std::string> stampIDs;
std::vector<Save*> stampsList;
@@ -21,6 +23,7 @@ class StampsModel {
int currentPage;
void notifyStampsListChanged();
void notifyPageChanged();
+ void notifySelectedChanged();
public:
StampsModel();
int GetPageCount() { return max(1, (int)(ceil(stampIDs.size()/16))); }
@@ -30,6 +33,10 @@ public:
void UpdateStampsList(int pageNumber);
Save * GetStamp();
void SetStamp(Save * newStamp);
+ vector<std::string> GetSelected() { return selected; }
+ void ClearSelected() { selected.clear(); notifySelectedChanged(); }
+ void SelectStamp(std::string stampID);
+ void DeselectStamp(std::string stampID);
virtual ~StampsModel();
};