• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

DNSSD

  • DNSSD
  • DomainModel
Public Member Functions | List of all members
DNSSD::DomainModel Class Reference

#include <DNSSD/DomainModel>

Inheritance diagram for DNSSD::DomainModel:
QAbstractItemModel

Public Member Functions

 DomainModel (DomainBrowser *browser, QObject *parent=0)
 
virtual ~DomainModel ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual bool hasIndex (int row, int column, const QModelIndex &parent) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual QModelIndex parent (const QModelIndex &index) const
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 

Detailed Description

Model for list of Zeroconf domains.

This class provides a Qt Model for DomainBrowser to allow easy integration of domain discovery into a GUI. For example, to provide a combo box listing available domains, you can do:

DNSSD::DomainModel *domainModel = new DomainModel(
new DNSSD::DomainBrowser(DNSSD::DomainBrowser::Browsing)
);
QComboBox *domainCombo = new QComboBox();
domainCombo->setModel(domainModel);
DNSSD::DomainBrowser
Browses recommended domains for browsing or publishing to.
Definition: domainbrowser.h:55
DNSSD::DomainBrowser::Browsing
@ Browsing
Domains recommended for browsing for services on (using ServiceBrowser)
Definition: domainbrowser.h:64
DNSSD::DomainModel
Model for list of Zeroconf domains.
Definition: domainmodel.h:54
QComboBox
Since
4.1
Author
Jakub Stachowski

Definition at line 53 of file domainmodel.h.

Constructor & Destructor Documentation

◆ DomainModel()

DNSSD::DomainModel::DomainModel ( DomainBrowser *  browser,
QObject *  parent = 0 
)
explicit

Creates a model for given domain browser and starts browsing for domains.

The model takes ownership of the browser, so there is no need to delete it afterwards.

You should not call DomainBrowser::startBrowse() on browser before passing it to DomainModel.

Parameters
browserthe domain browser that will provide the domains to be listed by the model
parentthe parent object (see QObject documentation)

Definition at line 34 of file domainmodel.cpp.

◆ ~DomainModel()

DNSSD::DomainModel::~DomainModel ( )
virtual

Definition at line 46 of file domainmodel.cpp.

Member Function Documentation

◆ columnCount()

int DNSSD::DomainModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual
Reimplemented from superclass.

Definition at line 51 of file domainmodel.cpp.

◆ data()

QVariant DNSSD::DomainModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual
Reimplemented from superclass.

Definition at line 80 of file domainmodel.cpp.

◆ hasIndex()

bool DNSSD::DomainModel::hasIndex ( int  row,
int  column,
const QModelIndex &  parent 
) const
virtual
Reimplemented from superclass.

Definition at line 72 of file domainmodel.cpp.

◆ index()

QModelIndex DNSSD::DomainModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual
Reimplemented from superclass.

Definition at line 67 of file domainmodel.cpp.

◆ parent()

QModelIndex DNSSD::DomainModel::parent ( const QModelIndex &  index) const
virtual
Reimplemented from superclass.

Definition at line 61 of file domainmodel.cpp.

◆ rowCount()

int DNSSD::DomainModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual
Reimplemented from superclass.

Definition at line 56 of file domainmodel.cpp.


The documentation for this class was generated from the following files:
  • domainmodel.h
  • domainmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

DNSSD

Skip menu "DNSSD"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal