00001 #ifndef WELCOMEDIALOG_H_ 00002 #define WELCOMEDIALOG_H_ 00003 00004 // qt 00005 #include <QDateTime> 00006 00007 // libmyth 00008 #include "programinfo.h" 00009 00010 // libmythtv 00011 #include "tvremoteutil.h" 00012 00013 // libmythui 00014 #include "mythscreentype.h" 00015 #include "mythuibutton.h" 00016 #include "mythuitext.h" 00017 #include "mythdialogbox.h" 00018 00019 class WelcomeDialog : public MythScreenType 00020 { 00021 00022 Q_OBJECT 00023 00024 public: 00025 00026 WelcomeDialog(MythScreenStack *parent, const char *name); 00027 ~WelcomeDialog(); 00028 00029 bool Create(void); 00030 bool keyPressEvent(QKeyEvent *event); 00031 void customEvent(QEvent *e); 00032 00033 protected slots: 00034 void startFrontendClick(void); 00035 void startFrontend(void); 00036 void updateAll(void); 00037 void updateStatus(void); 00038 void updateScreen(void); 00039 void closeDialog(void); 00040 void showMenu(void); 00041 void shutdownNow(void); 00042 void runEPGGrabber(void); 00043 void lockShutdown(void); 00044 void unlockShutdown(void); 00045 bool updateRecordingList(void); 00046 bool updateScheduledList(void); 00047 00048 private: 00049 void updateStatusMessage(void); 00050 bool checkConnectionToServer(void); 00051 void checkAutoStart(void); 00052 void runMythFillDatabase(void); 00053 00054 // 00055 // GUI stuff 00056 // 00057 MythUIText *m_status_text; 00058 MythUIText *m_recording_text; 00059 MythUIText *m_scheduled_text; 00060 MythUIText *m_warning_text; 00061 00062 MythUIButton *m_startfrontend_button; 00063 00064 MythDialogBox *m_menuPopup; 00065 00066 QTimer *m_updateStatusTimer; // audited ref #5318 00067 QTimer *m_updateScreenTimer; // audited ref #5318 00068 00069 QString m_installDir; 00070 QString m_timeFormat; 00071 QString m_dateFormat; 00072 bool m_isRecording; 00073 bool m_hasConflicts; 00074 bool m_bWillShutdown; 00075 int m_secondsToShutdown; 00076 QDateTime m_nextRecordingStart; 00077 int m_preRollSeconds; 00078 int m_idleWaitForRecordingTime; 00079 int m_idleTimeoutSecs; 00080 uint m_screenTunerNo; 00081 uint m_screenScheduledNo; 00082 uint m_statusListNo; 00083 QStringList m_statusList; 00084 bool m_frontendIsRunning; 00085 00086 vector<TunerStatus> m_tunerList; 00087 vector<ProgramInfo> m_scheduledList; 00088 00089 QMutex m_RecListUpdateMuxtex; 00090 bool m_pendingRecListUpdate; 00091 00092 bool pendingRecListUpdate() const { return m_pendingRecListUpdate; } 00093 void setPendingRecListUpdate(bool newState) { m_pendingRecListUpdate = newState; } 00094 00095 QMutex m_SchedUpdateMuxtex; 00096 bool m_pendingSchedUpdate; 00097 00098 bool pendingSchedUpdate() const { return m_pendingSchedUpdate; } 00099 void setPendingSchedUpdate(bool newState) { m_pendingSchedUpdate = newState; } 00100 00101 }; 00102 00103 #endif
1.6.3