Remove a few more obsolete parts.

Change-Id: I3a001f01ab7fd8cf63452126037b98c1b01df80d
Reviewed-on: http://codereview.qt.nokia.com/1797
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
Michael Goddard
2011-07-19 10:40:05 +10:00
committed by Qt by Nokia
parent 1403a1c7be
commit eccb43d73c
100 changed files with 50 additions and 8051 deletions

View File

@@ -10,10 +10,6 @@ SOURCES = audiodevices.cpp \
FORMS += audiodevicesbase.ui
symbian {
TARGET.CAPABILITY = UserEnvironment WriteDeviceData ReadDeviceData
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiodevices
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiodevices

View File

@@ -48,11 +48,7 @@ int main(int argv, char **args)
app.setApplicationName("Audio Device Test");
AudioTest audio;
#ifdef Q_OS_SYMBIAN
audio.showMaximized();
#else
audio.show();
#endif
return app.exec();
}

View File

@@ -46,7 +46,7 @@
#include "audiorecorder.h"
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(SYMBIAN_S60_3X)
#if defined(Q_WS_MAEMO_6)
#include "ui_audiorecorder_small.h"
#else
#include "ui_audiorecorder.h"

View File

@@ -12,15 +12,9 @@ SOURCES = \
maemo*: {
FORMS += audiorecorder_small.ui
}else:symbian:contains(S60_VERSION, 3.2)|contains(S60_VERSION, 3.1){
DEFINES += SYMBIAN_S60_3X
FORMS += audiorecorder_small.ui
}else {
FORMS += audiorecorder.ui
}
symbian: {
TARGET.CAPABILITY = UserEnvironment ReadDeviceData WriteDeviceData
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiorecorder
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro

View File

@@ -47,11 +47,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
AudioRecorder recorder;
#ifdef Q_OS_SYMBIAN
recorder.showMaximized();
#else
recorder.show();
#endif
return app.exec();
};

View File

@@ -53,7 +53,7 @@
#include <QtGui>
#if (defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)) && QT_VERSION >= 0x040700
#if (defined(Q_WS_MAEMO_6)) && QT_VERSION >= 0x040700
#define HAVE_CAMERA_BUTTONS
#endif

View File

