Debian Codegraph @

src/ApvlvWeb.h

raw
1 /*
2 * This file is part of the apvlv package
3 * Copyright (C) <2010> <Alf>
4 *
5 * Contact: Alf <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 */
22 /* @CPPFILE ApvlvWeb.h
23 *
24 * Author: Alf <[email protected]>
25 */
26
27 #ifndef _APVLV_WEB_H_
28 #define _APVLV_WEB_H_
29
30 #include <QUrl>
31
32 #include "ApvlvFile.h"
33 #include "ApvlvWebViewWidget.h"
34
35 namespace apvlv
36 {
37 class ApvlvWEB : public File
38 {
39 public:
40 ApvlvWEB () = default;
41
42 [[nodiscard]] DISPLAY_TYPE
43 getDisplayType () const override
44 {
45 return DISPLAY_TYPE::CUSTOM;
46 }
47
48 FileWidget *
49 getWidget () override
50 {
51 auto wid = new WebViewWidget ();
52 wid->setFile (this);
53 wid->setInternalScroll (true);
54 return wid;
55 }
56
57 bool load (const std::string &filename) override;
58
59 bool pageRenderToWebView (int pn, double zm, int rot,
60 WebView *webview) override;
61
62 protected:
63 QUrl mUrl;
64 };
65
66 }
67
68 #endif
69
70 /* Local Variables: */
71 /* mode: c++ */
72 /* End: */