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

KDEUI

KToolBarPopupAction Class Reference

#include <ktoolbarpopupaction.h>

Inheritance diagram for KToolBarPopupAction:

Inheritance graph
[legend]

List of all members.


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.


Public Member Functions

virtual QWidget * createWidget (QWidget *parent)
bool delayed () const
 KToolBarPopupAction (const KIcon &icon, const QString &text, QObject *parent)
KMenu * popupMenu () const
void setDelayed (bool delayed)
void setStickyMenu (bool sticky)
bool stickyMenu () const
virtual ~KToolBarPopupAction ()

Properties

bool delayed
bool stickyMenu

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:
icon The icon to display.
text The text that will be displayed.
parent This 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.

Reimplemented from QWidgetAction.

Definition at line 68 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 63 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 103 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 113 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 [read, write]

Definition at line 51 of file ktoolbarpopupaction.h.

bool KToolBarPopupAction::stickyMenu [read, write]

Definition at line 52 of file ktoolbarpopupaction.h.


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

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • 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
  • Kross
  • KUtils
  • Nepomuk
  • 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