Debian Codegraph @

src/ApvlvWeb.cc

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 ApvlvHtm.cc
23 *
24 * Author: Alf <[email protected]>
25 */
26
27 #include <QUrl>
28
29 #include "ApvlvWeb.h"
30 #include "ApvlvWebViewWidget.h"
31
32 namespace apvlv
33 {
34 using namespace std;
35
36 bool
37 ApvlvWEB::load (const string &filename)
38 {
39 mUrl = filename.c_str ();
40 return true;
41 }
42
43 bool
44 ApvlvWEB::pageRenderToWebView (int pn, double zm, int rot, WebView *webview)
45 {
46 webview->setZoomFactor (zm);
47 // do not load started page in browsing
48 if (!webview->url ().isValid ())
49 {
50 webview->load (mUrl);
51 }
52 return true;
53 }
54
55 }
56
57 // Local Variables:
58 // mode: c++
59 // End: