summaryrefslogtreecommitdiffstats
path: root/demos/qtdemo
diff options
context:
space:
mode:
Diffstat (limited to 'demos/qtdemo')
-rw-r--r--demos/qtdemo/colors.cpp31
-rw-r--r--demos/qtdemo/colors.h4
-rw-r--r--demos/qtdemo/mainwindow.cpp15
-rw-r--r--demos/qtdemo/qtdemo.pro4
-rw-r--r--demos/qtdemo/qtdemo.rc30
-rw-r--r--demos/qtdemo/xml/examples.xml23
6 files changed, 67 insertions, 40 deletions
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index f98ec57..e63417c 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -72,10 +72,8 @@ int Colors::contentHeight = 510;
// Properties:
bool Colors::openGlRendering = false;
-bool Colors::direct3dRendering = false;
bool Colors::softwareRendering = false;
-bool Colors::openGlAwailable = true;
-bool Colors::direct3dAwailable = true;
+bool Colors::openGlAvailable = true;
bool Colors::xRenderPresent = true;
bool Colors::noTicker = false;
@@ -206,8 +204,6 @@ void Colors::parseArgs(int argc, char *argv[])
QString s(argv[i]);
if (s == "-opengl")
Colors::openGlRendering = true;
- else if (s == "-direct3d")
- Colors::direct3dRendering = true;
else if (s == "-software")
Colors::softwareRendering = true;
else if (s == "-no-opengl") // support old style
@@ -270,7 +266,7 @@ void Colors::parseArgs(int argc, char *argv[])
Colors::fps = int(parseFloat(s, "-fps"));
else if (s.startsWith("-h") || s.startsWith("-help")){
QMessageBox::warning(0, "Arguments",
- QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-direct3d] [-software] [-fullscreen] [-ticker[0|1]] ")
+ QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
+ "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ "[-use-window-mask] [-no-rescale] "
+ "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
@@ -290,7 +286,6 @@ void Colors::parseArgs(int argc, char *argv[])
void Colors::setLowSettings()
{
Colors::openGlRendering = false;
- Colors::direct3dRendering = false;
Colors::softwareRendering = true;
Colors::noTicker = true;
Colors::noTimerUpdate = true;
@@ -325,15 +320,11 @@ void Colors::detectSystemResources()
qDebug() << "- OpenGL not supported by current build of Qt";
#endif
{
- Colors::openGlAwailable = false;
+ Colors::openGlAvailable = false;
if (Colors::verbose)
qDebug("- OpenGL not recommended on this system");
}
-#if defined(Q_WS_WIN)
- Colors::direct3dAwailable = false; // for now.
-#endif
-
#if defined(Q_WS_X11)
// check if X render is present:
QPixmap tmp(1, 1);
@@ -369,21 +360,9 @@ void Colors::postConfigure()
}
}
-#if !defined(Q_WS_WIN)
- if (Colors::direct3dRendering){
- Colors::direct3dRendering = false;
- qDebug() << "- WARNING: Direct3D specified, but not supported on this platform";
- }
-#endif
-
- if (!Colors::openGlRendering && !Colors::direct3dRendering && !Colors::softwareRendering){
+ if (!Colors::openGlRendering && !Colors::softwareRendering){
// The user has not decided rendering system. So we do it instead:
-#if defined(Q_WS_WIN)
- if (Colors::direct3dAwailable)
- Colors::direct3dRendering = true;
- else
-#endif
- if (Colors::openGlAwailable)
+ if (Colors::openGlAvailable)
Colors::openGlRendering = true;
else
Colors::softwareRendering = true;
diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h
index 3d2bb2a..c534649 100644
--- a/demos/qtdemo/colors.h
+++ b/demos/qtdemo/colors.h
@@ -81,11 +81,9 @@ public:
static int contentHeight;
// properties:
+ static bool openGlAvailable;
static bool openGlRendering;
- static bool direct3dRendering;
static bool softwareRendering;
- static bool openGlAwailable;
- static bool direct3dAwailable;
static bool xRenderPresent;
static bool noAdapt;
static bool noTicker;
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 55e0b86..f8f4922 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -100,14 +100,8 @@ void MainWindow::setRenderingSystem()
{
QWidget *viewport = 0;
- if (Colors::direct3dRendering){
- viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);
- setCacheMode(QGraphicsView::CacheNone);
- if (Colors::verbose)
- qDebug() << "- using Direct3D";
- }
#ifndef QT_NO_OPENGL
- else if (Colors::openGlRendering){
+ if (Colors::openGlRendering) {
QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers));
if (Colors::noScreenSync)
glw->format().setSwapInterval(0);
@@ -116,9 +110,10 @@ void MainWindow::setRenderingSystem()
setCacheMode(QGraphicsView::CacheNone);
if (Colors::verbose)
qDebug() << "- using OpenGL";
- }
+ } else // software rendering
#endif
- else{ // software rendering
+ {
+ // software rendering
viewport = new QWidget;
setCacheMode(QGraphicsView::CacheBackground);
if (Colors::verbose)
@@ -386,8 +381,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
s += "Rendering system: ";
if (Colors::openGlRendering)
s += "OpenGL";
- else if (Colors::direct3dRendering)
- s += "Direct3D";
else
s += "software";
diff --git a/demos/qtdemo/qtdemo.pro b/demos/qtdemo/qtdemo.pro
index 163ed17..011ea0c 100644
--- a/demos/qtdemo/qtdemo.pro
+++ b/demos/qtdemo/qtdemo.pro
@@ -6,6 +6,8 @@ DESTDIR = $$DEMO_DESTDIR/bin
OBJECTS_DIR = .obj
MOC_DIR = .moc
INSTALLS += target sources
+
+
QT += xml network
contains(QT_CONFIG, opengl) {
@@ -67,6 +69,8 @@ ICON = qtdemo.icns
QMAKE_INFO_PLIST = Info_mac.plist
}
+symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
# install
target.path = $$[QT_INSTALL_BINS]
sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES qtdemo.pro images xml *.ico *.icns *.rc *.plist
diff --git a/demos/qtdemo/qtdemo.rc b/demos/qtdemo/qtdemo.rc
index 4cf2a63..882b355 100644
--- a/demos/qtdemo/qtdemo.rc
+++ b/demos/qtdemo/qtdemo.rc
@@ -1,2 +1,32 @@
+#include "winver.h"
+
IDI_ICON1 ICON DISCARDABLE "qtdemo.ico"
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGS 0x0L
+ FILEFLAGSMASK 0x3fL
+ FILEOS 0x00040004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
+ VALUE "FileDescription", "Qt Examples and Demos"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
+ VALUE "InternalName", "qtdemo"
+ VALUE "OriginalFilename", "qtdemo.exe"
+ VALUE "ProductName", "Qt Examples and Demos"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 96a3e80..f598780 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -18,7 +18,16 @@
<example filename="browser" name="Browser" />
<example filename="mediaplayer" name="Media Player" />
<example filename="boxes" name="Boxes" />
+ <example filename="sub-attaq" name="Sub-attaq" />
</demos>
+ <category dirname="animation" name="Animation Framework">
+ <example filename="animatedtiles" name="Animated Tiles" />
+ <example filename="appchooser" name="Appchooser" />
+ <example filename="easing" name="Easing Curves" />
+ <example filename="moveblocks" name="Moving Blocks" />
+ <example filename="states" name="UI States" />
+ <example filename="stickman" name="Stickman" />
+ </category>
<category dirname="qtconcurrent" name="Concurrent Programming">
<example filename="map" name="Map" executable="false" />
<example filename="progressdialog" name="Progress Dialog" />
@@ -145,6 +154,11 @@
<category dirname="phonon" name="Phonon">
<example filename="musicplayer" name="Music Player" />
</category>
+ <category dirname="multimedia/audio" name="Multimedia">
+ <example filename="audiodevices" name="Audio Devices" />
+ <example filename="audiooutput" name="Audio Output" />
+ <example filename="audioinput" name="Audio Input" />
+ </category>
<category dirname="richtext" name="Rich Text">
<example filename="calendar" name="Calendar" />
<example filename="orderform" name="Order Form" />
@@ -167,6 +181,13 @@
<example filename="masterdetail" name="Music Archive" />
<example filename="sqlwidgetmapper" name="SQL Widget Mapper" />
</category>
+ <category dirname="statemachine" name="State Machine">
+ <example filename="eventtransitions" name="Event Transitions" />
+ <example filename="rogue" name="Rogue" />
+ <example filename="tankgame" name="Tank Game" />
+ <example filename="trafficlight" name="Traffic Light" />
+ <example filename="twowaybutton" name="Two-way Button" />
+ </category>
<category dirname="threads" name="Threading">
<example filename="mandelbrot" name="Mandelbrot" />
</category>
@@ -175,6 +196,7 @@
<example filename="completer" name="Completer" />
<example filename="customcompleter" name="Custom Completer" />
<example filename="i18n" name="Internationalization" />
+ <example filename="inputpanel" name="Input Panel" />
<example filename="plugandpaint" name="Plug and Paint" />
<example filename="regexp" name="Regular Expressions" />
<example filename="settingseditor" name="Settings Editor" />
@@ -231,5 +253,6 @@
<example filename="qobjectxmlmodel" name="QObjectXmlModel" />
<example filename="filetree" name="File Tree" />
<example filename="trafficinfo" name="Traffic Info" />
+ <example filename="schema" name="XML Schema Validation" />
</category>
</categories>