9#ifndef KDNSSDSERVICEMODEL_H
10#define KDNSSDSERVICEMODEL_H
12#include "kdnssd_export.h"
13#include "remoteservice.h"
14#include <QAbstractItemModel>
19struct ServiceModelPrivate;
60 ServicePtrRole = 0xA06519DE,
90 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
92 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
94 QModelIndex
parent(
const QModelIndex &index)
const override;
96 QModelIndex
index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
98 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
100 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
102 virtual bool hasIndex(
int row,
int column,
const QModelIndex &parent)
const;
105 std::unique_ptr<ServiceModelPrivate>
const d;
106 friend struct ServiceModelPrivate;
Browses for network services advertised over DNS-SD.
Definition servicebrowser.h:55
Model for list of Zeroconf services.
Definition servicemodel.h:54
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
virtual bool hasIndex(int row, int column, const QModelIndex &parent) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
AdditionalRoles
The additional data roles provided by this model.
Definition servicemodel.h:59
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
ServiceModel(ServiceBrowser *browser, QObject *parent=nullptr)
Creates a model for the given service browser and starts browsing for services.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
ModelColumns
The default columns for this model.
Definition servicemodel.h:69
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QModelIndex parent(const QModelIndex &index) const override