Tue, 21 Jan 2014 01:05:03 +0200
- renamed VertexCompiler to GLCompiler
623
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | /* |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | * LDForge: LDraw parts authoring CAD |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
3 | * Copyright (C) 2013, 2014 Santeri Piippo |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | * |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | * |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | * |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | */ |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
19 | #ifndef LDFORGE_MISC_INVOKATION_DEFERER_H |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
20 | #define LDFORGE_MISC_INVOKATION_DEFERER_H |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
22 | #include <QObject> |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
23 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | class InvokationDeferer : public QObject |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | { |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | Q_OBJECT |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | public: |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
29 | using FunctionType = void(*)(); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | explicit InvokationDeferer (QObject* parent = 0); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
32 | void addFunctionCall (FunctionType func); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
34 | signals: |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
35 | void functionAdded(); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
36 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
37 | private: |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | QList<FunctionType> m_funcs; |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
40 | private slots: |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
41 | void invokeFunctions(); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
42 | }; |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
43 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
44 | void invokeLater (InvokationDeferer::FunctionType func); |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
45 | |
cd0cbf091b83
- forgot the invokation deferer files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
46 | #endif // LDFORGE_MISC_INVOKATION_DEFERER_H |