Root/
Source at commit 68c4971a2eea0a0102fe78fb7b75e68698358996 created 13 years 11 months ago. By Mirko Lindner, initial upload | |
---|---|
1 | /*************************************************************************** |
2 | * Copyright (C) 2010 by Mirko Lindner * |
3 | * mirko@sharism.cc * |
4 | * * |
5 | * This program is free software; you can redistribute it and/or modify * |
6 | * it under the terms of the GNU General Public License as published by * |
7 | * the Free Software Foundation; either version 2 of the License, or * |
8 | * (at your option) any later version. * |
9 | * * |
10 | * This program is distributed in the hope that it will be useful, * |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
13 | * GNU General Public License for more details. * |
14 | * * |
15 | * You should have received a copy of the GNU General Public License * |
16 | * along with this program; if not, write to the * |
17 | * Free Software Foundation, Inc., * |
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 | ***************************************************************************/ |
20 | |
21 | #include <QTextBrowser> |
22 | #include <QWidget> |
23 | #include <zim/file.h> |
24 | #include <zim/search.h> |
25 | |
26 | class HtmlArea : public QTextBrowser |
27 | { |
28 | Q_OBJECT |
29 | |
30 | public: |
31 | HtmlArea(QWidget * parent = 0) : QTextBrowser(parent) {} |
32 | void searchArticle(QString term); |
33 | |
34 | private: |
35 | QString *url; |
36 | zim::Article getArticleFromUrl(QString url); |
37 | zim::Search::Results searchArticleFromTitle(QString phrase); |
38 | zim::Article getRandomArticle(); |
39 | const zim::File& get_file(); |
40 | void setNewContent( int method, QString str ); |
41 | |
42 | public Q_SLOTS: |
43 | void linking( const QUrl &txt ); |
44 | void getRandom(); |
45 | }; |
Branches:
master