LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Manages an XML settings model with a list of network interfaces selected by the user from the list of available ones. More...
#include "addressesmodelmanager.h"
Public Slots | |
void | addRequested (const QString &property, const QVariantList &list) |
Invoked by XML settings dialog to add new user-selected items. More... | |
void | removeRequested (const QString &property, const QModelIndexList &list) |
Invoked by XML settings dialog to remove some user-selected items. More... | |
Signals | |
void | addressesChanged () |
Notifies about the changes in the selected interfaces list. More... | |
Public Member Functions | |
AddressesModelManager (BaseSettingsManager *bsm, int defaultPort, QObject *parent=nullptr) | |
Constructs the model manager. More... | |
QAbstractItemModel * | GetModel () const |
Returns the managed model. More... | |
AddrList_t | GetAddresses () const |
Returns the list of addresses of interfaces selected by the user. More... | |
Static Public Member Functions | |
static void | RegisterTypes () |
Registers the types used for storage in Qt metasystem. More... | |
Manages an XML settings model with a list of network interfaces selected by the user from the list of available ones.
AddressesModelManager uses a BaseSettingsManager instance to store the interfaces.
The default list is populated by local-only interfaces.
Definition at line 35 of file addressesmodelmanager.h.
LC::Util::AddressesModelManager::AddressesModelManager | ( | BaseSettingsManager * | bsm, |
int | defaultPort, | ||
QObject * | parent = nullptr |
||
) |
Constructs the model manager.
[in] | bsm | The settings manager to be used to store the list of interfaces. |
[in] | defaultPort | The default port used when presenting interface addition dialog to the user. |
[in] | parent | The parent object. |
Definition at line 32 of file addressesmodelmanager.cpp.
|
slot |
Invoked by XML settings dialog to add new user-selected items.
[in] | property | The name of the property for which new items should be added. |
[in] | list | The list of items to add (corresponding to the columns in the model). |
Definition at line 125 of file addressesmodelmanager.cpp.
|
signal |
Notifies about the changes in the selected interfaces list.
AddrList_t LC::Util::AddressesModelManager::GetAddresses | ( | ) | const |
Returns the list of addresses of interfaces selected by the user.
Definition at line 77 of file addressesmodelmanager.cpp.
QAbstractItemModel * LC::Util::AddressesModelManager::GetModel | ( | ) | const |
Returns the managed model.
The model contains the list of network interfaces selected by the user.
Definition at line 72 of file addressesmodelmanager.cpp.
|
static |
Registers the types used for storage in Qt metasystem.
This function should be called once during plugin startup before XML settings system is initialized (that is, before the corresponding BaseSettingsManager passed to the constructor of this class is instantiated).
Definition at line 66 of file addressesmodelmanager.cpp.
|
slot |
Invoked by XML settings dialog to remove some user-selected items.
[in] | property | The name of the property for which new items should be added. |
[in] | list | The list of model indexes to remove. |
Definition at line 135 of file addressesmodelmanager.cpp.