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

DNSSD

  • DNSSD
  • DomainModel
Public Member Functions

DNSSD::DomainModel Class Reference

Model for list of Zeroconf domains. More...

#include <DNSSD/DomainModel>

Inheritance diagram for DNSSD::DomainModel:
Inheritance graph
[legend]

List of all members.

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);
Since:
4.1
Author:
Jakub Stachowski

Definition at line 53 of file domainmodel.h.


Constructor & Destructor Documentation

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 36 of file domainmodel.cpp.

DNSSD::DomainModel::~DomainModel ( ) [virtual]

Definition at line 48 of file domainmodel.cpp.


Member Function Documentation

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

Definition at line 53 of file domainmodel.cpp.

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

Definition at line 82 of file domainmodel.cpp.

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

Definition at line 74 of file domainmodel.cpp.

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

Definition at line 69 of file domainmodel.cpp.

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

Definition at line 63 of file domainmodel.cpp.

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

Definition at line 58 of file domainmodel.cpp.


The documentation for this class was generated from the following files:
  • domainmodel.h
  • domainmodel.cpp

DNSSD

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • 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
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal