ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <cloudicon.h>

Collaboration diagram for Cloud::CloudIcon:

List of all members.

Public Types

enum  Type { kNone, kSyncing, kDisabled }
 

The type of cloud icon to show.

More...

Public Member Functions

 CloudIcon ()
 ~CloudIcon ()
void show (Type icon, int duration=0)
 Select the icon to show on the OSD.
Type getShownType () const
 The currently visible icon.
bool needsUpdate () const
 Returns true if the icon state needs to be checked for changes.
void update ()
 Update the icon visible on the OSD.

Private Types

enum  State { kHidden, kShown, kGoingToHide }

Private Member Functions

void initIcons ()
void loadIcon (Graphics::Surface &icon, byte *data, uint32 size)
void makeAlphaIcon (const Graphics::Surface &icon, float alpha)
void hide ()

Private Attributes

State _state
Type _type
Graphics::Surface _icon
Graphics::Surface _disabledIcon
Graphics::Surface _alphaIcon
float _currentAlpha
bool _alphaRising
uint32 _hideTime
uint32 _lastUpdateTime

Static Private Attributes

static const float ALPHA_SPEED = 0.0005
static const float ALPHA_MAX = 1
static const float ALPHA_MIN = 0.6
static const int UPDATE_DELAY_MIN_MILLIS = 10

Detailed Description

Definition at line 30 of file cloudicon.h.


Member Enumeration Documentation

enum Cloud::CloudIcon::State [private]
Enumerator:
kHidden 
kShown 
kGoingToHide 

Definition at line 65 of file cloudicon.h.

The type of cloud icon to show.

Enumerator:
kNone 
kSyncing 

Hide the currently shown icon if any.

kDisabled 

Cloud syncing icon.

Cloud syncing not available icon

Definition at line 38 of file cloudicon.h.


Constructor & Destructor Documentation

Cloud::CloudIcon::CloudIcon (  ) 

Definition at line 34 of file cloudicon.cpp.

Cloud::CloudIcon::~CloudIcon (  ) 

Definition at line 40 of file cloudicon.cpp.


Member Function Documentation

CloudIcon::Type Cloud::CloudIcon::getShownType (  )  const

The currently visible icon.

kNone means no icon is shown.

Definition at line 73 of file cloudicon.cpp.

void Cloud::CloudIcon::hide (  )  [private]

Definition at line 65 of file cloudicon.cpp.

void Cloud::CloudIcon::initIcons (  )  [private]

Definition at line 137 of file cloudicon.cpp.

void Cloud::CloudIcon::loadIcon ( Graphics::Surface icon,
byte data,
uint32  size 
) [private]

Definition at line 142 of file cloudicon.cpp.

void Cloud::CloudIcon::makeAlphaIcon ( const Graphics::Surface icon,
float  alpha 
) [private]

Definition at line 154 of file cloudicon.cpp.

bool Cloud::CloudIcon::needsUpdate (  )  const

Returns true if the icon state needs to be checked for changes.

Definition at line 77 of file cloudicon.cpp.

void Cloud::CloudIcon::show ( CloudIcon::Type  icon,
int  duration = 0 
)

Select the icon to show on the OSD.

Parameters:
icon Icon type to show. Use kNone to hide the current icon if any.
duration Duration in milliseconds the icon stays visible on screen. 0 means the icon stays indefinitely.

Definition at line 46 of file cloudicon.cpp.

void Cloud::CloudIcon::update (  ) 

Update the icon visible on the OSD.

Definition at line 82 of file cloudicon.cpp.


Member Data Documentation

Definition at line 74 of file cloudicon.h.

Definition at line 76 of file cloudicon.h.

Definition at line 75 of file cloudicon.h.

Definition at line 74 of file cloudicon.h.

Definition at line 78 of file cloudicon.h.

Definition at line 74 of file cloudicon.h.

Definition at line 79 of file cloudicon.h.

Definition at line 71 of file cloudicon.h.

Definition at line 72 of file cloudicon.h.

const float Cloud::CloudIcon::ALPHA_MAX = 1 [static, private]

Definition at line 62 of file cloudicon.h.

const float Cloud::CloudIcon::ALPHA_MIN = 0.6 [static, private]

Definition at line 62 of file cloudicon.h.

const float Cloud::CloudIcon::ALPHA_SPEED = 0.0005 [static, private]

Definition at line 62 of file cloudicon.h.

const int Cloud::CloudIcon::UPDATE_DELAY_MIN_MILLIS = 10 [static, private]

Definition at line 63 of file cloudicon.h.


The documentation for this class was generated from the following files:


Generated on Sat May 25 2019 05:04:55 for ResidualVM by doxygen 1.7.1
curved edge   curved edge