MythTV  0.26-pre
Public Types | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
NetSearch Class Reference

#include <netsearch.h>

Inheritance diagram for NetSearch:
MythScreenType MythUIType XMLParseBase

List of all members.

Public Types

enum  DialogType { DLG_DEFAULT = 0, DLG_SEARCH = 0x1, DLG_RSS = 0x2, dtLast }

Public Member Functions

 NetSearch (MythScreenStack *parent, const char *name=0)
 ~NetSearch ()
bool Create (void)
bool keyPressEvent (QKeyEvent *)
 Key event handler.
void populateResultList (ResultItem::resultList list)

Protected Member Functions

void createBusyDialog (QString title)

Private Slots

void streamWebVideo (void)
void showWebVideo (void)
void doDownloadAndPlay (void)
void doPlayVideo (QString filename)
void showMenu (void)
void getMoreResults ()
void getLastResults ()
void runSearchEditor ()
void doListRefresh ()
void doSearch (void)
void searchFinished (void)
void searchTimeout (Search *item)
void loadData (void)
void fillGrabberButtonList (void)
void slotItemChanged (void)
void slotDoProgress (qint64 bytesReceived, qint64 bytesTotal)
void slotDownloadFinished (void)
void slotDeleteVideo (void)
void doDeleteVideo (bool remove)
void DownloadVideo (QString url, QString dest)
void customEvent (QEvent *levent)

Private Member Functions

virtual void Load ()
 Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning)
virtual void Init ()
 Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load()
void initProgressDialog ()
void cleanCacheDir (void)

Private Attributes

MythUIButtonListm_searchResultList
MythUIButtonListm_siteList
MythUITextEditm_search
MythUITextm_pageText
MythUITextm_noSites
MythUIImagem_thumbImage
MythUIStateTypem_downloadable
MythUIProgressBarm_progress
MythUIBusyDialogm_busyPopup
MythConfirmationDialogm_okPopup
MythDialogBoxm_menuPopup
MythScreenStackm_popupStack
MythUIProgressDialogm_progressDialog
QNetworkAccessManager * m_netSearch
QNetworkReply * m_reply
MythDownloadManagerm_download
MetadataImageDownloadm_imageDownload
QFile * m_file
QString m_currentSearch
int m_currentGrabber
QString m_currentCmd
QString m_downloadFile
uint m_pagenum
uint m_maxpage
bool m_playing
uint m_redirects
QString m_mythXML
GrabberScript::scriptList m_grabberList
RSSSite::rssList m_rssList
QMap< MythUIButtonListItem
*, ResultItem
m_rssitems
DialogType m_dialogType
NetSearch::DialogType m_type

Detailed Description

Definition at line 20 of file netsearch.h.


Member Enumeration Documentation

Enumerator:
DLG_DEFAULT 
DLG_SEARCH 
DLG_RSS 
dtLast 

Definition at line 26 of file netsearch.h.


Constructor & Destructor Documentation

NetSearch::NetSearch ( MythScreenStack parent,
const char *  name = 0 
)

Definition at line 36 of file netsearch.cpp.

Definition at line 124 of file netsearch.cpp.


Member Function Documentation

bool NetSearch::Create ( void  ) [virtual]

Reimplemented from MythScreenType.

Definition at line 57 of file netsearch.cpp.

Referenced by RunNetVision().

bool NetSearch::keyPressEvent ( QKeyEvent *  ) [virtual]

Key event handler.

Parameters:
eventKeypress event

Reimplemented from MythScreenType.

Definition at line 168 of file netsearch.cpp.

Definition at line 468 of file netsearch.cpp.

Referenced by searchFinished().

void NetSearch::createBusyDialog ( QString  title) [protected]

Definition at line 196 of file netsearch.cpp.

Referenced by doSearch(), getLastResults(), and getMoreResults().

void NetSearch::Load ( void  ) [private, virtual]

Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning)

Warning:
This method should only load data, it should NEVER perform UI routines or segfaults WILL result. This includes assinging data to any widgets, calling methods on a widget or anything else which triggers redraws. The safest and recommended approach is to avoid any interaction with a libmythui class or class member.

Reimplemented from MythScreenType.

Definition at line 114 of file netsearch.cpp.

void NetSearch::Init ( void  ) [private, virtual]

Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load()

Warning:
Do NOT confuse this with Load(), they serve very different purposes and most often both should be used when creating a new screen.

Reimplemented from MythScreenType.

Definition at line 119 of file netsearch.cpp.

Definition at line 714 of file netsearch.cpp.

Referenced by DownloadVideo().

Definition at line 303 of file netsearch.cpp.

Referenced by ~NetSearch().

void NetSearch::streamWebVideo ( void  ) [private, slot]

Definition at line 509 of file netsearch.cpp.

Referenced by Create(), and showMenu().

void NetSearch::showWebVideo ( void  ) [private, slot]

Definition at line 529 of file netsearch.cpp.

Referenced by showMenu(), and streamWebVideo().

void NetSearch::doDownloadAndPlay ( void  ) [private, slot]

Definition at line 678 of file netsearch.cpp.

Referenced by showMenu().

void NetSearch::doPlayVideo ( QString  filename) [private, slot]

Definition at line 599 of file netsearch.cpp.

Referenced by customEvent(), doDownloadAndPlay(), and showMenu().

void NetSearch::showMenu ( void  ) [private, slot]

Definition at line 215 of file netsearch.cpp.

Referenced by keyPressEvent().

void NetSearch::getMoreResults ( ) [private, slot]

Definition at line 380 of file netsearch.cpp.

Referenced by showMenu().

void NetSearch::getLastResults ( ) [private, slot]

Definition at line 364 of file netsearch.cpp.

Referenced by showMenu().

void NetSearch::runSearchEditor ( ) [private, slot]

Definition at line 650 of file netsearch.cpp.

Referenced by doListRefresh(), loadData(), and showMenu().

void NetSearch::doListRefresh ( ) [private, slot]

Definition at line 669 of file netsearch.cpp.

Referenced by runSearchEditor().

void NetSearch::doSearch ( void  ) [private, slot]

Definition at line 322 of file netsearch.cpp.

Referenced by Create().

void NetSearch::searchFinished ( void  ) [private, slot]

Definition at line 396 of file netsearch.cpp.

Referenced by doSearch().

void NetSearch::searchTimeout ( Search item) [private, slot]

Definition at line 441 of file netsearch.cpp.

void NetSearch::loadData ( void  ) [private, slot]

Definition at line 155 of file netsearch.cpp.

Referenced by doListRefresh(), and Init().

Definition at line 281 of file netsearch.cpp.

Referenced by loadData().

void NetSearch::slotItemChanged ( void  ) [private, slot]

Definition at line 731 of file netsearch.cpp.

Referenced by Create().

void NetSearch::slotDoProgress ( qint64  bytesReceived,
qint64  bytesTotal 
) [private, slot]

Definition at line 794 of file netsearch.cpp.

void NetSearch::slotDownloadFinished ( void  ) [private, slot]

Definition at line 807 of file netsearch.cpp.

void NetSearch::slotDeleteVideo ( void  ) [private, slot]

Definition at line 610 of file netsearch.cpp.

Referenced by showMenu().

void NetSearch::doDeleteVideo ( bool  remove) [private, slot]

Definition at line 627 of file netsearch.cpp.

Referenced by slotDeleteVideo().

void NetSearch::DownloadVideo ( QString  url,
QString  dest 
) [private, slot]

Definition at line 708 of file netsearch.cpp.

Referenced by doDownloadAndPlay().

void NetSearch::customEvent ( QEvent *  levent) [private, virtual, slot]

Reimplemented from MythUIType.

Definition at line 813 of file netsearch.cpp.


Member Data Documentation

Definition at line 50 of file netsearch.h.

Referenced by Create(), doSearch(), fillGrabberButtonList(), searchFinished(), and slotItemChanged().

Definition at line 51 of file netsearch.h.

Referenced by Create(), and doSearch().

Definition at line 53 of file netsearch.h.

Referenced by Create(), doSearch(), and searchFinished().

Definition at line 54 of file netsearch.h.

Referenced by Create(), and loadData().

Definition at line 56 of file netsearch.h.

Referenced by Create(), and slotItemChanged().

Definition at line 57 of file netsearch.h.

Referenced by Create(), and slotItemChanged().

Definition at line 58 of file netsearch.h.

Referenced by Create(), slotDoProgress(), and slotDownloadFinished().

Definition at line 59 of file netsearch.h.

Referenced by createBusyDialog(), searchFinished(), and searchTimeout().

Definition at line 60 of file netsearch.h.

Referenced by searchTimeout().

Definition at line 62 of file netsearch.h.

Referenced by NetSearch().

Definition at line 64 of file netsearch.h.

Referenced by customEvent(), and initProgressDialog().

QNetworkAccessManager* NetSearch::m_netSearch [private]

Definition at line 66 of file netsearch.h.

Referenced by doSearch(), getLastResults(), getMoreResults(), and ~NetSearch().

QNetworkReply* NetSearch::m_reply [private]

Definition at line 67 of file netsearch.h.

Referenced by doSearch(), getLastResults(), getMoreResults(), and searchFinished().

Definition at line 68 of file netsearch.h.

Referenced by NetSearch(), and ~NetSearch().

Definition at line 69 of file netsearch.h.

Referenced by NetSearch(), populateResultList(), and ~NetSearch().

QFile* NetSearch::m_file [private]

Definition at line 70 of file netsearch.h.

QString NetSearch::m_currentSearch [private]

Definition at line 72 of file netsearch.h.

Referenced by doSearch(), getLastResults(), and getMoreResults().

Definition at line 73 of file netsearch.h.

Referenced by doSearch(), and searchFinished().

QString NetSearch::m_currentCmd [private]

Definition at line 74 of file netsearch.h.

Referenced by doSearch(), getLastResults(), and getMoreResults().

QString NetSearch::m_downloadFile [private]

Definition at line 75 of file netsearch.h.

Referenced by customEvent(), and DownloadVideo().

Definition at line 76 of file netsearch.h.

Referenced by doSearch(), getLastResults(), getMoreResults(), searchFinished(), and showMenu().

Definition at line 77 of file netsearch.h.

Referenced by doSearch(), searchFinished(), and showMenu().

Definition at line 78 of file netsearch.h.

Referenced by NetSearch().

Definition at line 79 of file netsearch.h.

QString NetSearch::m_mythXML [private]

Definition at line 80 of file netsearch.h.

Referenced by doSearch(), getLastResults(), getMoreResults(), and NetSearch().

Definition at line 82 of file netsearch.h.

Referenced by doListRefresh(), fillGrabberButtonList(), Load(), loadData(), and ~NetSearch().

Definition at line 83 of file netsearch.h.

Definition at line 84 of file netsearch.h.

Definition at line 85 of file netsearch.h.

Definition at line 87 of file netsearch.h.

Referenced by Create().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends