GUI: Rename methods in CheckStatistics
This commit is contained in:
parent
24ce4292f2
commit
5ed4c7f3ea
|
@ -22,10 +22,10 @@
|
|||
CheckStatistics::CheckStatistics(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
Clear();
|
||||
clear();
|
||||
}
|
||||
|
||||
void CheckStatistics::AddItem(ShowTypes::ShowType type)
|
||||
void CheckStatistics::addItem(ShowTypes::ShowType type)
|
||||
{
|
||||
switch (type) {
|
||||
case ShowTypes::ShowStyle:
|
||||
|
@ -53,7 +53,7 @@ void CheckStatistics::AddItem(ShowTypes::ShowType type)
|
|||
}
|
||||
}
|
||||
|
||||
void CheckStatistics::Clear()
|
||||
void CheckStatistics::clear()
|
||||
{
|
||||
mStyle = 0;
|
||||
mWarning = 0;
|
||||
|
@ -63,7 +63,7 @@ void CheckStatistics::Clear()
|
|||
mError = 0;
|
||||
}
|
||||
|
||||
unsigned CheckStatistics::GetCount(ShowTypes::ShowType type) const
|
||||
unsigned CheckStatistics::getCount(ShowTypes::ShowType type) const
|
||||
{
|
||||
switch (type) {
|
||||
case ShowTypes::ShowStyle:
|
||||
|
|
|
@ -37,13 +37,13 @@ public:
|
|||
*
|
||||
* @param type Type of the item to add.
|
||||
*/
|
||||
void AddItem(ShowTypes::ShowType type);
|
||||
void addItem(ShowTypes::ShowType type);
|
||||
|
||||
/**
|
||||
* @brief Clear the statistics.
|
||||
*
|
||||
*/
|
||||
void Clear();
|
||||
void clear();
|
||||
|
||||
/**
|
||||
* @brief Return statistics for given type.
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
* @param type Type for which the statistics are returned.
|
||||
* @return Number of items of given type.
|
||||
*/
|
||||
unsigned GetCount(ShowTypes::ShowType type) const;
|
||||
unsigned getCount(ShowTypes::ShowType type) const;
|
||||
|
||||
private:
|
||||
unsigned mStyle;
|
||||
|
|
|
@ -78,7 +78,7 @@ void ResultsView::Clear(bool results)
|
|||
|
||||
mUI.mDetails->setText("");
|
||||
|
||||
mStatistics->Clear();
|
||||
mStatistics->clear();
|
||||
|
||||
//Clear the progressbar
|
||||
mUI.mProgress->setMaximum(PROGRESS_MAX);
|
||||
|
@ -106,7 +106,7 @@ void ResultsView::Error(const ErrorItem &item)
|
|||
{
|
||||
if (mUI.mTree->AddErrorItem(item)) {
|
||||
emit GotResults();
|
||||
mStatistics->AddItem(ShowTypes::SeverityToShowType(item.severity));
|
||||
mStatistics->addItem(ShowTypes::SeverityToShowType(item.severity));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,17 +107,17 @@ void StatsDialog::PDFexport()
|
|||
.arg(tr("Statistics"))
|
||||
.arg(QDate::currentDate().toString("dd.MM.yyyy"))
|
||||
.arg(tr("Errors"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
|
||||
.arg(tr("Warnings"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
|
||||
.arg(tr("Style warnings"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
|
||||
.arg(tr("Portability warnings"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
|
||||
.arg(tr("Performance warnings"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
|
||||
.arg(tr("Information messages"))
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName((QWidget*)0, tr("Export PDF"), QString(), "*.pdf");
|
||||
if (QFileInfo(fileName).suffix().isEmpty()) {
|
||||
|
@ -199,17 +199,17 @@ void StatsDialog::copyToClipboard()
|
|||
)
|
||||
.arg(stats)
|
||||
.arg(errors)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
|
||||
.arg(warnings)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
|
||||
.arg(style)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
|
||||
.arg(portability)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
|
||||
.arg(performance)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
|
||||
.arg(information)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
|
||||
|
||||
const QString textSummary = settings + previous + statistics;
|
||||
|
||||
|
@ -261,17 +261,17 @@ void StatsDialog::copyToClipboard()
|
|||
)
|
||||
.arg(stats)
|
||||
.arg(errors)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
|
||||
.arg(warnings)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
|
||||
.arg(style)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
|
||||
.arg(portability)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
|
||||
.arg(performance)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
|
||||
.arg(information)
|
||||
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
|
||||
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
|
||||
|
||||
const QString htmlSummary = htmlSettings + htmlPrevious + htmlStatistics;
|
||||
|
||||
|
@ -285,10 +285,10 @@ void StatsDialog::copyToClipboard()
|
|||
void StatsDialog::setStatistics(const CheckStatistics *stats)
|
||||
{
|
||||
mStatistics = const_cast<CheckStatistics*>(stats);
|
||||
mUI.mLblErrors->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowErrors)));
|
||||
mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowWarnings)));
|
||||
mUI.mLblStyle->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowStyle)));
|
||||
mUI.mLblPortability->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPortability)));
|
||||
mUI.mLblPerformance->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPerformance)));
|
||||
mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowInformation)));
|
||||
mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowErrors)));
|
||||
mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowWarnings)));
|
||||
mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowStyle)));
|
||||
mUI.mLblPortability->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPortability)));
|
||||
mUI.mLblPerformance->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPerformance)));
|
||||
mUI.mLblInformation->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowInformation)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue