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

liblancelot

  • Lancelot
  • PopupList
Classes | Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Lancelot::PopupList Class Reference

#include <PopupList.h>

Inheritance diagram for Lancelot::PopupList:
Inheritance graph
[legend]

Classes

class  Private
 

Public Types

enum  SublevelOpenAction { NoAction = 0, PopupNew, OpenInside }
 

Public Slots

void updateSize ()
 

Signals

void activated (int index)
 

Public Member Functions

 PopupList (QWidget *parent=0, Qt::WindowFlags f=Qt::Window)
 
virtual ~PopupList ()
 
int closeTimeout () const
 
void exec (const QPoint &p)
 
void setCloseTimeout (int timeout)
 
void setModel (ActionListModel *model)
 
void setSublevelOpenAction (SublevelOpenAction action)
 
SublevelOpenAction sublevelOpenAction () const
 

Protected Member Functions

L_Override void enterEvent (QEvent *event)
 
L_Override bool eventFilter (QObject *object, QEvent *event)
 
void exec (const QPoint &p, PopupList *parent)
 
L_Override void hideEvent (QHideEvent *event)
 
L_Override void leaveEvent (QEvent *event)
 
void moveTo (const QPoint &p)
 
PopupList * parentList () const
 
L_Override void showEvent (QShowEvent *event)
 
L_Override void timerEvent (QTimerEvent *event)
 

Properties

int closeTimeout
 
SublevelOpenAction sublevelOpenAction
 

Detailed Description

The list that pops up in its own window.

Note: Don't save pointers to this object, it can destroy itself. Use QPointer.

Author
Ivan Cukic

Definition at line 41 of file PopupList.h.

Member Enumeration Documentation

enum Lancelot::PopupList::SublevelOpenAction

This enum represents behaviour patterns when an item with a submenu is activated.

Enumerator
NoAction 

Do nothing.

PopupNew 

Pops a new list.

OpenInside 

Opens the sublist inside the current one.

Definition at line 52 of file PopupList.h.

Constructor & Destructor Documentation

Lancelot::PopupList::PopupList ( QWidget *  parent = 0,
Qt::WindowFlags  f = Qt::Window 
)
explicit

Creates a new Lancelot::PopupList.

Parameters
parentparent item

Definition at line 182 of file PopupList.cpp.

Lancelot::PopupList::~PopupList ( )
virtual

Destroys Lancelot::PopupList.

Definition at line 194 of file PopupList.cpp.

Member Function Documentation

void Lancelot::PopupList::activated ( int  index)
signal
int Lancelot::PopupList::closeTimeout ( ) const
Returns
the timeout
void Lancelot::PopupList::enterEvent ( QEvent *  event)
protected

Definition at line 275 of file PopupList.cpp.

bool Lancelot::PopupList::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Definition at line 437 of file PopupList.cpp.

void Lancelot::PopupList::exec ( const QPoint &  p)

Pops out the list.

Parameters
ppop-up location

Definition at line 326 of file PopupList.cpp.

void Lancelot::PopupList::exec ( const QPoint &  p,
PopupList *  parent 
)
protected

Pops out the list.

Parameters
ppop-up location
parentparent list

Definition at line 356 of file PopupList.cpp.

void Lancelot::PopupList::hideEvent ( QHideEvent *  event)
protected

Definition at line 240 of file PopupList.cpp.

void Lancelot::PopupList::leaveEvent ( QEvent *  event)
protected

Definition at line 283 of file PopupList.cpp.

void Lancelot::PopupList::moveTo ( const QPoint &  p)
protected

Moves the list to the specified point.

Definition at line 421 of file PopupList.cpp.

PopupList * Lancelot::PopupList::parentList ( ) const
protected
Returns
the parent PopupList

Definition at line 448 of file PopupList.cpp.

void Lancelot::PopupList::setCloseTimeout ( int  timeout)

Sets the timer for auto-closing when the popup is not hovered.

Parameters
timeoutin milliseconds

Definition at line 255 of file PopupList.cpp.

void Lancelot::PopupList::setModel ( ActionListModel *  model)

Sets the model for the popup list.

You can use ActionTreeModel as well as ActionListModel

Definition at line 199 of file PopupList.cpp.

void Lancelot::PopupList::setSublevelOpenAction ( SublevelOpenAction  action)

Sets the action for opening a sublevel.

Parameters
actionnew action

Definition at line 270 of file PopupList.cpp.

void Lancelot::PopupList::showEvent ( QShowEvent *  event)
protected

Shows the widget.

Definition at line 226 of file PopupList.cpp.

SublevelOpenAction Lancelot::PopupList::sublevelOpenAction ( ) const
Returns
action for opening a sublevel
void Lancelot::PopupList::timerEvent ( QTimerEvent *  event)
protected

Definition at line 293 of file PopupList.cpp.

void Lancelot::PopupList::updateSize ( )
slot

Requests the PopupList to be resized depending on the number of items.

Definition at line 305 of file PopupList.cpp.

Property Documentation

int Lancelot::PopupList::closeTimeout
readwrite

Definition at line 44 of file PopupList.h.

PopupList::SublevelOpenAction Lancelot::PopupList::sublevelOpenAction
readwrite

Definition at line 45 of file PopupList.h.


The documentation for this class was generated from the following files:
  • PopupList.h
  • PopupList.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

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

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

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