Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 3, 2010, 9:17:51 PM (14 years ago)
Author:
dafrick
Message:

Some documenting, cleaning up. Also: Now the NotificationQueue has a height corresponding to its input size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/src/modules/notifications/NotificationQueue.h

    r7338 r7342  
    7676
    7777        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 int displayTime = 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);
    7979            virtual ~NotificationQueue();
    8080
     
    104104                { return this->size_; }
    105105            /**
    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() const
    110                 { return this->notificationLength_; }
    111             /**
    112106            @brief Returns the time interval the Notification is displayed.
    113107            @return Returns the display time.
     
    121115            inline const Vector2 & getPosition() const
    122116                { 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() const
    128                 { 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() const
    134                 { return this->font_; }
    135117
    136118            /**
     
    151133        private:
    152134            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.
    154135            static const unsigned int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
    155             static const float DEFAULT_FONT_SIZE; //!< The default font size.
    156136
    157             static const std::string DEFAULT_FONT; //!< The default font.
    158137            static const Vector2 DEFAULT_POSITION; //!< the default position.
    159138
     
    167146
    168147            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.
    172148
    173149            std::multiset<NotificationContainer*, NotificationContainerCompare> ordering_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps. //TODO: Would set work as well?
     
    185161
    186162            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.
    188163            void setDisplayTime(unsigned int time); //!< Sets the maximum number of seconds a Notification is displayed.
    189164
    190165            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.
    194166
    195167            void positionChanged(void); //!< Aligns all the Notifications to the position of the NotificationQueue.
Note: See TracChangeset for help on using the changeset viewer.