diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-22 14:14:17 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-22 14:14:17 (GMT) |
| commit | 9abe51526cac2634af0541c3de69834dd30e9f78 (patch) | |
| tree | 6ae4deadfe00a83094b9d288d8c11d8ce823577a /src/preview/PreviewModel.h | |
| parent | 2c311b9a36a88fadd96f3d39acb1ab2590835d81 (diff) | |
| download | powder-9abe51526cac2634af0541c3de69834dd30e9f78.zip powder-9abe51526cac2634af0541c3de69834dd30e9f78.tar.gz | |
Move all GUI source files into gui/
Diffstat (limited to 'src/preview/PreviewModel.h')
| -rw-r--r-- | src/preview/PreviewModel.h | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h deleted file mode 100644 index a8800e3..0000000 --- a/src/preview/PreviewModel.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef PREVIEWMODEL_H_ -#define PREVIEWMODEL_H_ - -#include <vector> -#include <iostream> -#include <pthread.h> -#undef GetUserName //God dammit microsoft! -#include "PreviewView.h" -#include "client/SaveInfo.h" -#include "preview/Comment.h" -#include "search/Thumbnail.h" - -using namespace std; - -struct SaveData -{ - unsigned char * data; - int length; -}; - -class PreviewView; -class PreviewModel { - bool doOpen; - bool commentBoxEnabled; - vector<PreviewView*> observers; - SaveInfo * save; - vector<char> saveDataBuffer; - std::vector<SaveComment*> * saveComments; - void notifySaveChanged(); - void notifySaveCommentsChanged(); - void notifyCommentsPageChanged(); - void notifyCommentBoxEnabledChanged(); - - //Background retrieval - int tSaveID; - int tSaveDate; - - // - bool commentsLoaded; - int commentsTotal; - int commentsPageNumber; - - bool updateSaveDataWorking; - volatile bool updateSaveDataFinished; - pthread_t updateSaveDataThread; - static void * updateSaveDataTHelper(void * obj); - static void updateSaveDataTDelete(void * arg); - void * updateSaveDataT(); - - bool updateSaveInfoWorking; - volatile bool updateSaveInfoFinished; - pthread_t updateSaveInfoThread; - static void * updateSaveInfoTHelper(void * obj); - static void updateSaveInfoTDelete(void * arg); - void * updateSaveInfoT(); - - bool updateSaveCommentsWorking; - volatile bool updateSaveCommentsFinished; - pthread_t updateSaveCommentsThread; - static void * updateSaveCommentsTHelper(void * obj); - static void updateSaveCommentsTDelete(void * arg); - void * updateSaveCommentsT(); -public: - PreviewModel(); - SaveInfo * GetSave(); - std::vector<SaveComment*> * GetComments(); - - bool GetCommentBoxEnabled(); - void SetCommentBoxEnabled(bool enabledState); - - bool GetCommentsLoaded(); - int GetCommentsPageNum(); - int GetCommentsPageCount(); - void UpdateComments(int pageNumber); - - void AddObserver(PreviewView * observer); - void UpdateSave(int saveID, int saveDate); - void SetFavourite(bool favourite); - bool GetDoOpen(); - void SetDoOpen(bool doOpen); - void Update(); - virtual ~PreviewModel(); -}; - -#endif /* PREVIEWMODEL_H_ */ |
