liblancelot
#include <PopupList.h>
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.
Definition at line 41 of file PopupList.h.
Member Enumeration Documentation
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
|
explicit |
Creates a new Lancelot::PopupList.
- Parameters
-
parent parent item
Definition at line 182 of file PopupList.cpp.
|
virtual |
Destroys Lancelot::PopupList.
Definition at line 194 of file PopupList.cpp.
Member Function Documentation
|
signal |
int Lancelot::PopupList::closeTimeout | ( | ) | const |
- Returns
- the timeout
|
protected |
Definition at line 275 of file PopupList.cpp.
Definition at line 437 of file PopupList.cpp.
void Lancelot::PopupList::exec | ( | const QPoint & | p | ) |
Pops out the list.
- Parameters
-
p pop-up location parent parent list
Definition at line 356 of file PopupList.cpp.
|
protected |
Definition at line 240 of file PopupList.cpp.
|
protected |
Definition at line 283 of file PopupList.cpp.
|
protected |
Moves the list to the specified point.
Definition at line 421 of file PopupList.cpp.
|
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
-
timeout in 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
-
action new action
Definition at line 270 of file PopupList.cpp.
|
protected |
Shows the widget.
Definition at line 226 of file PopupList.cpp.
SublevelOpenAction Lancelot::PopupList::sublevelOpenAction | ( | ) | const |
- Returns
- action for opening a sublevel
|
protected |
Definition at line 293 of file PopupList.cpp.
|
slot |
Requests the PopupList to be resized depending on the number of items.
Definition at line 305 of file PopupList.cpp.
Property Documentation
|
readwrite |
Definition at line 44 of file PopupList.h.
|
readwrite |
Definition at line 45 of file PopupList.h.
The documentation for this class was generated from the following files:
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.