Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 1:42:17 AM (15 years ago)
Author:
rgrieder
Message:
  • updated msvc files
  • Fixed build by including util/Integer.h in NetworkPrereqs.h instead of util/Math.h
  • Fixed issue with a this pointer used in the base class c'tor initialisation
  • Fixed build under windows: INFINITE seems to be a macro, defined in winbase.h. Constant was somewhere in the quest files.
  • Fixed build: Only integral types can have header-file value when declared as static const. Float is not supported by the standard.
  • Fixed a potential bug in Planet.cc: "if (cond) doOne; doTwo" —> missing brances (indentation was correct, so I assume there have to be brances)
  • Corrected lots of indentation problems with tabs/spaces mix.
  • Changed all "@file Blubb.h" to "@file": Doxygen then assumes the actual filename. This gives more flexibility.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/overlays/notifications/Notification.h

    r2385 r2435  
    3636#include "core/BaseObject.h"
    3737
    38 namespace orxonox {
     38namespace orxonox
     39{
     40    static const float NOTIFICATION_DISPLAY_TIME = 4.0;
    3941
    4042    /**
    4143    @brief
    42         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.
     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.
    4345    @author
    4446        Damian 'Mozork' Frick
     
    4648    class _OrxonoxExport Notification : public BaseObject
    4749    {
    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);
    7877    };
    79 
    8078}
    8179
Note: See TracChangeset for help on using the changeset viewer.