Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QIrLocalDevice Class Reference

The QIrLocalDevice class encapsulates a local Infrared (IrDA) device. More...

    #include <QIrLocalDevice>

Inherits QObject.

Public Functions

  • 29 public functions inherited from QObject

Public Slots

  • 1 public slot inherited from QObject

Signals

Static Public Members

  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public type inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QIrLocalDevice class encapsulates a local Infrared (IrDA) device.

The QIrLocalDevice class can be used to control the state of the local IrDA device and query for remote Infrared devices.

The user can control the state of the device by using the bringUp() and bringDown() functions. The isUp() function returns the state of the device.

The local infrared device can be used to discover remote infrared devices by calling the discoverRemoteDevices() function and hooking onto the remoteDeviceFound() or remoteDevicesFound() signals.

This class can also be used to query the remote IAS database.

See also QIrIasDatabase.


Member Function Documentation

QIrLocalDevice::QIrLocalDevice ( const QString & device )

Constructs a local device for the given device name device. The device is usually of the form irdaN, e.g. irda0.

See also devices().

QIrLocalDevice::~QIrLocalDevice ()

Destroys the device object.

bool QIrLocalDevice::bringDown ()

Tries to bring down the infrared device. Returns true if the device could be brought down successfully, and false otherwise.

NOTE: Under linux this function requires administrator privileges.

See also isUp() and bringUp().

bool QIrLocalDevice::bringUp ()

Tries to bring up the infrared device. Returns true if the device could be brought up successfully, and false otherwise.

NOTE: Under linux this function requires administrator privileges.

See also isUp() and bringDown().

const QString & QIrLocalDevice::deviceName () const

Returns the device name of the infrared device. E.g. irda0.

QStringList QIrLocalDevice::devices ()   [static]

Returns all the infrared devices found on this system. The contents of the list could be passed to the QIrLocalDevice constructor.

bool QIrLocalDevice::discoverRemoteDevices ( QIr::DeviceClasses classes = QIr::All )   [slot]

Starts a discovery of remote infrared devices. The classes parameter specifies a filtering set. Thus a client can request that only remote devices which have at least one device class present in the filter set be discovered.

The clients can subscribe to the discovery information in one of two ways. If the client wants to receive information about a device as it is received, they should subscribe to the remoteDeviceFound() signal. If the clients wish to receive the information wholesale, they should subscribe to the remoteDevicesFound() signal.

Returns true if the discovery could be started successfully, and false otherwise.

See also discoveryStarted() and discoveryCompleted().

void QIrLocalDevice::discoveryCompleted ()   [signal]

This signal is emitted whenever a discovery of remote infrared devices has completed.

See also discoveryStarted().

void QIrLocalDevice::discoveryStarted ()   [signal]

This signal is emitted whenever a discovery of remote infrared devices is started.

See also discoveryCompleted().

bool QIrLocalDevice::isUp () const

Returns true if the infrared device is up and running.

See also bringUp() and bringDown().

QVariant QIrLocalDevice::queryRemoteAttribute ( const QIrRemoteDevice & remote, const QString & className, const QString & attribName )

Tries to query the remote device given by remote for an IAS Database entry with class name given by className and attribute name given by attribName. Returns a valid attribute if the device has an attribute specified, returns false if the device could not be contacted or the attribute does not exist.

    QIrIasAttribute ret =
            dev.queryRemoteAttribute(remote, "OBEX", "IrDA:TinyTP:LsapSel");

The above code would attempt to query the remote device given by remote for whether it supports the OBEX service.

See also QIrIasDatabase.

void QIrLocalDevice::remoteDeviceFound ( const QIrRemoteDevice & device )   [signal]

This signal is emitted during the discovery procedure. The device parameter holds the remote device found. Clients can subscribe to this signal if they wish to receive information about one device at a time. The can subscribe to the remoteDevicesFound() signal if they wish to receive all the devices wholesale.

See also discoveryStarted(), discoveryCompleted(), and remoteDevicesFound().

void QIrLocalDevice::remoteDevicesFound ( const QList<QIrRemoteDevice> & devices )   [signal]

This signal is emitted during the discovery procedure. The devices parameter holds the list of remote devices found. Clients can subscribe to this signal if they wish to receive information about all devices at once. They could subscribe to the remoteDeviceFound() signal if they wished to receive the information piecemeal.

See also discoveryStarted(), discoveryCompleted(), and remoteDeviceFound().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 7
Page suivante

Le Qt Quarterly au hasard

Logo

Un plugin pour QImage

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web