KAcceleratorManager

Search for usage in LXR

KAcceleratorManager Class Reference

#include <KAcceleratorManager>

Static Public Member Functions

static void addStandardActionNames (const QStringList &names)
 
static void last_manage (QString &added, QString &changed, QString &removed)
 
static void manage (QWidget *widget, bool programmers_mode=false)
 
static void setNoAccel (QWidget *widget)
 

Detailed Description

KDE Accelerator manager.

This class can be used to find a valid and working set of accelerators for any widget.

Author
Matthias Hölzer-Klüpfel mhk@k.nosp@m.de.o.nosp@m.rg

Definition at line 28 of file kacceleratormanager.h.

Member Function Documentation

◆ addStandardActionNames()

void KAcceleratorManager::addStandardActionNames ( const QStringList & names)
static

Append names to a list of standard action names.

These strings will be given higher priority when assigning keyboard accelerators.

Since
5.0

Definition at line 864 of file kacceleratormanager.cpp.

◆ last_manage()

void KAcceleratorManager::last_manage ( QString & added,
QString & changed,
QString & removed )
static

returns the result of the last manage operation.

Definition at line 436 of file kacceleratormanager.cpp.

◆ manage()

void KAcceleratorManager::manage ( QWidget * widget,
bool programmers_mode = false )
static

Manages the accelerators of a widget.

Call this function on the top widget of the hierarchy you want to manage. It will fix the accelerators of the child widgets so there are never duplicate accelerators. It also tries to put accelerators on as many widgets as possible.

The algorithm used tries to take the existing accelerators into account, as well as the class of each widget. Hopefully, the result is close to what you would assign manually.

QMenu's are managed dynamically, so when you add or remove entries, the accelerators are reassigned. If you add or remove widgets to your toplevel widget, you will have to call manage again to fix the accelerators.

Parameters
widgetThe toplevel widget you want to manage.
programmers_modeif true, KAcceleratorManager adds (&) for removed accels and & before added accels

Definition at line 427 of file kacceleratormanager.cpp.

◆ setNoAccel()

void KAcceleratorManager::setNoAccel ( QWidget * widget)
static

Use this method for a widget (and its children) you want no accels to be set on.

Definition at line 859 of file kacceleratormanager.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.