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;
44 /**--------------------------------------------------------------------------------------------------
45 \brief A button that displays information about multiple TemperatureSensors when clicked. Button changes color
46 based on the status of specified TemperatureSensor objects.
47 **/
49 {
50 Q_OBJECT
51 public:
52 explicit TemperatureWidget(QWidget* parent = nullptr);
55 void addSensor(TemperatureSensor* sensor, bool update = true);
56 void removeSensor(TemperatureSensor* sensor, bool update = true);
57 void clearSensors(bool update = true);
58 void setColumnCount(uint04 column_count);
59 const Dictionary<UUID, TemperatureSensor*>& sensors() const { return m_sensors; };
60 protected slots:
62 protected:
65 protected:
68 QWidget* m_widget;
69 QGridLayout* m_layout;
70 uint04 m_column_count = 2;
71
72 };
73}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:56
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A core widget that allows the user to click one of many button types.
Definition Button.h:66
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
A Device responsible for determining the temperature of either the environment or a specific componen...
Definition TemperatureSensor.h:41
A button that displays information about multiple TemperatureSensors when clicked....
Definition TemperatureWidget.h:49
Dictionary< UUID, ProgressWidget * > m_values
Definition TemperatureWidget.h:67
void addSensor(TemperatureSensor *sensor, bool update=true)
void setSensors(Buffer< TemperatureSensor * > sensors)
void setSensor(TemperatureSensor *sensor)
void removeSensor(TemperatureSensor *sensor, bool update=true)
QGridLayout * m_layout
Definition TemperatureWidget.h:69
Dictionary< UUID, TemperatureSensor * > m_sensors
Definition TemperatureWidget.h:66
RGBColor getColor(uint04 state)
void setColumnCount(uint04 column_count)
void clearSensors(bool update=true)
const Dictionary< UUID, TemperatureSensor * > & sensors() const
Definition TemperatureWidget.h:59
TemperatureWidget(QWidget *parent=nullptr)
QWidget * m_widget
Definition TemperatureWidget.h:68
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:96