Sun, 18 Mar 2018 12:00:39 +0200
added subfile reference editor
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | /* |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | * LDForge: LDraw parts authoring CAD |
1072 | 3 | * Copyright (C) 2013 - 2017 Teemu Piippo |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | * This program is free software: you can redistribute it and/or modify |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation, either version 3 of the License, or |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | * |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
17 | */ |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
18 | |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
19 | #pragma once |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
20 | #include <QRegExp> |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
21 | #include <QDialog> |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
22 | #include <QTreeWidgetItem> |
1021
f40c792c9334
Replaced GetRecursiveFilenames with QDirIterator
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1019
diff
changeset
|
23 | #include <QDirIterator> |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
24 | #include "main.h" |
1080
6dac2d52bd9a
Removed the LDSpawn function and replaced its last use cases.
Teemu Piippo <teemu@hecknology.net>
parents:
1072
diff
changeset
|
25 | #include "model.h" |
1159
6ad8cdcd88d9
print() is no longer a global function but is tied to HierarchyElement.
Teemu Piippo <teemu@hecknology.net>
parents:
1080
diff
changeset
|
26 | #include "hierarchyelement.h" |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | class LDDocument; |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
29 | class Ui_GeneratePrimitiveDialog; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | class PrimitiveCategory; |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
31 | class PrimitiveScanner; |
794 | 32 | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
33 | struct Primitive |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
34 | { |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
35 | QString name; |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
36 | QString title; |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
37 | PrimitiveCategory* category; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
38 | }; |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
39 | |
1053 | 40 | struct PrimitiveModel |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
41 | { |
1053 | 42 | enum Type |
43 | { | |
44 | Circle, | |
45 | Cylinder, | |
46 | Disc, | |
47 | DiscNegative, | |
48 | Ring, | |
49 | Cone, | |
50 | } type; | |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
51 | int segments; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
52 | int divisions; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
53 | int ringNumber; |
1053 | 54 | |
55 | QString typeName() const; | |
1080
6dac2d52bd9a
Removed the LDSpawn function and replaced its last use cases.
Teemu Piippo <teemu@hecknology.net>
parents:
1072
diff
changeset
|
56 | void generateBody(Model& model) const; |
1053 | 57 | static QString typeName(Type type); |
58 | QString makeFileName() const; | |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
59 | }; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
60 | |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
61 | class PrimitiveCategory : public QObject |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
62 | { |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
63 | Q_OBJECT |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
64 | |
794 | 65 | public: |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
66 | enum PatternType |
794 | 67 | { |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
68 | FilenamePattern, |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
69 | TitlePattern |
794 | 70 | }; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
71 | |
794 | 72 | struct RegexEntry |
73 | { | |
74 | QRegExp regex; | |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
75 | PatternType type; |
794 | 76 | }; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
77 | |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
78 | QList<RegexEntry> patterns; |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
79 | QList<Primitive> primitives; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
80 | |
794 | 81 | explicit PrimitiveCategory (QString name, QObject* parent = 0); |
82 | bool isValidToInclude(); | |
1010
969b48eddd6b
A bit more cleanup. Finally removed the PROPERTY macro. (now let's see about making a new one sometime that isn't so terrible?)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
984
diff
changeset
|
83 | QString name() const; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
84 | |
1010
969b48eddd6b
A bit more cleanup. Finally removed the PROPERTY macro. (now let's see about making a new one sometime that isn't so terrible?)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
984
diff
changeset
|
85 | private: |
969b48eddd6b
A bit more cleanup. Finally removed the PROPERTY macro. (now let's see about making a new one sometime that isn't so terrible?)
Teemu Piippo <crimsondusk64@gmail.com>
parents:
984
diff
changeset
|
86 | QString m_name; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
87 | }; |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
88 | |
1283
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
89 | class PrimitiveManager : public QAbstractItemModel, HierarchyElement |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
90 | { |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
91 | Q_OBJECT |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
92 | |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
93 | public: |
1297
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
94 | enum |
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
95 | { |
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
96 | PrimitiveNameRole = Qt::UserRole + 10, |
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
97 | PrimitiveDescriptionRole, |
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
98 | }; |
389516787a4c
added subfile reference editor
Teemu Piippo <teemu@hecknology.net>
parents:
1283
diff
changeset
|
99 | |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
100 | PrimitiveManager(QObject* parent); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
101 | |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
102 | PrimitiveScanner* activeScanner(); |
1053 | 103 | LDDocument* generatePrimitive(const PrimitiveModel &spec); |
104 | LDDocument* getPrimitive(const PrimitiveModel &spec); | |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
105 | QString getPrimitivesCfgPath() const; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
106 | void loadPrimitives(); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
107 | void startScan(); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
108 | |
1283
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
109 | int columnCount(const QModelIndex &parent = {}) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
110 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
111 | QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
112 | QModelIndex parent(const QModelIndex &index) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
113 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
114 | QVariant headerData(int section, Qt::Orientation orientation, int role) const override; |
3c3a5eb965f7
added an MVC interface to the primitives tree
Teemu Piippo <teemu@hecknology.net>
parents:
1159
diff
changeset
|
115 | |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
116 | private: |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
117 | QList<PrimitiveCategory*> m_categories; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
118 | PrimitiveScanner* m_activeScanner; |
1055
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
119 | QVector<Primitive> m_primitives; |
1019
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
120 | PrimitiveCategory* m_unmatched; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
121 | |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
122 | void loadCategories(); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
123 | void populateCategories(); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
124 | void clearCategories(); |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
125 | }; |
a2e4286adb0d
Split PrimitivePrompt into its new source files, renamed it to GeneratePrimitivePrompt
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1018
diff
changeset
|
126 | |
1055
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
127 | /* |
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
128 | * PrimitiveScanner |
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
129 | * |
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
130 | * Worker object that scans the primitives folder for primitives and builds an index of them. |
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
131 | */ |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
132 | class PrimitiveScanner : public QObject, HierarchyElement |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
133 | { |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
134 | Q_OBJECT |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
135 | |
794 | 136 | public: |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
137 | PrimitiveScanner(PrimitiveManager* parent); |
1055
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
138 | const QVector<Primitive>& scannedPrimitives() const; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
139 | |
794 | 140 | public slots: |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
141 | void work(); |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
142 | |
794 | 143 | signals: |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
144 | void workDone(); |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
145 | |
794 | 146 | private: |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
147 | PrimitiveManager* m_manager; |
1055
c28d07a583ac
Cleaned up PrimitiveScanner
Teemu Piippo <teemu@hecknology.net>
parents:
1054
diff
changeset
|
148 | QVector<Primitive> m_scannedPrimitives; |
1021
f40c792c9334
Replaced GetRecursiveFilenames with QDirIterator
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1019
diff
changeset
|
149 | QDirIterator m_iterator; |
f40c792c9334
Replaced GetRecursiveFilenames with QDirIterator
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1019
diff
changeset
|
150 | int m_basePathLength; |
655
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
151 | }; |
b376645315ab
- renamed files to camelCase
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
152 | |
1018
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
153 | class PrimitiveTreeItem : public QTreeWidgetItem |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
154 | { |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
155 | public: |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
156 | PrimitiveTreeItem (QTreeWidgetItem* parent, Primitive* info); |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
157 | PrimitiveTreeItem (QTreeWidget* parent, Primitive* info); |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
158 | Primitive* primitive() const; |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
159 | |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
160 | private: |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
161 | Primitive* m_primitive; |
49358df9495b
Transformed primitive management into a new class PrimitiveManager that is a member of MainWindow
Teemu Piippo <crimsondusk64@gmail.com>
parents:
1014
diff
changeset
|
162 | }; |