#ifndef EPT_NOTIFIER_H #define EPT_NOTIFIER_H #include #include #include #include #include class TQWidget; class KAction; // class KGlobalAccel; // the status indicator in system tray class TrayWindow : public KSystemTray { Q_OBJECT public: TrayWindow(TQWidget *parent=0, const char *name=0); void setAvailableUpdates( int n ); int updates() { return m_updates; } void contextMenuAboutToShow ( KPopupMenu * ); signals: void clicked(); void aboutSelected(); protected: void mouseReleaseEvent( TQMouseEvent * ); void resizeEvent( TQResizeEvent * ); int m_updates; KAction *m_quit, *m_about; }; // the apport indicator in system tray // gets shown where the app is started and // existing apport reports are found. // clicking starts apport-qt class ApportTrayWindow : public KSystemTray { Q_OBJECT signals: void clicked(); protected: void mousePressEvent(TQMouseEvent*); void resizeEvent(TQResizeEvent *); }; // used for the reboot notifier class RebootTrayWindow : public KSystemTray { Q_OBJECT signals: void clicked(); protected: void mousePressEvent(TQMouseEvent*); void resizeEvent(TQResizeEvent *); }; // application watching the current status // it will update the icon and run class NotifierApp : public KUniqueApplication { Q_OBJECT public: NotifierApp(bool allowStyles=true, bool GUIenabled=true); ~NotifierApp(); bool fileUpdated( const char *, time_t & ); int upgradable(); protected slots: // void menuActivated(int id); void clicked(); void checkUpdates(); void askQuit(); void about(); // for apport void crashWatcher(); void apportCheckExited(KProcess*); void rebootWatcher(const TQString& path); void rebootClicked(); protected: TrayWindow *m_tray; TQTimer *m_timer; time_t m_updateStamp, m_statusStamp; bool m_okAutostart; // for apport crash handler KDirWatch* m_dirWatch; KDirWatch* m_rebootDirWatch; bool m_crashes; bool m_rebootRequired; bool m_rebootShown; //have we already shown the reboot notifier? }; #endif