Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
wikipage.hpp
1 //This program is free software: you can redistribute it and/or modify
2 //it under the terms of the GNU General Public License as published by
3 //the Free Software Foundation, either version 3 of the License, or
4 //(at your option) any later version.
5 
6 //This program is distributed in the hope that it will be useful,
7 //but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 //GNU General Public License for more details.
10 
11 #ifndef WIKIPAGE_H
12 #define WIKIPAGE_H
13 
14 #include <QString>
15 #include "configuration.hpp"
16 #include "wikisite.hpp"
17 
18 namespace Huggle
19 {
20  //! Namespaces
22  {
23  MediaWikiNS_Main,
24  MediaWikiNS_Talk,
25  MediaWikiNS_Project,
26  MediaWikiNS_ProjectTalk,
27  MediaWikiNS_User,
28  MediaWikiNS_UserTalk,
29  MediaWikiNS_Help,
30  MediaWikiNS_HelpTalk,
31  MediaWikiNS_Category,
32  MediaWikiNS_CategoryTalk,
33  MediaWikiNS_Mediawiki,
34  MediaWikiNS_MediawikiTalk,
35  MediaWikiNS_File,
36  MediaWikiNS_FileTalk,
37  MediaWikiNS_Portal,
38  MediaWikiNS_PortalTalk,
39  MediaWikiNS_Special
40  };
41 
42  //! Mediawiki page
43  class WikiPage
44  {
45  public:
46  QString Contents;
47  //! Name of page
48  QString PageName;
49  //! Site this page is on
51  //! Create new empty instance of wiki page
52  WikiPage();
53  WikiPage(QString name);
54  WikiPage(WikiPage *page);
55  WikiPage(const WikiPage& page);
56  //! Retrieve a namespace ID for current page
58  //! Return true in case this is a talk page
59  bool IsTalk();
60  bool IsUserpage();
61  };
62 }
63 
64 #endif // WIKIPAGE_H
MediaWikiNS
Namespaces.
Definition: wikipage.hpp:21
bool IsTalk()
Return true in case this is a talk page.
Definition: wikipage.cpp:96
WikiPage()
Create new empty instance of wiki page.
Definition: wikipage.cpp:14
Mediawiki page.
Definition: wikipage.hpp:43
WikiSite * Site
Site this page is on.
Definition: wikipage.hpp:50
QString PageName
Name of page.
Definition: wikipage.hpp:48
MediaWikiNS GetNS()
Retrieve a namespace ID for current page.
Definition: wikipage.cpp:42