[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 Widgets
{
ClickableLabel::ClickableLabel( QWidget* parent )
: QLabel( parent )
@ -47,5 +48,5 @@ ClickableLabel::mouseReleaseEvent( QMouseEvent* event )
emit clicked();
}
}
} // namespace Widgets
} // namespace Calamares

View File

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

View File

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

View File

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

View File

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

View File

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