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

KDEUI

Public Member Functions | Properties | List of all members
KToolBarPopupAction Class Reference

#include <ktoolbarpopupaction.h>

Inheritance diagram for KToolBarPopupAction:
Inheritance graph
[legend]

Public Member Functions

 KToolBarPopupAction (const KIcon &icon, const QString &text, QObject *parent)
 
virtual ~KToolBarPopupAction ()
 
virtual QWidget * createWidget (QWidget *parent)
 
bool delayed () const
 
KMenu * popupMenu () const
 
void setDelayed (bool delayed)
 
void setStickyMenu (bool sticky)
 
bool stickyMenu () const
 
- Public Member Functions inherited from KAction
 KAction (QObject *parent)
 
 KAction (const QString &text, QObject *parent)
 
 KAction (const KIcon &icon, const QString &text, QObject *parent)
 
virtual ~KAction ()
 
KAuth::Action * authAction () const
 
bool event (QEvent *)
 
void forgetGlobalShortcut ()
 
const KShortcut & globalShortcut (ShortcutTypes type=ActiveShortcut) const
 
bool globalShortcutAllowed () const
 
bool isGlobalShortcutEnabled () const
 
bool isShortcutConfigurable () const
 
KRockerGesture rockerGesture (ShortcutTypes type=ActiveShortcut) const
 
void setAuthAction (KAuth::Action *action)
 
void setAuthAction (const QString &actionName)
 
void setGlobalShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut), GlobalShortcutLoading loading=Autoloading)
 
void setGlobalShortcutAllowed (bool allowed, GlobalShortcutLoading loading=Autoloading)
 
void setHelpText (const QString &text)
 
void setRockerGesture (const KRockerGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShapeGesture (const KShapeGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcutConfigurable (bool configurable)
 
void setShortcuts (const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
KShapeGesture shapeGesture (ShortcutTypes type=ActiveShortcut) const
 
KShortcut shortcut (ShortcutTypes types=ActiveShortcut) const
 

Properties

bool delayed
 
bool stickyMenu
 
- Properties inherited from KAction
KShortcut globalShortcut
 
bool globalShortcutAllowed
 
bool globalShortcutEnabled
 
KShortcut shortcut
 
bool shortcutConfigurable
 

Additional Inherited Members

- Public Types inherited from KAction
enum  GlobalShortcutLoading { Autoloading = 0x0, NoAutoloading = 0x4 }
 
enum  ShortcutType { ActiveShortcut = 0x1, DefaultShortcut = 0x2 }
 
- Signals inherited from KAction
void authorized (KAuth::Action *action)
 
void globalShortcutChanged (const QKeySequence &)
 
void triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
 

Detailed Description

This action is a normal action everywhere, except in a toolbar where it also has a popupmenu (optionally delayed).

This action is designed for history actions (back/forward, undo/redo) and for any other action that has more detail in a toolbar than in a menu (e.g. tool chooser with "Other" leading to a dialog...).

In contrast to KActionMenu, this action is a simple menuitem when plugged into a menu, and has a popup only in a toolbar.

Use cases include Back/Forward, and Undo/Redo. Simple click is what's most commonly used, and enough for menus, but in toolbars there is also an optional popup to go back N steps or undo N steps.

Definition at line 48 of file ktoolbarpopupaction.h.

Constructor & Destructor Documentation

KToolBarPopupAction::KToolBarPopupAction ( const KIcon &  icon,
const QString &  text,
QObject *  parent 
)

Create a KToolBarPopupAction, with a text, an icon, a parent and a name.

Parameters
iconThe icon to display.
textThe text that will be displayed.
parentThis action's parent.

Definition at line 50 of file ktoolbarpopupaction.cpp.

KToolBarPopupAction::~KToolBarPopupAction ( )
virtual

Destroys the toolbar popup action.

Definition at line 57 of file ktoolbarpopupaction.cpp.

Member Function Documentation

QWidget * KToolBarPopupAction::createWidget ( QWidget *  parent)
virtual

Reimplemented from.

See also
QActionWidgetFactory.

Definition at line 70 of file ktoolbarpopupaction.cpp.

bool KToolBarPopupAction::delayed ( ) const

Returns true if this action creates a delayed popup menu when plugged in a KToolBar.

KMenu * KToolBarPopupAction::popupMenu ( ) const

The popup menu that is shown when clicking (some time) on the toolbar button.

You may want to plug items into it on creation, or connect to aboutToShow for a more dynamic menu.

Deprecated:
use menu() instead

Definition at line 64 of file ktoolbarpopupaction.cpp.

void KToolBarPopupAction::setDelayed ( bool  delayed)

If set to true, this action will create a delayed popup menu when plugged in a KToolBar.

Otherwise it creates a normal popup. Default: delayed.

Definition at line 105 of file ktoolbarpopupaction.cpp.

void KToolBarPopupAction::setStickyMenu ( bool  sticky)

If set to true, this action will create a sticky popup menu when plugged in a KToolBar.

"Sticky", means it's visible until a selection is made or the mouse is clicked elsewhere. This feature allows you to make a selection without having to press and hold down the mouse while making a selection. Only available if delayed() is true. Default: sticky.

Definition at line 115 of file ktoolbarpopupaction.cpp.

bool KToolBarPopupAction::stickyMenu ( ) const

Returns true if this action creates a sticky popup menu.

See also
setStickyMenu().

Property Documentation

bool KToolBarPopupAction::delayed
readwrite

Definition at line 51 of file ktoolbarpopupaction.h.

bool KToolBarPopupAction::stickyMenu
readwrite

Definition at line 52 of file ktoolbarpopupaction.h.


The documentation for this class was generated from the following files:
  • ktoolbarpopupaction.h
  • ktoolbarpopupaction.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal