API Documentation
Loading...
Searching...
No Matches
StatusBar.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: StatusBar
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/LogStream.h>
34#include <NDEVR/String.h>
35#include <QWidget>
36#include <QPointer>
37namespace Ui
38{
39 class StatusBarUI;
40}
41namespace NDEVR
42{
43 class Button;
44 class QTModelManager;
45 class QTResourceListener;
46 /**--------------------------------------------------------------------------------------------------
47 \brief A simple widget that shows a Status and optionally a progressbar.
48 **/
49 class StatusBar : public QWidget, public LogStream
50 {
51 Q_OBJECT
52 public:
56 void allowCancel(bool) final override {};
57 void setProgress(fltp04 progress) final override;
58 bool ownsWidgets() const { return m_owns_widgets; };
59 void addMessage(const LogMessage& message) final override;
60 void addQuickButton(Button* button);
62 void setVertical(bool)
63 {
64 //ui->information_layout->se
65 }
66 void setVisible(bool visible) override;
68 QSize minimumSizeHint() const override;
69 QSize sizeHint() const override;
70 private:
71 void _updateUI();
72 signals:
74 void requestRemoteWidgetSignal(bool use_remote);
75 public slots:
77 void updateUI();
78 private:
79 String m_log_message;
80 fltp04 m_progress;
81 QTimer* m_hide_timer;
82 TranslatedString m_command_name;
83 TranslatedString m_command_hint;
84 QTModelManager* m_manager;
85 Ui::StatusBarUI* ui;
86 QTResourceListener* m_ui_change;
87 Buffer<QPointer<Button>> m_quick_widgets;
88 bool m_owns_widgets;
89 };
90}
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 class that allows for specific log information to be conveyed to a ProgressInfo object including in...
Definition LogMessage.h:44
A class that listens to a log object and processes the updates in a specified way....
Definition LogStream.h:46
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Definition QTModelManager.h:105
Definition QTTools.h:168
A simple widget that shows a Status and optionally a progressbar.
Definition StatusBar.h:50
void setProgress(fltp04 progress) final override
QSize minimumSizeHint() const override
void requestUpdateLog()
QSize sizeHint() const override
bool ownsWidgets() const
Definition StatusBar.h:58
void requestRemoteWidgetSignal(bool use_remote)
void clearQuickButtons()
Buffer< QPointer< QWidget > > remoteWidgets() const
void allowCancel(bool) final override
Definition StatusBar.h:56
void setVertical(bool)
Definition StatusBar.h:62
void addMessage(const LogMessage &message) final override
StatusBar(QTModelManager *manager)
void addQuickButton(Button *button)
void setVisible(bool visible) override
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
Definition FontEditor.h:6