- Timestamp:
- Sep 3, 2010, 9:17:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/src/modules/notifications/NotificationQueue.h
r7338 r7342 76 76 77 77 public: 78 NotificationQueue(const std::string& name, const std::string& senders = NotificationManager::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, const Vector2& position = NotificationQueue::DEFAULT_POSITION, unsigned int length = NotificationQueue::DEFAULT_LENGTH, unsigned intdisplayTime = NotificationQueue::DEFAULT_DISPLAY_TIME);78 NotificationQueue(const std::string& name, const std::string& senders = NotificationManager::ALL, unsigned int size = NotificationQueue::DEFAULT_SIZE, const Vector2& position = NotificationQueue::DEFAULT_POSITION, unsigned int displayTime = NotificationQueue::DEFAULT_DISPLAY_TIME); 79 79 virtual ~NotificationQueue(); 80 80 … … 104 104 { return this->size_; } 105 105 /** 106 @brief Returns the maximum length in characters a Notification message is allowed to have.107 @return Returns the maximum Notification length.108 */109 inline unsigned int getNotificationLength() const110 { return this->notificationLength_; }111 /**112 106 @brief Returns the time interval the Notification is displayed. 113 107 @return Returns the display time. … … 121 115 inline const Vector2 & getPosition() const 122 116 { return this->position_; } 123 /**124 @brief Returns the font size used to display the Notifications.125 @return Returns the font size.126 */127 inline float getFontSize() const128 { return this->fontSize_; }129 /**130 @brief Returns the font used to display the Notifications.131 @return Returns the font.132 */133 inline const std::string & getFont() const134 { return this->font_; }135 117 136 118 /** … … 151 133 private: 152 134 static const unsigned int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed. 153 static const unsigned int DEFAULT_LENGTH = 64; //!< The default maximum number of characters displayed.154 135 static const unsigned int DEFAULT_DISPLAY_TIME = 30; //!< The default display time. 155 static const float DEFAULT_FONT_SIZE; //!< The default font size.156 136 157 static const std::string DEFAULT_FONT; //!< The default font.158 137 static const Vector2 DEFAULT_POSITION; //!< the default position. 159 138 … … 167 146 168 147 std::set<std::string> targets_; //!< The targets the Queue displays Notifications of. 169 170 float fontSize_; //!< The font size.171 std::string font_; //!< The font.172 148 173 149 std::multiset<NotificationContainer*, NotificationContainerCompare> ordering_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps. //TODO: Would set work as well? … … 185 161 186 162 void setMaxSize(unsigned int size); //!< Sets the maximum number of displayed Notifications. 187 void setNotificationLength(unsigned int length); //!< Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.188 163 void setDisplayTime(unsigned int time); //!< Sets the maximum number of seconds a Notification is displayed. 189 164 190 165 bool setTargets(const std::string & targets); //!< Set the targets of this queue. 191 192 bool setFontSize(float size); //!< Set the font size.193 bool setFont(const std::string & font); //!< Set the font.194 166 195 167 void positionChanged(void); //!< Aligns all the Notifications to the position of the NotificationQueue.
Note: See TracChangeset
for help on using the changeset viewer.