summaryrefslogtreecommitdiff
path: root/src/gui/preview/PreviewController.h
blob: c5a4306df9a7191df6c5d798b6e37533a2131c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef PREVIEWCONTROLLER_H_
#define PREVIEWCONTROLLER_H_

#include "gui/preview/PreviewModel.h"
#include "gui/preview/PreviewView.h"
#include "Controller.h"
#include "client/SaveInfo.h"
#include "client/ClientListener.h"

class LoginController;
class PreviewModel;
class PreviewView;
class PreviewController: public ClientListener {
	int saveId;
	int saveDate;
	PreviewModel * previewModel;
	PreviewView * previewView;
	LoginController * loginWindow;
	ControllerCallback * callback;
public:
	virtual void NotifyAuthUserChanged(Client * sender);
	inline int SaveID() { return saveId; };

	bool HasExited;
	PreviewController(int saveID, ControllerCallback * callback);
	PreviewController(int saveID, int saveDate, ControllerCallback * callback);
	void Exit();
	void DoOpen();
	void OpenInBrowser();
	void Report(std::string message);
	void ShowLogin();
	bool GetDoOpen();
	SaveInfo * GetSave();
	PreviewView * GetView() { return previewView; }
	void Update();
	void FavouriteSave();
	bool SubmitComment(std::string comment);

	bool NextCommentPage();
	bool PrevCommentPage();

	virtual ~PreviewController();
};

#endif /* PREVIEWCONTROLLER_H_ */