ImportIconsWizard Class Reference

#include <importicons.h>

Inheritance diagram for ImportIconsWizard:
MythScreenType MythUIType XMLParseBase

List of all members.

Classes

struct  CSVEntry
 describes the TV channel name More...
struct  SearchEntry
 search entry results More...

Public Member Functions

 ImportIconsWizard (MythScreenStack *parent, bool fRefresh, const QString &channelname="")
 ~ImportIconsWizard ()
bool Create (void)
void customEvent (QEvent *event)

Protected Slots

void enableControls (dialogState state=STATE_NORMAL, bool selectEnabled=true)
 enable/disable the controls
void manualSearch ()
 process the manual search
void menuSelection (MythUIButtonListItem *)
 process the icon selection
void skip ()
 skip this icon
void askSubmit (const QString &strParam)
void Close ()

Protected Member Functions

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

Private Types

enum  dialogState { STATE_NORMAL, STATE_SEARCHING, STATE_DISABLED }
typedef QList< CSVEntryListEntries
 List of CSV entries.
typedef QList< CSVEntry >::Iterator ListEntriesIter
 iterator over list of CSV entries
typedef QList< SearchEntryListSearchEntries
 List of SearchEntry entries.
typedef QList< SearchEntry >
::Iterator 
ListSearchEntriesIter
 iterator over list of SearchEntry entries

Private Slots

void itemChanged (MythUIButtonListItem *item)

Private Member Functions

QString escape_csv (const QString &str)
 changes a string into csv format
QStringList extract_csv (const QString &strLine)
 extracts the csv values out of a string
QString wget (QUrl &url, const QString &strParam)
 use the equivalent of wget to fetch the POST command
bool lookup (const QString &strParam)
 looks up the string to determine the caller/xmltvid
bool search (const QString &strParam)
 search the remote db for icons etc
bool submit ()
 submit the icon information back to the remote db
bool findmissing (const QString &strParam)
 retrieve the actual logo for the TV channel
bool checkAndDownload (const QString &url, const QString &localChanId)
 checks and attempts to download the logo file to the appropriate place
bool initialLoad (QString name="")
 attempt the inital load of the TV channel information
bool doLoad ()
 attempts to move the iteration on one/more than one
void startDialog ()

Private Attributes

ListEntries m_listEntries
 list of TV channels to search for
ListEntries m_missingEntries
 list of TV channels with no unique icon
ListEntriesIter m_iter
 the current iterator
ListEntriesIter m_missingIter
ListSearchEntries m_listSearch
 the list of SearchEntry
QString m_strMatches
 the string for the submit() call
QString m_strChannelDir
 the location of the channel icon dir
QString m_strChannelname
 the channel name if searching for a single channel icon
QString m_strParam
bool m_fRefresh
 are we doing a refresh or not
int m_nMaxCount
 the maximum number of TV channels
int m_nCount
 the current search point (0..m_nMaxCount)
int m_missingMaxCount
 the total number of missing icons
int m_missingCount
 the current search point (0..m_missingCount)
const QString m_url
 the default url
QDir m_tmpDir
MythScreenStackm_popupStack
MythUIProgressDialogm_progressDialog
MythUIButtonListm_iconsList
 list of potential icons
MythUITextEditm_manualEdit
 manual edit field
MythUITextm_nameText
 name field for the icon
MythUIButtonm_manualButton
 manual button field
MythUIButtonm_skipButton
 button skip
MythUITextm_statusText
MythUIImagem_preview
MythUITextm_previewtitle

Detailed Description

Definition at line 28 of file importicons.h.


Member Typedef Documentation

typedef QList<CSVEntry> ImportIconsWizard::ListEntries [private]

List of CSV entries.

Definition at line 72 of file importicons.h.

typedef QList<CSVEntry>::Iterator ImportIconsWizard::ListEntriesIter [private]

iterator over list of CSV entries

Definition at line 74 of file importicons.h.

List of SearchEntry entries.

Definition at line 82 of file importicons.h.

typedef QList<SearchEntry>::Iterator ImportIconsWizard::ListSearchEntriesIter [private]

iterator over list of SearchEntry entries

Definition at line 84 of file importicons.h.


Member Enumeration Documentation

Enumerator:
STATE_NORMAL 
STATE_SEARCHING 
STATE_DISABLED 

Definition at line 50 of file importicons.h.


Constructor & Destructor Documentation

ImportIconsWizard::ImportIconsWizard ( MythScreenStack parent,
bool  fRefresh,
const QString &  channelname = "" 
)

Definition at line 22 of file importicons.cpp.

ImportIconsWizard::~ImportIconsWizard (  ) 

Definition at line 46 of file importicons.cpp.


Member Function Documentation

bool ImportIconsWizard::Create ( void   )  [virtual]

Reimplemented from MythScreenType.

Definition at line 59 of file importicons.cpp.

Referenced by ChannelEditor::customEvent().

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

Reimplemented from MythUIType.

Definition at line 792 of file importicons.cpp.

QString ImportIconsWizard::escape_csv ( const QString &  str  )  [private]

changes a string into csv format

Parameters:
str the string to change
Returns:
the actual string

Definition at line 458 of file importicons.cpp.

Referenced by initialLoad(), manualSearch(), menuSelection(), and search().

QStringList ImportIconsWizard::extract_csv ( const QString &  strLine  )  [private]

extracts the csv values out of a string

Parameters:
str the string to work on
Returns:
the actual QStringList

Definition at line 466 of file importicons.cpp.

Referenced by findmissing(), and search().

QString ImportIconsWizard::wget ( QUrl &  url,
const QString &  strParam 
) [private]

use the equivalent of wget to fetch the POST command

Parameters:
url the url to send this to
strParam the string to send
Returns:
the actual string

Definition at line 510 of file importicons.cpp.

Referenced by findmissing(), lookup(), search(), and submit().

bool ImportIconsWizard::lookup ( const QString &  strParam  )  [private]

looks up the string to determine the caller/xmltvid

Parameters:
str the string to work on
Returns:
true/false

Definition at line 560 of file importicons.cpp.

bool ImportIconsWizard::search ( const QString &  strParam  )  [private]

search the remote db for icons etc

Parameters:
str the string to work on
Returns:
true/false

Definition at line 580 of file importicons.cpp.

Referenced by doLoad(), and manualSearch().

bool ImportIconsWizard::submit (  )  [private]

submit the icon information back to the remote db

Returns:
true/false

Definition at line 740 of file importicons.cpp.

Referenced by customEvent().

bool ImportIconsWizard::findmissing ( const QString &  strParam  )  [private]

retrieve the actual logo for the TV channel

Parameters:
str the string to work on
Returns:
true/false

Definition at line 683 of file importicons.cpp.

Referenced by initialLoad().

bool ImportIconsWizard::checkAndDownload ( const QString &  url,
const QString &  localChanId 
) [private]

checks and attempts to download the logo file to the appropriate place

Parameters:
url the icon url
localChanId the local ID number of the channel
Returns:
true/false

Definition at line 526 of file importicons.cpp.

Referenced by findmissing(), and menuSelection().

bool ImportIconsWizard::initialLoad ( QString  name = ""  )  [private]

attempt the inital load of the TV channel information

Returns:
true if successful

Definition at line 266 of file importicons.cpp.

Referenced by Create().

bool ImportIconsWizard::doLoad (  )  [private]

attempts to move the iteration on one/more than one

Returns:
true if we can go again or false if we cannot

Definition at line 425 of file importicons.cpp.

Referenced by Init(), menuSelection(), and skip().

void ImportIconsWizard::enableControls ( dialogState  state = STATE_NORMAL,
bool  selectEnabled = true 
) [protected, slot]

enable/disable the controls

Definition at line 125 of file importicons.cpp.

Referenced by Create(), doLoad(), menuSelection(), and search().

void ImportIconsWizard::manualSearch (  )  [protected, slot]

process the manual search

Definition at line 161 of file importicons.cpp.

Referenced by Create().

void ImportIconsWizard::menuSelection ( MythUIButtonListItem item  )  [protected, slot]

