annotate gui/src/backend/OctaveCallbackThread.h @ 14290:faece6b2ab90 gui

Corrected license headers in all files to GPL. * README: Deleted because it was outdated anyways.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Tue, 31 Jan 2012 00:47:54 +0100
parents f27573828e92
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
1 /* OctaveGUI - A graphical user interface for Octave
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13543
diff changeset
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com)
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
3 *
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
4 * This program is free software: you can redistribute it and/or modify
14290
faece6b2ab90 Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13677
diff changeset
5 * it under the terms of the GNU General Public License as
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13543
diff changeset
6 * published by the Free Software Foundation, either version 3 of the
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13543
diff changeset
7 * License, or (at your option) any later version.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
8 *
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
9 * This program is distributed in the hope that it will be useful,
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14290
faece6b2ab90 Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13677
diff changeset
12 * GNU General Public License for more details.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
13 *
14290
faece6b2ab90 Corrected license headers in all files to GPL.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13677
diff changeset
14 * You should have received a copy of the GNU General Public License
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13543
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
13543
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
16 */
8d529f8103dc Separated backend files to folder.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13541
diff changeset
17
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
18 #ifndef OCTAVECALLBACKTHREAD_H
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
19 #define OCTAVECALLBACKTHREAD_H
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
20
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
21 #include <QThread>
13677
f27573828e92 Properly implemented shutdown of callback thread.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13674
diff changeset
22 #include <QSemaphore>
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
23
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
24 class OctaveCallbackThread:public QThread
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
25 {
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
26 Q_OBJECT
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
27 public:
13677
f27573828e92 Properly implemented shutdown of callback thread.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13674
diff changeset
28 void halt();
13541
b48ac9ad8de0 Highly improved separation of model and view classes.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13540
diff changeset
29 OctaveCallbackThread (QObject * parent);
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
30 protected:
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
31 void run ();
13677
f27573828e92 Properly implemented shutdown of callback thread.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13674
diff changeset
32 private:
f27573828e92 Properly implemented shutdown of callback thread.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13674
diff changeset
33 QSemaphore *m_runningSemaphore;
f27573828e92 Properly implemented shutdown of callback thread.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13674
diff changeset
34 bool m_running;
13540
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
35 };
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
36
0dbf8681cd08 Seperated classes into own files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
37 #endif // OCTAVECALLBACKTHREAD_H