MythTV  0.28pre
 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:
22  MythBrowser(MythScreenStack *parent, QStringList &urlList);
23  ~MythBrowser();
24 
25  bool Create(void);
26  bool keyPressEvent(QKeyEvent *);
27 
28  void setDefaultSaveDirectory(const QString &saveDir) { m_defaultSaveDir = saveDir; }
29  void setDefaultSaveFilename(const QString &saveFile) { m_defaultSaveFilename = saveFile; }
30 
32  {
33  if (m_defaultFavIcon)
35  return m_defaultFavIcon;
36  }
37 
38  public slots:
39  void slotOpenURL(const QString &url);
40 
41  protected slots:
42  void slotZoomIn();
43  void slotZoomOut();
44 
45  void slotBack();
46  void slotForward();
47 
48  void slotEnterURL(void);
49 
50  void slotAddTab(const QString &url = "", bool doSwitch = true);
51  void slotDeleteTab(void);
52 
53  void slotAddBookmark(void);
54 
55  void slotLoadStarted(void);
56  void slotLoadFinished(bool OK);
57  void slotLoadProgress(int progress);
58  void slotTitleChanged(const QString &title);
59  void slotStatusBarMessage(const QString &text);
61  void slotTabLosingFocus(void);
62 
63  private:
65 
66  void switchTab(int newTab);
67 
68  QStringList m_urlList;
69 
71  QList<WebPage*> m_browserList;
78 
80  QUrl m_url;
83 
85 
87 
89 
90  friend class WebPage;
91 };
92 
93 #endif
void slotAddTab(const QString &url="", bool doSwitch=true)
void switchTab(int newTab)
unsigned int slots[4]
Definition: element.c:38
void slotBack()
bool Create(void)
Definition: mythbrowser.cpp:45
All purpose text widget, displays a text string.
Definition: mythuitext.h:27
Basic menu dialog, message and a list of options.
MythDialogBox * m_menuPopup
Definition: mythbrowser.h:86
virtual int IncrRef(void)
Increments reference count.
Definition: mythimage.cpp:64
AllMusic * parent
QString m_defaultSaveDir
Definition: mythbrowser.h:81
void slotZoomOut()
MythBrowser(MythScreenStack *parent, QStringList &urlList)
Definition: mythbrowser.cpp:21
void slotLoadProgress(int progress)
void slotStatusBarMessage(const QString &text)
MythUIButton * m_forwardButton
Definition: mythbrowser.h:76
Bookmark m_editBookmark
Definition: mythbrowser.h:84
void slotTitleChanged(const QString &title)
void slotTabSelected(MythUIButtonListItem *item)
QStringList m_urlList
Definition: mythbrowser.h:68
MythImage * GetDefaultFavIcon(void)
Definition: mythbrowser.h:31
MythUIButton * m_exitButton
Definition: mythbrowser.h:77
void slotEnterURL(void)
void slotDeleteTab(void)
void setDefaultSaveDirectory(const QString &saveDir)
Definition: mythbrowser.h:28
void slotAddBookmark(void)
MythUIProgressBar * m_progressBar
Definition: mythbrowser.h:72
MythUIButtonList * m_pageList
Definition: mythbrowser.h:70
void slotOpenURL(const QString &url)
void slotLoadStarted(void)
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
int m_currentBrowser
Definition: mythbrowser.h:79
QString m_defaultSaveFilename
Definition: mythbrowser.h:82
A single button widget.
Definition: mythuibutton.h:21
void slotTabLosingFocus(void)
void setDefaultSaveFilename(const QString &saveFile)
Definition: mythbrowser.h:29
MythImage * m_defaultFavIcon
Definition: mythbrowser.h:88
void slotLoadFinished(bool OK)
void slotForward()
QList< WebPage * > m_browserList
Definition: mythbrowser.h:71
MythUIText * m_titleText
Definition: mythbrowser.h:73
Screen in which all other widgets are contained and rendered.
Progress bar widget.
Web browsing widget.
MythUIButton * m_backButton
Definition: mythbrowser.h:75
MythUIText * m_statusText
Definition: mythbrowser.h:74
void slotZoomIn()
MythUIWebBrowser * activeBrowser(void)
bool keyPressEvent(QKeyEvent *)
Key event handler.