Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl Class Reference
Collaboration diagram for geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl:
Collaboration graph
[legend]

Public Member Functions

 ImageTaskStatsWidgetImpl (ImageTaskStatsWidget *pQ)
 
 ~ImageTaskStatsWidgetImpl ()=default
 
ImageTaskStatsWidgetImpl operator= (const ImageTaskStatsWidgetImpl &)=delete
 
 ImageTaskStatsWidgetImpl (const ImageTaskStatsWidgetImpl &)=delete
 
void setTaskId (const std::size_t id)
 
void setTimeRunning (const int seconds)
 
void setCurrentStatus (const ImageTaskStatsWidget::ImageTaskStatus status)
 
void setShapeCount (const std::size_t shapeCount)
 
void setSimilarity (const float similarity)
 
void setImageDimensions (const std::uint32_t width, const std::uint32_t height)
 
void onLanguageChange ()
 

Private Member Functions

void populateUi ()
 
void setImageDimensionsText ()
 
void setCurrentStatusText ()
 

Private Attributes

ImageTaskStatsWidget::ImageTaskStatus m_status {ImageTaskStatsWidget::ImageTaskStatus::STOPPED}
 
std::uint32_t m_width {0}
 
std::uint32_t m_height {0}
 
ImageTaskStatsWidgetq
 
std::unique_ptr
< Ui::ImageTaskStatsWidget > 
ui
 

Constructor & Destructor Documentation

geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::ImageTaskStatsWidgetImpl ( ImageTaskStatsWidget pQ)
inline
20  : q{pQ}, ui{std::make_unique<Ui::ImageTaskStatsWidget>()}
21  {
22  ui->setupUi(q);
23  populateUi();
24  }
void populateUi()
Definition: imagetaskstatswidget.cpp:72
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
ImageTaskStatsWidget * q
Definition: imagetaskstatswidget.cpp:102
geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::~ImageTaskStatsWidgetImpl ( )
default
geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::ImageTaskStatsWidgetImpl ( const ImageTaskStatsWidgetImpl )
delete

Member Function Documentation

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::onLanguageChange ( )
inline
66  {
67  ui->retranslateUi(q);
68  populateUi();
69  }
void populateUi()
Definition: imagetaskstatswidget.cpp:72
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
ImageTaskStatsWidget * q
Definition: imagetaskstatswidget.cpp:102

Here is the call graph for this function:

ImageTaskStatsWidgetImpl geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::operator= ( const ImageTaskStatsWidgetImpl )
delete
void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::populateUi ( )
inlineprivate
73  {
76  }
void setCurrentStatusText()
Definition: imagetaskstatswidget.cpp:84
void setImageDimensionsText()
Definition: imagetaskstatswidget.cpp:78

Here is the call graph for this function:

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setCurrentStatus ( const ImageTaskStatsWidget::ImageTaskStatus  status)
inline
42  {
43  m_status = status;
45  }
void setCurrentStatusText()
Definition: imagetaskstatswidget.cpp:84
ImageTaskStatsWidget::ImageTaskStatus m_status
Definition: imagetaskstatswidget.cpp:98

Here is the call graph for this function:

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setCurrentStatusText ( )
inlineprivate
85  {
86  switch(m_status) {
87  case ImageTaskStatsWidget::ImageTaskStatus::STOPPED:
88  ui->currentStateValueLabel->setText(tr("Idle", "Text shown on a button when the app is not actively turning images into shapes. That is, the app is idle/not doing anything"));
89  break;
90  case ImageTaskStatsWidget::ImageTaskStatus::RUNNING:
91  ui->currentStateValueLabel->setText(tr("Running", "Text shown on a button when the app is actively turning images into shapes. That is, the app is running in the sense of being busy working/processing"));
92  break;
93  default:
94  assert(0 && "Unknown image task status set");
95  }
96  }
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
ImageTaskStatsWidget::ImageTaskStatus m_status
Definition: imagetaskstatswidget.cpp:98

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setImageDimensions ( const std::uint32_t  width,
const std::uint32_t  height 
)
inline
59  {
60  m_width = width;
61  m_height = height;
63  }
std::uint32_t m_height
Definition: imagetaskstatswidget.cpp:100
std::uint32_t m_width
Definition: imagetaskstatswidget.cpp:99
void setImageDimensionsText()
Definition: imagetaskstatswidget.cpp:78

Here is the call graph for this function:

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setImageDimensionsText ( )
inlineprivate
79  {
80  const QString imageDimensionsText{tr("%1x%2", "Dimensions of an image e.g. width-x-height, 1024x800").arg(QLocale().toString(static_cast<uint>(m_width))).arg(QLocale().toString(static_cast<uint>(m_height)))};
81  ui->imageDimensionsValueLabel->setText(imageDimensionsText);
82  }
std::uint32_t m_height
Definition: imagetaskstatswidget.cpp:100
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
std::uint32_t m_width
Definition: imagetaskstatswidget.cpp:99

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setShapeCount ( const std::size_t  shapeCount)
inline
48  {
49  ui->shapeCountValueLabel->setText(QLocale().toString(static_cast<uint>(shapeCount)));
50  }
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setSimilarity ( const float  similarity)
inline
53  {
54  const QString similarityValue{QLocale().toString(100.0f - similarity, 'f', 2)};
55  ui->targetSimilarityValueLabel->setText(similarityValue);
56  }
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setTaskId ( const std::size_t  id)
inline
30  {
31  ui->taskIdValueLabel->setText(QLocale().toString(static_cast<uint>(id)));
32  }
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103
void geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::setTimeRunning ( const int  seconds)
inline
35  {
36  QDateTime t{QDateTime::fromTime_t(seconds).toUTC()};
37  const QString time{QLocale().toString(t, "hh:mm:ss")};
38  ui->timeRunningValueLabel->setText(time);
39  }
std::unique_ptr< Ui::ImageTaskStatsWidget > ui
Definition: imagetaskstatswidget.cpp:103

Member Data Documentation

std::uint32_t geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::m_height {0}
private
ImageTaskStatsWidget::ImageTaskStatus geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::m_status {ImageTaskStatsWidget::ImageTaskStatus::STOPPED}
private
std::uint32_t geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::m_width {0}
private
ImageTaskStatsWidget* geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::q
private
std::unique_ptr<Ui::ImageTaskStatsWidget> geometrize::dialog::ImageTaskStatsWidget::ImageTaskStatsWidgetImpl::ui
private

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