summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-09-15 12:12:08 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-09-15 14:05:53 (GMT)
commit56cec4cf9a8b04c979ced28cab89ce6232d4184a (patch)
treea9701f13161810d1e9bfbf7ef9cd8430a77580be /demos
parentf42f5c457b3368adb4c92e521dc56969f138bdd3 (diff)
downloadQt-56cec4cf9a8b04c979ced28cab89ce6232d4184a.zip
Qt-56cec4cf9a8b04c979ced28cab89ce6232d4184a.tar.gz
Qt-56cec4cf9a8b04c979ced28cab89ce6232d4184a.tar.bz2
QCursor support for Symbian OS
Reviewed-By: Jason Barron Reviewed-By: Alessandro Portale Summary: QT_NO_CURSOR is now not defined for symbian builds Existing QCursor APIs are all supported New public API, QApplication::setNavigationMode, to allow the navigation mode to be set. I.E. on an S60 3.2 phone, some applications will want a virtual mouse cursor (web browser), while others are designed for keypad navigation. Symbian HAL is used for detecting input capabilities. Fix DND, code cleanup & comment QCursor visibility now uses a refcount, and is called from DND and the setNavigationMode so they are both simpler and don't interfere with each other. QApplication::setNavigationMode New public API for configuring cursor/keypad navi style. This links in with ongoing work on the 4-way keypad navi branch, but 2-way and 4-way modes both act as 2-way mode until that is integrated Some of the demos/examples have cursor switched on (those that were not usable with keypad) Virtual mouse support for non touch, non mouse phones (tested on N78) add *.d and .metadata (carbide debug file / workspace dir) to .gitignore System pointers are unavailable when using sprite workaround, so the system cursor shapes are compiled into qtgui as resources. MAC port does this also for shapes that aren't standard on the MAC. Refactor Drag'n'Drop to use QCursor Add test case to check all system cursor shapes Simply a mainwindow containing a label widget for each cursor shape, with the cursor property set appropriately QCursor(QBitmap,QBitmap) supported Fixed problem with the image & mask being inverted when using the QCursor constructor that takes two mono bitmaps. add .make.cache files to .gitignore Correct implementation of QApplication::setOverrideCursor QApplication::restoreOverrideCursor and QApplication::setOverrideCursor are now working correctly on Symbian platform. Performance will be slower compared with other platforms, because the Symbian window server has a cursor associated with each native window. Add test case for custom cursors Create a pixmap cursor and associate it with a widget. No changes to production code, since test passed 1st time ;) Add manual test for QCursor Make cursor independent of construction order Updated to work around window server issue where contruction order affects what cursor is displayed in child windows. Also changed to effectiveWinId following review comments Also fixed a problem which would make qcursor not link if configured with QT_NO_CURSOR Moved some multiply declared extern functions from cpp to _p.h files Implemented Symbian versions of the cursor functions. Merged in work I'd done based on tower. Fill in bits of stub functions based on windows port Removed QT_NO_CURSOR from list of config options forced on symbian Recompiled configure.exe Added stub functions for the missing functions in s60 port
Diffstat (limited to 'demos')
-rw-r--r--demos/deform/main.cpp3
-rw-r--r--demos/embedded/anomaly/src/Main.cpp3
-rw-r--r--demos/embedded/embeddedsvgviewer/main.cpp3
-rw-r--r--demos/embedded/flightinfo/flightinfo.pro2
-rw-r--r--demos/embedded/lightmaps/lightmaps.pro2
-rw-r--r--demos/embedded/weatherinfo/weatherinfo.pro2
-rw-r--r--demos/pathstroke/main.cpp3
7 files changed, 15 insertions, 3 deletions
diff --git a/demos/deform/main.cpp b/demos/deform/main.cpp
index cb92a21..6110a76 100644
--- a/demos/deform/main.cpp
+++ b/demos/deform/main.cpp
@@ -68,5 +68,8 @@ int main(int argc, char **argv)
else
deformWidget.show();
+#ifdef QT_KEYPAD_NAVIGATION
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif
return app.exec();
}
diff --git a/demos/embedded/anomaly/src/Main.cpp b/demos/embedded/anomaly/src/Main.cpp
index f9610d3..cf32420 100644
--- a/demos/embedded/anomaly/src/Main.cpp
+++ b/demos/embedded/anomaly/src/Main.cpp
@@ -67,5 +67,8 @@ int main(int argc, char *argv[])
app.setStyle("windows");
#endif
+#ifdef QT_KEYPAD_NAVIGATION
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif
return app.exec();
}
diff --git a/demos/embedded/embeddedsvgviewer/main.cpp b/demos/embedded/embeddedsvgviewer/main.cpp
index 10c7d76..9c91fb7 100644
--- a/demos/embedded/embeddedsvgviewer/main.cpp
+++ b/demos/embedded/embeddedsvgviewer/main.cpp
@@ -64,5 +64,8 @@ int main(int argc, char** argv)
viewer.showFullScreen();
+#ifdef QT_KEYPAD_NAVIGATION
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif
return app.exec();
}
diff --git a/demos/embedded/flightinfo/flightinfo.pro b/demos/embedded/flightinfo/flightinfo.pro
index 461c701..2f36cb8 100644
--- a/demos/embedded/flightinfo/flightinfo.pro
+++ b/demos/embedded/flightinfo/flightinfo.pro
@@ -9,6 +9,6 @@ symbian {
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.UID3 = 0xA000CF74
HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h
- LIBS += -lesock -lconnmon
+ LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
}
diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro
index 137183a..d4168b1 100644
--- a/demos/embedded/lightmaps/lightmaps.pro
+++ b/demos/embedded/lightmaps/lightmaps.pro
@@ -6,7 +6,7 @@ symbian {
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.UID3 = 0xA000CF75
HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h
- LIBS += -lesock -lconnmon
+ LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
diff --git a/demos/embedded/weatherinfo/weatherinfo.pro b/demos/embedded/weatherinfo/weatherinfo.pro
index 0a579b0..7bff6e9 100644
--- a/demos/embedded/weatherinfo/weatherinfo.pro
+++ b/demos/embedded/weatherinfo/weatherinfo.pro
@@ -8,6 +8,6 @@ symbian {
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.UID3 = 0xA000CF77
HEADERS += $$QT_SOURCE_TREE/examples/network/ftp/sym_iap_util.h
- LIBS += -lesock -lconnmon
+ LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
}
diff --git a/demos/pathstroke/main.cpp b/demos/pathstroke/main.cpp
index 7c4ad83..60520f1 100644
--- a/demos/pathstroke/main.cpp
+++ b/demos/pathstroke/main.cpp
@@ -65,5 +65,8 @@ int main(int argc, char **argv)
else
pathStrokeWidget.show();
+#ifdef QT_KEYPAD_NAVIGATION
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif
return app.exec();
}