Seamly2D
Code documentation
DialogDateTimeFormats Class Reference

#include <dialogdatetimeformats.h>

Inheritance diagram for DialogDateTimeFormats:
Collaboration diagram for DialogDateTimeFormats:

Public Member Functions

 DialogDateTimeFormats (const QDate &date, const QStringList &predefinedFormats, const QStringList &userDefinedFormats, QWidget *parent=nullptr)
 
 DialogDateTimeFormats (const QTime &time, const QStringList &predefinedFormats, const QStringList &userDefinedFormats, QWidget *parent=nullptr)
 
virtual ~DialogDateTimeFormats ()
 
QStringList GetFormats () const
 

Private Slots

void AddLine ()
 
void RemoveLine ()
 
void SaveFormat (const QString &text)
 
void ShowFormatDetails ()
 

Private Member Functions

void Init (const QStringList &predefined, const QStringList &userDefined)
 
void SetFormatLines (const QStringList &predefined, const QStringList &userDefined)
 
void SetupControls ()
 
bool IsPredefined () const
 
QListWidgetItem * AddListLine (const QString &format)
 

Private Attributes

Ui::DialogDateTimeFormats * ui
 
bool m_dateMode
 
QDate m_date
 
QTime m_time
 
QStringList m_predefined
 

Detailed Description

Definition at line 66 of file dialogdatetimeformats.h.

Constructor & Destructor Documentation

◆ DialogDateTimeFormats() [1/2]

DialogDateTimeFormats::DialogDateTimeFormats ( const QDate &  date,
const QStringList &  predefinedFormats,
const QStringList &  userDefinedFormats,
QWidget *  parent = nullptr 
)

Definition at line 60 of file dialogdatetimeformats.cpp.

References Init(), and ui.

◆ DialogDateTimeFormats() [2/2]

DialogDateTimeFormats::DialogDateTimeFormats ( const QTime &  time,
const QStringList &  predefinedFormats,
const QStringList &  userDefinedFormats,
QWidget *  parent = nullptr 
)

Definition at line 75 of file dialogdatetimeformats.cpp.

References Init(), and ui.

◆ ~DialogDateTimeFormats()

DialogDateTimeFormats::~DialogDateTimeFormats ( )
virtual

Definition at line 90 of file dialogdatetimeformats.cpp.

References ui.

Member Function Documentation

◆ AddLine

void DialogDateTimeFormats::AddLine ( )
privateslot

Definition at line 116 of file dialogdatetimeformats.cpp.

References ui.

Referenced by Init().

◆ AddListLine()

QListWidgetItem * DialogDateTimeFormats::AddListLine ( const QString &  format)
private

Definition at line 239 of file dialogdatetimeformats.cpp.

References m_date, m_dateMode, and m_time.

Referenced by SetFormatLines().

◆ GetFormats()

QStringList DialogDateTimeFormats::GetFormats ( ) const

Definition at line 96 of file dialogdatetimeformats.cpp.

References ui.

Referenced by PreferencesPatternPage::callDateTimeFormatEditor(), and SaveFormat().

◆ Init()

void DialogDateTimeFormats::Init ( const QStringList &  predefined,
const QStringList &  userDefined 
)
private

◆ IsPredefined()

bool DialogDateTimeFormats::IsPredefined ( ) const
private

◆ RemoveLine

void DialogDateTimeFormats::RemoveLine ( )
privateslot

Definition at line 124 of file dialogdatetimeformats.cpp.

References m_predefined, ShowFormatDetails(), and ui.

Referenced by Init().

◆ SaveFormat

void DialogDateTimeFormats::SaveFormat ( const QString &  text)
privateslot

Definition at line 139 of file dialogdatetimeformats.cpp.

References GetFormats(), m_date, m_dateMode, m_time, and ui.

Referenced by Init().

◆ SetFormatLines()

void DialogDateTimeFormats::SetFormatLines ( const QStringList &  predefined,
const QStringList &  userDefined 
)
private

Definition at line 184 of file dialogdatetimeformats.cpp.

References AddListLine(), and ui.

Referenced by Init().

◆ SetupControls()

void DialogDateTimeFormats::SetupControls ( )
private

Definition at line 210 of file dialogdatetimeformats.cpp.

References m_predefined, and ui.

Referenced by ShowFormatDetails().

◆ ShowFormatDetails

void DialogDateTimeFormats::ShowFormatDetails ( )
privateslot

Definition at line 153 of file dialogdatetimeformats.cpp.

References SetupControls(), and ui.

Referenced by Init(), and RemoveLine().

Member Data Documentation

◆ m_date

QDate DialogDateTimeFormats::m_date
private

Definition at line 89 of file dialogdatetimeformats.h.

Referenced by AddListLine(), and SaveFormat().

◆ m_dateMode

bool DialogDateTimeFormats::m_dateMode
private

Definition at line 88 of file dialogdatetimeformats.h.

Referenced by AddListLine(), and SaveFormat().

◆ m_predefined

QStringList DialogDateTimeFormats::m_predefined
private

Definition at line 91 of file dialogdatetimeformats.h.

Referenced by RemoveLine(), and SetupControls().

◆ m_time

QTime DialogDateTimeFormats::m_time
private

Definition at line 90 of file dialogdatetimeformats.h.

Referenced by AddListLine(), and SaveFormat().

◆ ui

Ui::DialogDateTimeFormats* DialogDateTimeFormats::ui
private

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