Toggle navigation
Toggle navigation
This project
Loading...
Sign in
조성현
/
graph-visualization
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
조성현
2017-04-27 09:40:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1b38b45e873bd446d52d4d84009d806e55959e90
1b38b45e
1 parent
1e191597
print_graph --> make_graph
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
28 deletions
PaperGraph/MainWindow.cpp
PaperGraph/MainWindow.h
PaperGraph/PaperGraphWidget.cpp
PaperGraph/PaperGraphWidget.h
PaperGraph/main.cpp
PaperGraph/MainWindow.cpp
View file @
1b38b45
...
...
@@ -25,16 +25,11 @@ MainWindow::~MainWindow()
}
void
MainWindow
::
print_graph
(
const
char
*
filename
)
void
MainWindow
::
make_graph
(
const
char
*
filename
)
{
graphWidget
->
print
_graph
(
filename
);
graphWidget
->
make
_graph
(
filename
);
}
//void MainWindow::print_graph(std::ifstream *pFin)
//{
// graphWidget->print_graph(pFin);
//}
//////////////////////////////////////////////////////////////////
// private methods
//////////////////////////////////////////////////////////////////
...
...
PaperGraph/MainWindow.h
View file @
1b38b45
...
...
@@ -12,8 +12,7 @@ public:
MainWindow
(
QWidget
*
parent
=
0
);
~
MainWindow
();
//void print_graph(std::ifstream *pFin);
void
print_graph
(
const
char
*
filename
);
void
make_graph
(
const
char
*
filename
);
private
:
...
...
PaperGraph/PaperGraphWidget.cpp
View file @
1b38b45
...
...
@@ -25,22 +25,10 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent)
setWindowTitle
(
tr
(
"dblp paper graph visualization"
));
}
//void PaperGraphWidget::print_graph(ifstream* pFin)
//{
// qDebug("* PaperGraphWidget::print_graph");
// //QGraphicsItem *graph_item = new GraphItem(fin);
// if (graphItem)
// throw std::exception("already have graph item");
//
// graphItem = new GraphItem(pFin);
// graphItem->setPos(0, 0);
// scene->addItem(graphItem);
//}
void
PaperGraphWidget
::
print_graph
(
const
char
*
filename
)
void
PaperGraphWidget
::
make_graph
(
const
char
*
filename
)
{
if
(
graphItem
)
throw
std
::
exception
(
"
already have graph item
"
);
throw
std
::
exception
(
"
graph is already exist
"
);
graphItem
=
new
GraphItem
(
filename
);
graphItem
->
setPos
(
0
,
0
);
...
...
PaperGraph/PaperGraphWidget.h
View file @
1b38b45
...
...
@@ -11,8 +11,7 @@ class PaperGraphWidget : public QWidget
public
:
PaperGraphWidget
(
QWidget
*
parent
=
0
);
//void print_graph(ifstream* pFin);
void
print_graph
(
const
char
*
filename
);
void
make_graph
(
const
char
*
filename
);
//main window slots
void
read_more
();
...
...
PaperGraph/main.cpp
View file @
1b38b45
...
...
@@ -9,9 +9,7 @@ int main(int argc, char *argv[])
MainWindow
m
;
try
{
//ifstream fin(PAPER_FILENAME);
m
.
print_graph
(
PAPER_FILENAME
);
//fin.close();
m
.
make_graph
(
PAPER_FILENAME
);
}
catch
(
const
std
::
exception
&
e
)
{
qDebug
()
<<
"Error: "
<<
e
.
what
();
return
EXIT_FAILURE
;
...
...
Please
register
or
login
to post a comment