/* -*- Mode: c++ -*- * vim: set expandtab tabstop=4 shiftwidth=4: * * Original Project * MythTV http://www.mythtv.org * * Author(s): * John Pullan (john@pullan.org) * * Description: */ #ifndef _IMPORTICONS_H #define _IMPORTICONS_H #include #include #include "settings.h" class ImportIcons : public VerticalConfigurationGroup { Q_OBJECT protected: struct CSVEntry { QString strChanId; QString strName; QString strXmlTvId; QString strCallsign; QString strTransportId; QString strAtscMajorChan; QString strAtscMinorChan; QString strNetworkId; QString strServiceId; QString strIconCSV; QString strNameCSV; }; typedef QValueList ListEntries; typedef QValueListIterator ListEntriesIter; ListEntries m_listEntries; ListEntriesIter m_iter; struct SearchEntry { QString strID; QString strName; QString strLogo; }; typedef QValueList ListSearchEntries; typedef QValueListIterator ListSearchEntriesIter; ListSearchEntries m_listSearch; QString m_strMatches; static const QString url; QString m_strChannelDir; bool m_fRefresh; int m_nMaxCount; int m_nCount; QString escape_csv(const QString& str); QStringList extract_csv(const QString& strLine); QString wget(QUrl& url,const QString& strParam); TransLineEditSetting *m_editName; TransListBoxSetting *m_listIcons; TransLineEditSetting *m_editManual; TransButtonSetting *m_buttonManual; TransButtonSetting *m_buttonSkip; TransButtonSetting *m_buttonFinish; bool ping(); bool isBlocked(const QString& strParam); bool lookup(const QString& strParam); bool search(const QString& strParam); bool submit(const QString& strParam); bool findmissing(const QString& strParam); bool checkAndDownload(const QString& str); unsigned initialLoad(); bool doLoad(); public: ImportIcons(bool fRefresh); ~ImportIcons(); bool initialise(); protected slots: void enableControls(); void manualSearch(); void menuSelection(int nIndex); void skip(); }; class ImportIconsWizard : public QObject, public ConfigurationWizard { Q_OBJECT protected: ImportIcons *m_ImportIcons; bool m_fResult; public: ImportIconsWizard(bool fRefresh); bool initialise(); virtual int exec(); virtual MythDialog *dialogWidget(MythMainWindow *parent, const char *widgetName); protected slots: void finishButtonPressed(); }; #endif // _IMPORTICONS_H