00001 /* ============================================================ 00002 * File : mythflix.h 00003 * Author: John Petrocik <john@petrocik.net> 00004 * Date : 2005-10-28 00005 * Description : 00006 * 00007 * Copyright 2005 by John Petrocik 00008 00009 * This program is free software; you can redistribute it 00010 * and/or modify it under the terms of the GNU General 00011 * Public License as published bythe Free Software Foundation; 00012 * either version 2, or (at your option) 00013 * any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * ============================================================ */ 00021 00022 #ifndef MYTHFLIX_H 00023 #define MYTHFLIX_H 00024 00025 00026 #include <qhttp.h> 00027 #include <mythtv/uitypes.h> 00028 #include <mythtv/uilistbtntype.h> 00029 #include <mythtv/xmlparse.h> 00030 #include <mythtv/mythdialogs.h> 00031 00032 #include "newsengine.h" 00033 00034 class QTimer; 00035 class UIListBtnType; 00036 00037 class MythFlix : public MythDialog 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 00043 MythFlix(MythMainWindow *parent, const char *name = 0); 00044 ~MythFlix(); 00045 00046 private: 00047 00048 void loadTheme(); 00049 void loadWindow(QDomElement &element); 00050 void paintEvent(QPaintEvent *e); 00051 00052 void updateBackground(); 00053 void updateSitesView(); 00054 void updateArticlesView(); 00055 void updateInfoView(); 00056 00057 void keyPressEvent(QKeyEvent *e); 00058 void cursorUp(bool page=false); 00059 void cursorDown(bool page=false); 00060 void cursorRight(); 00061 void cursorLeft(); 00062 void displayOptions(); 00063 00064 void cancelRetrieve(); 00065 void processAndShowNews(NewsSite *site); 00066 void InsertMovieIntoQueue(QString queueName = "", bool atTop = false); 00067 00068 QString executeExternal(const QStringList& args, const QString& purpose); 00069 00070 XMLParse *m_Theme; 00071 00072 UIListBtnType *m_UISites; 00073 UIListBtnType *m_UIArticles; 00074 00075 QPixmap m_background; 00076 00077 QRect m_SitesRect; 00078 QRect m_ArticlesRect; 00079 QRect m_InfoRect; 00080 unsigned int m_InColumn; 00081 MythPopupBox *popup; 00082 QString zoom; 00083 QString browser; 00084 bool expectingPopup; 00085 NewsSite::List m_NewsSites; 00086 00087 private slots: 00088 void slotViewArticle(); 00089 void slotViewArticleTop(); 00090 void slotRetrieveNews(); 00091 void slotNewsRetrieved(NewsSite* site); 00092 00093 void slotSiteSelected(UIListBtnTypeItem *item); 00094 void slotArticleSelected(UIListBtnTypeItem *item); 00095 void slotShowNetFlixPage(); 00096 void slotCancelPopup(); 00097 }; 00098 00099 #endif /* MYTHFLIX_H */ 00100 00101 /* vim: set expandtab tabstop=4 shiftwidth=4: */
1.5.5