NDEVR
API Documentation
TroubleShooting.h
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: TroubleShooting
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QCustomMessageBox.h>
34#include <NDEVR/QCustomStackedWidget.h>
35namespace NDEVR
36{
37 class ProgressWidget;
43 {
44 Q_OBJECT
45 protected:
51 explicit TroubleshootingDialog(const TranslatedString& title, QWidget* parent = nullptr);
58 void setupYesNo(const TranslatedString& message, std::function<void()> on_yes, std::function<void()> on_no);
66 void setupYesNo(const TranslatedString& message, const StringView& image, std::function<void()> on_yes, std::function<void()> on_no);
75 void setupYesNo(const TranslatedString& message, const StringView& image, fltp08 image_size_mult, std::function<void()> on_yes, std::function<void()> on_no);
81 void setupAck(const TranslatedString& message, std::function<void()> on_select);
88 void setupAck(const TranslatedString& message, const StringView& image, std::function<void()> on_select);
96 void setupAck(const TranslatedString& message, const StringView& image, fltp08 image_size_mult, std::function<void()> on_select);
101 void setupLoading(const TranslatedString& message);
107 void setupLoading(const TranslatedString& message, const StringView& image);
108 signals:
113 protected:
116 };
117}
Displays the progress, either horizontally as a bar or as a round spin dial.
A message box displays a primary text to alert the user to a situation, an informative text to furthe...
QCustomStackedWidget(QWidget *parent=nullptr)
Constructs a stacked widget.
The core String View class for the NDEVR API.
Definition StringView.h:58
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
void setupLoading(const TranslatedString &message, const StringView &image)
Adds a loading page with a progress indicator, message, and image.
void setupYesNo(const TranslatedString &message, const StringView &image, fltp08 image_size_mult, std::function< void()> on_yes, std::function< void()> on_no)
Adds a yes/no question page with an image at a custom size.
void setupAck(const TranslatedString &message, std::function< void()> on_select)
Adds an acknowledgment page requiring the user to confirm.
void setupLoading(const TranslatedString &message)
Adds a loading page with a progress indicator and message.
QCustomMessageBox * m_message_box
The message box used for question and acknowledgment pages.
void setupYesNo(const TranslatedString &message, const StringView &image, std::function< void()> on_yes, std::function< void()> on_no)
Adds a yes/no question page with an accompanying image.
void setupAck(const TranslatedString &message, const StringView &image, std::function< void()> on_select)
Adds an acknowledgment page with an accompanying image.
void setupYesNo(const TranslatedString &message, std::function< void()> on_yes, std::function< void()> on_no)
Adds a yes/no question page to the dialog.
void setupAck(const TranslatedString &message, const StringView &image, fltp08 image_size_mult, std::function< void()> on_select)
Adds an acknowledgment page with an image at a custom size.
void requestHideSignal()
Signal emitted to request that the dialog be hidden.
ProgressWidget * m_loading_page
The progress widget used for loading pages.
TroubleshootingDialog(const TranslatedString &title, QWidget *parent=nullptr)
Constructs a troubleshooting dialog with the given title.
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.