00001 #ifndef WELCOMEDIALOG_H_ 00002 #define WELCOMEDIALOG_H_ 00003 00004 #include <qdatetime.h> 00005 00006 #include "mythdialogs.h" 00007 #include "remoteutil.h" 00008 00009 class WelcomeDialog : public MythThemedDialog 00010 { 00011 00012 Q_OBJECT 00013 00014 public: 00015 00016 WelcomeDialog(MythMainWindow *parent, 00017 QString window_name, 00018 QString theme_filename, 00019 const char* name = 0); 00020 ~WelcomeDialog(); 00021 00022 void keyPressEvent(QKeyEvent *e); 00023 void customEvent(QCustomEvent *e); 00024 void wireUpTheme(); 00025 DialogCode exec(void); 00026 00027 protected slots: 00028 void startFrontendClick(void); 00029 void startFrontend(void); 00030 void updateAll(void); 00031 void updateStatus(void); 00032 void updateScreen(void); 00033 void closeDialog(); 00034 void updateTime(); 00035 void showPopup(); 00036 void donePopup(int); 00037 void cancelPopup(); 00038 void shutdownNow(); 00039 void runEPGGrabber(void); 00040 void lockShutdown(); 00041 void unlockShutdown(); 00042 bool updateRecordingList(void); 00043 bool updateScheduledList(void); 00044 00045 private: 00046 void updateStatusMessage(void); 00047 bool checkConnectionToServer(void); 00048 void runMythFillDatabase(void); 00049 00050 UITextType* getTextType(QString name); 00051 00052 MythPopupBox *popup; 00053 00054 // 00055 // GUI stuff 00056 // 00057 UITextType *m_status_text; 00058 UITextType *m_recording_text; 00059 UITextType *m_scheduled_text; 00060 UITextType *m_warning_text; 00061 UITextType *m_time_text; 00062 UITextType *m_date_text; 00063 00064 UITextButtonType *m_startfrontend_button; 00065 00066 QTimer *m_updateStatusTimer; 00067 QTimer *m_updateScreenTimer; 00068 QTimer *m_timeTimer; 00069 00070 QString m_installDir; 00071 QString m_timeFormat; 00072 QString m_dateFormat; 00073 bool m_isRecording; 00074 bool m_hasConflicts; 00075 bool m_bWillShutdown; 00076 int m_secondsToShutdown; 00077 QDateTime m_nextRecordingStart; 00078 int m_preRollSeconds; 00079 int m_idleWaitForRecordingTime; 00080 uint m_screenTunerNo; 00081 uint m_screenScheduledNo; 00082 uint m_statusListNo; 00083 QStringList m_statusList; 00084 00085 typedef struct 00086 { 00087 QString channel, title, subtitle; 00088 QDateTime startTime, endTime; 00089 } ProgramDetail; 00090 00091 QPtrList<TunerStatus> m_tunerList; 00092 QPtrList<ProgramDetail> m_scheduledList; 00093 00094 QMutex m_RecListUpdateMuxtex; 00095 bool m_pendingRecListUpdate; 00096 00097 bool pendingRecListUpdate() const { return m_pendingRecListUpdate; } 00098 void setPendingRecListUpdate(bool newState) { m_pendingRecListUpdate = newState; } 00099 00100 QMutex m_SchedUpdateMuxtex; 00101 bool m_pendingSchedUpdate; 00102 00103 bool pendingSchedUpdate() const { return m_pendingSchedUpdate; } 00104 void setPendingSchedUpdate(bool newState) { m_pendingSchedUpdate = newState; } 00105 00106 }; 00107 00108 #endif
1.5.5