• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Solid

Solid::Button

Solid::Button Class Reference

#include <button.h>

Inheritance diagram for Solid::Button:

Inheritance graph
[legend]

List of all members.


Detailed Description

This device interface is available on button devices.

A button is a device, like power button or lid switch, that can be pressed by user. Some buttons can have two states (Enabled/Disabled, On/Off ...), other buttons haven't state.

Author:
Davide Bettio <davbet@aliceposta.it>

Definition at line 41 of file button.h.


Public Types

enum  ButtonType { LidButton, PowerButton, SleepButton, UnknownButtonType }

Signals

void pressed (Solid::Button::ButtonType type, const QString &udi)

Public Member Functions

virtual ~Button ()
ButtonType type () const
bool hasState () const
bool stateValue () const

Static Public Member Functions

static Type deviceInterfaceType ()

Properties

ButtonType type
bool hasState
bool stateValue

Friends

class Device

Member Enumeration Documentation

enum Solid::Button::ButtonType

This enum type defines the type of button.

  • LidButton : The switch on a laptop that senses whether the lid is open or closed.
  • PowerButton : The main power button on the computer.
  • SleepButton : The sleep button on a computer capable of putting the computer into a suspend state.
  • UnknownButtonType : The type of the button is unknow.
Enumerator:
LidButton 
PowerButton 
SleepButton 
UnknownButtonType 

Definition at line 60 of file button.h.


Constructor & Destructor Documentation

Solid::Button::~Button (  )  [virtual]

Destroys a Button object.

Definition at line 34 of file button.cpp.


Member Function Documentation

static Type Solid::Button::deviceInterfaceType (  )  [inline, static]

Get the Solid::DeviceInterface::Type of the Button device interface.

Returns:
the Button device interface type
See also:
Solid::DeviceInterface::Type

Definition at line 86 of file button.h.

ButtonType Solid::Button::type (  )  const

Retrieves the type of button device.

Returns:
the type of button device.
See also:
Solid::Button::ButtonType

bool Solid::Button::hasState (  )  const

Indicates if the button mantains state (Can toggled on/off).

Returns:
true if the button maintains state, false otherwise.
See also:
stateValue()

bool Solid::Button::stateValue (  )  const

Retrieves the state of the button.

A button can have two states (Enabled/Disabled, On/Off ...). Available only if hasState is true.

Returns:
true if the button is enabled, false otherwise.
See also:
hasState()

void Solid::Button::pressed ( Solid::Button::ButtonType  type,
const QString &  udi 
) [signal]

This signal is emitted when the button is pressed.

Parameters:
type the type of button device, it's one of the type Solid::Button::ButtonType
See also:
Solid::Button::ButtonType
Parameters:
udi the UDI of the button


Friends And Related Function Documentation

friend class Device [friend]

Reimplemented from Solid::DeviceInterface.

Definition at line 49 of file button.h.


Property Documentation

Solid::Button::ButtonType Solid::Button::type [read]

Definition at line 45 of file button.h.

bool Solid::Button::hasState [read]

Definition at line 46 of file button.h.

bool Solid::Button::stateValue [read]

Definition at line 47 of file button.h.


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

Solid

Skip menu "Solid"
  • 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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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