Qx
v0.5.8
Qt Extensions Library
Loading...
Searching...
No Matches
qx-logindialog.h
1
#ifndef QX_LOGINDIALOG_H
2
#define QX_LOGINDIALOG_H
3
4
// Shared Lib Support
5
#include "qx/widgets/qx_widgets_export.h"
6
7
// Qt Includes
8
#include <QDialog>
9
#include <QLabel>
10
#include <QLineEdit>
11
#include <QDialogButtonBox>
12
13
using namespace
Qt::Literals::StringLiterals
;
14
15
namespace
Qx
16
{
17
18
class
QX_WIDGETS_EXPORT
LoginDialog
:
public
QDialog
19
{
20
//-QObject Macro (Required for all QObject Derived Classes)-----------------------------------------------------------
21
Q_OBJECT
22
23
//-Class Members-------------------------------------------------------------------------------------------------------
24
private
:
25
static
inline
const
QString
LABEL_DEF_PRMT= u
"Login Required"
_s;
26
static
inline
const
QString
LABEL_USRNAME = u
"&Username"
_s;
27
static
inline
const
QString
LABEL_PSSWD = u
"&Password"
_s;
28
29
//-Instance Members---------------------------------------------------------------------------------------------------
30
private
:
31
QLabel
* mPromptLabel;
32
QLabel
* mUsernameLabel;
33
QLabel
* mPasswordLabel;
34
QLineEdit
* mUsernameLineEdit;
35
QLineEdit
* mPasswordLineEdit;
36
QDialogButtonBox
* mButtonBox;
37
38
//-Constructor-------------------------------------------------------------------------------------------------------
39
public
:
40
explicit
LoginDialog
(
QWidget
* parent =
nullptr
,
QString
prompt = LABEL_DEF_PRMT);
41
42
//-Instance Functions----------------------------------------------------------------------------------------------
43
public
:
44
void
setPrompt(
QString
prompt);
45
QString
username();
46
QString
password();
47
48
//-Slots----------------------------------------------------------------------------------------------------------
49
private
slots:
50
void
acceptHandler();
51
void
rejectHandler();
52
};
53
54
}
55
56
#endif
// QX_LOGINDIALOG_H
Qx::LoginDialog
The LoginDialog class provides a modal dialog that prompts a user for a username and password.
Definition
qx-logindialog.h:19
Qx
The Qx namespace is the main namespace through which all non-global functionality of the Qx library i...
Definition
qx-processwaiter.cpp:5
QDialog
QDialogButtonBox
QLabel
QLineEdit
QString
Qt::Literals::StringLiterals
QWidget
lib
widgets
include
qx
widgets
qx-logindialog.h
Generated by
1.10.0