Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget Class Reference
+ Inheritance diagram for SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget:
+ Collaboration diagram for SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget:

Signals

void AreaCodeChanged ()
 AreaCodeChanged The area code changed. More...
 
void Changed ()
 Changed One or more values changed. More...
 
void CountryCodeChanged ()
 CountryCodeChanged The country code changed. More...
 
void ExtensionChanged ()
 ExtensionChanged The extension changed. More...
 
void PhoneNumberChanged ()
 PhoneNumberChanged The phone number part changed. More...
 
void TypeChanged (const QString &NewValue)
 PhoneTypeChanged The type of phone changed (Cell, Work, Home, ...) More...
 

Public Member Functions

 UsaPhoneWidget (QWidget *Parent=NULL)
 UsaPhoneWidget - Constructor. More...
 
virtual ~UsaPhoneWidget ()
 UsaPhoneWidget - Destructor. More...
 
bool Get (char *&CountryCode, char *&AreaCode, char *&PhoneNumber, char *&Extension, char *&Type) const
 Get Get the phone number into broken down parts. More...
 
bool Get (String &CountryCode, String &AreaCode, String &PhoneNumber, String &Extension, String &Type) const
 Get Get the phone number into broken down parts. More...
 
bool Get (QString &CountryCode, QString &AreaCode, QString &PhoneNumber, QString &Extension, QString &Type) const
 Get Get the phone number into broken down parts. More...
 
uint32_t GetAreaCode () const
 GetAreaCode - Get the area code, without the rest of the phone number. More...
 
uint32_t GetCountryCode () const
 GetCountryCode - Get the country code. More...
 
uint32_t GetDefaultAreaCode () const
 GetDefaultAreaCode Get the default area code that will be used. More...
 
uint32_t GetDefaultCountryCode () const
 GetDefaultCountryCode Get the default country code that will be used. More...
 
uint32_t GetExtension () const
 GetExtension - Get any phone extension. More...
 
uint32_t GetPhoneNumber () const
 GetPhoneNumber - Get the phone number without the area code. More...
 
const char * GetPhoneType () const
 GetPhoneType Get the phone type from the combobox. More...
 
const char * GetType () const
 GetType Get the phone type (Work, Home, Cell, ...) More...
 
 operator const char * () const
 Cast operator (const char *), cast the phone number to a C-string in the form: More...
 
 operator const QString & () const
 Cast operator (QString &), cast the phone number to a QString in the form: More...
 
 operator const String & () const
 Cast operator (String &), cast the phone number to a String in the form: More...
 
void Set (uint32_t CountryCode, uint32_t AreaCode, uint32_t Phone, uint32_t Extension=(uint32_t) -1, const char *Type=NULL)
 Set - Set the phone number. More...
 
void Set (uint32_t AreaCode, uint32_t Phone, uint32_t Extension=(uint32_t) -1, const char *Type=NULL)
 Set - Set the phone number. More...
 
void Set (const char *PhoneNumber)
 Set - Set the phone number. More...
 
void Set (const String &PhoneNumber)
 Set - Set the phone number. More...
 
void Set (const QString &PhoneNumber)
 Set - Set the phone number. More...
 
void SetDefaultAreaCode (uint32_t Ac)
 SetDefaultAreaCode Set the default area code. More...
 
void SetDefaultCountryCode (uint32_t Cc)
 SetDefaultCountryCode Set the default country code. More...
 
void SetPhoneType (const char *Type)
 SetPhoneType Set the combo box phone type. More...
 
void ShowCountryCode (bool Show)
 ShowCountryCode Indicate if the Country code search button and field should be shown. More...
 

Protected Attributes

const char * _CCache
 _CCache used by the (const char*) cast operator to store the results. More...
 
QString * _QCache
 _CCache used by the (const QString) cast operator to store the results. More...
 
String_SCache
 _CCache used by the (const String) cast operator to store the results. More...
 
Ui::UsaPhoneWidgetui
 ui The GUI links. More...
 

Detailed Description

Definition at line 27 of file UsaPhoneWidget.hpp.

Constructor & Destructor Documentation

◆ UsaPhoneWidget()

SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::UsaPhoneWidget ( QWidget *  Parent = NULL)
explicit

UsaPhoneWidget - Constructor.

Parameters
ParentParent object or NULL.

◆ ~UsaPhoneWidget()

virtual SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::~UsaPhoneWidget ( )
virtual

UsaPhoneWidget - Destructor.

Member Function Documentation

◆ AreaCodeChanged

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::AreaCodeChanged ( )
signal

AreaCodeChanged The area code changed.

◆ Changed

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Changed ( )
signal

Changed One or more values changed.

◆ CountryCodeChanged

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::CountryCodeChanged ( )
signal

CountryCodeChanged The country code changed.

◆ ExtensionChanged

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::ExtensionChanged ( )
signal

ExtensionChanged The extension changed.

◆ Get() [1/3]

bool SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Get ( char *&  CountryCode,
char *&  AreaCode,
char *&  PhoneNumber,
char *&  Extension,
char *&  Type 
) const

Get Get the phone number into broken down parts.

Parameters
CountryCodeThe country code, when not set in the GUI, will be set to one (1) for USA. If not NULL, it will be deleted and set to NULL prior to filling with any results.
AreaCodeThe area code, when not set will be set to an empty string (""). If not NULL, it will be deleted and set to NULL prior to filling with any results.
PhoneNumberThe phone number, when not set will be set to an empty string (""); If not NULL, it will be deleted and set to NULL prior to filling with any results.
ExtensionThe phone extension, when not set will be set to an empty string (""); If not NULL, it will be deleted and set to NULL prior to filling with any results.
TypeThe type of phone (Home, Work, Cell, ...) if set, else an empty string will be returned.
Returns
true when anything was set. Returns false when the GUI had nothing set.

◆ Get() [2/3]

bool SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Get ( String CountryCode,
String AreaCode,
String PhoneNumber,
String Extension,
String Type 
) const

Get Get the phone number into broken down parts.

Parameters
CountryCodeThe country code, when not set in the GUI, will be set to one (1) for USA.
AreaCodeThe area code, when not set will be set to an empty string ("").
PhoneNumberThe phone number, when not set will be set to an empty string ("");
ExtensionThe phone extension, when not set will be set to an empty string ("");
TypeThe type of phone (Home, Work, Cell, ...) if set, else an empty string will be returned.
Returns
true when anything was set. Returns false when the GUI had nothing set.

◆ Get() [3/3]

bool SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Get ( QString &  CountryCode,
QString &  AreaCode,
QString &  PhoneNumber,
QString &  Extension,
QString &  Type 
) const

Get Get the phone number into broken down parts.

Parameters
CountryCodeThe country code, when not set in the GUI, will be set to one (1) for USA.
AreaCodeThe area code, when not set will be set to an empty string ("").
PhoneNumberThe phone number, when not set will be set to an empty string ("");
ExtensionThe phone extension, when not set will be set to an empty string ("");
TypeThe type of phone (Home, Work, Cell, ...) if set, else an empty string will be returned.
Returns
true when anything was set. Returns false when the GUI had nothing set.

◆ GetAreaCode()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetAreaCode ( ) const

GetAreaCode - Get the area code, without the rest of the phone number.

Returns
The area code without the country code or phone number.

◆ GetCountryCode()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetCountryCode ( ) const

GetCountryCode - Get the country code.

If not set, a one (1) will be returned for U.S.A.

Returns
The country code.

◆ GetDefaultAreaCode()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetDefaultAreaCode ( ) const

GetDefaultAreaCode Get the default area code that will be used.

Returns
The default area code.

◆ GetDefaultCountryCode()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetDefaultCountryCode ( ) const

GetDefaultCountryCode Get the default country code that will be used.

Returns
The default country code.

◆ GetExtension()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetExtension ( ) const

GetExtension - Get any phone extension.

Returns

◆ GetPhoneNumber()

uint32_t SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetPhoneNumber ( ) const

GetPhoneNumber - Get the phone number without the area code.

Returns
The phone number without the country or area code.

◆ GetPhoneType()

const char* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetPhoneType ( ) const

GetPhoneType Get the phone type from the combobox.

Returns
The phone type.

◆ GetType()

const char* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::GetType ( ) const

GetType Get the phone type (Work, Home, Cell, ...)

Returns
The phone type, or NULL when not set.

◆ operator const char *()

SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::operator const char * ( ) const

Cast operator (const char *), cast the phone number to a C-string in the form:

+CC-AAA-PPP-PPPP xXXXX

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Returns
    A (const char*) of the phone number,
    Note
    Caller must delete results.
    Contents are deleted and new storage is aquired on each call.

◆ operator const QString &()

SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::operator const QString & ( ) const

Cast operator (QString &), cast the phone number to a QString in the form:

+CC-AAA-PPP-PPPP xXXXX

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Returns
    A (String &) of the phone number,
    Note
    Caller must delete results.
    Contents are deleted and new storage is aquired on each call.

◆ operator const String &()

SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::operator const String & ( ) const

Cast operator (String &), cast the phone number to a String in the form:

+CC-AAA-PPP-PPPP xXXXX

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Returns
    A (String &) of the phone number,
    Note
    Caller must delete results or call Results.incInstance() to keep a copy.
    Contents are deleted and new storage is aquired on each call.

◆ PhoneNumberChanged

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::PhoneNumberChanged ( )
signal

PhoneNumberChanged The phone number part changed.

◆ Set() [1/5]

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Set ( uint32_t  CountryCode,
uint32_t  AreaCode,
uint32_t  Phone,
uint32_t  Extension = (uint32_t) -1,
const char *  Type = NULL 
)

Set - Set the phone number.

Parameters
CountryCodeThe country code. The country code for the USA is one (1).
AreaCodeThe phone area code.
PhoneThe phone number.
ExtensionThe phone extension. When none, ommit, or set to ((uint32_t)-1).
TypeThe phone type (Work, Home, ...).

Be careful not to create multiple that differ only by case (Work, work, WORK, ...)

The convention is to capatilize the first character of each word.

◆ Set() [2/5]

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Set ( uint32_t  AreaCode,
uint32_t  Phone,
uint32_t  Extension = (uint32_t) -1,
const char *  Type = NULL 
)

Set - Set the phone number.

Sets the country code to one (1) for USA.

Parameters
AreaCodeThe phone area code.
PhoneThe phone number.
Extension- The phone extension. When none, ommit, or set to ((uint32_t)-1).
TypeThe phone type (Work, Home, ...).

Be careful not to create multiple that differ only by case (Work, work, WORK, ...)

The convention is to capatilize the first character of each word.

◆ Set() [3/5]

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Set ( const char *  PhoneNumber)

Set - Set the phone number.

Parameters
PhoneNumberThe phone number. Valid formats:
  • +CC-AAA-PPP-PPPP xXXXX (+1-714-989-6135 x12)
  • AAA-PPP-PPPP xXXXX (714-989-6135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP xXXXX (989-5135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • +CC-AAA-PPP-PPPP (+1-714-989-6135)
  • AAA-PPP-PPPP (714-989-6135) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP (989-6135) The configured default country code will be used. If not set, it will be one (1) for USA. The configured default area code will be used.

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Parameters
    Extension

◆ Set() [4/5]

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Set ( const String PhoneNumber)

Set - Set the phone number.

Parameters
PhoneNumberThe phone number. Valid formats:
  • +CC-AAA-PPP-PPPP xXXXX (+1-714-989-6135 x12)
  • AAA-PPP-PPPP xXXXX (714-989-6135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP xXXXX (989-5135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • +CC-AAA-PPP-PPPP (+1-714-989-6135)
  • AAA-PPP-PPPP (714-989-6135) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP (989-6135) The configured default country code will be used. If not set, it will be one (1) for USA. The configured default area code will be used.

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Parameters
    Extension

◆ Set() [5/5]

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::Set ( const QString &  PhoneNumber)

Set - Set the phone number.

Parameters
PhoneNumberThe phone number. Valid formats:
  • +CC-AAA-PPP-PPPP xXXXX (+1-714-989-6135 x12)
  • AAA-PPP-PPPP xXXXX (714-989-6135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP xXXXX (989-5135 x12) The configured default country code will be used. If not set, it will be one (1) for USA.
  • +CC-AAA-PPP-PPPP (+1-714-989-6135)
  • AAA-PPP-PPPP (714-989-6135) The configured default country code will be used. If not set, it will be one (1) for USA.
  • PPP-PPPP (989-6135) The configured default country code will be used. If not set, it will be one (1) for USA. The configured default area code will be used.

Where:

  • CC is the country code
    Note
    the PLUS sign in front of a country code.
  • AAA The areac code.
  • PPP-PPPP The phone number.
  • xXXXX The extension number.
    Note
    An extension number starts with 'x'.
    Parameters
    Extension

◆ SetDefaultAreaCode()

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::SetDefaultAreaCode ( uint32_t  Ac)

SetDefaultAreaCode Set the default area code.

If this method is not called, the default will zero (0).

Parameters
CcThe default area code to use.

◆ SetDefaultCountryCode()

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::SetDefaultCountryCode ( uint32_t  Cc)

SetDefaultCountryCode Set the default country code.

If this method is not called, the default will be one (1), for USA.

Parameters
CcThe default country code to use.

◆ SetPhoneType()

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::SetPhoneType ( const char *  Type)

SetPhoneType Set the combo box phone type.

If Type does not exist, it will be added to the widget.

Be careful not to create multiple that differ only by case (Work, work, WORK, ...)

The convention is to capatilize the first character of each word.

Parameters
TypeThe type of phone.

◆ ShowCountryCode()

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::ShowCountryCode ( bool  Show)

ShowCountryCode Indicate if the Country code search button and field should be shown.

Parameters
ShowWhen true, show the country code search button and fields.

◆ TypeChanged

void SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::TypeChanged ( const QString &  NewValue)
signal

PhoneTypeChanged The type of phone changed (Cell, Work, Home, ...)

Parameters
NewValueThe new value.

Member Data Documentation

◆ _CCache

const char* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::_CCache
mutableprotected

_CCache used by the (const char*) cast operator to store the results.

Definition at line 540 of file UsaPhoneWidget.hpp.

◆ _QCache

QString* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::_QCache
mutableprotected

_CCache used by the (const QString) cast operator to store the results.

Definition at line 552 of file UsaPhoneWidget.hpp.

◆ _SCache

String* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::_SCache
mutableprotected

_CCache used by the (const String) cast operator to store the results.

Definition at line 546 of file UsaPhoneWidget.hpp.

◆ ui

Ui::UsaPhoneWidget* SoftwareAndServices::Library::Common::Qt5::UsaPhoneWidget::ui
protected

ui The GUI links.

Definition at line 527 of file UsaPhoneWidget.hpp.


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