00001 #ifndef LOGVIEWER_H_ 00002 #define LOGVIEWER_H_ 00003 00004 // qt 00005 #include <QTimer> 00006 00007 // myth 00008 #include <mythscreentype.h> 00009 00010 class MythUIButton; 00011 class MythUIButtonList; 00012 class MythUIText; 00013 00014 void showLogViewer(void); 00015 00016 class LogViewer : public MythScreenType 00017 { 00018 Q_OBJECT 00019 00020 public: 00021 00022 LogViewer(MythScreenStack *parent); 00023 ~LogViewer(void); 00024 00025 bool Create(void); 00026 bool keyPressEvent(QKeyEvent *e); 00027 00028 void setFilenames(const QString &progressLog, const QString &fullLog); 00029 00030 protected slots: 00031 void cancelClicked(void); 00032 void updateClicked(void); 00033 void updateTimerTimeout(void); 00034 void toggleAutoUpdate(void); 00035 bool loadFile(QString filename, QStringList &list, int startline); 00036 void showProgressLog(void); 00037 void showFullLog(void); 00038 void showMenu(void); 00039 void updateLogItem(MythUIButtonListItem *item); 00040 00041 private: 00042 void Init(void); 00043 QString getSetting(const QString &key); 00044 00045 bool m_autoUpdate; 00046 int m_updateTime; 00047 QTimer *m_updateTimer; 00048 00049 QString m_currentLog; 00050 QString m_progressLog; 00051 QString m_fullLog; 00052 00053 MythUIButtonList *m_logList; 00054 MythUIText *m_logText; 00055 00056 MythUIButton *m_exitButton; 00057 MythUIButton *m_cancelButton; 00058 MythUIButton *m_updateButton; 00059 }; 00060 00061 #endif
1.6.3