diff --git a/bluetoothgatt/readme.txt b/bluetoothgatt/readme.txt
new file mode 100644
index 00000000..0bbff694
--- /dev/null
+++ b/bluetoothgatt/readme.txt
@@ -0,0 +1,38 @@
+Bluetooth GATT
+
+========================================================================
+Sample Description.
+
+The Bluetooth GATT example demonstrates how to use the Bluetooth functionality as
+provided by the BB10 platform to retrieve information from Bluetooth devices that
+offer the low-energy profile.
+
+You will learn how to:
+- How to use the BT Api to discover Bt devices and their details.
+- how to add actions to cross-cut menu
+- How to perform property binding
+- Register C++ classes for use in QML documents
+
+
+========================================================================
+Requirements:
+
+BlackBerry 10 Native SDK
+
+========================================================================
+Running the example:
+
+1. Clone the Sample repository.
+2. Launch BlackBerry 10 Native SDK, and from the File menu, select Import.
+3. Expand General, and select Existing Projects into Workspace. Click Next.
+4. Browse to the location of your sample directory, and then click OK.
+5. The sample project should display in the Projects section.
+ Click Finish to import the project into your workspace.
+6. In the Project Explorer pane, Right-click the project (for example hellocascades)
+ and select Build Project.
+7. In the Project Explorer pane, Right-click the project (for example hellocascades)
+ and select Run As > BlackBerry C/C++ Application.
+8. The application will now install and launch on your device if not you might
+ have to set up your environment:
+ http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html
+
diff --git a/docs/headlesserviceui.qdoc b/docs/headlesserviceui.qdoc
new file mode 100644
index 00000000..a2e8a695
--- /dev/null
+++ b/docs/headlesserviceui.qdoc
@@ -0,0 +1,133 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Research In Motion Limited.
+** All rights reserved.
+** Contact: BlackBerry Ltd. (http://www.blackberry.com/company/contact/)
+**
+** This file is part of the examples of the BB10 Platform.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Research In Motion Limited.
+**
+****************************************************************************/
+
+/*!
+ \page headlesserviceui
+ \example headlesserviceui
+ \title headlesserviceUI Example
+
+ \section1 Description
+
+ The headlesserviceui example demonstrates how to launch a headless service counterpart and communicate with it
+ through the QSettings instance.
+
+ \image headlesserviceui-example.png
+
+ \section1 Overview
+ In this sample, we represent visually the status of the service and it's current state values.
+
+ \section1 UI
+ In this sample, we represent the running service through a colored rectangle (red for stopped, green for running)
+ and two labels indicating the initial flash count and the remaining flash count. A reset button is provided in addition
+ to allow the user to reset the service in order to restart the LED countdown.
+
+ The business logic of the application is encapsulated in the applicationui component
+ which is exposed as "_app" to the UI.
+
+ \snippet headlesserviceui/assets/main.qml 0
+
+ The following custom component "ColoredRectangle" is a Container with a image overlay to create an appealing visual
+ component to represent the service status; it allows you to change it's label and color dependent on status.
+
+ \snippet headlesserviceui/assets/main.qml 1
+
+ The following \c Labels convey the services flash count and remaining flash count to the user.
+
+ \snippet headlesserviceui/assets/main.qml 2
+
+ The reset \c Button is meant to stop the current LED request and start a new request with original request count.
+
+ \section1 applicationui
+ The buisiness logic of the headlesserviceUI is encapsulated in the applicationui component.
+
+ \snippet headlesserviceui/src/applicationui.hpp 0
+
+ Initialization of static QString const that represent the QSettings keys under which we will be retrieving and conveying the
+ headless service status information to the UI.
+
+ \snippet headlesserviceui/src/applicationui.cpp 0
+
+ When the isServiceRunning() method is invoked it queries the QString instance, initiated by the headless service, using the
+ "ServiceStatus" key in order to retrieve the service status string. Once it is determined that the service is in the running
+ state the initial flash count and remaining count is queried as well.
+
+ \snippet headlesserviceui/src/applicationui.cpp 1
+
+ The resetLED() writes a boolean to the QSettings file in order to communicate to the service to stop the current led request and
+ restart a new request with the same parameters. The setRemainingFlashCount() method emits a remainingFlashCountChanged() signal to
+ the qml to change the label text representing the count, every time the count changes.
+
+ \snippet headlesserviceui/src/applicationui.cpp 2
+
+ The settingsChanged() method is invoked by the QFileSystemWatcher when the QSettings file has been altered by another process, it
+ then proceeds to invoke setRemainingFlashCount() in order to update the remaining flash count as described by the paragraph above this one.
+
+ \section1 headlesservice
+
+ The HeadlesService example demonstrates how to create a long-running headless service and communicate with it's UI counterpart.
+ Make note that this is NOT a standalone, independantly deployable application, it is packaged with headlesserviceui sample
+ and deployed via it's bar file. This project does not contain an asset folder due to the fact that it's not allowed to have
+ a UI element to it.
+
+ In this sample, there is no UI portion since a headless service cannot have one. The primary goal of this service is to initiate
+ a led instance and manipulate its flash count/color while communicating the results of this back to the UI.
+
+ \section1 applicationheadless
+ The buisiness logic of the headless service is encapsulated in the applicationheadless component.
+
+ \snippet headlesservice/src/applicationheadless.hpp 0
+
+ This class represents the basic service of led manipulation by setting to Color X and initiating led with flash count N.
+
+ \snippet headlesservice/src/applicationheadless.cpp 0
+
+ Initialization of static QString const that represent the QSettings keys under which we will be storing and conveying the
+ Led status information to it's UI counterpart.
+
+ \snippet headlesservice/src/applicationheadless.cpp 1
+
+ The default constructor that initializes its member variables and logs the service PID. It is important to take a note that
+ the headless service should be using bb::Application for it's parent instead of the usual bb::cascades::Application instance.
+ This is due to the fact that the service is not a cascades application since it cannot have a UI portion to it, it's strictly
+ like any other background service you would code up.
+
+ \snippet headlesservice/src/applicationheadless.cpp 2
+
+ This initializer method creates the unique QSettings which will be used as the moderator for sharing information between the service
+ and its UI. It also does all the signal/slot connections to receive invocation requests and Led status updates.
+
+ \snippet headlesservice/src/applicationheadless.cpp 3
+
+ This method is invoked when a invocation request is received. It listens for the system start event in order to activate the led
+ functionality; this event is generated upon system start and/or when the application is installed initially. This is an example
+ of a system startup triggered service.
+
+ \snippet headlesservice/src/applicationheadless.cpp 4
+
+ These methods are invoked through Qt's signal/slot mechanism when updates are done to the led active state and flash count instance
+ variables.
+
+ \snippet headlesservice/src/applicationheadless.cpp 5
+
+ The settingsChanged() is invoked when the QFileSystemWatcher senses that the QSettings file has been altered. The main purpose of this
+ method is to reset the QSetting key values, stop the current LED request and initiate a new LED flash request when the requesting UI
+ requests for the reset via the reset \c Button.
+*/
diff --git a/docs/images/headlesserviceui-example.png b/docs/images/headlesserviceui-example.png
new file mode 100644
index 00000000..95a7d7d0
Binary files /dev/null and b/docs/images/headlesserviceui-example.png differ
diff --git a/docs/images/mavenartifacts-example.png b/docs/images/mavenartifacts-example.png
new file mode 100644
index 00000000..726c894c
Binary files /dev/null and b/docs/images/mavenartifacts-example.png differ
diff --git a/docs/images/mavenartifacts-example1.png b/docs/images/mavenartifacts-example1.png
new file mode 100644
index 00000000..8d03ef74
Binary files /dev/null and b/docs/images/mavenartifacts-example1.png differ
diff --git a/docs/images/mavenartifacts-example2.png b/docs/images/mavenartifacts-example2.png
new file mode 100644
index 00000000..a79cf9f7
Binary files /dev/null and b/docs/images/mavenartifacts-example2.png differ
diff --git a/docs/listdecorators.qdoc b/docs/listdecorators.qdoc
index ba8ecd5e..4f99a4aa 100644
--- a/docs/listdecorators.qdoc
+++ b/docs/listdecorators.qdoc
@@ -177,24 +177,6 @@
\snippet listdecorators/src/GroupArtistDataModelDecorator.cpp 0
- \section1 The GroupStyleDataQueryDecorator class
- This class performs grouping of header items, resulting in all those items with similarly named headers to appear under one header.
-
- \snippet listdecorators/src/GroupStyleDataQueryDecorator.hpp 0
-
- The following method is a helper function to determine if the given \c HeaderDataItem's header title is the same as the given
- header title for comparison.
-
- \snippet listdecorators/src/GroupStyleDataQueryDecorator.cpp 0
-
- The processHeaderResults() method is a re-implementation of it's base class counterpart in order to give it the grouping
- capability. It traverses the header results, each item's header title is compared to the title of the next element, if both
- titles are found to be the same than their child counts are combined under one HeaderDataItem. This simplifies the data in
- the ListView by aggregating all items with similar headers under one header, creating a leaner list that reduces the
- amount of scrolling one has to do.
-
- \snippet listdecorators/src/GroupStyleDataQueryDecorator.cpp 1
-
\section1 The SelectionDataModelDecorator class
This class enriches the user interaction of the ListView, by giving it a new functionality - the ability to select multiple
items.
diff --git a/docs/mavenartifacts.qdoc b/docs/mavenartifacts.qdoc
new file mode 100644
index 00000000..6548f553
--- /dev/null
+++ b/docs/mavenartifacts.qdoc
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Research In Motion Limited.
+** All rights reserved.
+** Contact: Research In Motion Ltd. (http://www.rim.com/company/contact/)
+**
+** This file is part of the examples of the BB10 Platform.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Research In Motion Limited.
+**
+****************************************************************************/
+
+/*!
+ \page mavenartifacts
+ \example mavenartifacts
+ \title Maven Artifact search Example
+
+ \section1 Description
+
+ The Maven Artifacts example demonstrates how to access a RESTful service that responds with JSON
+ data and then display the results on the screen.
+
+ \image mavenartifacts-example.png
+
+ \section1 Overview
+ In this example we'll learn how to use the \c QNetworkAccessManager and \c JsonDataAccess classes to
+ download artifacts from the RESTful webservice and parse them into a model to visualize them in a \c ListView.
+
+ The business logic of this application is encapsulated in the \c App class, which
+ is exported to QML under the name '_artifactline'.
+
+ \section1 UI
+ The UI of this sample consists of a \c TextField to enter the artifact name and a \c Button to start
+ the lookup for artifacts containing the given name. Whenever the user clicks the button, the requestArtifact()
+ method of the \c App object is invoked. The button is disabled while the lookup is in progress.
+
+ \snippet mavenartifacts/assets/main.qml 1
+
+ If an error occurs during the lookup, the 'error' property of the \c App object becomes 'true', which
+ makes the \c Label below the button visible. It will show the error message as provided by the \c App object.
+
+ \snippet mavenartifacts/assets/main.qml 2
+
+ If the lookup is successful, the \c App object emits the ArtifactsLoaded() signal. After the UI is initialized,
+ we connect the pushPane() function against this signal.
+
+ \snippet mavenartifacts/assets/main.qml 0
+
+ The pushPane() function will push a page, that shows the artifacts in a \c ListView, on the navigation pane.
+ Since we want to have two different visual representations of the list, we have two different pages. One
+ uses the standard list item component and the other uses a custom list item component.
+
+ \snippet mavenartifacts/assets/main.qml 4
+
+ Both pages are loaded through \c{ComponentDefinition}s and the user can select which one is used through
+ a \c SegmentedControl at the bottom of the screen.
+
+ \snippet mavenartifacts/assets/main.qml 3
+
+ The standard appearance is implemented in StandardTimelineView.qml and uses the \c StandardListItem as
+ \c ListItemComponent. As data model the \c ListView uses the model provided by the \c App object.
+
+ \snippet mavenartifacts/assets/StandardTimelineView.qml 0
+
+ The page looks like the following:
+
+ \image mavenartifacts-example1.png
+
+ The custom appearance is implemented in CustomTimelineView.qml and uses a custom control as \c ListItemComponent,
+ consisting of two \c{Label}s below each other.
+
+ \snippet mavenartifacts/assets/CustomTimelineView.qml 0
+
+ The page looks like the following:
+
+ \image mavenartifacts-example2.png
+
+ \section1 The App class
+ The \c App class encapsulates the business logic of this application. It provides methods to trigger the lookup
+ of artifacts, a property of type bb::cascades::DataModel that contains the found artifacts and further properties to
+ report the current state of the object (e.g. error or in-progress).
+
+ \snippet mavenartifacts/src/app.hpp 0
+
+ Inside the constructor the model is initialized and the UI is loaded from main.qml file.
+
+ \snippet mavenartifacts/src/app.cpp 0
+
+ Before a new request is issued, the reset() method is called, which clears any previous error information.
+
+ \snippet mavenartifacts/src/app.cpp 1
+
+ When the user clicks the 'Timeline' button, the requestArtifact() method is invoked with the artifact name as parameter.
+ If no lookup is currently running, we do a sanity check on the artifact name and if everything is ok execute the lookup.
+ The lookup on the network is encapsulated in a \c ArtifactRequest object, which provides a signal complete() to notify
+ us when the raw JSON data has been retrieved. We connect a custom slot against this signal and start the request.
+ Afterwards we change the 'active' property of the \c App object to signal the UI that a lookup is in progress.
+
+ \snippet mavenartifacts/src/app.cpp 2
+
+ When the network lookup is finished, the onArtifactsline() slot is invoked. There we first check whether an error occurred.
+ In case of an error we update the 'error' and 'errorMessage' property of the \c App object and inform the UI about the
+ change. Otherwise we call the helper method parseResponse().
+
+ \snippet mavenartifacts/src/app.cpp 3
+
+ The parseResponse() method uses the \c JsonDataAccess class to parse the raw JSON data into a list of QVariantMaps, which
+ can be inserted directly into our model.
+
+ \snippet mavenartifacts/src/app.cpp 4
+
+ \section1 The ArtifactRequest class
+ The \c ArtifactRequest class encapsulates the retrieval of data from the maven central webservice. It basically provides
+ a method to trigger the lookup and a signal to notify when the lookup is finished.
+
+ \snippet mavenartifacts/src/ArtifactRequest.hpp 0
+
+ In requestArtifactline() we create a new \c QNetworkAccessManager object, which will do the low-level HTTP network communication.
+ It expects an URL as input parameter, which we assemble here from the REST API and the artifact name.
+ Calling \c{QNetworkAccessManager}'s get() method returns a \c QNetworkReply object, which acts as a handle to follow the
+ status and progress of the network operation. We connect against its finished() signal to know when all data have been received.
+
+ \snippet mavenartifacts/src/ArtifactRequest.cpp 0
+
+ Inside the connected slot we check whether an error occurred and read the data from the \c QNetworkReply if the download
+ was successful. At the end we emit the complete() signal with the JSON data or an error message as parameter.
+
+ \snippet mavenartifacts/src/ArtifactRequest.cpp 1
+*/
diff --git a/docs/pages.qdoc b/docs/pages.qdoc
index ca8a2f33..248bcded 100644
--- a/docs/pages.qdoc
+++ b/docs/pages.qdoc
@@ -42,7 +42,7 @@
\o \l{paymentservice}{Payment Service}
\o \l{bpstoqml}{BPS to QML}
\o \l{xandos}{XandOs Game}
- \o \l{headlesserviceui} {Headless service example}
+ \o \l{headlesserviceui} {Headless service example}
\endlist
\o \bold {Device and Communication}
\list
@@ -64,6 +64,7 @@
\o \l{nfcreceiver}{NFC Receiver}
\o \l{nfcsender}{NFC Sender}
\o \l{nfcshare}{NFC Share}
+ \o \l{mavenartifacts}{Maven Artifacts}
\endlist
\o \bold {App Integration}
\list
diff --git a/docs/xandos.qdoc b/docs/xandos.qdoc
index e854b33f..e632ef50 100644
--- a/docs/xandos.qdoc
+++ b/docs/xandos.qdoc
@@ -26,7 +26,8 @@
\section1 Description
- The XandOs example demonstrates how to launch a headless service counterpart and communicate with it.
+ The XandOs example demonstrates how to launch a headless service and communicate with it using
+ a UI counterpart.
\image xandos-example.png
\image xandos-example1.png
@@ -35,11 +36,13 @@
\section1 Overview
- In this sample, we represent the game board using an image and sprites for the game pieces.
+ In this sample, we demonstrate headless services using the classic game of tic-tac-toe. The players moves
+ are communicated to the service, which is the droid player in this instance, and it communicates it's choice
+ back to the gameboard using socket communication.
\section1 UI
The UI of this sample application consists of some labels that display the user/droid winning scores,
- followed by an image for the game grid.
+ followed by an image for the game grid and images for the game sprites.
The business logic of the application is encapsulated in the xandos component
which is exposed as "_xandos" to the UI.
@@ -68,11 +71,11 @@
the first grid row, the second being the second grid row and so on. Each of the ImageView represent one cell in the
grid, with the default image being a blank (meaning no selection has been made). When an onTouch event occurs, we
verify first that the cell was not marked previously and we change it to the players sprite image.
-
+
\snippet xandos/assets/main.qml 5
This \c SystemDialog is used at the start of the application to inquire the user if he wishes to play the game, upon
- pressing the confirmation button we get the game ready by starting the droid and connecting the necessary signals/slots.
+ pressing the confirmation button we get the game ready by starting the droid through socket communication.
\snippet xandos/assets/main.qml 6
@@ -93,36 +96,7 @@
The droidStart() function is invoked when a droidReady() signal is received which indicates that the droid connection
has been established and the droid is ready to play.
-
- \section1 droidlistener
- The droidlistener class serves as the server socket which communicates with droid connections and facilitates data
- transfers.
-
- \snippet xandos/src/droidlistener.hpp 0
-
- The default constructor creates the \c QTcpServer socket and readies it for any client connections by connecting
- to the signal/slot mechanism.
-
- \snippet xandos/src/droidlistener.cpp 0
-
- The listen() method initiates the server socket to start listenening for any client connections.
-
- \snippet xandos/src/droidlistener.cpp 1
-
- The newConnection() method is invoked when a connection is initiated, it grabs the new connection and readies it for
- data reads by connecting the related methods through the signals/slots mechanism.
-
- \snippet xandos/src/droidlistener.cpp 2
-
- The readyRead() method is invoked when the socket is ready to receive data transfers, it than forwards the data
- by emitting the droidSelection() signal with the data as it's parameter.
-
- \snippet xandos/src/droidlistener.cpp 3
-
- The disconnected() method is invoked when the socket signals the clients disconnection and the appropriate cleanup is taken.
-
- \snippet xandos/src/droidlistener.cpp 4
-
+
\section1 xandos
This class represents the central business logic for the game mechanism. Providing functionality to keep game states in-sync
with it's droid counterpart, and updating of the game matrix to represent the current game state.
@@ -135,37 +109,122 @@
\snippet xandos/src/xandos.cpp 0
- The default constructor initializes it's member variables, by instantiating the invoke manager and the game matrix to start of game.
+ The default constructor initializes it's member variables, and the game matrix to start of game. It makes the necessary signal/slot
+ connections to be informed of successful socket connection to the droid. It also initializes the invocation manager which is used
+ to start or stop the droid, which translates to starting/terminating the headless service.
\snippet xandos/src/xandos.cpp 1
The select() method is used to mark the player selection by chosing the grid matrix at some chosen index and performing the
row operation on the game matrix. The operation depends on the player, if it's the user than row addition is performed otherwise
row subtraction. Each player tries to achieve a 3 or -3 value in any of the game matrix indexes in order to win the game. Once a
- won or tie game is determined, the won() signal is emitted. The select() method can also send the selection to the droid in order
+ win or tie game is determined, the won() signal is emitted. The select() method can also send the selection to the droid in order
to update it's game matrix, this "send" paramter can be disabled when the user updates it's game matrix with droid selections where
communication with droid is not necessary.
\snippet xandos/src/xandos.cpp 2
- The startDroid() method uses the \c InvokeManager in order to send a START event via the \c InvokeRequest to the headless droid
- to prepare it for starting the game. The stopDroid() does the oppoisite by issuing a STOP event via \c InvokeRequest to the droid
- in order to terminate it due to game over.
+ The following set of methods: droidStart() and droidStop() are used in order to start or terminate the headless service, also known
+ as the xandos droid. These methods use the invocation mechanism by sending specific actions to the bound target id. For more information
+ on this framework please reference "App integration" under "platform features" in the Documentation.
\snippet xandos/src/xandos.cpp 3
- The droidSelection() method is invoked when a droid selection data is received, it than proceeds to find the corresponding
- \c ImageView for the cell that was selected and to change it's image source representing the droids sprite.
+ The droidSelection() method retrieves the \c ImageView associated with the droids grid cell choice and sets the images source to
+ the sprite image that is associated with the droid.
\snippet xandos/src/xandos.cpp 4
- The sendSelection() method is tasked with sending a CHOICE event to the droid with the data representing the users grid cell
- choice. This is done using \c InvokeRequest via the \c InvokeManager instance.
-
- \snippet xandos/src/xandos.cpp 5
-
noMoreSelections() is a private convenience method to check the grid matrix if there are no more selections available, which
signifies a tied game if no player has reached the winning state in the game matrix by this time.
\snippet xandos/src/xandos.cpp 6
+
+ \section1 droidlistener
+ The droidlistener class serves as the server socket which communicates with the headless service(Droid) connections and facilitates data
+ transfers.
+
+ \snippet xandos/src/droidlistener.hpp 0
+
+ The default constructor creates the \c QTcpServer socket and readies it for any client connections by connecting
+ to the signal/slot mechanism.
+
+ \snippet xandos/src/droidlistener.cpp 0
+
+ The listen() method initiates the server socket to start listenening for any client connections.
+
+ \snippet xandos/src/droidlistener.cpp 1
+
+ The newConnection() method is invoked when a connection is initiated, it grabs the new connection and readies it for
+ data reads by connecting the related methods through the signals/slots mechanism.
+
+ \snippet xandos/src/droidlistener.cpp 2
+
+ The readyRead() method is invoked when the socket is ready to receive data transfers, it than forwards the data
+ by emitting the droidSelection() signal with the data as it's parameter. The readyWrite() is used in the opposite way
+ to write data to the socket when requested.
+
+ \snippet xandos/src/droidlistener.cpp 3
+
+ The disconnected() method is invoked when the socket signals the clients disconnection and the appropriate cleanup is taken.
+
+ \snippet xandos/src/droidlistener.cpp 4
+
+
+ \section1 xandosdroid
+
+ The XandOsDroid example demonstrates how to create a headless service and communicate with it's UI counterpart. The emphasis is
+ placed on communication since the headless service needs to keep it's game state in-sync with the UI's game state.
+ Make note that this is NOT a standalone, independantly deployable application, it is packaged with xandos sample
+ and deployed via it's bar file.
+
+ \section1 Droid Overview
+ In this sample, there is no UI portion since a headless service cannot have one. We represent the same game board
+ that it's UI counterpart is using and keep them in-sync through communicating their selections.
+
+ \snippet xandosdroid/src/xandosdroid.hpp 0
+
+ This is the same type of matrix, exact duplicate, that is found in xandos in order to keep the gameboard states in sync in both
+ the UI and droid process'.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 0
+
+ The default constructor initializes it's member variables, including the game matrix instantiation to start of game. Also the
+ invocation manager is initialized, signal/slot connections made in order to receive the invocation action requests from the system
+ or the xandos app.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 1
+
+ onInvoked() method is called when a invoke request comes in, at which time it retrieves the requested action to be taken. The actions
+ that are supported are either START or STOP, which behave respectfully as their names imply. When a START action is received the droid
+ initializes communication with the UI app; however, it terminates all connections including the droid service when a STOP action is received.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 2
+
+ The select() method is used to mark either players selection by chosing the grid matrix at some chosen index and performing the
+ row operation on the game matrix. The operation depends on the player, if it's the user than row addition is performed otherwise
+ row subtraction. Each player tries to achieve a 3 or -3 value in any of the game matrix indexes in order to win the game. Once a
+ won game is determined, the droid is terminated.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 3
+
+ availableChoices() method returns all the grid choices that have not been selected yet. This can be filtered further by indicating
+ an specific index that you are looking for using the index parameter. Specifying a valid index will result in a choices list representing
+ all the matrices that have a win possibility for that index which correlates to one of {D1,H1,H2,H3,V1,V2,V3,D2}.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 4
+
+ The nextMove() method is used to analyse the game matrix to see if the opponent has any 2 sequences to prevent a user win, or if the droid
+ has any 2 sequences to get a winning combination with the next move. If none of the above mentioned priorities are found, than it finds all the
+ opponents moves and chooses at random which one to block with it's next move.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 6
+
+ The connectToServer(), connected(), readyRead() and disconnected() are related to the socket communication between the droid and the UI. The connectToServer()
+ method initializes a QTcpSocket connection to the UI socket server, once connection is made it emits a connected signal which is bound to and invokes the connected() slot.
+ The connected() slot writes out data over the socket, the data being the droids next move selection on the game grid. When the socket receives data from the UI, the
+ readyRead() method is invoked, which then proceeds to retrieve the data, representing the user grid cell selection, and marks it's grid state with that selection to keep in-sync.
+ The disconnected() method is invoked when the socket connection is dropped or terminated, which calls the application quit method to terminate the service.
+
+ \snippet xandosdroid/src/xandosdroid.cpp 5
*/
diff --git a/docs/xandosdroid.qdoc b/docs/xandosdroid.qdoc
deleted file mode 100644
index 028413fb..00000000
--- a/docs/xandosdroid.qdoc
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Research In Motion Limited.
-** All rights reserved.
-** Contact: BlackBerry Ltd. (http://www.blackberry.com/company/contact/)
-**
-** This file is part of the examples of the BB10 Platform.
-**
-** GNU Free Documentation License
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms
-** and conditions contained in a signed written agreement between you
-** and Research In Motion Limited.
-**
-****************************************************************************/
-
-/*!
- \page xandosdroid
- \example xandosdroid
- \title XandOsDroid Example
-
- \section1 Description
-
- The XandOsDroid example demonstrates how to create a headless service and communicate with it's UI counterpart.
- Make note that this is NOT a standalone, independantly deployable application, it is packaged with xandos sample
- and deployed via it's bar file.
-
- \section1 Overview
- In this sample, there is no UI portion since a headless service cannot have one. We represent the same game board
- that it's UI counterpart is using and keep them in-sync through communicating their selections.
-
- \section1 xandosdroid
- The buisiness logic of the headless service is encapsulated in the xandosdroid component.
-
- \snippet xandosdroid/src/xandosdroid.hpp 0
-
- This is the game grid matrix which consists of all the winning possibilites for each cell. Each winning matrix follows the
- {D1,H1,H2,H3,V1,V2,V3,D2,S} layout, which represents if the cell has the possibility to win in the diagnol, horizontal, vertical
- or a combination of the rows. The last index (S), is a flag indicator to communicate if the matrix has been selected already or not.
- This matrix is a identical duplicate of the one used by it's UI app to keep the game states in-sync.
-
- \snippet xandosdroid/src/xandosdroid.cpp 0
-
- The default constructor initializes it's member variables, by instantiating the invoke manager for receiving \c InvokeRequests
- from it UI portion. Including the game matrix instantiation to start of game and signal/slot connections for socket communication.
-
- \snippet xandosdroid/src/xandosdroid.cpp 1
-
- onInvoked() method is invoked when a \c InvokeRequest comes in from it's UI counterpart with a specific \c InvokeRequest.
- It monitors for three different events being START,STOP and CHOICE. When a START event is received it tries to establish
- communication with the server and signal a ready state to it. When the STOP event is received it initiates droid termination.
- If CHOICE event is received, it parses out the event data to get the users grid selection, uses that to update the grid matrix
- and based on that selection determines the next viable move to either win or block user from winning. Once it decides on it's
- next move it communicates it back to the UI via the socket.
-
- \snippet xandosdroid/src/xandosdroid.cpp 2
-
- The select() method is used to mark the player selection by chosing the grid matrix at some chosen index and performing the
- row operation on the game matrix. The operation depends on the player, if it's the user than row addition is performed otherwise
- row subtraction. Each player tries to achieve a 3 or -3 value in any of the game matrix indexes in order to win the game. Once a
- won game is determined, the droid is terminated.
-
- \snippet xandosdroid/src/xandosdroid.cpp 3
-
- availableChoices() method returns all the grid choices that have not been selected yet. This can be filtered further by indicating
- an specific index that you are looking for using the index parameter. Specifying a valid index will result in a choices list representing
- all the matrices that have a win possibility for that index which correlates to one of {D1,H1,H2,H3,V1,V2,V3,D2}.
-
- \snippet xandosdroid/src/xandosdroid.cpp 4
-
- The following set of methods: sendSelection(), connectToServer(), and connected() are chained in order to communicated the droids
- selection to it's UI counterpart. The sendSelection() method starts the chain reaction by invoking connectToServer() method to
- initiate the connection to the host server socket, once a connection is established the connected() method is invoked when the connected()
- signal is received, which than writes the data over the socket and calls the select() method to mark it's selection in the local game grid.
-
- \snippet xandosdroid/src/xandosdroid.cpp 5
-
- The nextMove() method is used to analyse the game matrix to see if the opponent has any 2 sequences to prevent a user win, or if the droid
- has any 2 sequences to get a winning combination with the next move. If none of the above mentioned priorities are found, than it finds all the
- opponents moves and chooses at random which one to block with it's next move.
-
- \snippet xandosdroid/src/xandosdroid.cpp 6
-
- The terminateDroid() private method is used to cleanup any socket connections and terminate the headless service when requested by
- it's UI counterpart or when game over is reached.
-*/
diff --git a/headlesservice/src/applicationheadless.cpp b/headlesservice/src/applicationheadless.cpp
index 066b69b4..b4fff205 100644
--- a/headlesservice/src/applicationheadless.cpp
+++ b/headlesservice/src/applicationheadless.cpp
@@ -82,7 +82,7 @@ void ApplicationHeadless::activeUpdate(bool active)
}
}
//! [4]
-
+//! [5]
void ApplicationHeadless::settingsChanged(const QString & path)
{
QSettings settings(m_author, m_appName);
@@ -104,7 +104,7 @@ void ApplicationHeadless::settingsChanged(const QString & path)
m_led->flash(m_flashCount);
}
}
-
+//! [5]
//! [2]
void ApplicationHeadless::init()
{
diff --git a/imageloader/config.pri b/imageloader/config.pri
index cd216b6f..80726bc5 100644
--- a/imageloader/config.pri
+++ b/imageloader/config.pri
@@ -90,7 +90,10 @@ lupdate_inclusion {
$$quote($$BASEDIR/../src/*.cxx) \
$$quote($$BASEDIR/../assets/*.qml) \
$$quote($$BASEDIR/../assets/*.js) \
- $$quote($$BASEDIR/../assets/*.qs)
+ $$quote($$BASEDIR/../assets/*.qs) \
+ $$quote($$BASEDIR/../assets/images/*.qml) \
+ $$quote($$BASEDIR/../assets/images/*.js) \
+ $$quote($$BASEDIR/../assets/images/*.qs)
HEADERS += $$quote($$BASEDIR/../src/*.h) \
$$quote($$BASEDIR/../src/*.h++) \
diff --git a/imageloader/src/imageloader.cpp b/imageloader/src/imageloader.cpp
index bbbe36aa..d5394dc7 100644
--- a/imageloader/src/imageloader.cpp
+++ b/imageloader/src/imageloader.cpp
@@ -135,7 +135,10 @@ void ImageLoader::onReplyFinished()
//! [4]
void ImageLoader::onImageProcessingFinished()
{
- const QImage swappedImage = m_watcher.future().result().rgbSwapped();
+ QImage swappedImage = m_watcher.future().result().rgbSwapped();
+ if(swappedImage.format() != QImage::Format_RGB32) {
+ swappedImage = swappedImage.convertToFormat(QImage::Format_RGB32);
+ }
const bb::ImageData imageData = bb::ImageData::fromPixels(swappedImage.bits(), bb::PixelFormat::RGBX, swappedImage.width(), swappedImage.height(), swappedImage.bytesPerLine());
m_image = bb::cascades::Image(imageData);
diff --git a/listdecorators/.project b/listdecorators/.project
index 5a809573..0ab08fad 100644
--- a/listdecorators/.project
+++ b/listdecorators/.project
@@ -1,96 +1,96 @@
-
-
- listdecorators
-
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.genmakebuilder
-
-
- ?name?
-
-
-
- org.eclipse.cdt.make.core.append_environment
- true
-
-
- org.eclipse.cdt.make.core.autoBuildTarget
- Device-Debug
-
-
- org.eclipse.cdt.make.core.buildArguments
- -j2
-
-
- org.eclipse.cdt.make.core.buildCommand
- make
-
-
- org.eclipse.cdt.make.core.cleanBuildTarget
- clean
-
-
- org.eclipse.cdt.make.core.contents
- org.eclipse.cdt.make.core.activeConfigSettings
-
-
- org.eclipse.cdt.make.core.enableAutoBuild
- true
-
-
- org.eclipse.cdt.make.core.enableCleanBuild
- true
-
-
- org.eclipse.cdt.make.core.enableFullBuild
- true
-
-
- org.eclipse.cdt.make.core.fullBuildTarget
- Device-Debug
-
-
- org.eclipse.cdt.make.core.stopOnError
- true
-
-
- org.eclipse.cdt.make.core.useDefaultBuildCmd
- true
-
-
-
-
- com.rim.tad.tools.wst.jsdt.core.javascriptValidator
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
- full,incremental,
-
-
-
-
- com.rim.tad.tools.qml.core.qmlFileBuilder
-
-
-
-
- com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder
-
-
-
-
-
- com.rim.tad.tools.wst.jsdt.core.jsNature
- org.eclipse.cdt.core.cnature
- org.eclipse.cdt.managedbuilder.core.managedBuildNature
- org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
- com.qnx.tools.ide.bbt.core.bbtnature
- org.eclipse.cdt.core.ccnature
- com.rim.tad.tools.qml.core.qmlNature
-
-
+
+
+ listdecorators
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.autoBuildTarget
+ Device-Debug
+
+
+ org.eclipse.cdt.make.core.buildArguments
+ -j2
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ make
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.fullBuildTarget
+ Device-Debug
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ true
+
+
+
+
+ org.eclipse.wst.jsdt.core.javascriptValidator
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+ com.rim.tad.tools.qml.core.qmlFileBuilder
+
+
+
+
+ com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder
+
+
+
+
+
+ org.eclipse.wst.jsdt.core.jsNature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+ com.qnx.tools.ide.bbt.core.bbtnature
+ org.eclipse.cdt.core.ccnature
+ com.rim.tad.tools.qml.core.qmlNature
+
+
diff --git a/listdecorators/assets/GroupStyleDecorator.qml b/listdecorators/assets/GroupStyleDecorator.qml
deleted file mode 100644
index 2bde0ae0..00000000
--- a/listdecorators/assets/GroupStyleDecorator.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2013 BlackBerry Limited.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import bb.cascades 1.0
-import bb.cascades.datamanager 1.2
-import bb.cascades.decorators 1.2
-
-// ActionItem dealing with the group style query decorator, which
-// which groups items that have the same header names under one header.
-ActionItem {
- ActionBar.placement: ActionBarPlacement.InOverflow
- onTriggered: {
- groupStyleModel.load()
- listView.dataModel = groupStyleModel
- }
-
- attachedObjects: [
- AsyncHeaderDataModel {
- id: groupStyleModel
- // Decorator that groups all items with the same header name under one header,
- // based on album style (genre).
- query: GroupStyleDataQueryDecorator {
- query: SqlHeaderDataQuery {
- source: _sqlImagesDir + "/../discogs_small.db"
- query: "select primary_image, title as name, master_style.style from master inner join master_style on master_style.master_id=master.id order by style"
- countQuery: "select count(*) from master inner join master_style on master_style.master_id=master.id"
- headerQuery: "select style as header, count(*) from master_style inner join master on master_style.master_id=master.id group by header"
- onDataChanged: console.log("data changed: revision=" + revision)
- onError: console.log("SQL query error: " + code + ", " + message)
- }
- }
- onLoaded: console.log("initial model data is loaded")
- }
- ]
-}
diff --git a/listdecorators/assets/main.qml b/listdecorators/assets/main.qml
index 0975061b..0b417fcd 100644
--- a/listdecorators/assets/main.qml
+++ b/listdecorators/assets/main.qml
@@ -62,11 +62,6 @@ Page {
title: qsTr("GroupArtistModelDecorator")
imageSource: "asset:///images/list_group.png"
},
- // GroupStyleDecorator menu ActionItem with attached object model
- GroupStyleDecorator {
- title: qsTr("GroupStyleDataQueryDecorator")
- imageSource: "asset:///images/list_group.png"
- },
// DataQualityDecorator menu ActionItem with attached object model
DataQualityDecorator {
title: qsTr("DataQualityDataQueryDecorator")
diff --git a/listdecorators/config.pri b/listdecorators/config.pri
index 4a094a61..af7ed48c 100644
--- a/listdecorators/config.pri
+++ b/listdecorators/config.pri
@@ -21,7 +21,6 @@ device {
$$quote($$BASEDIR/src/DataQualityModelDecorator.cpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.cpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.cpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/applicationui.cpp) \
$$quote($$BASEDIR/src/main.cpp)
@@ -31,7 +30,6 @@ device {
$$quote($$BASEDIR/src/DataQualityModelDecorator.hpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.hpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.hpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/applicationui.hpp)
}
@@ -55,7 +53,6 @@ device {
$$quote($$BASEDIR/src/DataQualityModelDecorator.cpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.cpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.cpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/applicationui.cpp) \
$$quote($$BASEDIR/src/main.cpp)
@@ -65,7 +62,6 @@ device {
$$quote($$BASEDIR/src/DataQualityModelDecorator.hpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.hpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.hpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/applicationui.hpp)
}
@@ -91,7 +87,6 @@ simulator {
$$quote($$BASEDIR/src/DataQualityModelDecorator.cpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.cpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.cpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.cpp) \
$$quote($$BASEDIR/src/applicationui.cpp) \
$$quote($$BASEDIR/src/main.cpp)
@@ -101,7 +96,6 @@ simulator {
$$quote($$BASEDIR/src/DataQualityModelDecorator.hpp) \
$$quote($$BASEDIR/src/ExpandableDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/GroupArtistDataModelDecorator.hpp) \
- $$quote($$BASEDIR/src/GroupStyleDataQueryDecorator.hpp) \
$$quote($$BASEDIR/src/SelectionDataModelDecorator.hpp) \
$$quote($$BASEDIR/src/applicationui.hpp)
}
@@ -121,7 +115,10 @@ lupdate_inclusion {
$$quote($$BASEDIR/../src/*.cxx) \
$$quote($$BASEDIR/../assets/*.qml) \
$$quote($$BASEDIR/../assets/*.js) \
- $$quote($$BASEDIR/../assets/*.qs)
+ $$quote($$BASEDIR/../assets/*.qs) \
+ $$quote($$BASEDIR/../assets/images/*.qml) \
+ $$quote($$BASEDIR/../assets/images/*.js) \
+ $$quote($$BASEDIR/../assets/images/*.qs)
HEADERS += $$quote($$BASEDIR/../src/*.h) \
$$quote($$BASEDIR/../src/*.h++) \
diff --git a/listdecorators/src/GroupStyleDataQueryDecorator.cpp b/listdecorators/src/GroupStyleDataQueryDecorator.cpp
deleted file mode 100644
index bf412441..00000000
--- a/listdecorators/src/GroupStyleDataQueryDecorator.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2013 BlackBerry Limited.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "GroupStyleDataQueryDecorator.hpp"
-
-GroupStyleDataQueryDecorator::GroupStyleDataQueryDecorator(QObject* parent)
- : bb::cascades::datamanager::DataQueryDecorator(parent)
-{
-}
-
-GroupStyleDataQueryDecorator::~GroupStyleDataQueryDecorator() {
-}
-//! [0]
-bool GroupStyleDataQueryDecorator::isGroupable(
- bb::cascades::datamanager::HeaderDataItem &data, const QString &title) {
- QVariant payload = data.payload();
- QString header = payload.toMap()["header"].toString();
- // return result of header name equality test
- return header == title;
-}
-//! [0]
-//! [1]
-void GroupStyleDataQueryDecorator::processHeaderResults(
- QList* headerResults) {
-
- // The new header results list which will contain the grouped headers.
- QList *groupedResults =
- new QList;
- int count = headerResults->size();
- for (int i = 0; i < count; ++i) {
- //bb::cascades::datamanager::HeaderDataItem groupItem =
- // ((*headerResults)[i]);
- QString title = ((*headerResults)[i]).payload().toMap()["header"].toString();
- int groupCount = 0;
- // Sum up child counts as long as headers are equal in name and within the list size.
- do {
- groupCount += (*headerResults)[i].childCount();
- } while ((i + 1) < count && isGroupable((*headerResults)[i + 1], title)
- && ++i);
- // Set the new child count of the grouped items and add it to the new list.
- (*headerResults)[i].setChildCount(groupCount);
- groupedResults->append((*headerResults)[i]);
- }
- headerResults = groupedResults;
-}
-//! [1]
diff --git a/listdecorators/src/GroupStyleDataQueryDecorator.hpp b/listdecorators/src/GroupStyleDataQueryDecorator.hpp
deleted file mode 100644
index 570df55c..00000000
--- a/listdecorators/src/GroupStyleDataQueryDecorator.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2013 BlackBerry Limited.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef GROUPSTYLEDATAQUERYDECORATOR_HPP_
-#define GROUPSTYLEDATAQUERYDECORATOR_HPP_
-
-#include
-#include
-#include
-#include
-
-/**
- * This class performs grouping of header items, which displays all those
- * items with similarly named headers to appear under one header.
- */
-//! [0]
-class GroupStyleDataQueryDecorator: public bb::cascades::datamanager::DataQueryDecorator {
- Q_OBJECT
-
-public:
- GroupStyleDataQueryDecorator(QObject* parent = 0);
- virtual ~GroupStyleDataQueryDecorator();
-
- /**
- * Helper method to test if the given headers can be grouped.
- * Returns true if names are equal, and false otherwise.
- */
- bool isGroupable(bb::cascades::datamanager::HeaderDataItem &data,
- const QString &title);
-
- /**
- * This method compares the header names and resets the header child count
- * as a sum of similarly named header child counts.
- * Overwritten function to perform special processing on the header results.
- *
- * @see DataQueryDecorator
- */
- virtual void processHeaderResults(
- QList* headerResults);
-
-};
-//! [0]
-#endif /* GROUPSTYLEDATAQUERYDECORATOR_HPP_ */
diff --git a/listdecorators/src/applicationui.cpp b/listdecorators/src/applicationui.cpp
index e893607f..0be134b3 100644
--- a/listdecorators/src/applicationui.cpp
+++ b/listdecorators/src/applicationui.cpp
@@ -15,7 +15,6 @@
*/
#include "GroupArtistDataModelDecorator.hpp"
-#include "GroupStyleDataQueryDecorator.hpp"
#include "DataQualityDataQueryDecorator.hpp"
#include "DataQualityModelDecorator.hpp"
#include "ExpandableDataModelDecorator.hpp"
@@ -35,8 +34,6 @@ ApplicationUI::ApplicationUI(bb::cascades::Application *app)
{
qmlRegisterType("bb.cascades.decorators", 1,
2, "GroupArtistDataModelDecorator");
- qmlRegisterType("bb.cascades.decorators", 1,
- 2, "GroupStyleDataQueryDecorator");
qmlRegisterType("bb.cascades.decorators", 1,
2, "DataQualityDataQueryDecorator");
qmlRegisterType("bb.cascades.decorators", 1, 2,
diff --git a/xandosdroid/src/xandosdroid.cpp b/xandosdroid/src/xandosdroid.cpp
index e58741a1..4d533545 100644
--- a/xandosdroid/src/xandosdroid.cpp
+++ b/xandosdroid/src/xandosdroid.cpp
@@ -107,13 +107,13 @@ QList xandosdroid::availableChoices(int index)
return choices;
}
//! [4]
-//! [5]
+
void xandosdroid::sendSelection(const int index)
{
m_nextMove = index;
connectToServer();
}
-
+//![5]
void xandosdroid::connectToServer()
{
if (!m_clientSocket->isOpen()) {
@@ -136,7 +136,6 @@ void xandosdroid::connected()
m_clientSocket->flush();
select(m_nextMove, -1);
}
-//! [5]
void xandosdroid::readyRead()
{
@@ -169,6 +168,7 @@ void xandosdroid::disconnected()
qDebug() << "XandOsDroid: disconnected...";
bb::Application::instance()->quit();
}
+//! [5]
//! [6]
int xandosdroid::nextMove(int player)
{