- Timestamp:
- Dec 14, 2008, 1:42:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/overlays/notifications/Notification.h
r2385 r2435 36 36 #include "core/BaseObject.h" 37 37 38 namespace orxonox { 38 namespace orxonox 39 { 40 static const float NOTIFICATION_DISPLAY_TIME = 4.0; 39 41 40 42 /** 41 43 @brief 42 44 This is rather temporary, so don't start relying on it, some better version will come soon but the Interface will not likely be the same. 43 45 @author 44 46 Damian 'Mozork' Frick … … 46 48 class _OrxonoxExport Notification : public BaseObject 47 49 { 48 public: 49 Notification(BaseObject* creator); 50 Notification(const std::string & message, const std::string & title = "", float time = DISPLAY_TIME); 51 virtual ~Notification(); 52 53 bool send(void); 54 55 inline bool isSent(void) const 56 { return this->sent_; } 57 inline const std::string & getTitle(void) const 58 { return this->title_; } 59 inline const std::string & getMessage(void) const 60 { return this->message_; } 61 inline const float getDisplayTime(void) const 62 { return displayTime_; } 63 64 bool setTitle(const std::string & title); 65 bool setMessage(const std::string & message); 66 bool setDisplayTime(float time); 67 68 private: 69 static const float DISPLAY_TIME = 4.0; 70 71 std::string title_; //!< The title of the Notification. 72 std::string message_; //!< The Notification message. 73 float displayTime_; //!< The time duration the Notification is displayed in seconds. 74 bool sent_; //!< Whether Notification has been sent, if so it cannot be changed. 75 76 void initialize(void); 77 50 public: 51 Notification(BaseObject* creator); 52 Notification(BaseObject* creator, const std::string & message, const std::string & title = "", float time = NOTIFICATION_DISPLAY_TIME); 53 virtual ~Notification(); 54 55 bool send(void); 56 57 inline bool isSent(void) const 58 { return this->sent_; } 59 inline const std::string & getTitle(void) const 60 { return this->title_; } 61 inline const std::string & getMessage(void) const 62 { return this->message_; } 63 inline const float getDisplayTime(void) const 64 { return displayTime_; } 65 66 bool setTitle(const std::string & title); 67 bool setMessage(const std::string & message); 68 bool setDisplayTime(float time); 69 70 private: 71 std::string title_; //!< The title of the Notification. 72 std::string message_; //!< The Notification message. 73 float displayTime_; //!< The time duration the Notification is displayed in seconds. 74 bool sent_; //!< Whether Notification has been sent, if so it cannot be changed. 75 76 void initialize(void); 78 77 }; 79 80 78 } 81 79
Note: See TracChangeset
for help on using the changeset viewer.