simple_mtglife

changeset 0:6321cfa2ad62

initial
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 23 Jan 2015 15:24:27 +0200
parents
children d76fb2ffe7f5
files android/AndroidManifest.xml android/build.gradle android/gradle/wrapper/gradle-wrapper.jar android/gradle/wrapper/gradle-wrapper.properties android/gradlew android/gradlew.bat android/res/values/libs.xml main.cc mainwin.cc mainwin.h mainwin.ui simple_mtglife.pro
diffstat 12 files changed, 930 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/android/AndroidManifest.xml	Fri Jan 23 15:24:27 2015 +0200
     1.3 @@ -0,0 +1,56 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<manifest package="com.mutantstargoat.simple_mtglife" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
     1.6 +	<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
     1.7 +		<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="sensorLandscape" android:launchMode="singleTop">
     1.8 +			<intent-filter>
     1.9 +				<action android:name="android.intent.action.MAIN"/>
    1.10 +				<category android:name="android.intent.category.LAUNCHER"/>
    1.11 +			</intent-filter>
    1.12 +			<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
    1.13 +			<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
    1.14 +			<meta-data android:name="android.app.repository" android:value="default"/>
    1.15 +			<meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
    1.16 +			<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
    1.17 +			<!-- Deploy Qt libs as part of package -->
    1.18 +			<meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
    1.19 +			<meta-data android:name="android.app.bundled_in_lib_resource_id" android:resource="@array/bundled_in_lib"/>
    1.20 +			<meta-data android:name="android.app.bundled_in_assets_resource_id" android:resource="@array/bundled_in_assets"/>
    1.21 +			<!-- Run with local libs -->
    1.22 +			<meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
    1.23 +			<meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
    1.24 +			<meta-data android:name="android.app.load_local_libs" android:value="-- %%INSERT_LOCAL_LIBS%% --"/>
    1.25 +			<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
    1.26 +			<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
    1.27 +			<!--  Messages maps -->
    1.28 +			<meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
    1.29 +			<meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
    1.30 +			<meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
    1.31 +			<!--  Messages maps -->
    1.32 +
    1.33 +			<!-- Splash screen -->
    1.34 +			<!--
    1.35 +			<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/>
    1.36 +			-->
    1.37 +			<!-- Splash screen -->
    1.38 +
    1.39 +			<!-- Background running -->
    1.40 +			<!-- Warning: changing this value to true may cause unexpected crashes if the
    1.41 +						  application still try to draw after
    1.42 +						  "applicationStateChanged(Qt::ApplicationSuspended)"
    1.43 +						  signal is sent! -->
    1.44 +			<meta-data android:name="android.app.background_running" android:value="false"/>
    1.45 +			<!-- Background running -->
    1.46 +		</activity>
    1.47 +	</application>
    1.48 +	<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
    1.49 +	<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
    1.50 +
    1.51 +	<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
    1.52 +		 Remove the comment if you do not require these default permissions. -->
    1.53 +	<!-- %%INSERT_PERMISSIONS -->
    1.54 +
    1.55 +	<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
    1.56 +		 Remove the comment if you do not require these default features. -->
    1.57 +	<!-- %%INSERT_FEATURES -->
    1.58 +
    1.59 +</manifest>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/android/build.gradle	Fri Jan 23 15:24:27 2015 +0200
     2.3 @@ -0,0 +1,51 @@
     2.4 +buildscript {
     2.5 +    repositories {
     2.6 +        mavenCentral()
     2.7 +    }
     2.8 +
     2.9 +    dependencies {
    2.10 +        classpath 'com.android.tools.build:gradle:0.12.1'
    2.11 +    }
    2.12 +}
    2.13 +
    2.14 +apply plugin: 'android'
    2.15 +
    2.16 +dependencies {
    2.17 +    compile fileTree(dir: 'libs', include: ['*.jar'])
    2.18 +}
    2.19 +
    2.20 +android {
    2.21 +    /*******************************************************
    2.22 +     * The following variables:
    2.23 +     * - androidBuildToolsVersion,
    2.24 +     * - androidCompileSdkVersion
    2.25 +     * - qt5AndroidDir - holds the path to qt android files
    2.26 +     *                   needed to build any Qt application
    2.27 +     *                   on Android.
    2.28 +     *
    2.29 +     * are defined in gradle.properties file. This file is
    2.30 +     * updated by QtCreator and androiddeployqt tools.
    2.31 +     * Changing them manually might break the compilation!
    2.32 +     *******************************************************/
    2.33 +
    2.34 +    compileSdkVersion androidCompileSdkVersion.toInteger()
    2.35 +
    2.36 +    buildToolsVersion androidBuildToolsVersion
    2.37 +
    2.38 +    sourceSets {
    2.39 +        main {
    2.40 +            manifest.srcFile 'AndroidManifest.xml'
    2.41 +            java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
    2.42 +            aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
    2.43 +            res.srcDirs = [qt5AndroidDir + '/res', 'res']
    2.44 +            resources.srcDirs = ['src']
    2.45 +            renderscript.srcDirs = ['src']
    2.46 +            assets.srcDirs = ['assets']
    2.47 +            jniLibs.srcDirs = ['libs']
    2.48 +       }
    2.49 +    }
    2.50 +
    2.51 +    lintOptions {
    2.52 +        abortOnError false
    2.53 +    }
    2.54 +}
     3.1 Binary file android/gradle/wrapper/gradle-wrapper.jar has changed
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/android/gradle/wrapper/gradle-wrapper.properties	Fri Jan 23 15:24:27 2015 +0200
     4.3 @@ -0,0 +1,6 @@
     4.4 +#Wed Apr 10 15:27:10 PDT 2013
     4.5 +distributionBase=GRADLE_USER_HOME
     4.6 +distributionPath=wrapper/dists
     4.7 +zipStoreBase=GRADLE_USER_HOME
     4.8 +zipStorePath=wrapper/dists
     4.9 +distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/android/gradlew	Fri Jan 23 15:24:27 2015 +0200
     5.3 @@ -0,0 +1,164 @@
     5.4 +#!/usr/bin/env bash
     5.5 +
     5.6 +##############################################################################
     5.7 +##
     5.8 +##  Gradle start up script for UN*X
     5.9 +##
    5.10 +##############################################################################
    5.11 +
    5.12 +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
    5.13 +DEFAULT_JVM_OPTS=""
    5.14 +
    5.15 +APP_NAME="Gradle"
    5.16 +APP_BASE_NAME=`basename "$0"`
    5.17 +
    5.18 +# Use the maximum available, or set MAX_FD != -1 to use that value.
    5.19 +MAX_FD="maximum"
    5.20 +
    5.21 +warn ( ) {
    5.22 +    echo "$*"
    5.23 +}
    5.24 +
    5.25 +die ( ) {
    5.26 +    echo
    5.27 +    echo "$*"
    5.28 +    echo
    5.29 +    exit 1
    5.30 +}
    5.31 +
    5.32 +# OS specific support (must be 'true' or 'false').
    5.33 +cygwin=false
    5.34 +msys=false
    5.35 +darwin=false
    5.36 +case "`uname`" in
    5.37 +  CYGWIN* )
    5.38 +    cygwin=true
    5.39 +    ;;
    5.40 +  Darwin* )
    5.41 +    darwin=true
    5.42 +    ;;
    5.43 +  MINGW* )
    5.44 +    msys=true
    5.45 +    ;;
    5.46 +esac
    5.47 +
    5.48 +# For Cygwin, ensure paths are in UNIX format before anything is touched.
    5.49 +if $cygwin ; then
    5.50 +    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
    5.51 +fi
    5.52 +
    5.53 +# Attempt to set APP_HOME
    5.54 +# Resolve links: $0 may be a link
    5.55 +PRG="$0"
    5.56 +# Need this for relative symlinks.
    5.57 +while [ -h "$PRG" ] ; do
    5.58 +    ls=`ls -ld "$PRG"`
    5.59 +    link=`expr "$ls" : '.*-> \(.*\)$'`
    5.60 +    if expr "$link" : '/.*' > /dev/null; then
    5.61 +        PRG="$link"
    5.62 +    else
    5.63 +        PRG=`dirname "$PRG"`"/$link"
    5.64 +    fi
    5.65 +done
    5.66 +SAVED="`pwd`"
    5.67 +cd "`dirname \"$PRG\"`/" >&-
    5.68 +APP_HOME="`pwd -P`"
    5.69 +cd "$SAVED" >&-
    5.70 +
    5.71 +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
    5.72 +
    5.73 +# Determine the Java command to use to start the JVM.
    5.74 +if [ -n "$JAVA_HOME" ] ; then
    5.75 +    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
    5.76 +        # IBM's JDK on AIX uses strange locations for the executables
    5.77 +        JAVACMD="$JAVA_HOME/jre/sh/java"
    5.78 +    else
    5.79 +        JAVACMD="$JAVA_HOME/bin/java"
    5.80 +    fi
    5.81 +    if [ ! -x "$JAVACMD" ] ; then
    5.82 +        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
    5.83 +
    5.84 +Please set the JAVA_HOME variable in your environment to match the
    5.85 +location of your Java installation."
    5.86 +    fi
    5.87 +else
    5.88 +    JAVACMD="java"
    5.89 +    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
    5.90 +
    5.91 +Please set the JAVA_HOME variable in your environment to match the
    5.92 +location of your Java installation."
    5.93 +fi
    5.94 +
    5.95 +# Increase the maximum file descriptors if we can.
    5.96 +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
    5.97 +    MAX_FD_LIMIT=`ulimit -H -n`
    5.98 +    if [ $? -eq 0 ] ; then
    5.99 +        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
   5.100 +            MAX_FD="$MAX_FD_LIMIT"
   5.101 +        fi
   5.102 +        ulimit -n $MAX_FD
   5.103 +        if [ $? -ne 0 ] ; then
   5.104 +            warn "Could not set maximum file descriptor limit: $MAX_FD"
   5.105 +        fi
   5.106 +    else
   5.107 +        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
   5.108 +    fi
   5.109 +fi
   5.110 +
   5.111 +# For Darwin, add options to specify how the application appears in the dock
   5.112 +if $darwin; then
   5.113 +    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
   5.114 +fi
   5.115 +
   5.116 +# For Cygwin, switch paths to Windows format before running java
   5.117 +if $cygwin ; then
   5.118 +    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
   5.119 +    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
   5.120 +
   5.121 +    # We build the pattern for arguments to be converted via cygpath
   5.122 +    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
   5.123 +    SEP=""
   5.124 +    for dir in $ROOTDIRSRAW ; do
   5.125 +        ROOTDIRS="$ROOTDIRS$SEP$dir"
   5.126 +        SEP="|"
   5.127 +    done
   5.128 +    OURCYGPATTERN="(^($ROOTDIRS))"
   5.129 +    # Add a user-defined pattern to the cygpath arguments
   5.130 +    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
   5.131 +        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
   5.132 +    fi
   5.133 +    # Now convert the arguments - kludge to limit ourselves to /bin/sh
   5.134 +    i=0
   5.135 +    for arg in "$@" ; do
   5.136 +        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
   5.137 +        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
   5.138 +
   5.139 +        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
   5.140 +            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
   5.141 +        else
   5.142 +            eval `echo args$i`="\"$arg\""
   5.143 +        fi
   5.144 +        i=$((i+1))
   5.145 +    done
   5.146 +    case $i in
   5.147 +        (0) set -- ;;
   5.148 +        (1) set -- "$args0" ;;
   5.149 +        (2) set -- "$args0" "$args1" ;;
   5.150 +        (3) set -- "$args0" "$args1" "$args2" ;;
   5.151 +        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
   5.152 +        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
   5.153 +        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
   5.154 +        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
   5.155 +        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
   5.156 +        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
   5.157 +    esac
   5.158 +fi
   5.159 +
   5.160 +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
   5.161 +function splitJvmOpts() {
   5.162 +    JVM_OPTS=("$@")
   5.163 +}
   5.164 +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
   5.165 +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
   5.166 +
   5.167 +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/android/gradlew.bat	Fri Jan 23 15:24:27 2015 +0200
     6.3 @@ -0,0 +1,90 @@
     6.4 +@if "%DEBUG%" == "" @echo off
     6.5 +@rem ##########################################################################
     6.6 +@rem
     6.7 +@rem  Gradle startup script for Windows
     6.8 +@rem
     6.9 +@rem ##########################################################################
    6.10 +
    6.11 +@rem Set local scope for the variables with windows NT shell
    6.12 +if "%OS%"=="Windows_NT" setlocal
    6.13 +
    6.14 +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
    6.15 +set DEFAULT_JVM_OPTS=
    6.16 +
    6.17 +set DIRNAME=%~dp0
    6.18 +if "%DIRNAME%" == "" set DIRNAME=.
    6.19 +set APP_BASE_NAME=%~n0
    6.20 +set APP_HOME=%DIRNAME%
    6.21 +
    6.22 +@rem Find java.exe
    6.23 +if defined JAVA_HOME goto findJavaFromJavaHome
    6.24 +
    6.25 +set JAVA_EXE=java.exe
    6.26 +%JAVA_EXE% -version >NUL 2>&1
    6.27 +if "%ERRORLEVEL%" == "0" goto init
    6.28 +
    6.29 +echo.
    6.30 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
    6.31 +echo.
    6.32 +echo Please set the JAVA_HOME variable in your environment to match the
    6.33 +echo location of your Java installation.
    6.34 +
    6.35 +goto fail
    6.36 +
    6.37 +:findJavaFromJavaHome
    6.38 +set JAVA_HOME=%JAVA_HOME:"=%
    6.39 +set JAVA_EXE=%JAVA_HOME%/bin/java.exe
    6.40 +
    6.41 +if exist "%JAVA_EXE%" goto init
    6.42 +
    6.43 +echo.
    6.44 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
    6.45 +echo.
    6.46 +echo Please set the JAVA_HOME variable in your environment to match the
    6.47 +echo location of your Java installation.
    6.48 +
    6.49 +goto fail
    6.50 +
    6.51 +:init
    6.52 +@rem Get command-line arguments, handling Windowz variants
    6.53 +
    6.54 +if not "%OS%" == "Windows_NT" goto win9xME_args
    6.55 +if "%@eval[2+2]" == "4" goto 4NT_args
    6.56 +
    6.57 +:win9xME_args
    6.58 +@rem Slurp the command line arguments.
    6.59 +set CMD_LINE_ARGS=
    6.60 +set _SKIP=2
    6.61 +
    6.62 +:win9xME_args_slurp
    6.63 +if "x%~1" == "x" goto execute
    6.64 +
    6.65 +set CMD_LINE_ARGS=%*
    6.66 +goto execute
    6.67 +
    6.68 +:4NT_args
    6.69 +@rem Get arguments from the 4NT Shell from JP Software
    6.70 +set CMD_LINE_ARGS=%$
    6.71 +
    6.72 +:execute
    6.73 +@rem Setup the command line
    6.74 +
    6.75 +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
    6.76 +
    6.77 +@rem Execute Gradle
    6.78 +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
    6.79 +
    6.80 +:end
    6.81 +@rem End local scope for the variables with windows NT shell
    6.82 +if "%ERRORLEVEL%"=="0" goto mainEnd
    6.83 +
    6.84 +:fail
    6.85 +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
    6.86 +rem the _cmd.exe /c_ return code!
    6.87 +if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
    6.88 +exit /b 1
    6.89 +
    6.90 +:mainEnd
    6.91 +if "%OS%"=="Windows_NT" endlocal
    6.92 +
    6.93 +:omega
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/android/res/values/libs.xml	Fri Jan 23 15:24:27 2015 +0200
     7.3 @@ -0,0 +1,25 @@
     7.4 +<?xml version='1.0' encoding='utf-8'?>
     7.5 +<resources>
     7.6 +    <array name="qt_sources">
     7.7 +        <item>https://download.qt-project.org/ministro/android/qt5/qt-5.4</item>
     7.8 +    </array>
     7.9 +
    7.10 +    <!-- The following is handled automatically by the deployment tool. It should
    7.11 +         not be edited manually. -->
    7.12 +
    7.13 +    <array name="bundled_libs">
    7.14 +        <!-- %%INSERT_EXTRA_LIBS%% -->
    7.15 +    </array>
    7.16 +
    7.17 +     <array name="qt_libs">
    7.18 +         <!-- %%INSERT_QT_LIBS%% -->
    7.19 +     </array>
    7.20 +
    7.21 +    <array name="bundled_in_lib">
    7.22 +        <!-- %%INSERT_BUNDLED_IN_LIB%% -->
    7.23 +    </array>
    7.24 +    <array name="bundled_in_assets">
    7.25 +        <!-- %%INSERT_BUNDLED_IN_ASSETS%% -->
    7.26 +    </array>
    7.27 +
    7.28 +</resources>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/main.cc	Fri Jan 23 15:24:27 2015 +0200
     8.3 @@ -0,0 +1,11 @@
     8.4 +#include "mainwin.h"
     8.5 +#include <QApplication>
     8.6 +
     8.7 +int main(int argc, char *argv[])
     8.8 +{
     8.9 +	QApplication a(argc, argv);
    8.10 +	MainWin w;
    8.11 +	w.show();
    8.12 +
    8.13 +	return a.exec();
    8.14 +}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/mainwin.cc	Fri Jan 23 15:24:27 2015 +0200
     9.3 @@ -0,0 +1,44 @@
     9.4 +#include "mainwin.h"
     9.5 +#include "ui_mainwin.h"
     9.6 +
     9.7 +MainWin::MainWin(QWidget *parent) :
     9.8 +	QMainWindow(parent),
     9.9 +	ui(new Ui::MainWin)
    9.10 +{
    9.11 +	ui->setupUi(this);
    9.12 +}
    9.13 +
    9.14 +MainWin::~MainWin()
    9.15 +{
    9.16 +	delete ui;
    9.17 +}
    9.18 +
    9.19 +void MainWin::on_bn_p1_reset_clicked()
    9.20 +{
    9.21 +	ui->spin_p1_life->setValue(20);
    9.22 +}
    9.23 +
    9.24 +void MainWin::on_bn_p2_reset_clicked()
    9.25 +{
    9.26 +	ui->spin_p2_life->setValue(20);
    9.27 +}
    9.28 +
    9.29 +void MainWin::on_bn_p1_inc10_clicked()
    9.30 +{
    9.31 +	ui->spin_p1_life->setValue(ui->spin_p1_life->value() + 10);
    9.32 +}
    9.33 +
    9.34 +void MainWin::on_bn_p1_dec10_clicked()
    9.35 +{
    9.36 +	ui->spin_p1_life->setValue(ui->spin_p1_life->value() - 10);
    9.37 +}
    9.38 +
    9.39 +void MainWin::on_bn_p2_inc10_clicked()
    9.40 +{
    9.41 +	ui->spin_p2_life->setValue(ui->spin_p2_life->value() + 10);
    9.42 +}
    9.43 +
    9.44 +void MainWin::on_bn_p2_dec10_clicked()
    9.45 +{
    9.46 +	ui->spin_p2_life->setValue(ui->spin_p2_life->value() - 10);
    9.47 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/mainwin.h	Fri Jan 23 15:24:27 2015 +0200
    10.3 @@ -0,0 +1,35 @@
    10.4 +#ifndef MAINWIN_H
    10.5 +#define MAINWIN_H
    10.6 +
    10.7 +#include <QMainWindow>
    10.8 +
    10.9 +namespace Ui {
   10.10 +class MainWin;
   10.11 +}
   10.12 +
   10.13 +class MainWin : public QMainWindow
   10.14 +{
   10.15 +	Q_OBJECT
   10.16 +
   10.17 +public:
   10.18 +	explicit MainWin(QWidget *parent = 0);
   10.19 +	~MainWin();
   10.20 +
   10.21 +private slots:
   10.22 +	void on_bn_p1_reset_clicked();
   10.23 +
   10.24 +	void on_bn_p2_reset_clicked();
   10.25 +
   10.26 +	void on_bn_p1_inc10_clicked();
   10.27 +
   10.28 +	void on_bn_p1_dec10_clicked();
   10.29 +
   10.30 +	void on_bn_p2_inc10_clicked();
   10.31 +
   10.32 +	void on_bn_p2_dec10_clicked();
   10.33 +
   10.34 +private:
   10.35 +	Ui::MainWin *ui;
   10.36 +};
   10.37 +
   10.38 +#endif // MAINWIN_H
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/mainwin.ui	Fri Jan 23 15:24:27 2015 +0200
    11.3 @@ -0,0 +1,413 @@
    11.4 +<?xml version="1.0" encoding="UTF-8"?>
    11.5 +<ui version="4.0">
    11.6 + <class>MainWin</class>
    11.7 + <widget class="QMainWindow" name="MainWin">
    11.8 +  <property name="geometry">
    11.9 +   <rect>
   11.10 +    <x>0</x>
   11.11 +    <y>0</y>
   11.12 +    <width>623</width>
   11.13 +    <height>380</height>
   11.14 +   </rect>
   11.15 +  </property>
   11.16 +  <property name="windowTitle">
   11.17 +   <string>MainWin</string>
   11.18 +  </property>
   11.19 +  <widget class="QWidget" name="centralWidget">
   11.20 +   <layout class="QHBoxLayout" name="horizontalLayout_3">
   11.21 +    <item>
   11.22 +     <widget class="QGroupBox" name="groupBox">
   11.23 +      <property name="title">
   11.24 +       <string>Player 1</string>
   11.25 +      </property>
   11.26 +      <layout class="QHBoxLayout" name="horizontalLayout">
   11.27 +       <item>
   11.28 +        <layout class="QVBoxLayout" name="verticalLayout_2">
   11.29 +         <item>
   11.30 +          <spacer name="verticalSpacer">
   11.31 +           <property name="orientation">
   11.32 +            <enum>Qt::Vertical</enum>
   11.33 +           </property>
   11.34 +           <property name="sizeHint" stdset="0">
   11.35 +            <size>
   11.36 +             <width>20</width>
   11.37 +             <height>40</height>
   11.38 +            </size>
   11.39 +           </property>
   11.40 +          </spacer>
   11.41 +         </item>
   11.42 +         <item>
   11.43 +          <widget class="QPushButton" name="bn_p1_reset">
   11.44 +           <property name="sizePolicy">
   11.45 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
   11.46 +             <horstretch>0</horstretch>
   11.47 +             <verstretch>0</verstretch>
   11.48 +            </sizepolicy>
   11.49 +           </property>
   11.50 +           <property name="text">
   11.51 +            <string>Reset</string>
   11.52 +           </property>
   11.53 +          </widget>
   11.54 +         </item>
   11.55 +         <item>
   11.56 +          <spacer name="verticalSpacer_2">
   11.57 +           <property name="orientation">
   11.58 +            <enum>Qt::Vertical</enum>
   11.59 +           </property>
   11.60 +           <property name="sizeHint" stdset="0">
   11.61 +            <size>
   11.62 +             <width>20</width>
   11.63 +             <height>40</height>
   11.64 +            </size>
   11.65 +           </property>
   11.66 +          </spacer>
   11.67 +         </item>
   11.68 +        </layout>
   11.69 +       </item>
   11.70 +       <item>
   11.71 +        <spacer name="horizontalSpacer">
   11.72 +         <property name="orientation">
   11.73 +          <enum>Qt::Horizontal</enum>
   11.74 +         </property>
   11.75 +         <property name="sizeHint" stdset="0">
   11.76 +          <size>
   11.77 +           <width>38</width>
   11.78 +           <height>20</height>
   11.79 +          </size>
   11.80 +         </property>
   11.81 +        </spacer>
   11.82 +       </item>
   11.83 +       <item>
   11.84 +        <layout class="QVBoxLayout" name="verticalLayout">
   11.85 +         <item>
   11.86 +          <widget class="QPushButton" name="bn_p1_inc10">
   11.87 +           <property name="font">
   11.88 +            <font>
   11.89 +             <pointsize>24</pointsize>
   11.90 +            </font>
   11.91 +           </property>
   11.92 +           <property name="text">
   11.93 +            <string>+10</string>
   11.94 +           </property>
   11.95 +          </widget>
   11.96 +         </item>
   11.97 +         <item>
   11.98 +          <widget class="QPushButton" name="bn_p1_inc">
   11.99 +           <property name="sizePolicy">
  11.100 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.101 +             <horstretch>0</horstretch>
  11.102 +             <verstretch>0</verstretch>
  11.103 +            </sizepolicy>
  11.104 +           </property>
  11.105 +           <property name="font">
  11.106 +            <font>
  11.107 +             <pointsize>24</pointsize>
  11.108 +            </font>
  11.109 +           </property>
  11.110 +           <property name="text">
  11.111 +            <string>+1</string>
  11.112 +           </property>
  11.113 +          </widget>
  11.114 +         </item>
  11.115 +         <item>
  11.116 +          <widget class="QSpinBox" name="spin_p1_life">
  11.117 +           <property name="sizePolicy">
  11.118 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.119 +             <horstretch>0</horstretch>
  11.120 +             <verstretch>0</verstretch>
  11.121 +            </sizepolicy>
  11.122 +           </property>
  11.123 +           <property name="font">
  11.124 +            <font>
  11.125 +             <pointsize>50</pointsize>
  11.126 +            </font>
  11.127 +           </property>
  11.128 +           <property name="frame">
  11.129 +            <bool>true</bool>
  11.130 +           </property>
  11.131 +           <property name="alignment">
  11.132 +            <set>Qt::AlignCenter</set>
  11.133 +           </property>
  11.134 +           <property name="readOnly">
  11.135 +            <bool>true</bool>
  11.136 +           </property>
  11.137 +           <property name="buttonSymbols">
  11.138 +            <enum>QAbstractSpinBox::NoButtons</enum>
  11.139 +           </property>
  11.140 +           <property name="minimum">
  11.141 +            <number>-99</number>
  11.142 +           </property>
  11.143 +           <property name="value">
  11.144 +            <number>20</number>
  11.145 +           </property>
  11.146 +          </widget>
  11.147 +         </item>
  11.148 +         <item>
  11.149 +          <widget class="QPushButton" name="bn_p1_dec">
  11.150 +           <property name="sizePolicy">
  11.151 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.152 +             <horstretch>0</horstretch>
  11.153 +             <verstretch>0</verstretch>
  11.154 +            </sizepolicy>
  11.155 +           </property>
  11.156 +           <property name="font">
  11.157 +            <font>
  11.158 +             <pointsize>24</pointsize>
  11.159 +            </font>
  11.160 +           </property>
  11.161 +           <property name="text">
  11.162 +            <string>-1</string>
  11.163 +           </property>
  11.164 +          </widget>
  11.165 +         </item>
  11.166 +         <item>
  11.167 +          <widget class="QPushButton" name="bn_p1_dec10">
  11.168 +           <property name="font">
  11.169 +            <font>
  11.170 +             <pointsize>24</pointsize>
  11.171 +            </font>
  11.172 +           </property>
  11.173 +           <property name="text">
  11.174 +            <string>-10</string>
  11.175 +           </property>
  11.176 +          </widget>
  11.177 +         </item>
  11.178 +        </layout>
  11.179 +       </item>
  11.180 +      </layout>
  11.181 +     </widget>
  11.182 +    </item>
  11.183 +    <item>
  11.184 +     <widget class="QGroupBox" name="groupBox_2">
  11.185 +      <property name="title">
  11.186 +       <string>Player 2</string>
  11.187 +      </property>
  11.188 +      <layout class="QHBoxLayout" name="horizontalLayout_2">
  11.189 +       <item>
  11.190 +        <layout class="QVBoxLayout" name="verticalLayout_3">
  11.191 +         <item>
  11.192 +          <spacer name="verticalSpacer_3">
  11.193 +           <property name="orientation">
  11.194 +            <enum>Qt::Vertical</enum>
  11.195 +           </property>
  11.196 +           <property name="sizeHint" stdset="0">
  11.197 +            <size>
  11.198 +             <width>20</width>
  11.199 +             <height>40</height>
  11.200 +            </size>
  11.201 +           </property>
  11.202 +          </spacer>
  11.203 +         </item>
  11.204 +         <item>
  11.205 +          <widget class="QPushButton" name="bn_p2_reset">
  11.206 +           <property name="sizePolicy">
  11.207 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.208 +             <horstretch>0</horstretch>
  11.209 +             <verstretch>0</verstretch>
  11.210 +            </sizepolicy>
  11.211 +           </property>
  11.212 +           <property name="text">
  11.213 +            <string>Reset</string>
  11.214 +           </property>
  11.215 +          </widget>
  11.216 +         </item>
  11.217 +         <item>
  11.218 +          <spacer name="verticalSpacer_4">
  11.219 +           <property name="orientation">
  11.220 +            <enum>Qt::Vertical</enum>
  11.221 +           </property>
  11.222 +           <property name="sizeHint" stdset="0">
  11.223 +            <size>
  11.224 +             <width>20</width>
  11.225 +             <height>40</height>
  11.226 +            </size>
  11.227 +           </property>
  11.228 +          </spacer>
  11.229 +         </item>
  11.230 +        </layout>
  11.231 +       </item>
  11.232 +       <item>
  11.233 +        <spacer name="horizontalSpacer_2">
  11.234 +         <property name="orientation">
  11.235 +          <enum>Qt::Horizontal</enum>
  11.236 +         </property>
  11.237 +         <property name="sizeHint" stdset="0">
  11.238 +          <size>
  11.239 +           <width>32</width>
  11.240 +           <height>20</height>
  11.241 +          </size>
  11.242 +         </property>
  11.243 +        </spacer>
  11.244 +       </item>
  11.245 +       <item>
  11.246 +        <layout class="QVBoxLayout" name="verticalLayout_4">
  11.247 +         <item>
  11.248 +          <widget class="QPushButton" name="bn_p2_inc10">
  11.249 +           <property name="font">
  11.250 +            <font>
  11.251 +             <pointsize>24</pointsize>
  11.252 +            </font>
  11.253 +           </property>
  11.254 +           <property name="text">
  11.255 +            <string>+10</string>
  11.256 +           </property>
  11.257 +          </widget>
  11.258 +         </item>
  11.259 +         <item>
  11.260 +          <widget class="QPushButton" name="bn_p2_inc">
  11.261 +           <property name="sizePolicy">
  11.262 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.263 +             <horstretch>0</horstretch>
  11.264 +             <verstretch>0</verstretch>
  11.265 +            </sizepolicy>
  11.266 +           </property>
  11.267 +           <property name="font">
  11.268 +            <font>
  11.269 +             <pointsize>24</pointsize>
  11.270 +            </font>
  11.271 +           </property>
  11.272 +           <property name="text">
  11.273 +            <string>+1</string>
  11.274 +           </property>
  11.275 +          </widget>
  11.276 +         </item>
  11.277 +         <item>
  11.278 +          <widget class="QSpinBox" name="spin_p2_life">
  11.279 +           <property name="sizePolicy">
  11.280 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.281 +             <horstretch>0</horstretch>
  11.282 +             <verstretch>0</verstretch>
  11.283 +            </sizepolicy>
  11.284 +           </property>
  11.285 +           <property name="font">
  11.286 +            <font>
  11.287 +             <pointsize>50</pointsize>
  11.288 +            </font>
  11.289 +           </property>
  11.290 +           <property name="frame">
  11.291 +            <bool>true</bool>
  11.292 +           </property>
  11.293 +           <property name="alignment">
  11.294 +            <set>Qt::AlignCenter</set>
  11.295 +           </property>
  11.296 +           <property name="readOnly">
  11.297 +            <bool>true</bool>
  11.298 +           </property>
  11.299 +           <property name="buttonSymbols">
  11.300 +            <enum>QAbstractSpinBox::NoButtons</enum>
  11.301 +           </property>
  11.302 +           <property name="minimum">
  11.303 +            <number>-99</number>
  11.304 +           </property>
  11.305 +           <property name="value">
  11.306 +            <number>20</number>
  11.307 +           </property>
  11.308 +          </widget>
  11.309 +         </item>
  11.310 +         <item>
  11.311 +          <widget class="QPushButton" name="bn_p2_dec">
  11.312 +           <property name="sizePolicy">
  11.313 +            <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
  11.314 +             <horstretch>0</horstretch>
  11.315 +             <verstretch>0</verstretch>
  11.316 +            </sizepolicy>
  11.317 +           </property>
  11.318 +           <property name="font">
  11.319 +            <font>
  11.320 +             <pointsize>24</pointsize>
  11.321 +            </font>
  11.322 +           </property>
  11.323 +           <property name="text">
  11.324 +            <string>-1</string>
  11.325 +           </property>
  11.326 +          </widget>
  11.327 +         </item>
  11.328 +         <item>
  11.329 +          <widget class="QPushButton" name="bn_p2_dec10">
  11.330 +           <property name="font">
  11.331 +            <font>
  11.332 +             <pointsize>24</pointsize>
  11.333 +            </font>
  11.334 +           </property>
  11.335 +           <property name="text">
  11.336 +            <string>-10</string>
  11.337 +           </property>
  11.338 +          </widget>
  11.339 +         </item>
  11.340 +        </layout>
  11.341 +       </item>
  11.342 +      </layout>
  11.343 +     </widget>
  11.344 +    </item>
  11.345 +   </layout>
  11.346 +  </widget>
  11.347 + </widget>
  11.348 + <layoutdefault spacing="6" margin="11"/>
  11.349 + <resources/>
  11.350 + <connections>
  11.351 +  <connection>
  11.352 +   <sender>bn_p1_dec</sender>
  11.353 +   <signal>clicked()</signal>
  11.354 +   <receiver>spin_p1_life</receiver>
  11.355 +   <slot>stepDown()</slot>
  11.356 +   <hints>
  11.357 +    <hint type="sourcelabel">
  11.358 +     <x>209</x>
  11.359 +     <y>277</y>
  11.360 +    </hint>
  11.361 +    <hint type="destinationlabel">
  11.362 +     <x>232</x>
  11.363 +     <y>196</y>
  11.364 +    </hint>
  11.365 +   </hints>
  11.366 +  </connection>
  11.367 +  <connection>
  11.368 +   <sender>bn_p1_inc</sender>
  11.369 +   <signal>clicked()</signal>
  11.370 +   <receiver>spin_p1_life</receiver>
  11.371 +   <slot>stepUp()</slot>
  11.372 +   <hints>
  11.373 +    <hint type="sourcelabel">
  11.374 +     <x>241</x>
  11.375 +     <y>131</y>
  11.376 +    </hint>
  11.377 +    <hint type="destinationlabel">
  11.378 +     <x>251</x>
  11.379 +     <y>181</y>
  11.380 +    </hint>
  11.381 +   </hints>
  11.382 +  </connection>
  11.383 +  <connection>
  11.384 +   <sender>bn_p2_dec</sender>
  11.385 +   <signal>clicked()</signal>
  11.386 +   <receiver>spin_p2_life</receiver>
  11.387 +   <slot>stepDown()</slot>
  11.388 +   <hints>
  11.389 +    <hint type="sourcelabel">
  11.390 +     <x>536</x>
  11.391 +     <y>252</y>
  11.392 +    </hint>
  11.393 +    <hint type="destinationlabel">
  11.394 +     <x>540</x>
  11.395 +     <y>190</y>
  11.396 +    </hint>
  11.397 +   </hints>
  11.398 +  </connection>
  11.399 +  <connection>
  11.400 +   <sender>bn_p2_inc</sender>
  11.401 +   <signal>clicked()</signal>
  11.402 +   <receiver>spin_p2_life</receiver>
  11.403 +   <slot>stepUp()</slot>
  11.404 +   <hints>
  11.405 +    <hint type="sourcelabel">
  11.406 +     <x>510</x>
  11.407 +     <y>135</y>
  11.408 +    </hint>
  11.409 +    <hint type="destinationlabel">
  11.410 +     <x>506</x>
  11.411 +     <y>189</y>
  11.412 +    </hint>
  11.413 +   </hints>
  11.414 +  </connection>
  11.415 + </connections>
  11.416 +</ui>
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/simple_mtglife.pro	Fri Jan 23 15:24:27 2015 +0200
    12.3 @@ -0,0 +1,35 @@
    12.4 +#-------------------------------------------------
    12.5 +#
    12.6 +# Project created by QtCreator 2015-01-23T12:00:15
    12.7 +#
    12.8 +#-------------------------------------------------
    12.9 +
   12.10 +QT       += core gui
   12.11 +
   12.12 +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
   12.13 +
   12.14 +TARGET = simple_mtglife
   12.15 +TEMPLATE = app
   12.16 +
   12.17 +
   12.18 +SOURCES += main.cc\
   12.19 +        mainwin.cc
   12.20 +
   12.21 +HEADERS  += mainwin.h
   12.22 +
   12.23 +FORMS    += mainwin.ui
   12.24 +
   12.25 +CONFIG += mobility
   12.26 +MOBILITY = 
   12.27 +
   12.28 +DISTFILES += \
   12.29 +    android/gradle/wrapper/gradle-wrapper.jar \
   12.30 +    android/AndroidManifest.xml \
   12.31 +    android/res/values/libs.xml \
   12.32 +    android/build.gradle \
   12.33 +    android/gradle/wrapper/gradle-wrapper.properties \
   12.34 +    android/gradlew \
   12.35 +    android/gradlew.bat
   12.36 +
   12.37 +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
   12.38 +