Mercurial > hg > orthanc-stone
comparison Applications/IStoneApplication.h @ 288:8c8da145fefa am-2
renamings and doc
author | am@osimis.io |
---|---|
date | Thu, 30 Aug 2018 16:52:40 +0200 |
parents | Applications/IBasicApplication.h@2038d76bf13f |
children | be2660b6e40a |
comparison
equal
deleted
inserted
replaced
287:2038d76bf13f | 288:8c8da145fefa |
---|---|
1 /** | |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
24 #include "StoneApplicationContext.h" | |
25 #include <boost/program_options.hpp> | |
26 #include "../Framework/Viewport/WidgetViewport.h" | |
27 #include "json/json.h" | |
28 | |
29 namespace OrthancStone | |
30 { | |
31 // a StoneApplication is an application that can actually be executed | |
32 // in multiple environments. i.e: it can run natively integrated in a QtApplication | |
33 // or it can be executed as part of a WebPage when compiled into WebAssembly. | |
34 class IStoneApplication : public boost::noncopyable | |
35 { | |
36 protected: | |
37 StoneApplicationContext* context_; | |
38 | |
39 public: | |
40 virtual ~IStoneApplication() | |
41 { | |
42 } | |
43 | |
44 virtual void DeclareStartupOptions(boost::program_options::options_description& options) = 0; | |
45 virtual void Initialize(StoneApplicationContext* context, | |
46 IStatusBar& statusBar, | |
47 const boost::program_options::variables_map& parameters) = 0; | |
48 #if ORTHANC_ENABLE_WASM==1 | |
49 virtual void InitializeWasm() {} // specific initialization when the app is running in WebAssembly. This is called after the other Initialize() | |
50 #endif | |
51 | |
52 virtual std::string GetTitle() const = 0; | |
53 virtual IWidget* GetCentralWidget() = 0; | |
54 | |
55 virtual void Finalize() = 0; | |
56 }; | |
57 | |
58 } |