BibleTime
src
frontend
btmessageinputdialog.h
Go to the documentation of this file.
1
/*********
2
*
3
* In the name of the Father, and of the Son, and of the Holy Spirit.
4
*
5
* This file is part of BibleTime's source code, https://bibletime.info/
6
*
7
* Copyright 1999-2021 by the BibleTime developers.
8
* The BibleTime source code is licensed under the GNU General Public License
9
* version 2.0.
10
*
11
**********/
12
13
#pragma once
14
15
#include <QDialog>
16
17
#include <QObject>
18
#include <QString>
19
#include <Qt>
20
21
22
class
QLineEdit
;
23
class
QWidget
;
24
25
/**
26
* @brief The BtMessageInputDialog class provides a editable
27
* field for user input. Optionally it displays a larger
28
* message.
29
*/
30
31
class
BtMessageInputDialog
:
public
QDialog
32
{
33
Q_OBJECT
34
35
public
:
// types:
36
37
enum
InputType
{
Normal
,
Password
};
38
39
public
:
// methods:
40
41
/**
42
* @brief The BtMessageInputDialog class provides a editable
43
* field for user input. Optionally it displays a larger message.
44
* @param title dialog title
45
* @param inputLabel short text displayed above input field
46
* @param inputType The type of user input field to display
47
* @param inputText user input field which may be preloaded with text
48
* @param infoMessage optional larger message displayed above the inputLabel
49
* @param parent parent window for dialog
50
* @param f optional window flags
51
*/
52
BtMessageInputDialog
(QString
const
& title,
53
QString
const
& inputLabel,
54
InputType
inputType,
55
QString
const
& inputText,
56
QString
const
& infoMessage = QString(),
57
QWidget
* parent =
nullptr
,
58
Qt::WindowFlags f = Qt::Dialog);
59
60
/**
61
* @brief getUserInput
62
* @returns edited text from user
63
*/
64
QString
getUserInput
()
const
;
65
66
private
:
67
QLineEdit
*
m_inputTextEdit
;
68
};
BtMessageInputDialog
The BtMessageInputDialog class provides a editable field for user input. Optionally it displays a lar...
Definition:
btmessageinputdialog.h:32
BtMessageInputDialog::getUserInput
QString getUserInput() const
getUserInput
Definition:
btmessageinputdialog.cpp:93
BtMessageInputDialog::InputType
InputType
Definition:
btmessageinputdialog.h:37
BtMessageInputDialog::Password
@ Password
Definition:
btmessageinputdialog.h:37
BtMessageInputDialog::Normal
@ Normal
Definition:
btmessageinputdialog.h:37
BtMessageInputDialog::BtMessageInputDialog
BtMessageInputDialog(QString const &title, QString const &inputLabel, InputType inputType, QString const &inputText, QString const &infoMessage=QString(), QWidget *parent=nullptr, Qt::WindowFlags f=Qt::Dialog)
The BtMessageInputDialog class provides a editable field for user input. Optionally it displays a lar...
Definition:
btmessageinputdialog.cpp:28
BtMessageInputDialog::m_inputTextEdit
QLineEdit * m_inputTextEdit
Definition:
btmessageinputdialog.h:67
QDialog
QLineEdit
QWidget
Generated by
1.9.1