summaryrefslogtreecommitdiffstats
path: root/examples/statemachine
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Updated example license to three clause BSD license.David Boddie2010-05-199-245/+236
| | | | | Reviewed-by: Trust Me Requested-by: Legal
* Allow building Qt without the QtGui moduleBernhard Rosenkraenzer2010-04-071-2/+6
| | | | | | | | | | | | | | This adds a -no-gui switch to configure, allowing to build Qt without QtGui and components depending on QtGui. This is useful on headless servers, and in using QtCore, QtNetwork, QtXml, QtSql etc. on platforms QtGui hasn't been ported to yet. Task-number: QTBUG-4007 Merge-request: 543 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com> Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Update copyright year to 2010Jason McDonald2010-01-069-9/+9
| | | | Reviewed-by: Trust Me
* Compile Rogue example again after state machchine event type rename.Volker Hilsheimer2009-10-031-1/+1
|
* Introduce state machine event priority, make it possible to cancel eventsKent Hansen2009-09-291-2/+2
| | | | | | | | | | | | The priority specifies whether the event should be posted to what the SCXML spec refers to as the "external" (NormalPriority) queue, or the "internal" (HighPriority) queue. Delayed events are now posted through a separate function, postDelayedEvent(). That function returns an id that can be passed to cancelDelayedEvent() to cancel it. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Make QSignalEvent and QWrappedEvent inner classes of QStateMachineKent Hansen2009-09-282-6/+6
| | | | | | | | | Those two classes are specific to the state machine framework, but their names were so generic that we felt they were polluting the Q-namespace. They are now QStateMachine::SignalEvent and QStateMachine::WrappedEvent. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Update license headers again.Jason McDonald2009-09-099-36/+36
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-318-104/+104
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
* Update contact URL in license headers.Jason McDonald2009-08-129-9/+9
| | | | Reviewed-by: Trust Me
* Compile fix with namespaceshjk2009-08-101-0/+2
|
* Doc: Integrated the Rogue (state machine) example.Geir Vattekar2009-08-076-0/+465
| | | | Reviewed-by: Kent Hansen
* Remove tank game exampleEskil Abrahamsen Blomfeldt2009-07-2827-2396/+1
| | | | | | | | | After discussions with product management, it was considered best that this example be removed until it can be improved. There are some bugs an irregularities that should be cleaned up, and the theme should be made less violent. Reviewed-by: Volker Hilsheimer
* Make QStateMachine inherit QStateKent Hansen2009-07-222-5/+5
| | | | | | | | | | | | | | | | | | This removes the need for a "root state" in the machine; or rather, the machine _is_ the root state. User code can now pass in a QStateMachine directly to the QState constructor, instead of machine->rootState(). This also means we could get rid of the "proxying" from the machine to the root state for things like properties (initialState et al), finished() signal and auto-reparenting of states (the ChildAdded event hack). A fun little side-effect of this change is that it's now possible to embed state machines within state machines. We can't think of a good use case yet where you would rather embed a stand-alone state machine (with its own event processing etc.) rather than having just a regular nested state, but it's neat and it works. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Update license headers in files that are new in 4.6.Jason McDonald2009-06-1724-48/+48
| | | | Reviewed-by: Trust Me
* Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|
* WinCE doesn't have time() function, use QTimeKent Hansen2009-06-091-3/+2
|
* kill usage of QT_STATEMACHINE_SOLUTIONKent Hansen2009-06-045-25/+0
| | | | The define no longer exists.
* Fix missing/outdated license headers.Jason McDonald2009-05-2120-79/+896
| | | | Reviewed-by: Trust Me
* fix compiler warningsKent Hansen2009-05-201-1/+1
|
* compile with -qtnamespace, clean up the example .pro filesKent Hansen2009-05-209-41/+53
|
* remove the citizenquartz exampleKent Hansen2009-05-2014-956/+0
| | | | It's not done yet, so let's re-add it when it is.
* Make QAbstractTransition::eventTest() non-constEskil Abrahamsen Blomfeldt2009-05-145-10/+10
| | | | | We decided to remove the const of the eventTest() since some transitions have dynamic conditions and need to update when eventTest() is called.
* Pop up message when a tank wins the gameEskil Abrahamsen Blomfeldt2009-05-147-12/+111
| | | | | Also fixed: Added some docs and moved the tanks a little so they don't start partly outside the scene rect.
* Fix run-time error in Seek AI's state machineEskil Abrahamsen Blomfeldt2009-05-141-1/+5
| | | | | Passed parent as 'tank', thus getting a null parent in the GoToLocation state, which breaks the machine when you transition into the state.
* Fix SpinState in Tank Game Example to spin more than 180 degreesEskil Abrahamsen Blomfeldt2009-05-142-2/+12
| | | | This was a leftover from when the setDirection() semantics were broken.
* document statemachine/factorial exampleKent Hansen2009-05-131-26/+38
|
* doc: Correct names of snippets in docs for Tank Game exampleEskil Abrahamsen Blomfeldt2009-05-131-0/+4
|
* document the statemachine/eventtransitions exampleKent Hansen2009-05-121-1/+15
|
* Change name of "errorstate" example to "tankgame"Eskil Abrahamsen Blomfeldt2009-05-1226-29/+40
| | | | | The error state is not a big enough part of the example to justify naming it after it.
* Fixes: document statemachine/twowaybutton exampleKent Hansen2009-05-121-7/+15
|
* kill some simplistic/overlapping/under-developed examplesKent Hansen2009-05-129-445/+0
|
* document the statemachine/pingpong exampleKent Hansen2009-05-121-0/+14
|
* improve the docs for the trafficlight exampleKent Hansen2009-05-121-25/+22
|
* Make selecting plugins more user friendly and platform independentEskil Abrahamsen Blomfeldt2009-05-115-18/+66
| | | | | | Using *.dll was just a placeholder here. The code is mostly copied from the Plug&Paint example, and goes through all the plugins to find the compatible ones with some hacks to find out the application directory on windows and mac.
* Add chase state and ability to detect and fire at other tanks. This reveals anEskil Abrahamsen Blomfeldt2009-05-062-4/+92
| | | | assert in the state machine which needs to be debugged.
* Avoid passage where the walls meet the edge of the scene rect.Eskil Abrahamsen Blomfeldt2009-05-061-5/+6
|
* get rid of marginKent Hansen2009-05-051-1/+2
|
* add event as argument to onEntry(), onExit() and onTransition()Kent Hansen2009-05-058-16/+16
| | | | | | | | | Accessing the event can be useful. E.g., onEntry() can do some common event processing regardless of which transition caused the state to be entered; onTransition() can be used in combination with eventTest(), where eventTest() would first check that the input matches some criteria, and then the actual processing of that input would be done in onTransition.
* Add randomness.Eskil Abrahamsen Blomfeldt2009-05-051-2/+2
|
* Make sure target state is set correctly. Also make sure eventTest() actuallyEskil Abrahamsen Blomfeldt2009-05-051-5/+8
| | | | overrides the virtual function.
* Set collidedLine for the implicit walls around the scene to allow for collisionEskil Abrahamsen Blomfeldt2009-05-051-4/+21
| | | | response.
* Make sure the correct position/direction is actually set at the end of aEskil Abrahamsen Blomfeldt2009-05-051-10/+16
| | | | loop. Also make sure we set the direction to an angle within 360 degrees.
* Fix support reverse actions. Logic was broken and would always return falseEskil Abrahamsen Blomfeldt2009-05-051-2/+2
| | | | immediately for reverse actions, thus immediately stopping them.
* Add unfinished "more advanced" AI for errorstate.Eskil Abrahamsen Blomfeldt2009-04-306-5/+184
|
* Make design better. Remove the Tank interface. This is now an implicit interfaceEskil Abrahamsen Blomfeldt2009-04-3016-86/+65
| | | | based on the meta-object system.
* Add two AIs: They are both designed to do the same. Spin until they see a tankEskil Abrahamsen Blomfeldt2009-04-3014-26/+262
| | | | | | and then fire. One of them has an error, which causes it to enter its error state. The errorstate example has been changed to handle this by disabling the tank. The rest of the tanks will keep working.
* Compile against new QState::ChildMode API.Eskil Abrahamsen Blomfeldt2009-04-291-1/+1
|
* Kill gameOver signal as it was only used when you clicked the stop actionEskil Abrahamsen Blomfeldt2009-04-292-9/+6
|
* replace QState::Type with QState::childMode propertyKent Hansen2009-04-292-2/+2
| | | | Result of API review.