Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::Database::Qt5::DbConnect Class Reference

Implements a Qt5 DbConnect Dialog. More...

#include <SaS/Sql/Qt/Qt5/DbConnect.hpp>

+ Inheritance diagram for SoftwareAndServices::Library::Database::Qt5::DbConnect:
+ Collaboration diagram for SoftwareAndServices::Library::Database::Qt5::DbConnect:

Public Slots

void CertificateAuthClicked (bool IsSet)
 CertificateAuthClicked - The Certtificate Authentication radio button has changed. More...
 
void MustUseTlsClicked (bool IsSet)
 MustUseTlsClicked - Use TLS. More...
 
void NeverTlsClicked (bool IsSet)
 NeverTlsClicked - The never TLS radio button has changed. More...
 
void SaveClicked (bool IsSet)
 SaveClicked The user pressed the Save button. More...
 
void SetDbAuthMode (SQL::AuthenticationType_e)
 SetDbAuthMode - Set the authentication mode. More...
 
void SetDbHost (const QString &DbHost)
 
void SetDbName (const QString &DbName)
 
void SetDbPassword (const QString &DbPw)
 
void SetDbPath (const QString &DbPath)
 
void SetDbPort (uint16_t ThePort)
 SetDbPort - Set the port number. More...
 
void SetDbPrivateKey (const QString &Certificate)
 
void SetDbPublicKey (const QString &Certificate)
 
void SetDbTlsMode (SQL::SecurityType_e TlsMode)
 
void SetDbType (SQL::DatabaseType_e TheDbType)
 
void SetDbType (QString TheDbType)
 SetDbType - This is called when the database type has changed. More...
 
void SetDbUser (const QString &DbUser)
 
void ShowCheckboxChecked (bool IsChecked)
 ShowCheckboxChecked - Call when the ShowPwCheckbox is toggled. More...
 
bool TestSettings ()
 TestSettings - Call to test the curent settings. More...
 
void TlsIfAvailableClicked (bool IsSet)
 TlsIfAvailableClicked - The use TLS when available radio button has changed. More...
 

Signals

void ErrorMessage (const QString &ErrorText) const
 Sends any error message. More...
 
void ObjectSaved (DbConnect *Who)
 ObjectSaved - Thrown (emit) when this object is saved. More...
 
void ValueError () const
 Value error, value is not valid for an company name. More...
 

Public Member Functions

 DbConnect (QWidget *Parent=0)
 DbConnect - Constructor. More...
 
virtual ~DbConnect ()
 DbConnect - Destructor. More...
 
void Clear ()
 Clear the values. More...
 
SQL::AuthenticationType_e GetDbAuthMode () const
 GetDbAuthMode - Get the authentication mode. More...
 
const QString & GetDbHost () const
 
const QString & GetDbName () const
 
const QString & GetDbPassword () const
 
const QString & GetDbPath () const
 
const QString & GetDbPrivteKeyFile () const
 
const QString & GetDbPublicKeyFile () const
 
SQL::SecurityType_e GetDbTlsMode () const
 GetDbTlsMode - Get the TLS mode. More...
 
SQL::DatabaseType_e GetDbType () const
 
const QString & GetDbUser () const
 
void LoadSettings (QSettings *Config)
 LoadSettings - Load the configuration settings needed for this widget. More...
 
void SetConfiguration (QSettings *Config)
 SetConfiguration - Tell the DbConnect widget which configuation object to use. More...
 
QTreeWidgetItem * TreeItem () const
 TreeItem - Get this object QTreeWidgetItem. More...
 
void TreeItem (QTreeWidgetItem *NewOne)
 TreeItem - Set this object QTreeWidgetItem. More...
 

Private Member Functions

void retranslateUi (QWidget *SoftwareAndServices__Library__Database__Qt5__DbConnect_Widget)
 
void retranslateUi (QWidget *SoftwareAndServices__Library__Database__Qt5__DbConnect_Widget)
 
void setupUi (QWidget *SoftwareAndServices__Library__Database__Qt5__DbConnect_Widget)
 
void setupUi (QWidget *SoftwareAndServices__Library__Database__Qt5__DbConnect_Widget)
 

Private Attributes

QGroupBox * AuthTypeGroup
 
QGridLayout * AuthTypeLayout
 
QPushButton * BrowseForDb
 
QRadioButton * BsdAuth
 
QGridLayout * ButtonsLayout
 
QVBoxLayout * ByHostNameLayout
 
QWidget * ByHostNamePage
 
QGridLayout * ByIPv4Layout
 
QWidget * ByIPv4Page
 
QVBoxLayout * ByIPv6Layout
 
QWidget * ByIPv6Page
 
QHBoxLayout * ByPathLayout
 
QWidget * ByPathPage
 
QRadioButton * CertificateAuth
 
