diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-10-26 09:31:08 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-10-26 09:31:08 -0300 |
commit | ae3abca2b15794bdde313eed3f7f9391cd68f72d (patch) | |
tree | 382309fb28924ec0d52ade46674904bb458ccd22 /doc/tutorial/libfoo.rst | |
parent | 8fd38fe9fcb176441e34cad2a3094301c33080f5 (diff) |
forked boostpythongenerator project to separate the generatorrunner
so that it could be used independently; the qtdoc generator module
remained part of generatorrunner
Diffstat (limited to 'doc/tutorial/libfoo.rst')
-rw-r--r-- | doc/tutorial/libfoo.rst | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/doc/tutorial/libfoo.rst b/doc/tutorial/libfoo.rst deleted file mode 100644 index 76246570d..000000000 --- a/doc/tutorial/libfoo.rst +++ /dev/null @@ -1,68 +0,0 @@ -.. highlight:: cpp - -.. _gentut-libfoo: - -Creating the foo library -========================= - -In this section it will be presented the code and the build instructions for a -very simple Qt4 based library. It will be used as the subject for this tutorial. - -The Source Code ---------------- - -There is only one class on this foo library plus a ``.pro`` file which means -that the build system used will be Trolltech's **qmake**. - -Put the files below in a directory called **libfoo**. Be aware that this -directory will be refered by the binding Makefile presented in a next section -of this tutorial. If you want to use other names or paths change the binding -Makefile accordingly. Blind copy'n'paste shortens your life. - -**libfoo/foo.h** -:: - - #ifndef FOO_H - #define FOO_H - - #include <QtCore/QtCore> - - class Math : public QObject - { - Q_OBJECT - public: - Math() {} - virtual ~Math() {} - int squared(int x); - }; - #endif // FOO_H - - -**libfoo/foo.cpp** -:: - - #include "foo.h" - - int Math::squared(int x) - { - return x * x; - } - - -**libfoo/foo.pro** -:: - - TEMPLATE = lib - TARGET = foo - DEPENDPATH += . - INCLUDEPATH += . - HEADERS += foo.h - SOURCES += foo.cpp - -To build the lib: - -:: - - $ cd libfoo - $ qmake - $ make |