@@ -19,13 +19,6 @@ FORMS += \
videosettings.ui \
imagesettings.ui
symbian {
include(camerakeyevent_symbian/camerakeyevent_symbian.pri)
TARGET.CAPABILITY += UserEnvironment WriteUserData ReadUserData
TARGET.EPOCHEAPSIZE = 0x20000 0x3000000
LIBS += -lavkon -leiksrv -lcone -leikcore
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/camera
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/camera

View File

@@ -1,101 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "camerakeyevent_symbian.h"
#include <QtGui/QWidget> // WId
#include <eikon.hrh> // EKeyCamera
#include <coecntrl.h> // CCoeControl (WId)
#include <w32std.h> // RWindowbase, RWindowGroup, RWsSession
QSymbianCameraKeyListener::QSymbianCameraKeyListener(QWidget *widget):
QObject(widget),
m_widget(widget)
{
if (!m_widget)
return;
// Get view's native Symbian window
WId windowId = 0;
if (m_widget->internalWinId())
windowId = m_widget->internalWinId();
else if (m_widget->parentWidget() && m_widget->effectiveWinId())
windowId = m_widget->effectiveWinId();
RWindowBase *window = windowId ? static_cast<RWindowBase*>(windowId->DrawableWindow()) : 0;
// Get hold of the window group
TInt wGroupId = window ? window->WindowGroupId() : 0;
if (!wGroupId)
return;
RWsSession &wsSession = CCoeEnv::Static()->WsSession();
TUint wGroupHandle = wsSession.GetWindowGroupHandle(wGroupId);
if (wGroupHandle) {
RWindowGroup wGroup(wsSession);
wGroup.Construct(wGroupHandle);
if (wGroup.CaptureKey(EKeyCamera, 0, 0, 100) < 0)
qWarning("Unable to register for camera capture key events, SwEvent capability may be missing");
}
}
QSymbianCameraKeyListener::~QSymbianCameraKeyListener()
{
if (!m_widget)
return;
// Get view's native Symbian window
WId windowId = 0;
if (m_widget->internalWinId())
windowId = m_widget->internalWinId();
else if (m_widget->parentWidget() && m_widget->effectiveWinId())
windowId = m_widget->effectiveWinId();
RWindowBase *window = windowId ? static_cast<RWindowBase*>(windowId->DrawableWindow()) : 0;
// Get hold of the window group
TInt wGroupId = window ? window->WindowGroupId() : 0;
if (!wGroupId)
return;
RWsSession &wsSession = CCoeEnv::Static()->WsSession();
TUint wGroupHandle = wsSession.GetWindowGroupHandle(wGroupId);
if (wGroupHandle) {
RWindowGroup wGroup(wsSession);
wGroup.Construct(wGroupHandle);
wGroup.CancelCaptureKey(EKeyCamera);
}
}

View File

@@ -1,87 +0,0 @@
#ifndef CAMERAKEYEVENT_SYMBIAN_H
#define CAMERAKEYEVENT_SYMBIAN_H
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
/*
* Description:
* This header can be used to register application on Symbian platforms
* for the Camera capture button key events. Application can avoid native
* camera application from starting by not forwarding the key event.
*
* Usage:
* Application needs to include this header and include the needed Symbian
* libraries. Optionally application can include camerakeyevent_symbian.pri
* file. Application can register and unregister for the Camera capture
* key events by creating/destructing the QSymbianCameraKeyListener helper
* object. The widget needs to be shown before it registers for the
* Camera key event.
*
* Libraries needed:
* User needs to define following in the .pro file (or optionally include
* the camerakeyevent_symbian.pri):
* LIBS += -lcone -lws32
*
* Symbian Capabilities needed:
* To use this header user needs to have SwEvent capability (included in
* the camerakeyevent_symbian.pri):
* TARGET.CAPABILITY += SwEvent
*/
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
QT_FORWARD_DECLARE_CLASS(QWidget)
QT_END_NAMESPACE
QT_USE_NAMESPACE
class QSymbianCameraKeyListener : public QObject
{
Q_OBJECT
public:
QSymbianCameraKeyListener(QWidget *parent = 0);
~QSymbianCameraKeyListener();
private:
QWidget *m_widget;
};
#endif // CAMERAKEYEVENT_SYMBIAN_H

View File

@@ -1,7 +0,0 @@
message("camerakeyevent_symbian: Including Symbian camera capture key event register methods")
HEADERS += $$PWD/camerakeyevent_symbian.h
SOURCES += $$PWD/camerakeyevent_symbian.cpp
INCLUDEPATH += $$PWD
LIBS *= -lcone -lws32
TARGET.CAPABILITY *= SwEvent

View File

@@ -39,34 +39,15 @@
****************************************************************************/
#include "camera.h"
#ifdef Q_OS_SYMBIAN
#include "camerakeyevent_symbian.h"
#endif // Q_OS_SYMBIAN
#include <QtGui>
int main(int argc, char *argv[])
{
#if defined (Q_OS_SYMBIAN)
QApplication::setGraphicsSystem("raster");
QApplication app(argc, argv);
// lock orientation before constructing camera
CAknAppUi* appUi = dynamic_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi());
if(appUi){
QT_TRAP_THROWING(appUi ->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape));
}
#else
QApplication app(argc, argv);
#endif
Camera camera;
#ifdef Q_OS_SYMBIAN
camera.showMaximized();
new QSymbianCameraKeyListener(&camera);
#else
camera.show();
#endif
return app.exec();
};

View File

@@ -1,101 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
#include "camerakeyevent_symbian.h"
#include <QtGui/QWidget> // WId
#include <eikon.hrh> // EKeyCamera
#include <coecntrl.h> // CCoeControl (WId)
#include <w32std.h> // RWindowbase, RWindowGroup, RWsSession
QSymbianCameraKeyListener::QSymbianCameraKeyListener(QWidget *widget):
QObject(widget),
m_widget(widget)
{
if (!m_widget)
return;
// Get view's native Symbian window
WId windowId = 0;
if (m_widget->internalWinId())
windowId = m_widget->internalWinId();
else if (m_widget->parentWidget() && m_widget->effectiveWinId())
windowId = m_widget->effectiveWinId();
RWindowBase *window = windowId ? static_cast<RWindowBase*>(windowId->DrawableWindow()) : 0;
// Get hold of the window group
TInt wGroupId = window ? window->WindowGroupId() : 0;
if (!wGroupId)
return;
RWsSession &wsSession = CCoeEnv::Static()->WsSession();
TUint wGroupHandle = wsSession.GetWindowGroupHandle(wGroupId);
if (wGroupHandle) {
RWindowGroup wGroup(wsSession);
wGroup.Construct(wGroupHandle);
if (wGroup.CaptureKey(EKeyCamera, 0, 0, 100) < 0)
qWarning("Unable to register for camera capture key events, SwEvent capability may be missing");
}
}
QSymbianCameraKeyListener::~QSymbianCameraKeyListener()
{
if (!m_widget)
return;
// Get view's native Symbian window
WId windowId = 0;
if (m_widget->internalWinId())
windowId = m_widget->internalWinId();
else if (m_widget->parentWidget() && m_widget->effectiveWinId())
windowId = m_widget->effectiveWinId();
RWindowBase *window = windowId ? static_cast<RWindowBase*>(windowId->DrawableWindow()) : 0;
// Get hold of the window group
TInt wGroupId = window ? window->WindowGroupId() : 0;
if (!wGroupId)
return;
RWsSession &wsSession = CCoeEnv::Static()->WsSession();
TUint wGroupHandle = wsSession.GetWindowGroupHandle(wGroupId);
if (wGroupHandle) {
RWindowGroup wGroup(wsSession);
wGroup.Construct(wGroupHandle);
wGroup.CancelCaptureKey(EKeyCamera);
}
}

View File

@@ -1,87 +0,0 @@
#ifndef CAMERAKEYEVENT_SYMBIAN_H
#define CAMERAKEYEVENT_SYMBIAN_H
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
/*
* Description:
* This header can be used to register application on Symbian platforms
* for the Camera capture button key events. Application can avoid native
* camera application from starting by not forwarding the key event.
*
* Usage:
* Application needs to include this header and include the needed Symbian
* libraries. Optionally application can include camerakeyevent_symbian.pri
* file. Application can register and unregister for the Camera capture
* key events by creating/destructing the QSymbianCameraKeyListener helper
* object. The widget needs to be shown before it registers for the
* Camera key event.
*
* Libraries needed:
* User needs to define following in the .pro file (or optionally include
* the camerakeyevent_symbian.pri):
* LIBS += -lcone -lws32
*
* Symbian Capabilities needed:
* To use this header user needs to have SwEvent capability (included in
* the camerakeyevent_symbian.pri):
* TARGET.CAPABILITY += SwEvent
*/
#include <QtCore/QObject>
QT_BEGIN_NAMESPACE
QT_FORWARD_DECLARE_CLASS(QWidget)
QT_END_NAMESPACE
QT_USE_NAMESPACE
class QSymbianCameraKeyListener : public QObject
{
Q_OBJECT
public:
QSymbianCameraKeyListener(QWidget *parent = 0);
~QSymbianCameraKeyListener();
private:
QWidget *m_widget;
};
#endif // CAMERAKEYEVENT_SYMBIAN_H

View File

@@ -1,7 +0,0 @@
message("camerakeyevent_symbian: Including Symbian camera capture key event register methods")
HEADERS += $$PWD/camerakeyevent_symbian.h
SOURCES += $$PWD/camerakeyevent_symbian.cpp
INCLUDEPATH += $$PWD
LIBS *= -lcone -lws32
TARGET.CAPABILITY *= SwEvent

View File

@@ -3,10 +3,8 @@ TEMPLATE=app
QT += declarative qtquick1 network multimediakit
!maemo5 {
contains(QT_CONFIG, opengl) {
QT += opengl
}
contains(QT_CONFIG, opengl) {
QT += opengl
}
SOURCES += $$PWD/qmlcamera.cpp
@@ -15,13 +13,6 @@ else:TARGET = QmlCamera
RESOURCES += declarative-camera.qrc
symbian {
include(camerakeyevent_symbian/camerakeyevent_symbian.pri)
load(data_caging_paths)
TARGET.CAPABILITY += UserEnvironment NetworkServices Location ReadUserData WriteUserData
TARGET.EPOCHEAPSIZE = 0x20000 0x3000000
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/qml_camera
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/qml_camera

View File

@@ -47,14 +47,10 @@
#include <QtOpenGL/QGLWidget>
#endif
#ifdef Q_OS_SYMBIAN
#include "camerakeyevent_symbian.h"
#endif // Q_OS_SYMBIAN
int main(int argc, char *argv[])
{
#if defined (Q_WS_X11) || defined (Q_WS_MAC) || defined (Q_OS_SYMBIAN)
#if defined (Q_WS_X11) || defined (Q_WS_MAC)
//### default to using raster graphics backend for now
bool gsSpecified = false;
for (int i = 0; i < argc; ++i) {
@@ -72,7 +68,7 @@ int main(int argc, char *argv[])
QApplication application(argc, argv);
const QString mainQmlApp = QLatin1String("qrc:/declarative-camera.qml");
QDeclarativeView view;
#if !defined(QT_NO_OPENGL) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_S60)
#if !defined(QT_NO_OPENGL)
view.setViewport(new QGLWidget);
#endif
view.setSource(QUrl(mainQmlApp));
@@ -80,12 +76,9 @@ int main(int argc, char *argv[])
// Qt.quit() called in embedded .qml by default only emits
// quit() signal, so do this (optionally use Qt.exit()).
QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
#if defined(Q_WS_MAEMO_6)
view.setGeometry(application.desktop()->screenGeometry());
view.showFullScreen();
#ifdef Q_OS_SYMBIAN
new QSymbianCameraKeyListener(&view);
#endif // Q_OS_SYMBIAN
#else
view.setGeometry(QRect(100, 100, 800, 480));
view.show();

View File

@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
Player player;
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
#if defined(Q_WS_SIMULATOR)
# if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 2))
player.setAttribute(Qt::WA_LockLandscapeOrientation);
# else

View File

@@ -182,14 +182,7 @@ Player::~Player()
void Player::open()
{
#ifdef Q_WS_MAEMO_5
QStringList fileNames;
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Files"), "/");
if (!fileName.isEmpty())
fileNames << fileName;
#else
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Files"));
#endif
addToPlaylist(fileNames);
}
@@ -405,25 +398,16 @@ void Player::showColorDialog()
connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setSaturation(int)));
connect(videoWidget, SIGNAL(saturationChanged(int)), saturationSlider, SLOT(setValue(int)));
#if defined(Q_OS_SYMBIAN)
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
#endif
QFormLayout *layout = new QFormLayout;
layout->addRow(tr("Brightness"), brightnessSlider);
layout->addRow(tr("Contrast"), contrastSlider);
layout->addRow(tr("Hue"), hueSlider);
layout->addRow(tr("Saturation"), saturationSlider);
#if defined(Q_OS_SYMBIAN)
layout->addWidget(buttonBox);
#endif
QPushButton *button = new QPushButton(tr("Close"));
layout->addRow(button);
colorDialog = new QDialog(this);
#if defined(Q_OS_SYMBIAN)
connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), colorDialog, SLOT(hide()));
#endif
colorDialog->setWindowTitle(tr("Color Options"));
colorDialog->setLayout(layout);

View File

@@ -22,11 +22,6 @@ maemo* {
DEFINES += PLAYER_NO_COLOROPTIONS
}
symbian {
LIBS += -lavkon -lcone -leikcore
TARGET.CAPABILITY = ReadUserData
}
#install
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/player
sources.files = $$SOURCES $HEADERS $$RESOURCES $$FORMS *.pro

View File

@@ -84,7 +84,6 @@ PlayerControls::PlayerControls(QWidget *parent)
connect(muteButton, SIGNAL(clicked()), this, SLOT(muteClicked()));
#ifndef Q_WS_MAEMO_5
volumeSlider = new QSlider(Qt::Horizontal, this);
volumeSlider->setRange(0, 100);
@@ -98,7 +97,6 @@ PlayerControls::PlayerControls(QWidget *parent)
rateBox->setCurrentIndex(1);
connect(rateBox, SIGNAL(activated(int)), SLOT(updateRate()));
#endif
QBoxLayout *layout = new QHBoxLayout;
layout->setMargin(0);

View File

@@ -56,11 +56,6 @@ VideoWidget::VideoWidget(QWidget *parent)
void VideoWidget::keyPressEvent(QKeyEvent *event)
{
#ifdef Q_OS_SYMBIAN
if (isFullScreen())
setFullScreen(false);
#endif
if (event->key() == Qt::Key_Escape && isFullScreen()) {
showNormal();
@@ -83,13 +78,6 @@ void VideoWidget::mouseDoubleClickEvent(QMouseEvent *event)
void VideoWidget::mousePressEvent(QMouseEvent *event)
{
#ifdef Q_WS_MAEMO_5
if (isFullScreen())
setFullScreen(false);
event->accept();
#else
QVideoWidget::mousePressEvent(event);
#endif
}

View File

@@ -47,11 +47,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
Radio radio;
#ifdef Q_OS_SYMBIAN
radio.showMaximized();
#else
radio.show();
#endif
return app.exec();
};

View File

@@ -55,9 +55,6 @@ Radio::Radio()
QWidget *window = new QWidget;
QVBoxLayout* layout = new QVBoxLayout;
QHBoxLayout* buttonBar = new QHBoxLayout;
#if defined Q_OS_SYMBIAN // this is so that we can see all buttons also in 3.1 devices, where the screens are smaller..
QHBoxLayout* buttonBar2 = new QHBoxLayout;
#endif
QHBoxLayout* topBar = new QHBoxLayout;
layout->addLayout(topBar);
@@ -72,22 +69,13 @@ Radio::Radio()
else
signal->setText(tr("No radio found"));
topBar->addWidget(signal);
#if defined Q_WS_MAEMO_5
QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
topBar->addItem(spacer);
volumeSlider = new QSlider(Qt::Horizontal,this);
#else
volumeSlider = new QSlider(Qt::Vertical,this);
#endif
volumeSlider->setRange(0,100);
volumeSlider->setValue(50);
connect(volumeSlider,SIGNAL(valueChanged(int)),this,SLOT(updateVolume(int)));
topBar->addWidget(volumeSlider);
layout->addLayout(buttonBar);
#if defined Q_OS_SYMBIAN
layout->addLayout(buttonBar2);
#endif
searchLeft = new QPushButton;
searchLeft->setText(tr("scan Down"));
@@ -97,20 +85,12 @@ Radio::Radio()
left = new QPushButton;
left->setText(tr("Freq Down"));
connect(left,SIGNAL(clicked()),SLOT(freqDown()));
#if defined Q_OS_SYMBIAN
buttonBar2->addWidget(left);
#else
buttonBar->addWidget(left);
#endif
right = new QPushButton;
connect(right,SIGNAL(clicked()),SLOT(freqUp()));
right->setText(tr("Freq Up"));
#if defined Q_OS_SYMBIAN
buttonBar2->addWidget(right);
#else
buttonBar->addWidget(right);
#endif
searchRight = new QPushButton;
searchRight->setText(tr("scan Up"));

View File

@@ -10,10 +10,6 @@ SOURCES = \
main.cpp \
radio.cpp
symbian: {
TARGET.CAPABILITY = UserEnvironment WriteDeviceData ReadDeviceData SwEvent
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/radio
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/radio

View File

@@ -47,11 +47,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
SlideShow slideShow;
#ifdef Q_OS_SYMBIAN
slideShow.showMaximized();
#else
slideShow.show();
#endif
return app.exec();
}

View File

@@ -10,11 +10,6 @@ SOURCES = \
main.cpp \
slideshow.cpp
symbian {
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x3000000
}
target.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/slideshow
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/slideshow

View File

@@ -31,16 +31,10 @@ SOURCES += fftreal_wrapper.cpp
DEFINES += FFTREAL_LIBRARY
symbian {
# Provide unique ID for the generated binary, required by Symbian OS
TARGET.UID3 = 0xA000E403
TARGET.CAPABILITY = UserEnvironment
}
macx {
CONFIG += lib_bundle
} else {
!symbian: DESTDIR = ../..$${spectrum_build_dir}
DESTDIR = ../..$${spectrum_build_dir}
}
# Install

View File

@@ -44,30 +44,15 @@ INCLUDEPATH += $${fftreal_dir}
RESOURCES = spectrum.qrc
symbian {
# Platform security capability required to record audio on Symbian
TARGET.CAPABILITY = UserEnvironment
# Provide unique ID for the generated binary, required by Symbian OS
TARGET.UID3 = 0xA000E402
}
# Dynamic linkage against FFTReal DLL
!contains(DEFINES, DISABLE_FFT) {
symbian {
# Must explicitly add the .dll suffix to ensure dynamic linkage
LIBS += -lfftreal.dll
QMAKE_LIBDIR += $${fftreal_dir}
macx {
# Link to fftreal framework
LIBS += -F$${fftreal_dir}
LIBS += -framework fftreal
} else {
macx {
# Link to fftreal framework
LIBS += -F$${fftreal_dir}
LIBS += -framework fftreal
} else {
LIBS += -L..$${spectrum_build_dir}
LIBS += -lfftreal
}
LIBS += -L..$${spectrum_build_dir}
LIBS += -lfftreal
}
}
@@ -81,37 +66,26 @@ INSTALLS += sources images
# Deployment
symbian {
CONFIG += qt_demo
DESTDIR = ..$${spectrum_build_dir}
macx {
!contains(DEFINES, DISABLE_FFT) {
# Include FFTReal DLL in the SIS file
fftreal.files = ../fftreal.dll
fftreal.path = !:/sys/bin
DEPLOYMENT += fftreal
# Relocate fftreal.framework into spectrum.app bundle
framework_dir = ../spectrum.app/Contents/Frameworks
framework_name = fftreal.framework/Versions/1/fftreal
QMAKE_POST_LINK = \
mkdir -p $${framework_dir} &&\
rm -rf $${framework_dir}/fftreal.framework &&\
cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
$${framework_dir}/$${framework_name} &&\
install_name_tool -change $${framework_name} \
@executable_path/../Frameworks/$${framework_name} \
../spectrum.app/Contents/MacOS/spectrum
}
} else {
DESTDIR = ..$${spectrum_build_dir}
macx {
!contains(DEFINES, DISABLE_FFT) {
# Relocate fftreal.framework into spectrum.app bundle
framework_dir = ../spectrum.app/Contents/Frameworks
framework_name = fftreal.framework/Versions/1/fftreal
QMAKE_POST_LINK = \
mkdir -p $${framework_dir} &&\
rm -rf $${framework_dir}/fftreal.framework &&\
cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
$${framework_dir}/$${framework_name} &&\
install_name_tool -change $${framework_name} \
@executable_path/../Frameworks/$${framework_name} \
../spectrum.app/Contents/MacOS/spectrum
}
} else {
linux-g++*: {
# Provide relative path from application to fftreal library
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
}
linux-g++*: {
# Provide relative path from application to fftreal library
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
}
}

View File

@@ -47,11 +47,7 @@ int main(int argc, char **argv)
app.setApplicationName("QtMultimediaKit spectrum analyzer");
MainWidget w;
#ifdef Q_OS_SYMBIAN
w.showMaximized();
#else
w.show();
#endif
return app.exec();
}

View File

@@ -149,12 +149,7 @@ void MainWidget::infoMessage(const QString &message, int timeoutMs)
void MainWidget::errorMessage(const QString &heading, const QString &detail)
{
#ifdef Q_OS_SYMBIAN
const QString message = heading + "\n" + detail;
QMessageBox::warning(this, "", message, QMessageBox::Close);
#else
QMessageBox::warning(this, heading, detail, QMessageBox::Close);
#endif
}
void MainWidget::timerEvent(QTimerEvent *event)

View File

@@ -13,15 +13,6 @@ SUBDIRS += app
TARGET = spectrum
symbian {
# Create a 'make sis' rule which can be run from the top-level
CONFIG += qt_demo
# UID for the SIS file
TARGET.UID3 = 0xA000E402
}
sources.files = README.txt spectrum.pri spectrum.pro TODO.txt
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/spectrum
INSTALLS += sources

View File

@@ -3,7 +3,7 @@ TARGET = videographicsitem
QT += multimediakit
!symbian:contains(QT_CONFIG, opengl): QT += opengl
contains(QT_CONFIG, opengl): QT += opengl
HEADERS += videoplayer.h \
videoitem.h

View File

@@ -44,7 +44,7 @@
#include <QtGui>
#include <qvideosurfaceformat.h>
#if !defined(QT_NO_OPENGL) && !defined(Q_OS_SYMBIAN)
#if !defined(QT_NO_OPENGL)
# include <QtOpenGL/QGLWidget>
#endif
@@ -60,7 +60,7 @@ VideoPlayer::VideoPlayer(QWidget *parent, Qt::WindowFlags flags)
QGraphicsScene *scene = new QGraphicsScene(this);
QGraphicsView *graphicsView = new QGraphicsView(scene);
#if !defined(QT_NO_OPENGL) && !defined(Q_OS_SYMBIAN)
#if !defined(QT_NO_OPENGL)
graphicsView->setViewport(new QGLWidget);
#endif