HAL
hal::MainSettingsList Class Reference

List that contains all SettingsWidgets. More...

#include <main_settings_widget.h>

Inheritance diagram for hal::MainSettingsList:
Inheritance graph
Collaboration diagram for hal::MainSettingsList:
Collaboration graph

Public Member Functions

 ~MainSettingsList ()
 
void registerWidget (const QString &sectionName, SettingsWidget *widget)
 
void unregisterWidget (SettingsWidget *widget)
 
QList< SettingsWidget * > section (const QString &s) const
 
QList< const SettingsItem * > getItems () const
 
QStringList emptySections () const
 
void clearAll ()
 
- Public Member Functions inherited from QList< SettingsWidget * >
 QList ()
 
 QList (const QList< T > &other)
 
 QList (QList< T > &&other)
 
 QList (std::initializer_list< T > args)
 
 QList (InputIterator first, InputIterator last)
 
 ~QList ()
 
QList< T > & operator= (const QList< T > &other)
 
QList< T > & operator= (QList< T > &&other)
 
void swap (QList< T > &other)
 
void swap (int i, int j)
 
bool operator== (const QList< T > &other) const const
 
bool operator!= (const QList< T > &other) const const
 
int size () const const
 
bool isEmpty () const const
 
void clear ()
 
const T & at (int i) const const
 
const T & operator[] (int i) const const
 
T & operator[] (int i)
 
void reserve (int alloc)
 
void append (const T &value)
 
void append (const QList< T > &value)
 
void prepend (const T &value)
 
void insert (int i, const T &value)
 
QList::iterator insert (QList::iterator before, const T &value)
 
void replace (int i, const T &value)
 
void removeAt (int i)
 
int removeAll (const T &value)
 
bool removeOne (const T &value)
 
takeAt (int i)
 
takeFirst ()
 
takeLast ()
 
void move (int from, int to)
 
void swapItemsAt (int i, int j)
 
int indexOf (const T &value, int from) const const
 
int lastIndexOf (const T &value, int from) const const
 
bool contains (const T &value) const const
 
int count (const T &value) const const
 
int count () const const
 
QList::iterator begin ()
 
QList::const_iterator begin () const const
 
QList::const_iterator cbegin () const const
 
QList::const_iterator constBegin () const const
 
QList::iterator end ()
 
QList::const_iterator end () const const
 
QList::const_iterator cend () const const
 
QList::const_iterator constEnd () const const
 
QList::reverse_iterator rbegin ()
 
QList::const_reverse_iterator rbegin () const const
 
QList::reverse_iterator rend ()
 
QList::const_reverse_iterator rend () const const
 
QList::const_reverse_iterator crbegin () const const
 
QList::const_reverse_iterator crend () const const
 
QList::iterator erase (QList::iterator pos)
 
QList::iterator erase (QList::iterator begin, QList::iterator end)
 
int length () const const
 
T & first ()
 
const T & first () const const
 
const T & constFirst () const const
 
T & last ()
 
const T & last () const const
 
const T & constLast () const const
 
void removeFirst ()
 
void removeLast ()
 
bool startsWith (const T &value) const const
 
bool endsWith (const T &value) const const
 
QList< T > mid (int pos, int length) const const
 
value (int i) const const
 
value (int i, const T &defaultValue) const const
 
void push_back (const T &value)
 
void push_front (const T &value)
 
T & front ()
 
const T & front () const const
 
T & back ()
 
const T & back () const const
 
void pop_front ()
 
void pop_back ()
 
bool empty () const const
 
QList< T > & operator+= (const QList< T > &other)
 
QList< T > & operator+= (const T &value)
 
QList< T > operator+ (const QList< T > &other) const const
 
QList< T > & operator<< (const T &value)
 
QList< T > & operator<< (const QList< T > &other)
 
QDataStreamoperator<< (QDataStream &out, const QList< T > &list)
 
QVector< T > toVector () const const
 
QSet< T > toSet () const const
 
std::list< T > toStdList () const const
 
bool operator< (const QList< T > &lhs, const QList< T > &rhs)
 
bool operator<= (const QList< T > &lhs, const QList< T > &rhs)
 
bool operator> (const QList< T > &lhs, const QList< T > &rhs)
 
bool operator>= (const QList< T > &lhs, const QList< T > &rhs)
 
uint qHash (const QList< T > &key, uint seed)
 
QDataStreamoperator>> (QDataStream &in, QList< T > &list)
 

Additional Inherited Members

- Static Public Member Functions inherited from QList< SettingsWidget * >
QList< T > fromVector (const QVector< T > &vector)
 
QList< T > fromSet (const QSet< T > &set)
 
QList< T > fromStdList (const std::list< T > &list)
 
- Public Attributes inherited from QList< SettingsWidget * >
typedef reverse_iterator
 
typedef const_reverse_iterator
 
typedef Iterator
 
typedef ConstIterator
 
typedef size_type
 
typedef value_type
 
typedef pointer
 
typedef const_pointer
 
typedef reference
 
typedef const_reference
 
typedef difference_type
 

Detailed Description

List that contains all SettingsWidgets.

A utility class used to store all SettingsWidget of the MainSettingsWidget. It also provides an interface to partition the settings into multiple sections.

Definition at line 58 of file main_settings_widget.h.

Constructor & Destructor Documentation

◆ ~MainSettingsList()

hal::MainSettingsList::~MainSettingsList ( )

The desctructor.

Definition at line 28 of file main_settings_widget.cpp.

Member Function Documentation

◆ clearAll()

void hal::MainSettingsList::clearAll ( )

Calls the clearEditor() function of all SettingsWidgets.

Definition at line 40 of file main_settings_widget.cpp.

References hal::SettingsWidget::clearEditor().

Referenced by hal::MainSettingsWidget::activate().

◆ emptySections()

QStringList hal::MainSettingsList::emptySections ( ) const

Get all sections that do not contain any SettingsWidgets.

Returns
The list of sections.

Definition at line 73 of file main_settings_widget.cpp.

References QList::append().

◆ getItems()

QList< const SettingsItem * > hal::MainSettingsList::getItems ( ) const

Get a list of all underlying SettingsItems that are retrieved from the corresponding SettingWidgets.

Returns
The list of SettingsItems.

Definition at line 46 of file main_settings_widget.cpp.

References QList::append(), and hal::SettingsWidget::settingsItem().

◆ registerWidget()

void hal::MainSettingsList::registerWidget ( const QString sectionName,
SettingsWidget widget 
)

Appends the widget to the list and adds them to the given section.

Parameters
sectionName- The section to which the widget belongs.
widget- The setting to add.

Definition at line 34 of file main_settings_widget.cpp.

References QList< SettingsWidget * >::append().

◆ section()

QList<SettingsWidget*> hal::MainSettingsList::section ( const QString s) const
inline

Get a list of all SettingsWidgets belonging to the given section.

Parameters
s- The section's name.
Returns
The list of SettingsWidgets.

Definition at line 88 of file main_settings_widget.h.

References QMap::value().

Referenced by hal::MainSettingsWidget::handleButtonSelected().

◆ unregisterWidget()

void hal::MainSettingsList::unregisterWidget ( SettingsWidget widget)

Removes the widget from all internal data structures and deletes it.

Parameters
widget- The widget to be removed.

Definition at line 54 of file main_settings_widget.cpp.

References QWidget::close(), QObject::deleteLater(), test::n, and QList< SettingsWidget * >::removeAll().

Referenced by hal::MainSettingsWidget::handleWidgetRemove().


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