KDNSSD

domainmodel.h
1 /*
2  This file is part of the KDE project
3 
4  SPDX-FileCopyrightText: 2008 Jakub Stachowski <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KDNSSDDOMAINMODEL_H
10 #define KDNSSDDOMAINMODEL_H
11 
12 #include <QAbstractItemModel>
13 #include <dnssd/kdnssd_export.h>
14 
15 namespace KDNSSD
16 {
17 
18 struct DomainModelPrivate;
19 class DomainBrowser;
20 
40 class KDNSSD_EXPORT DomainModel : public QAbstractItemModel
41 {
42  Q_OBJECT
43 
44 public:
59  explicit DomainModel(DomainBrowser *browser, QObject *parent = nullptr);
60 
61  virtual ~DomainModel();
62 
64  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
66  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
68  QModelIndex parent(const QModelIndex &index) const override;
70  QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
72  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
74  virtual bool hasIndex(int row, int column, const QModelIndex &parent) const;
75 
76 private:
77  DomainModelPrivate *const d;
78  friend struct DomainModelPrivate;
79 
80 };
81 
82 }
83 
84 #endif
DisplayRole
Browses recommended domains for browsing or publishing to.
Definition: domainbrowser.h:42
Model for list of Zeroconf domains.
Definition: domainmodel.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Oct 22 2020 22:44:40 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.