[libcalamaresui] Use namespace Calamares::Widgets

This commit is contained in:
Adriaan de Groot 2022-04-27 12:39:45 +02:00
parent f42924a9ca
commit 928b46f18e
6 changed files with 26 additions and 17 deletions

View File

@ -13,7 +13,8 @@
namespace Calamares namespace Calamares
{ {
namespace Widgets
{
ClickableLabel::ClickableLabel( QWidget* parent ) ClickableLabel::ClickableLabel( QWidget* parent )
: QLabel( parent ) : QLabel( parent )
@ -47,5 +48,5 @@ ClickableLabel::mouseReleaseEvent( QMouseEvent* event )
emit clicked(); emit clicked();
} }
} }
} // namespace Widgets
} // namespace Calamares } // namespace Calamares

View File

@ -8,8 +8,8 @@
* *
*/ */
#ifndef LIBCALAMARESUI_CLICKABLELABEL_H #ifndef LIBCALAMARESUI_WIDGETS_CLICKABLELABEL_H
#define LIBCALAMARESUI_CLICKABLELABEL_H #define LIBCALAMARESUI_WIDGETS_CLICKABLELABEL_H
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QLabel> #include <QLabel>
@ -18,7 +18,8 @@
namespace Calamares namespace Calamares
{ {
namespace Widgets
{
/** @brief A Label where the whole label area is clickable /** @brief A Label where the whole label area is clickable
* *
* When clicking anywhere on the Label (text, background, whatever) * When clicking anywhere on the Label (text, background, whatever)
@ -44,7 +45,7 @@ protected:
private: private:
QElapsedTimer m_time; QElapsedTimer m_time;
}; };
} // namespace Widgets
} // namespace Calamares } // namespace Calamares
#endif // LIBCALAMARESUI_CLICKABLELABEL_H #endif // LIBCALAMARESUI_WIDGETS_CLICKABLELABEL_H

View File

@ -20,6 +20,8 @@
namespace Calamares namespace Calamares
{ {
namespace Widgets
{
PrettyRadioButton::PrettyRadioButton( QWidget* parent ) PrettyRadioButton::PrettyRadioButton( QWidget* parent )
: QWidget( parent ) : QWidget( parent )
@ -124,5 +126,5 @@ PrettyRadioButton::toggleOptions( bool toggle )
m_optionsLayout->parentWidget()->setVisible( toggle ); m_optionsLayout->parentWidget()->setVisible( toggle );
} }
} }
} // namespace Widgets
} // namespace Calamares } // namespace Calamares

View File

@ -7,8 +7,8 @@
* *
*/ */
#ifndef LIBCALAMARESUI_PRETTYRADIOBUTTON_H #ifndef LIBCALAMARESUI_WIDGETS_PRETTYRADIOBUTTON_H
#define LIBCALAMARESUI_PRETTYRADIOBUTTON_H #define LIBCALAMARESUI_WIDGETS_PRETTYRADIOBUTTON_H
#include "DllMacro.h" #include "DllMacro.h"
@ -21,6 +21,8 @@ class QHBoxLayout;
namespace Calamares namespace Calamares
{ {
namespace Widgets
{
class ClickableLabel; class ClickableLabel;
/** @brief A radio button with fancy label next to it. /** @brief A radio button with fancy label next to it.
@ -72,6 +74,6 @@ protected:
QGridLayout* m_mainLayout; QGridLayout* m_mainLayout;
QHBoxLayout* m_optionsLayout; QHBoxLayout* m_optionsLayout;
}; };
} // namespace Widgets
} // namespace Calamares } // namespace Calamares
#endif // LIBCALAMARESUI_PRETTYRADIOBUTTON_H #endif // LIBCALAMARESUI_WIDGETS_PRETTYRADIOBUTTON_H

View File

@ -54,7 +54,7 @@
#include <QListView> #include <QListView>
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
using Calamares::PrettyRadioButton; using Calamares::Widgets::PrettyRadioButton;
using CalamaresUtils::Partition::findPartitionByPath; using CalamaresUtils::Partition::findPartitionByPath;
using CalamaresUtils::Partition::isPartitionFreeSpace; using CalamaresUtils::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::PartitionIterator; using CalamaresUtils::Partition::PartitionIterator;

View File

@ -30,8 +30,11 @@ class QListView;
namespace Calamares namespace Calamares
{ {
namespace Widgets
{
class PrettyRadioButton; class PrettyRadioButton;
} }
} // namespace Calamares
class Config; class Config;
class DeviceInfoWidget; class DeviceInfoWidget;
@ -142,10 +145,10 @@ private:
QComboBox* m_drivesCombo; QComboBox* m_drivesCombo;
QButtonGroup* m_grp; QButtonGroup* m_grp;
Calamares::PrettyRadioButton* m_alongsideButton; Calamares::Widgets::PrettyRadioButton* m_alongsideButton;
Calamares::PrettyRadioButton* m_eraseButton; Calamares::Widgets::PrettyRadioButton* m_eraseButton;
Calamares::PrettyRadioButton* m_replaceButton; Calamares::Widgets::PrettyRadioButton* m_replaceButton;
Calamares::PrettyRadioButton* m_somethingElseButton; Calamares::Widgets::PrettyRadioButton* m_somethingElseButton;
QComboBox* m_eraseSwapChoiceComboBox = nullptr; // UI, see also Config's swap choice QComboBox* m_eraseSwapChoiceComboBox = nullptr; // UI, see also Config's swap choice
QComboBox* m_eraseFsTypesChoiceComboBox = nullptr; // UI, see also Config's erase-mode FS QComboBox* m_eraseFsTypesChoiceComboBox = nullptr; // UI, see also Config's erase-mode FS