summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorJani Hautakangas <ext-jani.hautakangas@nokia.com>2010-05-20 10:04:34 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2010-05-20 10:04:34 (GMT)
commit6fb92f77f6d6b5b685b8748a1a35ffbd7df8b76b (patch)
treeba9ec7bc61be5ae87bd93fa055c6fb628b3d8404 /tools/qml
parent98972c1b271de1292b4e46484fe689d62a8b8e62 (diff)
parente6557220bccbdbbc218dc9eab0eb426ba774435e (diff)
downloadQt-6fb92f77f6d6b5b685b8748a1a35ffbd7df8b76b.zip
Qt-6fb92f77f6d6b5b685b8748a1a35ffbd7df8b76b.tar.gz
Qt-6fb92f77f6d6b5b685b8748a1a35ffbd7df8b76b.tar.bz2
Merge branch '4.7' of scm.dev.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/Info_mac.plist2
-rw-r--r--tools/qml/content/Browser.qml6
-rw-r--r--tools/qml/main.cpp41
-rw-r--r--tools/qml/qml.icnsbin0 -> 196156 bytes
-rw-r--r--tools/qml/qml.pri8
-rw-r--r--tools/qml/qml.pro5
-rw-r--r--tools/qml/qmlruntime.cpp267
-rw-r--r--tools/qml/qmlruntime.h8
8 files changed, 47 insertions, 290 deletions
diff --git a/tools/qml/Info_mac.plist b/tools/qml/Info_mac.plist
index ce4ebe3..80ca6a3 100644
--- a/tools/qml/Info_mac.plist
+++ b/tools/qml/Info_mac.plist
@@ -2,6 +2,8 @@
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.1">
<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
<key>CFBundleIdentifier</key>
<string>com.nokia.qt.qml</string>
<key>CFBundlePackageType</key>
diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml
index 0912f58..c3a2cc0 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/content/Browser.qml
@@ -12,12 +12,12 @@ Rectangle {
FolderListModel {
id: folders1
nameFilters: [ "*.qml" ]
- folder: qmlViewerFolder
+ folder: qmlLauncherFolder
}
FolderListModel {
id: folders2
nameFilters: [ "*.qml" ]
- folder: qmlViewerFolder
+ folder: qmlLauncherFolder
}
SystemPalette { id: palette }
@@ -62,7 +62,7 @@ Rectangle {
if (folders.isFolder(index)) {
down(filePath);
} else {
- qmlViewer.launch(filePath);
+ qmlLauncher.launch(filePath);
}
}
width: root.width
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index fb687ac..380f5cc 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -86,7 +86,7 @@ QString warnings;
void showWarnings()
{
if (!warnings.isEmpty()) {
- QMessageBox::warning(0, QApplication::tr("Qt Declarative UI Runtime"), warnings);
+ QMessageBox::warning(0, QApplication::tr("Qt QML Launcher"), warnings);
}
}
@@ -118,10 +118,7 @@ void usage()
qWarning(" -frameless ............................... run with no window frame");
qWarning(" -maximized................................ run maximized");
qWarning(" -fullscreen............................... run fullscreen");
- qWarning(" -stayontop................................ keep viewer window on top");
- qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
- qWarning(" \"list\" for a list of built-ins");
- qWarning(" -resizeview .............................. resize the view, not the skin");
+ qWarning(" -stayontop................................ keep launcher window on top");
qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content");
qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view");
qWarning(" -qmlbrowser .............................. use a QML-based file browser");
@@ -160,9 +157,9 @@ void scriptOptsUsage()
qWarning(" testerror ................................ test 'error' property of root item on playback");
qWarning(" snapshot ................................. file being recorded is static,");
qWarning(" only one frame will be recorded or tested");
- qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion");
- qWarning(" exitonfailure ............................ immediately exit the viewer on script failure");
- qWarning(" saveonexit ............................... save recording on viewer exit");
+ qWarning(" exitoncomplete ........................... cleanly exit the launcher on script completion");
+ qWarning(" exitonfailure ............................ immediately exit the launcher on script failure");
+ qWarning(" saveonexit ............................... save recording on launcher exit");
qWarning(" ");
qWarning(" One of record, play or both must be specified.");
exit(1);
@@ -200,7 +197,7 @@ int main(int argc, char ** argv)
#endif
QApplication app(argc, argv);
- app.setApplicationName("QtQmlRuntime");
+ app.setApplicationName("QtQmlLauncher");
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
@@ -209,7 +206,6 @@ int main(int argc, char ** argv)
QDeclarativeFolderListModel::registerTypes();
bool frameless = false;
- bool resizeview = false;
QString fileName;
double fps = 0;
int autorecord_from = 0;
@@ -219,7 +215,6 @@ int main(int argc, char ** argv)
QStringList recordargs;
QStringList imports;
QStringList plugins;
- QString skin;
QString script;
QString scriptopts;
bool runScript = false;
@@ -231,6 +226,7 @@ int main(int argc, char ** argv)
bool stayOnTop = false;
bool maximized = false;
bool useNativeFileBrowser = true;
+ bool experimentalGestures = false;
WarningsConfig warningsConfig = DefaultWarnings;
bool sizeToView = true;
@@ -251,11 +247,6 @@ int main(int argc, char ** argv)
fullScreen = true;
} else if (arg == "-stayontop") {
stayOnTop = true;
- } else if (arg == "-skin") {
- if (lastArg) usage();
- skin = QString(argv[++i]);
- } else if (arg == "-resizeview") {
- resizeview = true;
} else if (arg == "-netcache") {
if (lastArg) usage();
cache = QString(argv[++i]).toInt();
@@ -284,7 +275,7 @@ int main(int argc, char ** argv)
if (lastArg) usage();
app.setStartDragDistance(QString(argv[++i]).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
- qWarning("Qt Qml Runtime version %s", QT_VERSION_STR);
+ qWarning("Qt QML Launcher version %s", QT_VERSION_STR);
exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();
@@ -334,6 +325,8 @@ int main(int argc, char ** argv)
sizeToView = false;
} else if (arg == "-sizerootobjecttoview") {
sizeToView = true;
+ } else if (arg == "-experimentalgestures") {
+ experimentalGestures = true;
} else if (arg[0] != '-') {
fileName = arg;
} else if (1 || arg == "-help") {
@@ -403,6 +396,9 @@ int main(int argc, char ** argv)
}
#endif
+ if (experimentalGestures)
+ viewer->enableExperimentalGestures();
+
foreach (QString lib, imports)
viewer->addLibraryPath(lib);
@@ -412,21 +408,10 @@ int main(int argc, char ** argv)
viewer->setNetworkCacheSize(cache);
viewer->setRecordFile(recordfile);
viewer->setSizeToView(sizeToView);
- if (resizeview)
- viewer->setScaleView();
if (fps>0)
viewer->setRecordRate(fps);
if (autorecord_to)
viewer->setAutoRecord(autorecord_from,autorecord_to);
- if (!skin.isEmpty()) {
- if (skin == "list") {
- foreach (QString s, viewer->builtinSkins())
- qWarning() << qPrintable(s);
- exit(0);
- } else {
- viewer->setSkin(skin);
- }
- }
if (devkeys)
viewer->setDeviceKeys(true);
viewer->setRecordDither(dither);
diff --git a/tools/qml/qml.icns b/tools/qml/qml.icns
new file mode 100644
index 0000000..c760516
--- /dev/null
+++ b/tools/qml/qml.icns
Binary files differ
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index d343c76..a2058c7 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -24,7 +24,11 @@ maemo5 {
} else {
SOURCES += $$PWD/deviceorientation.cpp
}
+
+symbian {
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
+ LIBS += -lesock -lcommdb -lconnmon -linsock
+}
+
FORMS = $$PWD/recopts.ui \
$$PWD/proxysettings.ui
-
-include(../shared/deviceskin/deviceskin.pri)
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index b33d48b..6129639 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -32,12 +32,11 @@ wince* {
symbian {
TARGET.UID3 = 0x20021317
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- LIBS += -lesock -lcommdb -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices ReadUserData
}
mac {
QMAKE_INFO_PLIST=Info_mac.plist
- TARGET=Qml
+ TARGET="QML Launcher"
+ ICON=qml.icns
}
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 06fa004..9700090 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -53,7 +53,6 @@
#include "qdeclarative.h"
#include <private/qabstractanimation_p.h>
#include <QAbstractAnimation>
-#include "deviceskin.h"
#include <QSettings>
#include <QXmlStreamReader>
@@ -168,89 +167,6 @@ private:
QWidget *refWidget;
};
-
-class PreviewDeviceSkin : public DeviceSkin
-{
- Q_OBJECT
-public:
- explicit PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent);
-
- void setPreview(QWidget *formWidget);
- void setPreviewAndScale(QWidget *formWidget);
-
- void setScreenSize(const QSize& size)
- {
- QMatrix fit;
- fit = fit.scale(qreal(size.width())/m_screenSize.width(),
- qreal(size.height())/m_screenSize.height());
- setTransform(fit);
- QApplication::syncX();
- }
-
- QSize standardScreenSize() const { return m_screenSize; }
-
- QMenu* menu;
-
-private slots:
- void slotSkinKeyPressEvent(int code, const QString& text, bool autorep);
- void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep);
- void slotPopupMenu();
-
-private:
- const QSize m_screenSize;
-};
-
-
-PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent) :
- DeviceSkin(parameters, parent),
- m_screenSize(parameters.screenSize())
-{
- menu = new QMenu(this);
- connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)),
- this, SLOT(slotSkinKeyPressEvent(int,QString,bool)));
- connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)),
- this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool)));
- connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu()));
-}
-
-void PreviewDeviceSkin::setPreview(QWidget *formWidget)
-{
- formWidget->setFixedSize(m_screenSize);
- formWidget->setParent(this, Qt::SubWindow);
- formWidget->setAutoFillBackground(true);
- setView(formWidget);
-}
-
-void PreviewDeviceSkin::setPreviewAndScale(QWidget *formWidget)
-{
- setScreenSize(formWidget->sizeHint());
- formWidget->setParent(this, Qt::SubWindow);
- formWidget->setAutoFillBackground(true);
- setView(formWidget);
-}
-
-void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep)
-{
- if (QWidget *focusWidget = QApplication::focusWidget()) {
- QKeyEvent e(QEvent::KeyPress,code,0,text,autorep);
- QApplication::sendEvent(focusWidget, &e);
- }
-
-}
-
-void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep)
-{
- if (QWidget *focusWidget = QApplication::focusWidget()) {
- QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep);
- QApplication::sendEvent(focusWidget, &e);
- }
-}
-
-void PreviewDeviceSkin::slotPopupMenu()
-{
- menu->exec(QCursor::pos());
-}
-
static struct { const char *name, *args; } ffmpegprofiles[] = {
{"Maximum Quality", "-sameq"},
{"High Quality", "-qmax 2"},
@@ -434,7 +350,7 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent)
setupProxy(manager);
if (cacheSize > 0) {
QNetworkDiskCache *cache = new QNetworkDiskCache;
- cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache"));
+ cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-launcher-network-cache"));
cache->setMaximumCacheSize(cacheSize);
manager->setCache(cache);
} else {
@@ -463,7 +379,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
: QWidget(parent, flags)
#endif
, loggerWindow(new LoggerWidget())
- , frame_stream(0), scaleSkin(true), mb(0)
+ , frame_stream(0), mb(0)
, portraitOrientation(0), landscapeOrientation(0)
, showWarningsWindow(0)
, m_scriptOptions(0)
@@ -472,10 +388,9 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
, translator(0)
{
QDeclarativeViewer::registerTypes();
- setWindowTitle(tr("Qt Qml Runtime"));
+ setWindowTitle(tr("Qt QML Launcher"));
devicemode = false;
- skin = 0;
canvas = 0;
record_autotime = 0;
record_rate = 50;
@@ -501,6 +416,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
}
canvas = new QDeclarativeView(this);
+
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
@@ -550,6 +466,16 @@ QDeclarativeViewer::~QDeclarativeViewer()
delete namFactory;
}
+void QDeclarativeViewer::enableExperimentalGestures()
+{
+ canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
+}
+
int QDeclarativeViewer::menuBarHeight() const
{
if (!(windowFlags() & Qt::FramelessWindowHint))
@@ -642,51 +568,6 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
if (flatmenu) flatmenu->addSeparator();
- QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin"));
-
- QActionGroup *skinActions;
- QAction *skinAction;
-
- skinActions = new QActionGroup(parent);
- skinAction = new QAction(tr("Scale skin"), parent);
- skinAction->setCheckable(true);
- skinAction->setChecked(scaleSkin);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleSkin()));
- skinAction = new QAction(tr("Resize view"), parent);
- skinAction->setCheckable(true);
- skinAction->setChecked(!scaleSkin);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleView()));
- skinMenu->addSeparator();
-
- skinActions = new QActionGroup(parent);
- QSignalMapper *mapper = new QSignalMapper(parent);
- skinAction = new QAction(tr("None"), parent);
- skinAction->setCheckable(true);
- if (currentSkin.isEmpty())
- skinAction->setChecked(true);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- mapper->setMapping(skinAction, "");
- connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
- skinMenu->addSeparator();
-
- foreach (QString name, builtinSkins()) {
- skinAction = new QAction(name, parent);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- skinAction->setCheckable(true);
- if (":skin/"+name+".skin" == currentSkin)
- skinAction->setChecked(true);
- mapper->setMapping(skinAction, name);
- connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
- }
- connect(mapper, SIGNAL(mapped(QString)), this, SLOT(setSkin(QString)));
-
- if (flatmenu) flatmenu->addSeparator();
#endif // Q_OS_SYMBIAN
QMenu *settingsMenu = flatmenu ? flatmenu : menu->addMenu(tr("S&ettings"));
@@ -802,31 +683,6 @@ void QDeclarativeViewer::warningsWidgetClosed()
showWarningsWindow->setChecked(false);
}
-void QDeclarativeViewer::setScaleSkin()
-{
- if (scaleSkin)
- return;
- scaleSkin = true;
- if (skin) {
- canvas->resize(initialSize);
- canvas->setFixedSize(initialSize);
- canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
- updateSizeHints();
- }
-}
-
-void QDeclarativeViewer::setScaleView()
-{
- if (!scaleSkin)
- return;
- scaleSkin = false;
- if (skin) {
- canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- updateSizeHints();
- }
-}
-
-
void QDeclarativeViewer::takeSnapShot()
{
static int snapshotcount = 1;
@@ -1031,7 +887,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url)
url = QUrl::fromLocalFile(fi.absoluteFilePath());
else
url = QUrl(file_or_url);
- setWindowTitle(tr("%1 - Qt Qml Runtime").arg(file_or_url));
+ setWindowTitle(tr("%1 - Qt QML Launcher").arg(file_or_url));
if (!m_script.isEmpty())
tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas);
@@ -1039,11 +895,11 @@ bool QDeclarativeViewer::open(const QString& file_or_url)
delete canvas->rootObject();
canvas->engine()->clearComponentCache();
QDeclarativeContext *ctxt = canvas->rootContext();
- ctxt->setContextProperty("qmlViewer", this);
+ ctxt->setContextProperty("qmlLauncher", this);
#ifdef Q_OS_SYMBIAN
- ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone
+ ctxt->setContextProperty("qmlLauncherFolder", "E:\\"); // Documents on your S60 phone
#else
- ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath());
+ ctxt->setContextProperty("qmlLauncherFolder", QDir::currentPath());
#endif
ctxt->setContextProperty("runtime", Runtime::instance());
@@ -1080,83 +936,6 @@ void QDeclarativeViewer::startNetwork()
#endif
}
-QStringList QDeclarativeViewer::builtinSkins() const
-{
- QDir dir(":/skins/","*.skin");
- const QFileInfoList l = dir.entryInfoList();
- QStringList r;
- for (QFileInfoList::const_iterator it = l.begin(); it != l.end(); ++it) {
- r += (*it).baseName();
- }
- return r;
-}
-
-void QDeclarativeViewer::setSkin(const QString& skinDirOrName)
-{
- QString skinDirectory = skinDirOrName;
-
- if (!QDir(skinDirOrName).exists() && QDir(":/skins/"+skinDirOrName+".skin").exists())
- skinDirectory = ":/skins/"+skinDirOrName+".skin";
-
- if (currentSkin == skinDirectory)
- return;
-
- currentSkin = skinDirectory;
-
- // XXX QWidget::setMask does not handle changes well, and we may
- // XXX have been signalled from an item in a menu we're replacing,
- // XXX hence some rather convoluted resetting here...
-
- QString err;
- if (skin) {
- skin->hide();
- skin->deleteLater();
- }
-
- DeviceSkinParameters parameters;
- if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) {
- layout()->setEnabled(false);
- if (mb)
- mb->hide();
- if (!err.isEmpty())
- qWarning() << err;
- skin = new PreviewDeviceSkin(parameters,this);
- if (scaleSkin)
- skin->setPreviewAndScale(canvas);
- else
- skin->setPreview(canvas);
- createMenu(0,skin->menu);
- if (scaleSkin) {
- canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
- }
- updateSizeHints();
- skin->show();
- } else if (skin) {
- skin = 0;
- clearMask();
- if ((windowFlags() & Qt::FramelessWindowHint)) {
- menuBar()->clear();
- createMenu(menuBar(),0);
- }
- canvas->setParent(this, Qt::SubWindow);
- setParent(0,windowFlags()); // recreate
- mb->show();
- canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- updateSizeHints();
-
- layout()->setEnabled(true);
- if (!scaleSkin) {
- canvas->resize(initialSize);
- canvas->setFixedSize(initialSize);
- }
- QSize newWindowSize = canvas->size();
- newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
- resize(newWindowSize);
- show();
- }
- canvas->show();
-}
-
void QDeclarativeViewer::setAutoRecord(int from, int to)
{
if (from==0) from=1; // ensure resized
@@ -1485,24 +1264,16 @@ void QDeclarativeViewer::updateSizeHints()
{
if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
QSize newWindowSize = canvas->sizeHint();
- if (!skin)
- newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
+ newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
if (!isFullScreen() && !isMaximized()) {
resize(newWindowSize);
setFixedSize(newWindowSize);
- if (skin && scaleSkin) {
- skin->setScreenSize(newWindowSize);
- }
}
} else { // QDeclarativeView::SizeRootObjectToView
canvas->setMinimumSize(QSize(0,0));
canvas->setMaximumSize(QSize(16777215,16777215));
setMinimumSize(QSize(0,0));
setMaximumSize(QSize(16777215,16777215));
- if (skin && !scaleSkin) {
- canvas->setFixedSize(skin->standardScreenSize());
- skin->setScreenSize(skin->standardScreenSize());
- }
}
updateGeometry();
}
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 9551090..0416b32 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -105,13 +105,14 @@ public:
void setUseNativeFileBrowser(bool);
void updateSizeHints();
void setSizeToView(bool sizeToView);
- QStringList builtinSkins() const;
QMenuBar *menuBar() const;
QDeclarativeView *view() const;
LoggerWidget *warningsWidget() const;
+ void enableExperimentalGestures();
+
public slots:
void sceneResized(QSize size);
bool open(const QString&);
@@ -121,10 +122,8 @@ public slots:
void toggleRecording();
void toggleRecordingWithSelection();
void ffmpegFinished(int code);
- void setSkin(const QString& skinDirectory);
void showProxySettings ();
void proxySettingsChanged ();
- void setScaleView();
void toggleOrientation();
void statusChanged();
void setSlowMode(bool);
@@ -141,7 +140,6 @@ private slots:
void recordFrame();
void chooseRecordingOptions();
void pickRecordingFile();
- void setScaleSkin();
void setPortrait();
void setLandscape();
void startNetwork();
@@ -157,8 +155,6 @@ private:
int menuBarHeight() const;
LoggerWidget *loggerWindow;
- PreviewDeviceSkin *skin;
- QSize skinscreensize;
QDeclarativeView *canvas;
QSize initialSize;
QString currentFileOrUrl;