Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMediaMenu class provides a menu system for browsing media content. More...
#include <QMediaMenu>
Inherits QListView.
The QMediaMenu class provides a menu system for browsing media content.
The QMediaMenu class is useful for displaying media content filtered by Artist, Album, Genre etc.
QVBoxLayout* layout = new QVBoxLayout; QMediaPlaylist playlist(QContentFilter(QContent::Document)); medialist = new QMediaList(playlist); QMediaMenu* mainmenu = new QMediaMenu(); layout->addWidget(mainmenu); setLayout(layout); QMediaMenuItem* a = new QMediaMenuItem(new QIcon(":icon/mediaplayer/black/music"), QString("Music"), 0); mainmenu->add(a); a->add(new QMediaMenuItem(QMediaList::Artist, medialist)); a->add(new QMediaMenuItem(QMediaList::Album, medialist)); a->add(new QMediaMenuItem(QMediaList::Genre, medialist)); a->add(new QMediaMenuItem(QMediaList::Title, medialist)); QMediaMenuItem* b = new QMediaMenuItem(new QIcon(":icon/mediaplayer/black/videos"), QString("Videos"), medialist); mainmenu->add(b); QMediaMenuItem* c = (QMediaMenuItem*) new CustomMenuItem(new QIcon(":icon/mediaplayer/black/videos"), QString("Custom"), 0); mainmenu->add(c); mainmenu->resetMenu();
dataChanged() is emitted when display content changes see signals dataChanged()
Constructs a menu with parent
Constructs a menu
Add item to menu
Return current menu item
This signal is emitted when a selection has been made plist is a QMediaPlaylist containing the selection.
Updates data and display
Remove item from menu
Reset menu back to base menu
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |