extprogs.h

Mon, 06 May 2013 03:32:00 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 06 May 2013 03:32:00 +0300
changeset 166
72ec7b60da54
parent 165
88a03c1a52d9
child 167
df78c894ae24
permissions
-rw-r--r--

add missing license headers from new files

166
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
1 /*
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
2 * LDForge: LDraw parts authoring CAD
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
3 * Copyright (C) 2013 Santeri Piippo
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
4 *
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
5 * This program is free software: you can redistribute it and/or modify
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
6 * it under the terms of the GNU General Public License as published by
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
8 * (at your option) any later version.
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
9 *
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
10 * This program is distributed in the hope that it will be useful,
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
13 * GNU General Public License for more details.
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
14 *
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
15 * You should have received a copy of the GNU General Public License
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
17 */
72ec7b60da54 add missing license headers from new files
Santeri Piippo <crimsondusk64@gmail.com>
parents: 165
diff changeset
18
165
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #ifndef EXTPROGS_H
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #define EXTPROGS_H
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 #include <qobject.h>
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 class QProcess;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 class ProcessWaiter : public QObject {
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 Q_OBJECT
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 public:
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 ProcessWaiter (QProcess* proc, bool& readyvar) : m_proc (proc), m_readyvar (readyvar) {
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 m_readyvar = false;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 }
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 int exitFlag () { return m_exitflag; }
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 public slots:
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 void slot_procDone (int exitflag) {
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37 m_readyvar = true;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 m_exitflag = exitflag;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39 }
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 private:
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 QProcess* m_proc;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 bool& m_readyvar;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44 int m_exitflag;
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
45 };
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
46
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
47 enum extprog {
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
48 IseCalc,
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
49 Intersector,
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
50 Coverer,
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
51 Ytruder,
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
52 DATHeader
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
53 };
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
54
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
55 void runYtruder ();
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
56
88a03c1a52d9 Begin work on external program support (Ytruder partially supported)
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
57 #endif // EXTPROGS_H

mercurial