remove graphic progressbar

Origin commit data
------------------
Commit: 675c0dc6f6
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-06 (Tue, 06 Jun 2017)

Origin message was:
------------------
- remove graphic progressbar
This commit is contained in:
vanhofen
2017-06-06 00:09:31 +02:00
parent ff626ed909
commit a0ec4edf2e
19 changed files with 15 additions and 70 deletions

View File

@@ -39,9 +39,7 @@
#define GREEN 0x00FF00
#define YELLOW 0xFFFF00
//NI graphic
#include <sstream>
#include <unistd.h>
//NI starbar
#include <gui/pictureviewer.h>
extern CPictureViewer * g_PicViewer;
@@ -86,8 +84,6 @@ CProgressBar::CProgressBar( const int x_pos,
pb_value = 0;
pb_max_value = 0;
graphic_file = "progressbar"; //NI graphic
// init start positions x/y active bar
pb_x = x + fr_thickness;
pb_y = y + fr_thickness;
@@ -479,10 +475,6 @@ void CProgressBar::paintProgress(bool do_save_bg)
paintStarBar();
is_painted = true;
}
else if(*pb_design == PB_GRAPHIC) {
paintGraphic();
is_painted = true;
}
else {
CProgressBarCache *pbc = CProgressBarCache::pbcLookup(pb_height, pb_max_width, pb_active_col, pb_passive_col, *pb_design, pb_invert, *pb_gradient, pb_red, pb_yellow, pb_green);
if (pbc)
@@ -504,31 +496,6 @@ void CProgressBar::paintProgress(bool do_save_bg)
}
}
//NI graphic
void CProgressBar::paintGraphic()
{
std::string pb_active_graphic(frameBuffer->getIconPath(graphic_file));
std::string pb_passive_graphic(frameBuffer->getIconPath(graphic_file + "_passive"));
//printf("**** %04d::%04d: pb_last_width: %d, pb_active_width: %d, pb_max_width %d\n", pb_x, pb_y, pb_last_width, pb_active_width, pb_max_width);
if (pb_last_width == -1 ) {
if (pb_active_width <= pb_max_width && pb_passive_width > 0)
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
}
if (pb_active_width > pb_last_width) {
// we have to paint the passive graphic in all cases to satisfy the CProgresswindow
if (pb_passive_width > 0)
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
if (pb_active_width > 0)
g_PicViewer->DisplayImage(pb_active_graphic, pb_x, pb_y, pb_active_width, pb_height); // active bar
}
else if (pb_active_width <= pb_max_width && pb_passive_width > 0)
g_PicViewer->DisplayImage(pb_passive_graphic, pb_start_x_passive, pb_y, pb_passive_width, pb_height); // passive bar
}
//NI starbar
void CProgressBar::paintStarBar()
{

View File

@@ -79,8 +79,6 @@ class CProgressBar : public CComponentsItem
///to evaluate values, these will be convert to the graph
int pb_value, pb_max_value;
std::string graphic_file; //NI graphic
int *pb_design, *pb_gradient;
int pb_type;
@@ -88,7 +86,6 @@ class CProgressBar : public CComponentsItem
///paints graph
void paintProgress(bool do_save_bg = CC_SAVE_SCREEN_NO);
void paintGraphic(); //NI graphic
void paintStarBar(); //NI starbar
public:
@@ -135,9 +132,6 @@ class CProgressBar : public CComponentsItem
const int w, const int h,
const int val, const int max_val){x=x_pos; y=y_pos; width=w; height=h; pb_value=val; pb_max_value=max_val;}
//NI graphic
void setGraphic(std::string graphic) { graphic_file = graphic; }
///force update on next paint
void reset() { pb_last_width = -1; }
void paint(bool do_save_bg = CC_SAVE_SCREEN_NO);
@@ -148,8 +142,7 @@ class CProgressBar : public CComponentsItem
PB_MATRIX, /* 0 */
PB_LINES_V, /* 1 */
PB_LINES_H, /* 2 */
PB_COLOR, /* 3 */
PB_GRAPHIC /* 4 */ //NI graphic
PB_COLOR /* 3 */
};
enum pb_type_t {