--- /dev/null
+Makefile*
+.moc
+.obj
+lib*.so*
+*.a
+*.prl
+*~
+.project
+.cproject
+*.pro.user*
+core
+core.*
+*-stamp
+src/quickdice
+
--- /dev/null
+This is a readme file. It should contain something useful to read =)
--- /dev/null
+###############################################################################
+#
+# This file is part of quickdice.
+#
+# Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+# Contact: Zoltan Papp <zoltan.papp@digia.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License version 2.1 as
+# published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+#------------------------------------------------------------------------------
+# Common installation configuration for all projects.
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# setup the installation prefix
+#------------------------------------------------------------------------------
+!include( common-vars.pri ) : \
+ error( "Unable to include common-vars.pri" )
+
+INSTALL_PREFIX = /usr # default installation prefix
+
+# default prefix can be overriden by defining PREFIX when running qmake
+isEmpty( PREFIX ) {
+
+ message("====")
+ message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'")
+ message("==== (current installation path is `$${INSTALL_PREFIX}')")
+} else {
+
+ INSTALL_PREFIX = $${PREFIX}
+ message("====")
+ message("==== install prefix set to `$${INSTALL_PREFIX}'")
+}
+
+#------------------------------------------------------------------------------
+# default installation target for applications
+#------------------------------------------------------------------------------
+contains( TEMPLATE, app ) {
+
+ target.path = $${INSTALL_PREFIX}/bin
+ INSTALLS += target
+ message("====")
+ message("==== INSTALLS += target")
+}
+
+#------------------------------------------------------------------------------
+# default installation target for libraries
+#------------------------------------------------------------------------------
+contains( TEMPLATE, lib ) {
+
+ target.path = $${INSTALL_PREFIX}/lib
+ INSTALLS += target
+ message("====")
+ message("==== INSTALLS += target")
+}
+
+#-----------------------------------------------------------------------------
+# target for header files
+#-----------------------------------------------------------------------------
+!isEmpty( headers.files ) {
+
+ headers.path = $${INSTALL_PREFIX}/include/$${PROJECT_FULL_NAME}
+ INSTALLS += headers
+ message("====")
+ message("==== INSTALLS += headers")
+} else {
+
+ message("====")
+ message("==== NOTE: Remember to add your API headers into `headers.files' for installation!")
+}
+
+#------------------------------------------------------------------------------
+# End of File
+#------------------------------------------------------------------------------
+
--- /dev/null
+###############################################################################
+#
+# This file is part of quickdice.
+#
+# Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+# Contact: Zoltan Papp <zoltan.papp@digia.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License version 2.1 as
+# published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+#------------------------------------------------------------------------------
+# Common configuration for all projects.
+#------------------------------------------------------------------------------
+
+CONFIG += link_pkgconfig
+MOC_DIR = .moc
+OBJECTS_DIR = .obj
+RCC_DIR = resources
+UI_DIR = ui
+UI_HEADERS_DIR = ui/include
+UI_SOURCES_DIR = ui/src
+
+# we don't like warnings...
+QMAKE_CXXFLAGS *= -Werror
+
+#------------------------------------------------------------------------------
+# End of File
+#------------------------------------------------------------------------------
+
--- /dev/null
+###############################################################################
+#
+# This file is part of quickdice.
+#
+# Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+# Contact: Zoltan Papp <zoltan.papp@digia.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License version 2.1 as
+# published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+#------------------------------------------------------------------------------
+# Common variables for all projects.
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# Project name (used e.g. in include file and doc install path).
+# remember to update debian/* files if you changes this
+#------------------------------------------------------------------------------
+PROJECT_NAME = quickdice
+PROJECT_FULL_NAME = QuickDice
+
+#------------------------------------------------------------------------------
+# Project version
+# remember to update debian/* files if you changes this
+#-----------------------------------------------------------------------------
+PROJECT_VERSION = 0.0.1
+
+#------------------------------------------------------------------------------
+# End of File
+#------------------------------------------------------------------------------
+
--- /dev/null
+###############################################################################
+#
+# This file is part of quickdice.
+#
+# Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+# Contact: Zoltan Papp <zoltan.papp@digia.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License version 2.1 as
+# published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+!include( common-vars.pri ) : \
+ error( "Unable to include common-vars.pri" )
+
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = src
+
+#------------------------------------------------------------------------------
+# installation setup
+#------------------------------------------------------------------------------
+!include( common-installs-config.pri ) : \
+ error( "Unable to include common-installs-config.pri!" )
+
+#------------------------------------------------------------------------------
+# End of File
+#------------------------------------------------------------------------------
+
--- /dev/null
+/******************************************************************************
+**
+** This file is part of quickdice.
+**
+** Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+** Contact: Zoltan Papp <zoltan.papp@digia.com>
+**
+** This library is free software; you can redistribute it and/or modify it
+** under the terms of the GNU Lesser General Public License version 2.1 as
+** published by the Free Software Foundation.
+**
+** This library is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+** License for more details.
+**
+** You should have received a copy of the GNU Lesser General Public License
+** along with this library; if not, write to the Free Software Foundation, Inc.,
+** 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+**
+******************************************************************************/
+
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
+
--- /dev/null
+/******************************************************************************
+**
+** This file is part of quickdice.
+**
+** Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+** Contact: Zoltan Papp <zoltan.papp@digia.com>
+**
+** This library is free software; you can redistribute it and/or modify it
+** under the terms of the GNU Lesser General Public License version 2.1 as
+** published by the Free Software Foundation.
+**
+** This library is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+** License for more details.
+**
+** You should have received a copy of the GNU Lesser General Public License
+** along with this library; if not, write to the Free Software Foundation, Inc.,
+** 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+**
+******************************************************************************/
+
+#include "mainwindow.h"
+#include <QtDeclarative/QtDeclarative>
+#include <QtGui/QAction>
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ QDeclarativeView *view = new QDeclarativeView;
+ setCentralWidget(view);
+
+ QDeclarativeEngine *engine = view->engine();
+ QDeclarativeContext *context = engine->rootContext();
+ context->setContextProperty(QLatin1String("message"),
+ QLatin1String("Hello World!"));
+ context->setContextProperty(QLatin1String("defaultColor"),
+ QColor(Qt::lightGray));
+
+ QAction *action = new QAction(this);
+ connect(action,
+ SIGNAL(triggered()),
+ this,
+ SLOT(close()));
+ context->setContextProperty(QLatin1String("action"),
+ action);
+
+ // FIXME: load it properly from a resource file
+ QString fn = "test.qml";
+ view->setSource(fn);
+}
+
+MainWindow::~MainWindow()
+{
+}
+
--- /dev/null
+/******************************************************************************
+**
+** This file is part of quickdice.
+**
+** Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+** Contact: Zoltan Papp <zoltan.papp@digia.com>
+**
+** This library is free software; you can redistribute it and/or modify it
+** under the terms of the GNU Lesser General Public License version 2.1 as
+** published by the Free Software Foundation.
+**
+** This library is distributed in the hope that it will be useful, but
+** WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+** License for more details.
+**
+** You should have received a copy of the GNU Lesser General Public License
+** along with this library; if not, write to the Free Software Foundation, Inc.,
+** 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+**
+******************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+};
+
+#endif // MAINWINDOW_H
+
--- /dev/null
+###############################################################################
+#
+# This file is part of quickdice.
+#
+# Copyright (C) 2011 Digia Plc. and/or its subsidiary(-ies).
+# Contact: Zoltan Papp <zoltan.papp@digia.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License version 2.1 as
+# published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+###############################################################################
+
+!include( ../common-project-config.pri ) : \
+ error( "Unable to include common-project-config.pri" )
+!include( ../common-vars.pri ) : \
+ error( "Unable to include common-vars.pri" )
+
+# -----------------------------------------------------------------------------
+# Target setup
+# -----------------------------------------------------------------------------
+TEMPLATE = app
+TARGET = $${PROJECT_NAME}
+
+QT += core \
+ gui \
+ declarative
+
+# -----------------------------------------------------------------------------
+# Dependencies
+# -----------------------------------------------------------------------------
+INCLUDEPATH += .
+
+DEPENDPATH += $$INCLUDEPATH
+
+# -----------------------------------------------------------------------------
+# Input
+# -----------------------------------------------------------------------------
+HEADERS += mainwindow.h
+
+SOURCES += mainwindow.cpp \
+ main.cpp
+
+# TODO: this should be a resource, but for now it will be fine here
+OTHER_FILES += test.qml
+
+# -----------------------------------------------------------------------------
+# Common installation setup
+# NOTE: remember to set headers.files before this include to have the headers
+# properly setup.
+# -----------------------------------------------------------------------------
+!include( ../common-installs-config.pri ) : \
+ error( "Unable to include common-installs-config.pri" )
+
+# -----------------------------------------------------------------------------
+# Installation target for the .desktop file
+# -----------------------------------------------------------------------------
+# TODO: desktop file needed
+
+#------------------------------------------------------------------------------
+# End of File
+#------------------------------------------------------------------------------
+
--- /dev/null
+import Qt 4.7
+
+Rectangle {
+ width: 640
+ height: 480
+ color: defaultColor
+
+ Text {
+ id: name
+ text: message
+ anchors.centerIn: parent
+ }
+
+ Rectangle {
+ id: myButton
+ width: 250
+ height: 25
+ color: defaultColor
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ console.log("onMyButtonClicked");
+ action.trigger();
+ }
+
+ }
+
+ Text {
+ id: myButtonText
+ text: ">> Close button <<"
+ font.pointSize: 16
+ anchors.centerIn: parent
+ }
+ }
+
+}