QGridLayout * DbConnectGridLayout
 
QFrame * DbFileNameFrame
 
QVBoxLayout * DbFileNameVerticalLayout
 
SoftwareAndServices::Library::Common::Qt5::HostNameDbHost
 
QLineEdit * DbName
 
QLabel * DbNameLabel
 
QHBoxLayout * DbNameLayout
 
QLineEdit * DbPassword
 
QLabel * DbPasswordLabel
 
QLineEdit * DbPath
 
QComboBox * DbType
 
QLabel * DbTypeLabel
 
QLineEdit * DbUser
 
QLabel * DbUserLabel
 
QGridLayout * gridLayout
 
QRadioButton * GssApiAuth
 
QComboBox * HostIdMethod
 
QStackedWidget * HostIdStacked
 
QRadioButton * IdentAuth
 
SoftwareAndServices::Library::Common::Qt5::IPv4IPv4
 
SoftwareAndServices::Library::Common::Qt5::IPv6IPv6
 
QRadioButton * LdapAuth
 
QRadioButton * MustUseTlsRadio
 
QRadioButton * NeverTlsRadio
 
QRadioButton * PamAuth
 
QRadioButton * PasswordAuth
 
QHBoxLayout * PasswordLayout
 
QRadioButton * PasswordMd5
 
QRadioButton * PeerAuth
 
QSpinBox * Port
 
QLabel * PortLabel
 
QPushButton * PrivateKeyButton
 
QPushButton * PublicKeyButton
 
QRadioButton * RadiusAuth
 
QPushButton * SaveButton
 
QPushButton * ScanDbButton
 
QWidget * SetCertsWidget
 
QCheckBox * ShowPwCheckbox
 
QFrame * SpacerLine1
 
QFrame * SpacerLine2
 
QRadioButton * SspiAuth
 
QPushButton * TestSettingsButton
 
QGroupBox * TlsGroupBox
 
QRadioButton * TlsIfAvailableRadio
 
QRadioButton * TrustAuth
 
QCheckBox * UseProvidedCert
 
QGridLayout * UseTlsGroupBox
 
QLabel * UuidHidden
 

Detailed Description

Implements a Qt5 DbConnect Dialog.

DbConnect_Image.png
DbConnect Widget

Definition at line 75 of file DbConnect.hpp.

Constructor & Destructor Documentation

◆ DbConnect()

SoftwareAndServices::Library::Database::Qt5::DbConnect::DbConnect ( QWidget *  Parent = 0)

DbConnect - Constructor.

This widget provides a GUI to gather database authentication information.

You can disable specific parts of the widget, or just ignore the information from the parts you do not need.

This widget does not perform the authenticaton, it simply gathers the information in a consistant manner.

Parameters
ParentThe parent widget or object.
See also
Clear()
Close()

◆ ~DbConnect()

virtual SoftwareAndServices::Library::Database::Qt5::DbConnect::~DbConnect ( )
virtual

DbConnect - Destructor.

Clears the values and deletes this object.

Member Function Documentation

◆ CertificateAuthClicked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::CertificateAuthClicked ( bool  IsSet)
slot

CertificateAuthClicked - The Certtificate Authentication radio button has changed.

Parameters
IsSetThe status of the button.

◆ Clear()

void SoftwareAndServices::Library::Database::Qt5::DbConnect::Clear ( )

Clear the values.

◆ ErrorMessage

void SoftwareAndServices::Library::Database::Qt5::DbConnect::ErrorMessage ( const QString &  ErrorText) const
signal

Sends any error message.

Parameters
ErrorTextThe error message.

◆ GetDbAuthMode()

SQL::AuthenticationType_e SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbAuthMode ( ) const

GetDbAuthMode - Get the authentication mode.

Returns
The database authentication mode.

◆ GetDbHost()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbHost ( ) const
Returns
The database host.

◆ GetDbName()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbName ( ) const
Returns
The database name.

◆ GetDbPassword()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbPassword ( ) const
Returns
The database password.
Note
This is a destructive read. Once you read the value, the widget clears the value.

◆ GetDbPath()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbPath ( ) const
Returns
The database path.

◆ GetDbPrivteKeyFile()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbPrivteKeyFile ( ) const
Returns
The database Private Key, or NULL when not set.

◆ GetDbPublicKeyFile()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbPublicKeyFile ( ) const
Returns
The database Public certificate file name, or NULL when not set.

◆ GetDbTlsMode()

SQL::SecurityType_e SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbTlsMode ( ) const

GetDbTlsMode - Get the TLS mode.

Returns
The database TLS mode.

◆ GetDbType()

SQL::DatabaseType_e SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbType ( ) const
Returns
The database type.

◆ GetDbUser()

