GlistEngine
Loading...
Searching...
No Matches
gGUIPieGraph.h
Go to the documentation of this file.
1/*
2 * gGUIPieGraph.h
3 *
4 * Created on: 27 Jul 2022
5 * Author: burakmeydan
6 */
7
8#ifndef UI_gGUIPieGraph_H_
9#define UI_gGUIPieGraph_H_
10
11#include "gGUIControl.h"
12
14public:
16 virtual ~gGUIPieGraph();
17
18 void set(gBaseApp* root, gBaseGUIObject* topParentGUIObject, gBaseGUIObject* parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h);
19
20 void draw();
21
22 void setRadius(float radius);
23 float getRadius();
24
25 void addVariable(std::string variableLabel, float variableValue);
26 void addVariable(std::string variableLabel, float variableValue, gColor variableColor);
27
30 void setShowInfoOnCursor(bool isShown);
31 void setInfoTextSize(int size);
32 void setAdditionalLabelY(float diff);
33 void setPredictedOutputs(const std::vector<int>& outs);
34 void setPredictedOutputName(int id, const std::string& label);
35
36 void clear();
37
38private:
39 float getTotalValue(std::vector<float> vector);
40 void mouseMoved(int x, int y);
41 void arrangeOnCursor(int index);
42 void showInfoOnCursor();
43 void loadFont();
44 void arrangePieGraph();
45 void calculateLabelPositions();
46
47 std::vector<std::string> variablelabels;
48 std::vector<float> variablevalues;
49 std::vector<gColor> variablecolors;
50
51 std::vector<float> valuesdegree;
52 std::vector<float> valuespercentage;
53 std::vector<int> valuessides;
54 std::vector<int> othersindex;
55 std::vector<std::string> labelstr;
56 std::vector<int> labelx, labely;
57 std::vector<int> predictedoutputs;
58 std::vector<std::string> valuefortext;
59 std::vector<std::string> percentagefortext;
60
61 float radius, cursordegree, radiusreduction, oncursorcolorreduction, rotationforothers;
62 bool isFilled, isshown;
63 int numberofsidesratio, sideofothers, cursorx, cursory, infotextshift, showinfoindex, fontsize;
64 gColor color;
65 gColor outlinecolor, otherscolor, infotextcolor;
66 gFont fontforinfotext;
67 float additionallabely;
68 int widthhalf, heighthalf;
69 bool setPredictedOutputNameRequested;
70};
71
72#endif /* UI_gGUIPieGraph_H_ */
Definition gBaseApp.h:16
Definition gBaseGUIObject.h:18
gBaseApp * root
Definition gBaseGUIObject.h:147
Definition gColor.h:17
Definition gFont.h:47
Definition gGUIControl.h:29
Definition gGUIPieGraph.h:13
void addVariable(std::string variableLabel, float variableValue, gColor variableColor)
void setInfoTextSize(int size)
void setInfoTextColor(gColor color)
void setPredictedOutputs(const std::vector< int > &outs)
void setPredictedOutputName(int id, const std::string &label)
float getRadius()
void setShowInfoOnCursor(bool isShown)
void set(gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h)
void addVariable(std::string variableLabel, float variableValue)
void setOutLineColor(gColor color)
void setRadius(float radius)
void setAdditionalLabelY(float diff)
virtual ~gGUIPieGraph()