Showing
17 changed files
with
95 additions
and
91 deletions
1 | +#include "stdafx.h" | ||
1 | #include "GraphItem.h" | 2 | #include "GraphItem.h" |
2 | 3 | ||
3 | -#include <boost/graph/fruchterman_reingold.hpp> | ||
4 | -#include <boost/graph/random_layout.hpp> | ||
5 | -#include <boost/graph/circle_layout.hpp> | ||
6 | -#include <boost/graph/dijkstra_shortest_paths.hpp> | ||
7 | -#include <boost/algorithm/string.hpp> //boost::split | ||
8 | -#include <boost/bimap.hpp> | ||
9 | -#include <boost/regex.hpp> | ||
10 | - | ||
11 | -#include <exception> | ||
12 | -#include <iterator> | ||
13 | -#include <string> | ||
14 | -#include <map> | ||
15 | -#include <vector> | ||
16 | - | ||
17 | -#include <QDebug> | ||
18 | -#include <QtWidgets> | ||
19 | - | ||
20 | - | ||
21 | GraphItem::GraphItem(ifstream& fin) | 4 | GraphItem::GraphItem(ifstream& fin) |
22 | { | 5 | { |
23 | if (!fin) | 6 | if (!fin) |
... | @@ -270,6 +253,13 @@ void GraphItem::path_highlighting(std::string start, std::string end) | ... | @@ -270,6 +253,13 @@ void GraphItem::path_highlighting(std::string start, std::string end) |
270 | 253 | ||
271 | } | 254 | } |
272 | 255 | ||
256 | +void GraphItem::reset_color() | ||
257 | +{ | ||
258 | + for (auto& n: nodeList) { | ||
259 | + n->setColor(QColor()); | ||
260 | + } | ||
261 | +} | ||
262 | + | ||
273 | //event handler | 263 | //event handler |
274 | void GraphItem::mousePressEvent(QGraphicsSceneMouseEvent *event) | 264 | void GraphItem::mousePressEvent(QGraphicsSceneMouseEvent *event) |
275 | { | 265 | { | ... | ... |
1 | #ifndef GRAPHITEM_H | 1 | #ifndef GRAPHITEM_H |
2 | #define GRAPHITEM_H | 2 | #define GRAPHITEM_H |
3 | 3 | ||
4 | -#include <QGraphicsItem> | 4 | +#include "stdafx.h" |
5 | -#include <QList> | ||
6 | -#include <QColor> | ||
7 | - | ||
8 | -#include <boost/graph/adjacency_list.hpp> | ||
9 | -#include <boost/graph/topology.hpp> | ||
10 | -#include <boost/graph/graph_traits.hpp> | ||
11 | - | ||
12 | -#include <fstream> | ||
13 | - | ||
14 | #include "NodeItem.h" | 5 | #include "NodeItem.h" |
15 | #include "EdgeItem.h" | 6 | #include "EdgeItem.h" |
16 | 7 | ||
... | @@ -68,6 +59,7 @@ public: | ... | @@ -68,6 +59,7 @@ public: |
68 | 59 | ||
69 | //methods | 60 | //methods |
70 | void path_highlighting(std::string start, std::string end); | 61 | void path_highlighting(std::string start, std::string end); |
62 | + void reset_color(); | ||
71 | // | 63 | // |
72 | 64 | ||
73 | protected: | 65 | protected: | ... | ... |
1 | #ifndef GRAPHICSVIEW_H | 1 | #ifndef GRAPHICSVIEW_H |
2 | #define GRAPHICSVIEW_H | 2 | #define GRAPHICSVIEW_H |
3 | 3 | ||
4 | -#include <QFrame> | 4 | +#include "stdafx.h" |
5 | -#include <QGraphicsView> | ||
6 | -#include <QGridLayout> | ||
7 | 5 | ||
8 | //pre-declare | 6 | //pre-declare |
9 | class View; | 7 | class View; |
10 | 8 | ||
11 | - | ||
12 | class GraphicsView | 9 | class GraphicsView |
13 | : public QGraphicsView | 10 | : public QGraphicsView |
14 | { | 11 | { | ... | ... |
1 | #ifndef MAINWINDOW_H | 1 | #ifndef MAINWINDOW_H |
2 | #define MAINWINDOW_H | 2 | #define MAINWINDOW_H |
3 | 3 | ||
4 | -#include <QMainWindow> | 4 | +#include "stdafx.h" |
5 | -#include <QtWidgets> | ||
6 | -#include <QGridLayout> | ||
7 | -#include <QtGui> | ||
8 | - | ||
9 | -#include <iostream> | ||
10 | - | ||
11 | //#include "ui_MainWindow.h" | 5 | //#include "ui_MainWindow.h" |
12 | #include "PaperGraphWidget.h" | 6 | #include "PaperGraphWidget.h" |
13 | 7 | ... | ... |
... | @@ -86,6 +86,7 @@ | ... | @@ -86,6 +86,7 @@ |
86 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 86 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
87 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | 87 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> |
88 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> | 88 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> |
89 | + <PrecompiledHeader>Use</PrecompiledHeader> | ||
89 | </ClCompile> | 90 | </ClCompile> |
90 | <Link> | 91 | <Link> |
91 | <SubSystem>Console</SubSystem> | 92 | <SubSystem>Console</SubSystem> |
... | @@ -103,6 +104,7 @@ | ... | @@ -103,6 +104,7 @@ |
103 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 104 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
104 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> | 105 | <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> |
105 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> | 106 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> |
107 | + <PrecompiledHeader>Use</PrecompiledHeader> | ||
106 | </ClCompile> | 108 | </ClCompile> |
107 | <Link> | 109 | <Link> |
108 | <SubSystem>Console</SubSystem> | 110 | <SubSystem>Console</SubSystem> |
... | @@ -119,6 +121,7 @@ | ... | @@ -119,6 +121,7 @@ |
119 | <DebugInformationFormat /> | 121 | <DebugInformationFormat /> |
120 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 122 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
121 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> | 123 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> |
124 | + <PrecompiledHeader>Use</PrecompiledHeader> | ||
122 | </ClCompile> | 125 | </ClCompile> |
123 | <Link> | 126 | <Link> |
124 | <SubSystem>Console</SubSystem> | 127 | <SubSystem>Console</SubSystem> |
... | @@ -135,6 +138,7 @@ | ... | @@ -135,6 +138,7 @@ |
135 | <DebugInformationFormat /> | 138 | <DebugInformationFormat /> |
136 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> | 139 | <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> |
137 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> | 140 | <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> |
141 | + <PrecompiledHeader>Use</PrecompiledHeader> | ||
138 | </ClCompile> | 142 | </ClCompile> |
139 | <Link> | 143 | <Link> |
140 | <SubSystem>Console</SubSystem> | 144 | <SubSystem>Console</SubSystem> |
... | @@ -186,25 +190,31 @@ | ... | @@ -186,25 +190,31 @@ |
186 | <ClCompile Include="MainWindow.cpp" /> | 190 | <ClCompile Include="MainWindow.cpp" /> |
187 | <ClCompile Include="NodeItem.cpp" /> | 191 | <ClCompile Include="NodeItem.cpp" /> |
188 | <ClCompile Include="PaperGraphWidget.cpp" /> | 192 | <ClCompile Include="PaperGraphWidget.cpp" /> |
193 | + <ClCompile Include="stdafx.cpp"> | ||
194 | + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> | ||
195 | + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> | ||
196 | + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> | ||
197 | + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> | ||
198 | + </ClCompile> | ||
189 | </ItemGroup> | 199 | </ItemGroup> |
190 | <ItemGroup> | 200 | <ItemGroup> |
191 | <CustomBuild Include="PaperGraphWidget.h"> | 201 | <CustomBuild Include="PaperGraphWidget.h"> |
192 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 202 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
193 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing PaperGraphWidget.h...</Message> | 203 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing PaperGraphWidget.h...</Message> |
194 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 204 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
195 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 205 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> |
196 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 206 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
197 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing PaperGraphWidget.h...</Message> | 207 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing PaperGraphWidget.h...</Message> |
198 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 208 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
199 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 209 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> |
200 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 210 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
201 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing PaperGraphWidget.h...</Message> | 211 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing PaperGraphWidget.h...</Message> |
202 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 212 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
203 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 213 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> |
204 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 214 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
205 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing PaperGraphWidget.h...</Message> | 215 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing PaperGraphWidget.h...</Message> |
206 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 216 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
207 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 217 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> |
208 | </CustomBuild> | 218 | </CustomBuild> |
209 | </ItemGroup> | 219 | </ItemGroup> |
210 | <ItemGroup> | 220 | <ItemGroup> |
... | @@ -231,42 +241,43 @@ | ... | @@ -231,42 +241,43 @@ |
231 | <ClInclude Include="EdgeItem.h" /> | 241 | <ClInclude Include="EdgeItem.h" /> |
232 | <ClInclude Include="GeneratedFiles\ui_MainWindow.h" /> | 242 | <ClInclude Include="GeneratedFiles\ui_MainWindow.h" /> |
233 | <ClInclude Include="GeneratedFiles\ui_PaperGraphWidget.h" /> | 243 | <ClInclude Include="GeneratedFiles\ui_PaperGraphWidget.h" /> |
244 | + <ClInclude Include="stdafx.h" /> | ||
234 | <CustomBuild Include="GraphicsView.h"> | 245 | <CustomBuild Include="GraphicsView.h"> |
235 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 246 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
236 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GraphicsView.h...</Message> | 247 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GraphicsView.h...</Message> |
237 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 248 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
238 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 249 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> |
239 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 250 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
240 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing GraphicsView.h...</Message> | 251 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing GraphicsView.h...</Message> |
241 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 252 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
242 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 253 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> |
243 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 254 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
244 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GraphicsView.h...</Message> | 255 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GraphicsView.h...</Message> |
245 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 256 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
246 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 257 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> |
247 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 258 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
248 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GraphicsView.h...</Message> | 259 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GraphicsView.h...</Message> |
249 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 260 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
250 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 261 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> |
251 | </CustomBuild> | 262 | </CustomBuild> |
252 | <ClInclude Include="GraphItem.h" /> | 263 | <ClInclude Include="GraphItem.h" /> |
253 | <CustomBuild Include="MainWindow.h"> | 264 | <CustomBuild Include="MainWindow.h"> |
254 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 265 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
255 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing MainWindow.h...</Message> | 266 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing MainWindow.h...</Message> |
256 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 267 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
257 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 268 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> |
258 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 269 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
259 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing MainWindow.h...</Message> | 270 | <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing MainWindow.h...</Message> |
260 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 271 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
261 | - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 272 | + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> |
262 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 273 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
263 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing MainWindow.h...</Message> | 274 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing MainWindow.h...</Message> |
264 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 275 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
265 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 276 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> |
266 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> | 277 | <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> |
267 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing MainWindow.h...</Message> | 278 | <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing MainWindow.h...</Message> |
268 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> | 279 | <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> |
269 | - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command> | 280 | + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> |
270 | </CustomBuild> | 281 | </CustomBuild> |
271 | <ClInclude Include="NodeItem.h" /> | 282 | <ClInclude Include="NodeItem.h" /> |
272 | </ItemGroup> | 283 | </ItemGroup> | ... | ... |
... | @@ -33,6 +33,9 @@ | ... | @@ -33,6 +33,9 @@ |
33 | <Extensions>cpp;moc</Extensions> | 33 | <Extensions>cpp;moc</Extensions> |
34 | <SourceControlFiles>False</SourceControlFiles> | 34 | <SourceControlFiles>False</SourceControlFiles> |
35 | </Filter> | 35 | </Filter> |
36 | + <Filter Include="PCH"> | ||
37 | + <UniqueIdentifier>{23e088fd-f255-4f93-9c5e-f963b79d7a97}</UniqueIdentifier> | ||
38 | + </Filter> | ||
36 | </ItemGroup> | 39 | </ItemGroup> |
37 | <ItemGroup> | 40 | <ItemGroup> |
38 | <ClCompile Include="main.cpp"> | 41 | <ClCompile Include="main.cpp"> |
... | @@ -77,6 +80,9 @@ | ... | @@ -77,6 +80,9 @@ |
77 | <ClCompile Include="GeneratedFiles\Release\moc_MainWindow.cpp"> | 80 | <ClCompile Include="GeneratedFiles\Release\moc_MainWindow.cpp"> |
78 | <Filter>Generated Files\Release</Filter> | 81 | <Filter>Generated Files\Release</Filter> |
79 | </ClCompile> | 82 | </ClCompile> |
83 | + <ClCompile Include="stdafx.cpp"> | ||
84 | + <Filter>PCH</Filter> | ||
85 | + </ClCompile> | ||
80 | </ItemGroup> | 86 | </ItemGroup> |
81 | <ItemGroup> | 87 | <ItemGroup> |
82 | <CustomBuild Include="PaperGraphWidget.h"> | 88 | <CustomBuild Include="PaperGraphWidget.h"> |
... | @@ -114,5 +120,8 @@ | ... | @@ -114,5 +120,8 @@ |
114 | <ClInclude Include="GeneratedFiles\ui_MainWindow.h"> | 120 | <ClInclude Include="GeneratedFiles\ui_MainWindow.h"> |
115 | <Filter>Generated Files</Filter> | 121 | <Filter>Generated Files</Filter> |
116 | </ClInclude> | 122 | </ClInclude> |
123 | + <ClInclude Include="stdafx.h"> | ||
124 | + <Filter>PCH</Filter> | ||
125 | + </ClInclude> | ||
117 | </ItemGroup> | 126 | </ItemGroup> |
118 | </Project> | 127 | </Project> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | +#include "stdafx.h" | ||
1 | #include "PaperGraphWidget.h" | 2 | #include "PaperGraphWidget.h" |
2 | #include "NodeItem.h" | 3 | #include "NodeItem.h" |
3 | #include "GraphicsView.h" | 4 | #include "GraphicsView.h" |
4 | 5 | ||
5 | -#include <string> | ||
6 | -#include <QComboBox> | ||
7 | -#include <QMessageBox> | ||
8 | -#include <QtGui> | ||
9 | - | ||
10 | PaperGraphWidget::PaperGraphWidget(QWidget *parent) | 6 | PaperGraphWidget::PaperGraphWidget(QWidget *parent) |
11 | : QWidget(parent) | 7 | : QWidget(parent) |
12 | { | 8 | { | ... | ... |
1 | #ifndef PAPERGRAPHWIDGET_H | 1 | #ifndef PAPERGRAPHWIDGET_H |
2 | #define PAPERGRAPHWIDGET_H | 2 | #define PAPERGRAPHWIDGET_H |
3 | 3 | ||
4 | -#include <QtWidgets/QWidget> | 4 | +#include "stdafx.h" |
5 | -#include <QGraphicsScene> | ||
6 | - | ||
7 | -#include <fstream> | ||
8 | 5 | ||
9 | #include "GraphItem.h" | 6 | #include "GraphItem.h" |
10 | //#include "ui_PaperGraphWidget.h" | 7 | //#include "ui_PaperGraphWidget.h" |
11 | 8 | ||
12 | - | ||
13 | class PaperGraphWidget : public QWidget | 9 | class PaperGraphWidget : public QWidget |
14 | { | 10 | { |
15 | Q_OBJECT | 11 | Q_OBJECT | ... | ... |
1 | +#include "stdafx.h" | ||
1 | #include "PaperGraphWidget.h" | 2 | #include "PaperGraphWidget.h" |
2 | #include "MainWindow.h" | 3 | #include "MainWindow.h" |
3 | 4 | ||
4 | -#include <QtWidgets/QApplication> | ||
5 | -#include <QDebug> | ||
6 | - | ||
7 | -#include <algorithm> | ||
8 | -#include <exception> | ||
9 | -#include <fstream> | ||
10 | -#include <iterator> | ||
11 | -#include <string> | ||
12 | -#include <map> | ||
13 | -#include <vector> | ||
14 | - | ||
15 | -#include <boost/graph/fruchterman_reingold.hpp> | ||
16 | -//#include <boost/graph/kamada_kawai_spring_layout.hpp> | ||
17 | -#include <boost/graph/random_layout.hpp> | ||
18 | -#include <boost/graph/circle_layout.hpp> | ||
19 | -#include <boost/algorithm/string.hpp> //boost::split | ||
20 | -#include <boost/bimap.hpp> | ||
21 | - | ||
22 | -using namespace std; | ||
23 | - | ||
24 | /** | 5 | /** |
25 | * Constants | 6 | * Constants |
26 | */ | 7 | */ | ... | ... |
PaperGraph/stdafx.cpp
0 → 100644
1 | +#include "stdafx.h" |
PaperGraph/stdafx.h
0 → 100644
1 | +#pragma once | ||
2 | +#include <QColor> | ||
3 | +#include <QComboBox> | ||
4 | +#include <QDebug> | ||
5 | +#include <QFrame> | ||
6 | +#include <QGraphicsItem> | ||
7 | +#include <QGraphicsScene> | ||
8 | +#include <QGraphicsView> | ||
9 | +#include <QGridLayout> | ||
10 | +#include <QKeyEvent> | ||
11 | +#include <QList> | ||
12 | +#include <QMainWindow> | ||
13 | +#include <qmath.h> | ||
14 | +#include <QMessageBox> | ||
15 | +#include <QtGui> | ||
16 | +#include <QtWidgets/QApplication> | ||
17 | +#include <QtWidgets/QWidget> | ||
18 | +#include <QtWidgets> | ||
19 | + | ||
20 | +#include <boost/algorithm/string.hpp> //boost::split | ||
21 | +#include <boost/bimap.hpp> | ||
22 | +#include <boost/graph/adjacency_list.hpp> | ||
23 | +#include <boost/graph/circle_layout.hpp> | ||
24 | +#include <boost/graph/dijkstra_shortest_paths.hpp> | ||
25 | +#include <boost/graph/fruchterman_reingold.hpp> | ||
26 | +#include <boost/graph/graph_traits.hpp> | ||
27 | +#include <boost/graph/random_layout.hpp> | ||
28 | +#include <boost/graph/topology.hpp> | ||
29 | +#include <boost/regex.hpp> | ||
30 | + | ||
31 | +#include <algorithm> | ||
32 | +#include <exception> | ||
33 | +#include <fstream> | ||
34 | +#include <iostream> | ||
35 | +#include <iterator> | ||
36 | +#include <map> | ||
37 | +#include <string> | ||
38 | +#include <vector> | ||
39 | + | ||
40 | +using namespace boost; | ||
41 | +using namespace std; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment