-
- _idxOffStart = 0;
- QString fadeOffName("quassel_tray-fade-off-%1");
- for(int i = 2; i <= 10; i++)
- _phases.append(loader->loadIcon(fadeOffName.arg(i), IconLoader::Panel, size));
- _idxOffEnd = _idxOnStart = _phases.count() - 1;
-
- QString fadeOnName("quassel_tray-fade-on-%1");
- for(int i = 2; i <= 15; i++)
- _phases.append(loader->loadIcon(fadeOnName.arg(i), IconLoader::Panel, size));
- _idxOnEnd = _idxAlertStart = _phases.count() - 1;
-
- QString alertName("quassel_tray-alert-%1");
- for(int i = 1; i <= 10; i++)
- _phases.append(loader->loadIcon(alertName.arg(i), IconLoader::Panel, size));
-}
-
-void SystemTray::nextPhase() {
- if(_currentIdx == _idxOnEnd && !_alert && _state == Inactive)
- _currentIdx = _idxOffStart; // skip alert phases
-
- else if(++_currentIdx >= _phases.count()) {
- if(_alert)
- _currentIdx = _idxAlertStart;
- else
- if(_state == Active)
- _currentIdx = _idxOnEnd;
- else
- _currentIdx = _idxOffStart;