API Documentation
Loading...
Searching...
No Matches
TemperatureWidget.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: BatteryWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Button.h>
35#include <NDEVR/Dictionary.h>
36#include <NDEVR/UUID.h>
37class QLabel;
38class QGridLayout;
39namespace NDEVR
40{
41 class ProgressWidget;
42 class TemperatureSensor;
43 class QCustomLabel;
45 {
46 Q_OBJECT
47 public:
48 explicit TemperatureWidget(QWidget* parent = nullptr);
49 void setSensor(TemperatureSensor* sensor);
50 void setSensors(Buffer<TemperatureSensor*> sensors);
51 void addSensor(TemperatureSensor* sensor, bool update = true);
52 void removeSensor(TemperatureSensor* sensor, bool update = true);
53 void clearSensors(bool update = true);
54 void setColumnCount(uint04 column_count);
55 const Dictionary<UUID, TemperatureSensor*>& sensors() const { return m_sensors; };
56 protected slots:
57 void updatedSlot();
58 protected:
59 void updateLayout();
60 RGBColor getColor(uint04 state);
61 protected:
64 QWidget* m_widget;
65 QGridLayout* m_layout;
66 uint04 m_column_count = 2;
67
68 };
69}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:74
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Button.h:60
Definition Dictionary.h:48
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Definition TemperatureSensor.h:37
Definition TemperatureWidget.h:45
Dictionary< UUID, ProgressWidget * > m_values
Definition TemperatureWidget.h:63
QGridLayout * m_layout
Definition TemperatureWidget.h:65
Dictionary< UUID, TemperatureSensor * > m_sensors
Definition TemperatureWidget.h:62
const Dictionary< UUID, TemperatureSensor * > & sensors() const
Definition TemperatureWidget.h:55
QWidget * m_widget
Definition TemperatureWidget.h:64
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120