MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
mythbrowser.h
Go to the documentation of this file.
1 #ifndef MYTHBROWSER_H
2 #define MYTHBROWSER_H
3 
4 #include <QUrl>
5 
6 #include <mythuiwebbrowser.h>
7 #include <mythuibuttonlist.h>
8 #include <mythuibutton.h>
9 #include <mythscreentype.h>
10 #include <mythdialogbox.h>
11 #include <mythuiprogressbar.h>
12 
13 #include "bookmarkmanager.h"
14 
15 class WebPage;
16 
18 {
19  Q_OBJECT
20 
21  public:
23  QStringList &urlList, float zoom);
24  ~MythBrowser();
25 
26  bool Create(void);
27  bool keyPressEvent(QKeyEvent *);
28 
29  void setDefaultSaveDirectory(const QString saveDir) { m_defaultSaveDir = saveDir; }
30  void setDefaultSaveFilename(const QString saveFile) { m_defaultSaveFilename = saveFile; }
31 
33  {
34  if (m_defaultFavIcon)
36  return m_defaultFavIcon;
37  }
38 
39  public slots:
40  void slotOpenURL(const QString &url);
41 
42  protected slots:
43  void slotZoomIn();
44  void slotZoomOut();
45 
46  void slotBack();
47  void slotForward();
48 
49  void slotEnterURL(void);
50 
51  void slotAddTab(const QString &url = "", bool doSwitch = true);
52  void slotDeleteTab(void);
53 
54  void slotAddBookmark(void);
55 
56  void slotLoadStarted(void);
57  void slotLoadFinished(bool OK);
58  void slotLoadProgress(int progress);
59  void slotTitleChanged(const QString &title);
60  void slotStatusBarMessage(const QString &text);
62  void slotTabLosingFocus(void);
63 
64  private:
66 
67  void switchTab(int newTab);
68 
69  QStringList m_urlList;
70 
72  QList<WebPage*> m_browserList;
79 
81  QUrl m_url;
82  float m_zoom;
85 
87 
89 
91 
92  friend class WebPage;
93 };
94 
95 #endif