FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
TextInputDialog.h
Go to the documentation of this file.
1#ifndef TEXT_INPUT_DIALOG_H
2#define TEXT_INPUT_DIALOG_H
3
4#include <QInputDialog>
5#include <QString>
6#include <algorithm>
7#include <optional>
8#include <string>
9
11#include "typenames.h"
13
14namespace gui::window::prompt {
20 class TextInputDialog final : public QAppSingletonProto {
21 public:
22 TextInputDialog() = delete;
23
24 static std::optional<std::string> promptForTextInput(
25 const std::string& title,
26 const std::string& prompt,
27 const std::string& defaultValue,
29
30 static std::optional<FloatingPoint> promptForFloatingPointInput(
31 const std::string& title,
32 const std::string& prompt,
33 const std::optional<FloatingPoint>& defaultValue,
35 };
36} // namespace gui::window::prompt
37
38#endif // TEXT_INPUT_DIALOG_H
An internal helper class for handling QApplication.
Utility class for prompting the user for input.
static std::optional< std::string > promptForTextInput(const std::string &title, const std::string &prompt, const std::string &defaultValue, business_logic::delegate::IWindowDelegate *windowDelegate)
static std::optional< FloatingPoint > promptForFloatingPointInput(const std::string &title, const std::string &prompt, const std::optional< FloatingPoint > &defaultValue, business_logic::delegate::IWindowDelegate *windowDelegate)
GUI user prompt utilities.