• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
TDEPopupMenu Class Reference

#include <tdepopupmenu.h>

Inheritance diagram for TDEPopupMenu:
KPanelMenu

Signals

void aboutToShowContextMenu (TDEPopupMenu *menu, int menuItem, TQPopupMenu *ctxMenu)
 

Public Member Functions

 TDEPopupMenu (TQWidget *parent=0, const char *name=0)
 
 ~TDEPopupMenu ()
 
int insertTitle (const TQString &text, int id=-1, int index=-1)
 
int insertTitle (const TQPixmap &icon, const TQString &text, int id=-1, int index=-1)
 
void changeTitle (int id, const TQString &text)
 
void changeTitle (int id, const TQPixmap &icon, const TQString &text)
 
TQString title (int id=-1) const
 
TQPixmap titlePixmap (int id) const
 
void setKeyboardShortcutsEnabled (bool enable)
 
void setKeyboardShortcutsExecute (bool enable)
 
 TDEPopupMenu (const TQString &title, TQWidget *parent=0, const char *name=0) TDE_DEPRECATED
 
void setTitle (const TQString &title) TDE_DEPRECATED
 
TQPopupMenu * contextMenu ()
 
const TQPopupMenu * contextMenu () const
 
void hideContextMenu ()
 
virtual void activateItemAt (int index)
 
TQt::ButtonState state () const
 

Static Public Member Functions

static TDEPopupMenu * contextMenuFocus ()
 
static int contextMenuFocusItem ()
 

Protected Slots

TQString underlineText (const TQString &text, uint length)
 
void resetKeyboardVars (bool noMatches=false)
 
void itemHighlighted (int whichItem)
 
void showCtxMenu (TQPoint pos)
 
void ctxMenuHiding ()
 
void ctxMenuHideShowingMenu ()
 

Protected Member Functions

virtual void closeEvent (TQCloseEvent *)
 
virtual void keyPressEvent (TQKeyEvent *e)
 
virtual void mouseReleaseEvent (TQMouseEvent *e)
 
virtual void mousePressEvent (TQMouseEvent *e)
 
virtual bool focusNextPrevChild (bool next)
 
virtual void contextMenuEvent (TQContextMenuEvent *e)
 
virtual void hideEvent (TQHideEvent *)
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

A menu with title items.

TDEPopupMenu is a class for menus with standard title items and keyboard accessibility for popups with many options and/or varying options. It acts identically to TQPopupMenu, with the addition of insertTitle(), changeTitle(), setKeyboardShortcutsEnabled() and setKeyboardShortcutsExecute() methods.

The titles support a text string, an icon, plus user defined gradients, colors, and background pixmaps.

The keyboard search algorithm is incremental with additional underlining for user feedback.

Author
Daniel M. Duley mosfe.nosp@m.t@kd.nosp@m.e.org
Hamish Rodda rodda.nosp@m.@kde.nosp@m..org

Definition at line 123 of file tdepopupmenu.h.

Constructor & Destructor Documentation

◆ TDEPopupMenu() [1/2]

TDEPopupMenu::TDEPopupMenu ( TQWidget *  parent = 0,
const char *  name = 0 
)

Constructs a TDEPopupMenu.

Definition at line 162 of file tdepopupmenu.cpp.

◆ ~TDEPopupMenu()

TDEPopupMenu::~TDEPopupMenu ( )

Destructs the object.

Definition at line 170 of file tdepopupmenu.cpp.

◆ TDEPopupMenu() [2/2]

TDEPopupMenu::TDEPopupMenu ( const TQString &  title,
TQWidget *  parent = 0,
const char *  name = 0 
)

end of RMB menus on menus support

Deprecated:
Obsolete method provided for backwards compatibility only. Use the normal constructor and insertTitle instead.

Definition at line 668 of file tdepopupmenu.cpp.

Member Function Documentation

◆ aboutToShowContextMenu

void TDEPopupMenu::aboutToShowContextMenu ( TDEPopupMenu *  menu,
int  menuItem,
TQPopupMenu *  ctxMenu 
)
signal

connect to this signal to be notified when a context menu is about to be shown

Parameters
menuThe menu that the context menu is about to be shown for
menuItemThe menu item that the context menu is currently on
ctxMenuThe context menu itself
Since
3.2

◆ activateItemAt()

void TDEPopupMenu::activateItemAt ( int  index)
virtual

Reimplemented for internal purposes.

Since
3.4

Definition at line 275 of file tdepopupmenu.cpp.

◆ changeTitle() [1/2]

void TDEPopupMenu::changeTitle ( int  id,
const TQPixmap &  icon,
const TQString &  text 
)

Changes the title and icon of the title item at the specified id.

Definition at line 217 of file tdepopupmenu.cpp.

◆ changeTitle() [2/2]

void TDEPopupMenu::changeTitle ( int  id,
const TQString &  text 
)

Changes the title of the item at the specified id.

If a icon was previously set it is cleared.

Definition at line 200 of file tdepopupmenu.cpp.

◆ closeEvent()

void TDEPopupMenu::closeEvent ( TQCloseEvent *  e)
protectedvirtual

This is re-implemented for keyboard navigation.

Definition at line 268 of file tdepopupmenu.cpp.

◆ contextMenu() [1/2]

TQPopupMenu * TDEPopupMenu::contextMenu ( )

Returns the context menu associated with this menu.

Since
3.2

Definition at line 512 of file tdepopupmenu.cpp.

◆ contextMenu() [2/2]

const TQPopupMenu * TDEPopupMenu::contextMenu ( ) const

Returns the context menu associated with this menu.

Since
3.2

Definition at line 523 of file tdepopupmenu.cpp.

◆ contextMenuEvent()

void TDEPopupMenu::contextMenuEvent ( TQContextMenuEvent *  e)
protectedvirtual

Definition at line 626 of file tdepopupmenu.cpp.

◆ contextMenuFocus()

TDEPopupMenu * TDEPopupMenu::contextMenuFocus ( )
static

Returns the TDEPopupMenu associated with the current context menu.

Since
3.2

Definition at line 538 of file tdepopupmenu.cpp.

◆ contextMenuFocusItem()

int TDEPopupMenu::contextMenuFocusItem ( )
static

returns the ID of the menuitem associated with the current context menu

Since
3.2

Definition at line 533 of file tdepopupmenu.cpp.

◆ ctxMenuHideShowingMenu

void TDEPopupMenu::ctxMenuHideShowingMenu ( )
protectedslot

Definition at line 598 of file tdepopupmenu.cpp.

◆ ctxMenuHiding

void TDEPopupMenu::ctxMenuHiding ( )
protectedslot

Definition at line 611 of file tdepopupmenu.cpp.

◆ focusNextPrevChild()

bool TDEPopupMenu::focusNextPrevChild ( bool  next)
protectedvirtual

Definition at line 444 of file tdepopupmenu.cpp.

◆ hideContextMenu()

void TDEPopupMenu::hideContextMenu ( )

Hides the context menu if shown.

Since
3.2

Definition at line 528 of file tdepopupmenu.cpp.

◆ hideEvent()

void TDEPopupMenu::hideEvent ( TQHideEvent *  )
protectedvirtual

Reimplemented in KPanelMenu.

Definition at line 646 of file tdepopupmenu.cpp.

◆ insertTitle() [1/2]

int TDEPopupMenu::insertTitle ( const TQPixmap &  icon,
const TQString &  text,
int  id = -1,
int  index = -1 
)

Inserts a title item with the given icon and title.

Definition at line 190 of file tdepopupmenu.cpp.

◆ insertTitle() [2/2]

int TDEPopupMenu::insertTitle ( const TQString &  text,
int  id = -1,
int  index = -1 
)

Inserts a title item with no icon.

Definition at line 181 of file tdepopupmenu.cpp.

◆ itemHighlighted

void TDEPopupMenu::itemHighlighted ( int  whichItem)
protectedslot

Definition at line 543 of file tdepopupmenu.cpp.

◆ keyPressEvent()

void TDEPopupMenu::keyPressEvent ( TQKeyEvent *  e)
protectedvirtual

Definition at line 286 of file tdepopupmenu.cpp.

◆ mousePressEvent()

void TDEPopupMenu::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

End keyboard navigation.

RMB menus on menus

Definition at line 492 of file tdepopupmenu.cpp.

◆ mouseReleaseEvent()

void TDEPopupMenu::mouseReleaseEvent ( TQMouseEvent *  e)
protectedvirtual
Since
3.4

Definition at line 503 of file tdepopupmenu.cpp.

◆ resetKeyboardVars

void TDEPopupMenu::resetKeyboardVars ( bool  noMatches = false)
protectedslot
Since
3.1

Definition at line 460 of file tdepopupmenu.cpp.

◆ setKeyboardShortcutsEnabled()

void TDEPopupMenu::setKeyboardShortcutsEnabled ( bool  enable)

Enables keyboard navigation by searching for the entered key sequence.

Also underlines the currently selected item, providing feedback on the search.

Defaults to off.

WARNING: calls to text() of currently keyboard-selected items will contain additional ampersand characters.

WARNING: though pre-existing keyboard shortcuts will not interfere with the operation of this feature, they may be confusing to the user as the existing shortcuts will not work.

Since
3.1

Definition at line 475 of file tdepopupmenu.cpp.

◆ setKeyboardShortcutsExecute()

void TDEPopupMenu::setKeyboardShortcutsExecute ( bool  enable)

Enables execution of the menu item once it is uniquely specified.

Defaults to off.

Since
3.1

Definition at line 480 of file tdepopupmenu.cpp.

◆ setTitle()

void TDEPopupMenu::setTitle ( const TQString &  title)
Deprecated:
Obsolete method provided for backwards compatibility only. Use insertTitle and changeTitle instead.

Definition at line 676 of file tdepopupmenu.cpp.

◆ showCtxMenu

void TDEPopupMenu::showCtxMenu ( TQPoint  pos)
protectedslot

Definition at line 554 of file tdepopupmenu.cpp.

◆ state()

TQt::ButtonState TDEPopupMenu::state ( ) const

Return the state of the mouse button and keyboard modifiers when the last menuitem was activated.

Since
3.4

Definition at line 281 of file tdepopupmenu.cpp.

◆ title()

TQString TDEPopupMenu::title ( int  id = -1) const

Returns the title of the title item at the specified id.

The default id of -1 is for backwards compatibility only, you should always specify the id.

Definition at line 234 of file tdepopupmenu.cpp.

◆ titlePixmap()

TQPixmap TDEPopupMenu::titlePixmap ( int  id) const

Returns the icon of the title item at the specified id.

Definition at line 250 of file tdepopupmenu.cpp.

◆ underlineText

TQString TDEPopupMenu::underlineText ( const TQString &  text,
uint  length 
)
protectedslot
Since
3.1

Definition at line 450 of file tdepopupmenu.cpp.

◆ virtual_hook()

void TDEPopupMenu::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 687 of file tdepopupmenu.cpp.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.