BackendSelection Class Reference

Classes to Prompt user for a master backend. More...

#include <backendselect.h>

Inheritance diagram for BackendSelection:
MythScreenType MythUIType XMLParseBase

List of all members.

Public Types

enum  Decision { kManualConfigure = -1, kCancelConfigure = 0, kAcceptConfigure = +1 }
typedef enum
BackendSelection::Decision 
BackendDecision

Public Member Functions

 BackendSelection (MythScreenStack *parent, DatabaseParams *params, Configuration *pConfig, bool exitOnFinish=false)
virtual ~BackendSelection ()
bool Create (void)
void customEvent (QEvent *event)

Static Public Member Functions

static Decision Prompt (DatabaseParams *dbParams, Configuration *pConfig)

Protected Slots

void Accept (void)
void Accept (MythUIButtonListItem *)
void Manual (void)
 Linked to 'Configure Manually' button.
void Cancel (void)
 Linked to 'Cancel' button.

Private Member Functions

void Load (void)
 Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning).
void Init (void)
 Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load().
bool ConnectBackend (DeviceLocation *dev)
 Attempt UPnP connection to a backend device, get its DB details.
void AddItem (DeviceLocation *dev)
void RemoveItem (QString URN)
bool TryDBfromURL (const QString &error, QString URL)
void PromptForPassword (void)
void Close (Decision)

Private Attributes

DatabaseParamsm_DBparams
Configurationm_pConfig
bool m_exitOnFinish
ItemMap m_devices
MythUIButtonListm_backendList
MythUIButtonm_manualButton
MythUIButtonm_saveButton
MythUIButtonm_cancelButton
QString m_pinCode
QString m_USN
QMutex m_mutex
BackendDecision m_backendDecision

Detailed Description

Classes to Prompt user for a master backend.

Author:
Originally based on masterselection.cpp/h by David Blain.

Definition at line 37 of file backendselect.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kManualConfigure 
kCancelConfigure 
kAcceptConfigure 

Definition at line 42 of file backendselect.h.


Constructor & Destructor Documentation

BackendSelection::BackendSelection ( MythScreenStack parent,
DatabaseParams params,
Configuration pConfig,
bool  exitOnFinish = false 
)

Definition at line 15 of file backendselect.cpp.

Referenced by Prompt().

BackendSelection::~BackendSelection (  )  [virtual]

Definition at line 24 of file backendselect.cpp.


Member Function Documentation

BackendSelection::Decision BackendSelection::Prompt ( DatabaseParams dbParams,
Configuration pConfig 
) [static]

Definition at line 40 of file backendselect.cpp.

Referenced by MythContextPrivate::ChooseBackend().

bool BackendSelection::Create ( void   )  [virtual]

Reimplemented from MythScreenType.

Definition at line 64 of file backendselect.cpp.

Referenced by Prompt().

void BackendSelection::customEvent ( QEvent *  event  )  [virtual]

Reimplemented from MythUIType.

Definition at line 295 of file backendselect.cpp.

void BackendSelection::Accept ( void   )  [protected, slot]

Definition at line 112 of file backendselect.cpp.

Referenced by Create(), and customEvent().

void BackendSelection::Accept ( MythUIButtonListItem item  )  [protected, slot]

Definition at line 89 of file backendselect.cpp.

void BackendSelection::Manual ( void   )  [protected, slot]

Linked to 'Configure Manually' button.

Definition at line 257 of file backendselect.cpp.

Referenced by Create().

void BackendSelection::Cancel ( void   )  [protected, slot]

Linked to 'Cancel' button.

Definition at line 231 of file backendselect.cpp.

Referenced by Accept(), and Create().

void BackendSelection::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 236 of file backendselect.cpp.

void BackendSelection::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 242 of file backendselect.cpp.

bool BackendSelection::ConnectBackend ( DeviceLocation dev  )  [private]

Attempt UPnP connection to a backend device, get its DB details.

Will loop until a valid PIN is entered.

Definition at line 178 of file backendselect.cpp.

Referenced by Accept().

void BackendSelection::AddItem ( DeviceLocation dev  )  [private]

Definition at line 123 of file backendselect.cpp.

Referenced by customEvent(), and Init().

void BackendSelection::RemoveItem ( QString  URN  )  [private]

Definition at line 262 of file backendselect.cpp.

Referenced by customEvent().

bool BackendSelection::TryDBfromURL ( const QString &  error,
QString  URL 
) [private]

Definition at line 281 of file backendselect.cpp.

Referenced by ConnectBackend().

void BackendSelection::PromptForPassword ( void   )  [private]

Definition at line 341 of file backendselect.cpp.

Referenced by ConnectBackend().

void BackendSelection::Close ( Decision  d  )  [private]

Definition at line 361 of file backendselect.cpp.


Member Data Documentation

Definition at line 74 of file backendselect.h.

Referenced by ConnectBackend(), and TryDBfromURL().

Definition at line 75 of file backendselect.h.

Referenced by Accept().

Definition at line 76 of file backendselect.h.

Referenced by Close().

Definition at line 77 of file backendselect.h.

Referenced by AddItem(), RemoveItem(), and ~BackendSelection().

Definition at line 79 of file backendselect.h.

Referenced by Accept(), AddItem(), ConnectBackend(), and Create().

Definition at line 80 of file backendselect.h.

Referenced by Create().

Definition at line 81 of file backendselect.h.

Referenced by Create().

Definition at line 82 of file backendselect.h.

Referenced by Create().

QString BackendSelection::m_pinCode [private]

Definition at line 85 of file backendselect.h.

Referenced by Accept(), ConnectBackend(), and customEvent().

QString BackendSelection::m_USN [private]

Definition at line 86 of file backendselect.h.

Referenced by Accept(), and ConnectBackend().

QMutex BackendSelection::m_mutex [private]

Definition at line 88 of file backendselect.h.

Referenced by AddItem(), and RemoveItem().

Definition at line 90 of file backendselect.h.

Referenced by Close(), and Prompt().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:41:53 2012 for MythTV by  doxygen 1.6.3