summaryrefslogtreecommitdiffstats
path: root/examples/phonon
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-28 17:39:11 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-04-28 17:39:11 (GMT)
commit3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch)
tree58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/phonon
parentddb22795641253a026b72f752ebc769745dd41be (diff)
downloadQt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip
Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz
Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/phonon')
-rw-r--r--examples/phonon/capabilities/capabilities.desktop11
-rw-r--r--examples/phonon/capabilities/capabilities.pro11
-rw-r--r--examples/phonon/capabilities/main.cpp4
-rw-r--r--examples/phonon/capabilities/window.cpp52
-rw-r--r--examples/phonon/capabilities/window.h1
-rw-r--r--examples/phonon/phonon.pro1
-rw-r--r--examples/phonon/qmusicplayer/main.cpp4
-rw-r--r--examples/phonon/qmusicplayer/qmusicplayer.desktop11
-rw-r--r--examples/phonon/qmusicplayer/qmusicplayer.pro11
9 files changed, 90 insertions, 16 deletions
diff --git a/examples/phonon/capabilities/capabilities.desktop b/examples/phonon/capabilities/capabilities.desktop
new file mode 100644
index 0000000..e6e87d1
--- /dev/null
+++ b/examples/phonon/capabilities/capabilities.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Capabilities
+Exec=/opt/usr/bin/capabilities
+Icon=capabilities
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/phonon/capabilities/capabilities.pro b/examples/phonon/capabilities/capabilities.pro
index d05e5ec..82c895d 100644
--- a/examples/phonon/capabilities/capabilities.pro
+++ b/examples/phonon/capabilities/capabilities.pro
@@ -11,7 +11,14 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/capabilities
INSTALLS += target sources
wince*{
-DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
+ DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
}
-symbian:TARGET.UID3 = 0xA000CF69
+symbian {
+ TARGET.UID3 = 0xA000CF69
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
+
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/phonon/capabilities/main.cpp b/examples/phonon/capabilities/main.cpp
index 94e9cbc..37d0a77 100644
--- a/examples/phonon/capabilities/main.cpp
+++ b/examples/phonon/capabilities/main.cpp
@@ -49,7 +49,11 @@ int main(int argv, char **args)
app.setApplicationName("Phonon Capabilities Example");
Window window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#else
window.show();
+#endif
return app.exec();
}
diff --git a/examples/phonon/capabilities/window.cpp b/examples/phonon/capabilities/window.cpp
index 39ecf86..f532107 100644
--- a/examples/phonon/capabilities/window.cpp
+++ b/examples/phonon/capabilities/window.cpp
@@ -121,19 +121,43 @@ void Window::updateWidgets()
void Window::setupUi()
{
- setupBackendBox();
- QLayout *layout = new QVBoxLayout;
- layout->addWidget(backendBox);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ devicesListView = new QListView;
+ mimeListWidget = new QListWidget;
- setLayout(layout);
- setWindowTitle(tr("Backend Capabilities Example"));
-}
+ QStringList headerLabels;
+ headerLabels << tr("Type") << tr("Name") << tr("Description") <<
+ tr("Value Type") << tr("Default/Min/Max Values");
-void Window::setupBackendBox()
-{
- backendBox = new QGroupBox(tr("Backend Capabilities"));
+ effectsTreeWidget = new QTreeWidget;
+ effectsTreeWidget->setHeaderLabels(headerLabels);
+ effectsTreeWidget->setColumnCount(5);
+ QTabWidget *tabWidget = new QTabWidget;
+
+ QWidget *widgetDevices = new QWidget;
+ QVBoxLayout *devicesLayout = new QVBoxLayout;
+ devicesLayout->addWidget(devicesListView);
+ widgetDevices->setLayout(devicesLayout);
+
+ QWidget *widgetMimes = new QWidget;
+ QVBoxLayout *mimesLayout = new QVBoxLayout;
+ mimesLayout->addWidget(mimeListWidget);
+ widgetMimes->setLayout(mimesLayout);
+
+ QWidget *widgetEffects = new QWidget;
+ QVBoxLayout *effectsLayout = new QVBoxLayout;
+ effectsLayout->addWidget(effectsTreeWidget);
+ widgetEffects->setLayout(effectsLayout);
+
+ tabWidget->addTab(widgetDevices, tr("Audio Devices"));
+ tabWidget->addTab(widgetMimes, tr("MIME Types"));
+ tabWidget->addTab(widgetEffects, tr("Audio Effects"));
+
+ QLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
+#else
devicesLabel = new QLabel(tr("Available Audio Devices:"));
devicesListView = new QListView;
@@ -151,6 +175,7 @@ void Window::setupBackendBox()
effectsTreeWidget->setColumnCount(5);
QGridLayout *layout = new QGridLayout;
+
layout->addWidget(devicesLabel, 0, 0);
layout->addWidget(devicesListView, 1, 0);
layout->addWidget(mimeTypesLabel, 0, 1);
@@ -161,5 +186,12 @@ void Window::setupBackendBox()
backendBox = new QGroupBox(tr("Backend Capabilities"));
backendBox->setLayout(layout);
-}
+ QLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(backendBox);
+#endif
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Backend Capabilities Example"));
+
+}
diff --git a/examples/phonon/capabilities/window.h b/examples/phonon/capabilities/window.h
index ce4e7d3..9ef908f 100644
--- a/examples/phonon/capabilities/window.h
+++ b/examples/phonon/capabilities/window.h
@@ -78,7 +78,6 @@ private slots:
private:
void setupUi();
- void setupBackendBox();
QGroupBox *backendBox;
diff --git a/examples/phonon/phonon.pro b/examples/phonon/phonon.pro
index c6a0bff..f74bcc1 100644
--- a/examples/phonon/phonon.pro
+++ b/examples/phonon/phonon.pro
@@ -12,4 +12,3 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS phonon.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/phonon
INSTALLS += target sources
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/phonon/qmusicplayer/main.cpp b/examples/phonon/qmusicplayer/main.cpp
index 708135f..2c05692 100644
--- a/examples/phonon/qmusicplayer/main.cpp
+++ b/examples/phonon/qmusicplayer/main.cpp
@@ -49,7 +49,11 @@ int main(int argv, char **args)
app.setQuitOnLastWindowClosed(true);
MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#else
window.show();
+#endif
return app.exec();
}
diff --git a/examples/phonon/qmusicplayer/qmusicplayer.desktop b/examples/phonon/qmusicplayer/qmusicplayer.desktop
new file mode 100644
index 0000000..9ca0a19
--- /dev/null
+++ b/examples/phonon/qmusicplayer/qmusicplayer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Music Player
+Exec=/opt/usr/bin/qmusicplayer
+Icon=qmusicplayer
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/phonon/qmusicplayer/qmusicplayer.pro b/examples/phonon/qmusicplayer/qmusicplayer.pro
index 25ab7eb..bc18088 100644
--- a/examples/phonon/qmusicplayer/qmusicplayer.pro
+++ b/examples/phonon/qmusicplayer/qmusicplayer.pro
@@ -11,7 +11,14 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/phonon/qmusicplayer
INSTALLS += target sources
wince*{
-DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
+ DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout
}
-symbian:TARGET.UID3 = 0xA000CF6A
+symbian {
+ TARGET.UID3 = 0xA000CF6A
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
+
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+symbian: warning(This example might not fully work on Symbian platform)
+simulator: warning(This example might not fully work on Simulator platform)