LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
addressesmodelmanager.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QObject>
12
#include <QVariantList>
13
#include <QModelIndexList>
14
#include <
util/network/addresses.h
>
15
#include "
xsdconfig.h
"
16
17
class
QHostAddress;
18
class
QStandardItemModel;
19
class
QStandardItem;
20
21
namespace
LC::Util
22
{
23
class
BaseSettingsManager;
24
33
class
UTIL_XSD_API
AddressesModelManager
:
public
QObject
34
{
35
Q_OBJECT
36
37
QStandardItemModel *
const
Model_;
38
BaseSettingsManager *
const
BSM_;
39
public
:
48
AddressesModelManager
(BaseSettingsManager *bsm,
int
defaultPort, QObject *parent =
nullptr
);
49
57
static
void
RegisterTypes
();
58
68
QAbstractItemModel*
GetModel
()
const
;
69
78
AddrList_t
GetAddresses
()
const
;
79
private
:
80
void
SaveSettings ()
const
;
81
void
AppendRow (
const
QPair<QString, QString>&);
82
public
Q_SLOTS:
93
void
addRequested
(
const
QString& property,
const
QVariantList& list);
94
104
void
removeRequested
(
const
QString& property,
const
QModelIndexList& list);
105
Q_SIGNALS:
109
void
addressesChanged
();
110
};
111
}
addresses.h
LC::Util::AddressesModelManager::addressesChanged
void addressesChanged()
Notifies about the changes in the selected interfaces list.
LC::Util::AddressesModelManager::GetAddresses
AddrList_t GetAddresses() const
Returns the list of addresses of interfaces selected by the user.
Definition
addressesmodelmanager.cpp:71
LC::Util::AddressesModelManager::addRequested
void addRequested(const QString &property, const QVariantList &list)
Invoked by XML settings dialog to add new user-selected items.
Definition
addressesmodelmanager.cpp:103
LC::Util::AddressesModelManager::RegisterTypes
static void RegisterTypes()
Registers the types used for storage in Qt metasystem.
Definition
addressesmodelmanager.cpp:61
LC::Util::AddressesModelManager::AddressesModelManager
AddressesModelManager(BaseSettingsManager *bsm, int defaultPort, QObject *parent=nullptr)
Constructs the model manager.
Definition
addressesmodelmanager.cpp:39
LC::Util::AddressesModelManager::GetModel
QAbstractItemModel * GetModel() const
Returns the managed model.
Definition
addressesmodelmanager.cpp:66
LC::Util::AddressesModelManager::removeRequested
void removeRequested(const QString &property, const QModelIndexList &list)
Invoked by XML settings dialog to remove some user-selected items.
Definition
addressesmodelmanager.cpp:113
LC::Util
Definition
icoreproxy.h:34
LC::Util::AddrList_t
QList< QPair< QString, QString > > AddrList_t
Definition
addresses.h:21
xsdconfig.h
UTIL_XSD_API
#define UTIL_XSD_API
Definition
xsdconfig.h:16
src
util
xsd
addressesmodelmanager.h
Generated by
1.17.0