diff options
author | Timothy Pearson <[email protected]> | 2012-12-06 18:29:37 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-12-06 18:29:37 -0600 |
commit | caf80d88243aaa00e8f1baeaa6b7e4c3aca75f63 (patch) | |
tree | 860926c1e01068a8d3b8ea120630a48cf537424b /tutorial/t15/main.h | |
parent | 78125ea2f051107b84fdc0354acdedb7885308ee (diff) | |
download | qt3-caf80d88243aaa00e8f1baeaa6b7e4c3aca75f63.tar.gz qt3-caf80d88243aaa00e8f1baeaa6b7e4c3aca75f63.zip |
Add threading tutorial and fix a couple rare crashes
Diffstat (limited to 'tutorial/t15/main.h')
-rw-r--r-- | tutorial/t15/main.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tutorial/t15/main.h b/tutorial/t15/main.h new file mode 100644 index 0000000..13ac5df --- /dev/null +++ b/tutorial/t15/main.h @@ -0,0 +1,45 @@ +/**************************************************************** +** +** Qt threading tutorial +** (c) 2012 Timothy Pearson <[email protected]> +** +** This tutorial is released into the Public Domain and +** can therefore be modified and/or used for any purpose +** +****************************************************************/ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + +#include <qapplication.h> +#include <qobject.h> +#include <qpushbutton.h> +#include <qthread.h> + +class MainObject; + +class WorkerObject : public QObject +{ + Q_OBJECT + + public slots: + void run(); + void timerHandler(); + + signals: + void displayMessage(QString, QString); + + public: + QString threadFriendlyName; +}; + +class MainObject : public QObject +{ + Q_OBJECT + + public slots: + void emitMessage(QString, QString); + void buttonClicked(); +}; + +#endif // _MAIN_H_ |