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

Solid

Solid::Button

Solid::Button Class Reference

This device interface is available on button devices. More...

#include <button.h>

Inheritance diagram for Solid::Button:
Solid::DeviceInterface QObject

List of all members.

Public Types

enum  ButtonType {
  LidButton, PowerButton, SleepButton, UnknownButtonType,
  TabletButton
}

Signals

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

Public Member Functions

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

Static Public Member Functions

static Type deviceInterfaceType ()

Properties

bool hasState
bool stateValue
ButtonType type

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.


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.
  • TabletButton : The tablet switch on a laptop that senses if the monitor is rotated or not.
  • UnknownButtonType : The type of the button is unknow.
Enumerator:
LidButton 
PowerButton 
SleepButton 
UnknownButtonType 
TabletButton 

Definition at line 61 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 87 of file button.h.

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()
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
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()
ButtonType Solid::Button::type (  )  const

Retrieves the type of button device.

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

Property Documentation

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.

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

Definition at line 45 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
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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