LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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
22 {
23 namespace Util
24 {
25  class BaseSettingsManager;
26 
35  class UTIL_XSD_API AddressesModelManager : public QObject
36  {
37  Q_OBJECT
38 
39  QStandardItemModel * const Model_;
40  BaseSettingsManager * const BSM_;
41  public:
50  AddressesModelManager (BaseSettingsManager *bsm, int defaultPort, QObject *parent = nullptr);
51 
59  static void RegisterTypes ();
60 
70  QAbstractItemModel* GetModel () const;
71 
80  AddrList_t GetAddresses () const;
81  private:
82  void SaveSettings () const;
83  void AppendRow (const QPair<QString, QString>&);
84  private Q_SLOTS:
85  void updateAvailInterfaces ();
86  public Q_SLOTS:
97  void addRequested (const QString& property, const QVariantList& list);
98 
108  void removeRequested (const QString& property, const QModelIndexList& list);
109  Q_SIGNALS:
113  void addressesChanged ();
114  };
115 }
116 }
addresses.h
QList
Definition: ianrulesstorage.h:14
xsdconfig.h
LC::Util::AddressesModelManager
Manages an XML settings model with a list of network interfaces selected by the user from the list of...
Definition: addressesmodelmanager.h:35
LC
Definition: constants.h:14
UTIL_XSD_API
#define UTIL_XSD_API
Definition: xsdconfig.h:16