KAuthIcon class Reference (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KAuthIcon Class Reference

This is the base class from which different authorization icon widget which actually do something should be derived. ABC for authorization icon widgets. More...

`#include <kauthicon.h>`

Inheritance diagram for KAuthIcon:

[legend]
Collaboration diagram for KAuthIcon:

[legend]
List of all members.

## Public Slots
virtual void | updateStatus ()=0
| Re-implement this method if you want the icon to update itself when something external has changed (i.e.
## Signals
void | authChanged (bool authorized)
| this signal is emitted when authorization has changed from its previous state.
## Public Member Functions
| KAuthIcon (QWidget *parent=0, const char *name=0)
| Constructor.
virtual QSize | sizeHint () const
virtual bool | status () const =0
| return the status of whatever is being monitored.
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)
## Protected Attributes
QHBoxLayout * | layout
QLabel * | lockBox
QLabel * | lockLabel
QPixmap | lockPM
QPixmap | openLockPM
QString | lockText
QString | openLockText

## Detailed Description

This is the base class from which different authorization icon widget which actually do something should be derived. ABC for authorization icon widgets.

You can use these widgets to show that the user has (or doesn't have) the ability to do something, and why that is.

One of the most useful things you can do with this is connect authChanged(bool) to setEnabled(bool) for a widget to turn it on and off depending on the status of whatever it is you are monitoring.

See also:
  KRootPermsIcon, KWritePermsIcon

Author:
  Preston Brown <pbrown@kde.org>

Definition at line 44 of file kauthicon.h.

## Constructor & Destructor Documentation

KAuthIcon::KAuthIcon | ( | QWidget * | parent = 0,
|  | const char * | name = 0
| ) |

| Constructor. Definition at line 94 of file kauthicon.cpp. References KStdAccel::name(), QWidget::resize(), QLabel::setAlignment(), QLabel::setPixmap(), QLabel::setText(), and QWidget::sizeHint().

## Member Function Documentation

virtual bool KAuthIcon::status | ( |  | ) | const`[pure virtual]`

| return the status of whatever is being monitored. Implemented in KRootPermsIcon, and KWritePermsIcon.

virtual void KAuthIcon::updateStatus | ( |  | ) | `[pure virtual, slot]`

| Re-implement this method if you want the icon to update itself when something external has changed (i.e. a file on disk, uid/gid). Implemented in KRootPermsIcon, and KWritePermsIcon.

void KAuthIcon::authChanged | ( | bool | authorized | ) | `[signal]`

  | this signal is emitted when authorization has changed from its previous state. Parameters:
  authorized | will be true if the type of authorization described by the icon is true, otherwise it will be false.
Referenced by KWritePermsIcon::updateStatus(), and KRootPermsIcon::updateStatus().

The documentation for this class was generated from the following files:

- kauthicon.h
- kauthicon.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:58:52 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001