mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
CComponents: add progressbar class to cc-items
CProgressbar moved into components sub directory and adapt includes.
Progressbar objects are now usable as cc-item
TODO:
-some color and size corrections
-found some dub codes for sig and snr-bars, needs rework
Origin commit data
------------------
Branch: ni/coolstream
Commit: 860be9a412
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-01 (Mon, 01 Apr 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
#include <gui/widget/messagebox.h>
|
||||
#include <gui/widget/progressbar.h>
|
||||
#include <gui/components/cc_item_progressbar.h>
|
||||
|
||||
#include <system/settings.h>
|
||||
#include <system/helpers.h>
|
||||
@@ -81,8 +81,11 @@ CScanTs::CScanTs()
|
||||
total = done = 0;
|
||||
freqready = 0;
|
||||
|
||||
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||
sigscale = new CProgressBar();
|
||||
sigscale->setBlink();
|
||||
|
||||
snrscale = new CProgressBar();
|
||||
snrscale->setBlink();
|
||||
}
|
||||
|
||||
void CScanTs::prev_next_TP( bool up)
|
||||
@@ -555,13 +558,14 @@ void CScanTs::showSNR ()
|
||||
sig = (ssig & 0xFFFF) * 100 / 65535;
|
||||
|
||||
posy = y + height - mheight - 5;
|
||||
|
||||
if (lastsig != sig) {
|
||||
//TODO: move sig/snr display into its own class, similar or same code also to find in motorcontrol
|
||||
if (lastsig != sig) {
|
||||
lastsig = sig;
|
||||
posx = x + 20;
|
||||
sprintf(percent, "%d%%", sig);
|
||||
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100%");
|
||||
sigscale->paintProgressBar2(posx - 1, posy+2, sig);
|
||||
sigscale->setProgress(posx - 1, posy+2, BAR_WIDTH, BAR_HEIGHT, sig, 100);
|
||||
sigscale->paint();
|
||||
|
||||
posx = posx + barwidth + 3;
|
||||
frameBuffer->paintBoxRel(posx, posy -1, sw, mheight-8, COL_MENUCONTENT_PLUS_0);
|
||||
@@ -576,7 +580,8 @@ void CScanTs::showSNR ()
|
||||
posx = x + 20 + (20 * fw);
|
||||
sprintf(percent, "%d%%", snr);
|
||||
sw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth ("100%");
|
||||
snrscale->paintProgressBar2(posx - 1, posy+2, snr);
|
||||
snrscale->setProgress(posx - 1, posy+2, BAR_WIDTH, BAR_HEIGHT, snr, 100);
|
||||
snrscale->paint();
|
||||
|
||||
posx = posx + barwidth + 3;
|
||||
frameBuffer->paintBoxRel(posx, posy - 1, sw, mheight-8, COL_MENUCONTENT_PLUS_0, 0, true);
|
||||
|
Reference in New Issue
Block a user