[welcome] Chase file renaming
- Rename classes inside - Rename include guards
This commit is contained in:
parent
1240f63a39
commit
bfb5a4efb9
@ -16,8 +16,8 @@ include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui )
|
||||
|
||||
set( CHECKER_SOURCES
|
||||
checker/CheckerContainer.cpp
|
||||
checker/CheckerWidget.cpp
|
||||
checker/CheckItemWidget.cpp
|
||||
checker/ResultWidget.cpp
|
||||
checker/ResultsListWidget.cpp
|
||||
checker/GeneralRequirements.cpp
|
||||
${PARTMAN_SRC}
|
||||
)
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "CheckerContainer.h"
|
||||
|
||||
#include "CheckerWidget.h"
|
||||
#include "ResultsListWidget.h"
|
||||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
@ -59,7 +59,7 @@ void CheckerContainer::requirementsComplete( bool ok )
|
||||
m_waitingWidget->deleteLater();
|
||||
m_waitingWidget = nullptr; // Don't delete in destructor
|
||||
|
||||
m_checkerWidget = new CheckerWidget( this );
|
||||
m_checkerWidget = new ResultsListWidget( this );
|
||||
m_checkerWidget->init( m_requirements );
|
||||
layout()->addWidget( m_checkerWidget );
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "modulesystem/Requirement.h"
|
||||
|
||||
class CheckerWidget;
|
||||
class ResultsListWidget;
|
||||
class WaitingWidget;
|
||||
|
||||
/**
|
||||
@ -55,7 +55,7 @@ public slots:
|
||||
|
||||
protected:
|
||||
WaitingWidget *m_waitingWidget;
|
||||
CheckerWidget *m_checkerWidget;
|
||||
ResultsListWidget *m_checkerWidget;
|
||||
|
||||
Calamares::RequirementsList m_requirements;
|
||||
bool m_verdict;
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CheckItemWidget.h"
|
||||
#include "ResultWidget.h"
|
||||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
@ -31,7 +31,7 @@ static inline void setCondition( QLabel* label, CalamaresUtils::ImageType t )
|
||||
QSize( label->height(), label->height() ) ) );
|
||||
}
|
||||
|
||||
CheckItemWidget::CheckItemWidget( bool checked,
|
||||
ResultWidget::ResultWidget( bool satisfied,
|
||||
bool required,
|
||||
QWidget* parent )
|
||||
: QWidget( parent )
|
||||
@ -46,8 +46,7 @@ CheckItemWidget::CheckItemWidget( bool checked,
|
||||
mainLayout->addWidget( m_textLabel );
|
||||
m_textLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||
|
||||
if ( checked )
|
||||
// Condition is satisfied
|
||||
if ( satisfied )
|
||||
setCondition( m_iconLabel, CalamaresUtils::StatusOk );
|
||||
else
|
||||
if ( required )
|
||||
@ -58,7 +57,7 @@ CheckItemWidget::CheckItemWidget( bool checked,
|
||||
|
||||
|
||||
void
|
||||
CheckItemWidget::setText( const QString& text )
|
||||
ResultWidget::setText( const QString& text )
|
||||
{
|
||||
m_textLabel->setText( text );
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -17,22 +17,35 @@
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CHECKITEMWIDGET_H
|
||||
#define CHECKITEMWIDGET_H
|
||||
#ifndef CHECKER_RESULTWIDGET_H
|
||||
#define CHECKER_RESULTWIDGET_H
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class CheckItemWidget : public QWidget
|
||||
/**
|
||||
* @brief Displays the results of a single check.
|
||||
*
|
||||
* Widget to insert into a ResultListWidget to display an iconic status
|
||||
* (warning or failure when the check is not satisfied) along with
|
||||
* descriptive test.
|
||||
*/
|
||||
class ResultWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CheckItemWidget( bool checked, bool required,
|
||||
QWidget* parent = nullptr );
|
||||
/**
|
||||
* @brief Create widget with results of a check.
|
||||
*
|
||||
* Use setText() to set up the text of the widget.
|
||||
*/
|
||||
explicit ResultWidget( bool satisfied, bool required,
|
||||
QWidget* parent = nullptr );
|
||||
|
||||
/// @brief Set the displayed description of the check.
|
||||
void setText( const QString& text );
|
||||
private:
|
||||
QLabel* m_textLabel;
|
||||
QLabel* m_iconLabel;
|
||||
};
|
||||
|
||||
#endif // CHECKITEMWIDGET_H
|
||||
#endif // CHECKER_RESULTWIDGET_H
|
||||
|
@ -17,9 +17,9 @@
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CheckerWidget.h"
|
||||
#include "ResultsListWidget.h"
|
||||
|
||||
#include "CheckItemWidget.h"
|
||||
#include "ResultWidget.h"
|
||||
|
||||
#include "Branding.h"
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
@ -33,7 +33,7 @@
|
||||
#include <QLabel>
|
||||
|
||||
|
||||
CheckerWidget::CheckerWidget( QWidget* parent )
|
||||
ResultsListWidget::ResultsListWidget( QWidget* parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
@ -53,7 +53,7 @@ CheckerWidget::CheckerWidget( QWidget* parent )
|
||||
|
||||
|
||||
void
|
||||
CheckerWidget::init( const Calamares::RequirementsList& checkEntries )
|
||||
ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
|
||||
{
|
||||
bool allChecked = true;
|
||||
bool requirementsSatisfied = true;
|
||||
@ -62,7 +62,7 @@ CheckerWidget::init( const Calamares::RequirementsList& checkEntries )
|
||||
{
|
||||
if ( !entry.satisfied )
|
||||
{
|
||||
CheckItemWidget* ciw = new CheckItemWidget( entry.satisfied, entry.mandatory );
|
||||
ResultWidget* ciw = new ResultWidget( entry.satisfied, entry.mandatory );
|
||||
CALAMARES_RETRANSLATE( ciw->setText( entry.negatedText() ); )
|
||||
m_entriesLayout->addWidget( ciw );
|
||||
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||
@ -162,7 +162,7 @@ CheckerWidget::init( const Calamares::RequirementsList& checkEntries )
|
||||
|
||||
|
||||
void
|
||||
CheckerWidget::showDetailsDialog( const Calamares::RequirementsList& checkEntries )
|
||||
ResultsListWidget::showDetailsDialog( const Calamares::RequirementsList& checkEntries )
|
||||
{
|
||||
QDialog* detailsDialog = new QDialog( this );
|
||||
QBoxLayout* mainLayout = new QVBoxLayout;
|
||||
@ -182,7 +182,7 @@ CheckerWidget::showDetailsDialog( const Calamares::RequirementsList& checkEntrie
|
||||
if ( entry.enumerationText().isEmpty() )
|
||||
continue;
|
||||
|
||||
CheckItemWidget* ciw = new CheckItemWidget( entry.satisfied, entry.mandatory );
|
||||
ResultWidget* ciw = new ResultWidget( entry.satisfied, entry.mandatory );
|
||||
CALAMARES_RETRANSLATE( ciw->setText( entry.enumerationText() ); )
|
||||
entriesLayout->addWidget( ciw );
|
||||
ciw->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||
|
@ -16,19 +16,19 @@
|
||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CHECKERWIDGET_H
|
||||
#define CHECKERWIDGET_H
|
||||
#ifndef CHECKER_RESULTSLISTWIDGET_H
|
||||
#define CHECKER_RESULTSLISTWIDGET_H
|
||||
|
||||
#include "modulesystem/Requirement.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
class CheckerWidget : public QWidget
|
||||
class ResultsListWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CheckerWidget( QWidget* parent = nullptr );
|
||||
explicit ResultsListWidget( QWidget* parent = nullptr );
|
||||
|
||||
void init( const Calamares::RequirementsList& checkEntries );
|
||||
|
||||
@ -40,4 +40,4 @@ private:
|
||||
int m_paddingSize;
|
||||
};
|
||||
|
||||
#endif // CHECKERWIDGET_H
|
||||
#endif // CHECKER_RESULTSLISTWIDGET_H
|
||||
|
Loading…
Reference in New Issue
Block a user