summaryrefslogtreecommitdiff
path: root/src/search/SearchController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/SearchController.cpp')
-rw-r--r--src/search/SearchController.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp
index 7103591..46a353c 100644
--- a/src/search/SearchController.cpp
+++ b/src/search/SearchController.cpp
@@ -3,8 +3,10 @@
#include "SearchModel.h"
#include "SearchView.h"
#include "interface/Panel.h"
+#include "preview/PreviewController.h"
-SearchController::SearchController()
+SearchController::SearchController():
+ activePreview(NULL)
{
searchModel = new SearchModel();
searchView = new SearchView();
@@ -19,6 +21,11 @@ SearchController::SearchController()
SearchController::~SearchController()
{
+ if(activePreview)
+ {
+ ui::Engine::Ref().CloseWindow();
+ delete activePreview;
+ }
delete searchModel;
delete searchView;
}
@@ -54,5 +61,11 @@ void SearchController::ChangeSort()
void SearchController::ShowOwn(bool show)
{
+ //TODO: Implement
+}
+void SearchController::OpenSave(int saveID)
+{
+ activePreview = new PreviewController(saveID);
+ ui::Engine::Ref().ShowWindow(activePreview->GetView());
}