process the icon selection

Definition at line 184 of file importicons.cpp.

Referenced by Create().

void ImportIconsWizard::skip (  )  [protected, slot]

skip this icon

Definition at line 170 of file importicons.cpp.

Referenced by Create().

void ImportIconsWizard::askSubmit ( const QString &  strParam  )  [protected, slot]

Definition at line 724 of file importicons.cpp.

Referenced by Init(), menuSelection(), and skip().

void ImportIconsWizard::Close ( void   )  [protected, virtual, slot]

Reimplemented from MythScreenType.

Definition at line 817 of file importicons.cpp.

Referenced by customEvent(), menuSelection(), and skip().

void ImportIconsWizard::itemChanged ( MythUIButtonListItem item  )  [private, slot]

Definition at line 246 of file importicons.cpp.

Referenced by Create().

void ImportIconsWizard::Init ( void   )  [protected, 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 112 of file importicons.cpp.

void ImportIconsWizard::startDialog (  )  [private]

Member Data Documentation

list of TV channels to search for

Definition at line 76 of file importicons.h.

Referenced by initialLoad().

list of TV channels with no unique icon

Definition at line 77 of file importicons.h.

Referenced by doLoad(), Init(), and initialLoad().

the current iterator

Definition at line 78 of file importicons.h.

Referenced by initialLoad().

Definition at line 79 of file importicons.h.

Referenced by doLoad(), Init(), menuSelection(), and skip().

the list of SearchEntry

Definition at line 161 of file importicons.h.

Referenced by search().

the string for the submit() call

Definition at line 162 of file importicons.h.

Referenced by Init(), menuSelection(), and skip().

the location of the channel icon dir

Definition at line 164 of file importicons.h.

Referenced by checkAndDownload(), and initialLoad().

the channel name if searching for a single channel icon

Definition at line 165 of file importicons.h.

Referenced by Create(), and ImportIconsWizard().

QString ImportIconsWizard::m_strParam [private]

Definition at line 166 of file importicons.h.

Referenced by askSubmit(), and submit().

are we doing a refresh or not

Definition at line 168 of file importicons.h.

Referenced by initialLoad().

the maximum number of TV channels

Definition at line 169 of file importicons.h.

Referenced by Init(), and initialLoad().

the current search point (0..m_nMaxCount)

Definition at line 170 of file importicons.h.

Referenced by initialLoad().

the total number of missing icons

Definition at line 171 of file importicons.h.

Referenced by doLoad(), enableControls(), initialLoad(), and menuSelection().

the current search point (0..m_missingCount)

Definition at line 172 of file importicons.h.

Referenced by doLoad(), enableControls(), menuSelection(), and skip().

const QString ImportIconsWizard::m_url [private]

the default url

Definition at line 174 of file importicons.h.

Referenced by findmissing(), lookup(), search(), and submit().

Definition at line 175 of file importicons.h.

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

Definition at line 179 of file importicons.h.

Referenced by askSubmit(), ImportIconsWizard(), and initialLoad().

Definition at line 180 of file importicons.h.

Referenced by initialLoad().

list of potential icons

Definition at line 182 of file importicons.h.

Referenced by Create(), enableControls(), menuSelection(), and search().

manual edit field

Definition at line 183 of file importicons.h.

Referenced by Create(), doLoad(), enableControls(), and manualSearch().

name field for the icon

Definition at line 184 of file importicons.h.

Referenced by Create(), doLoad(), and enableControls().

manual button field

Definition at line 185 of file importicons.h.

Referenced by Create(), and enableControls().

button skip

Definition at line 186 of file importicons.h.

Referenced by Create(), and enableControls().

Definition at line 187 of file importicons.h.

Referenced by Create(), doLoad(), manualSearch(), menuSelection(), and submit().

Definition at line 189 of file importicons.h.

Referenced by Create(), and itemChanged().

Definition at line 190 of file importicons.h.

Referenced by Create(), and itemChanged().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Sun Feb 12 06:42:04 2012 for MythTV by  doxygen 1.6.3