const QString& SoftwareAndServices::Library::Database::Qt5::DbConnect::GetDbUser ( ) const
Returns
The database user.

◆ LoadSettings()

void SoftwareAndServices::Library::Database::Qt5::DbConnect::LoadSettings ( QSettings *  Config)

LoadSettings - Load the configuration settings needed for this widget.

Parameters
ConfigAn initialized QSettings object that is our handle to load the settings we need.

◆ MustUseTlsClicked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::MustUseTlsClicked ( bool  IsSet)
slot

MustUseTlsClicked - Use TLS.

Parameters
IsSetThe status of the button.

◆ NeverTlsClicked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::NeverTlsClicked ( bool  IsSet)
slot

NeverTlsClicked - The never TLS radio button has changed.

Parameters
IsSetThe status of the button.

◆ ObjectSaved

void SoftwareAndServices::Library::Database::Qt5::DbConnect::ObjectSaved ( DbConnect Who)
signal

ObjectSaved - Thrown (emit) when this object is saved.

Parameters
Who- The emitting object (us).

◆ SaveClicked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SaveClicked ( bool  IsSet)
slot

SaveClicked The user pressed the Save button.

Parameters
IsSetThe status of the button.

◆ SetConfiguration()

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetConfiguration ( QSettings *  Config)

SetConfiguration - Tell the DbConnect widget which configuation object to use.

Parameters
ConfigThe initialized configuration to use.

◆ SetDbAuthMode

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbAuthMode ( SQL::AuthenticationType_e  )
slot

SetDbAuthMode - Set the authentication mode.

Parameters
AuthThe authentication type.

◆ SetDbHost

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbHost ( const QString &  DbHost)
slot
Parameters
DbHostSet the database host server name.

◆ SetDbName

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbName ( const QString &  DbName)
slot
Parameters
DbNameSet the name of the database to use.

◆ SetDbPassword

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbPassword ( const QString &  DbPw)
slot
Parameters
DbPwSet the database username password.

◆ SetDbPath

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbPath ( const QString &  DbPath)
slot
Parameters
DbPathSet the database path. Used with SqlLite_t.

◆ SetDbPort

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbPort ( uint16_t  ThePort)
slot

SetDbPort - Set the port number.

Parameters
ThePortThe port number to show.

◆ SetDbPrivateKey

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbPrivateKey ( const QString &  Certificate)
slot
Parameters
CertificateThe Private PEM key to use for the connection to the database.

◆ SetDbPublicKey

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbPublicKey ( const QString &  Certificate)
slot
Parameters
CertificateThe Public PEM certiticate to use for the connection to the database.

◆ SetDbTlsMode

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbTlsMode ( SQL::SecurityType_e  TlsMode)
slot
Parameters
TlsModeSet the database TLS connection type.

◆ SetDbType [1/2]

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbType ( SQL::DatabaseType_e  TheDbType)
slot
Parameters
TheDbTypeSet the database type to TheDbType.

◆ SetDbType [2/2]

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbType ( QString  TheDbType)
slot

SetDbType - This is called when the database type has changed.

Parameters
TheDbTypeThe current value.

◆ SetDbUser

void SoftwareAndServices::Library::Database::Qt5::DbConnect::SetDbUser ( const QString &  DbUser)
slot
Parameters
DbUserSet the name of the database user to use.

◆ ShowCheckboxChecked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::ShowCheckboxChecked ( bool  IsChecked)
slot

ShowCheckboxChecked - Call when the ShowPwCheckbox is toggled.

Parameters
IsCheckedWhen true, show the password.

◆ TestSettings

bool SoftwareAndServices::Library::Database::Qt5::DbConnect::TestSettings ( )
slot

TestSettings - Call to test the curent settings.

Returns
true when the settings are correct and it connects to the database.

◆ TlsIfAvailableClicked

void SoftwareAndServices::Library::Database::Qt5::DbConnect::TlsIfAvailableClicked ( bool  IsSet)
slot

TlsIfAvailableClicked - The use TLS when available radio button has changed.

Parameters
IsSetThe status of the button.

◆ TreeItem() [1/2]

QTreeWidgetItem* SoftwareAndServices::Library::Database::Qt5::DbConnect::TreeItem ( ) const

TreeItem - Get this object QTreeWidgetItem.

Returns
This objects QTreeWidgetItem or NULL when none.

◆ TreeItem() [2/2]

void SoftwareAndServices::Library::Database::Qt5::DbConnect::TreeItem ( QTreeWidgetItem *  NewOne)

TreeItem - Set this object QTreeWidgetItem.

Parameters
NewOneThe new QTreeWidgetItem to use.

◆ ValueError

void SoftwareAndServices::Library::Database::Qt5::DbConnect::ValueError ( ) const
signal

Value error, value is not valid for an company name.


The documentation for this class was generated from the following file: