Changeset View
Changeset View
Standalone View
Standalone View
src/kstatusnotifieritem.h
Show First 20 Lines • Show All 353 Lines • ▼ Show 20 Line(s) | 87 | public: | |||
---|---|---|---|---|---|
354 | 354 | | |||
355 | /** | 355 | /** | ||
356 | * Sets a new context menu for this StatusNotifierItem. | 356 | * Sets a new context menu for this StatusNotifierItem. | ||
357 | * the menu will be shown with a contextMenu(int,int) | 357 | * the menu will be shown with a contextMenu(int,int) | ||
358 | * call by the systemtray over D-Bus | 358 | * call by the systemtray over D-Bus | ||
359 | * usually you don't need to call this unless you want to use | 359 | * usually you don't need to call this unless you want to use | ||
360 | * a custom QMenu subclass as context menu. | 360 | * a custom QMenu subclass as context menu. | ||
361 | * | 361 | * | ||
362 | * The KStatusNotifierItem instance takes ownership of the menu, | 362 | * By default, the KStatusNotifierItem instance takes ownership | ||
363 | * and will delete it upon its destruction. | 363 | * of the menu, and will delete it upon its destruction. | ||
364 | * @param menu new context menu for this StatusNotifierItem | ||||
365 | * @param takeOwnership if it's true, KStatusNotifierItem will take | ||||
366 | * the ownership | ||||
364 | */ | 367 | */ | ||
365 | void setContextMenu(QMenu *menu); | 368 | void setContextMenu(QMenu *menu, bool takeOwnership = true); | ||
366 | 369 | | |||
367 | /** | 370 | /** | ||
368 | * Access the context menu associated to this status notifier item | 371 | * Access the context menu associated to this status notifier item | ||
369 | */ | 372 | */ | ||
370 | QMenu *contextMenu() const; | 373 | QMenu *contextMenu() const; | ||
371 | 374 | | |||
372 | /** | 375 | /** | ||
373 | * Sets the main widget associated with this StatusNotifierItem | 376 | * Sets the main widget associated with this StatusNotifierItem | ||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |