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-05-02 17:35:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8fea7b4bab70aa9e38c8f81f487e5e08bf8f5bd6
8fea7b4b
1 parent
65eb5e9f
add combobox and label
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
PaperGraph/PaperGraphWidget.cpp
PaperGraph/PaperGraphWidget.h
PaperGraph/PaperGraphWidget.cpp
View file @
8fea7b4
...
...
@@ -11,7 +11,7 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent)
View
*
view
=
new
View
(
"temp view"
);
view
->
view
()
->
setScene
(
scene
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
;
//
QVBoxLayout *layout = new QVBoxLayout;
//QComboBox *combo = new QComboBox;
//combo->addItem("conf/iastedCSN/KeimS06");
//combo->addItem("conf/iastedCSN/Mojumdar06");
...
...
@@ -19,7 +19,15 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent)
//connect(combo, SIGNAL(currentIndexChanged(int)),
// this, SLOT(handleSelectionChanged(int)));
//layout->addWidget(combo);
layout
->
addWidget
(
view
);
QGridLayout
*
layout
=
new
QGridLayout
;
//test
QLabel
*
testLabel
=
new
QLabel
(
tr
(
"&Test label"
));
testCombo
=
new
QComboBox
;
testLabel
->
setBuddy
(
testCombo
);
layout
->
addWidget
(
testLabel
,
0
,
0
);
layout
->
addWidget
(
testCombo
,
0
,
1
);
layout
->
addWidget
(
view
,
1
,
0
,
1
,
2
);
setLayout
(
layout
);
setWindowTitle
(
tr
(
"dblp paper graph visualization"
));
...
...
@@ -63,6 +71,9 @@ void PaperGraphWidget::reset_color()
void
PaperGraphWidget
::
test
()
{
//test
testCombo
->
addItem
(
to_string
(
rand
()
%
300
).
c_str
());
testCombo
->
addItem
(
to_string
(
rand
()
%
300
).
c_str
());
testCombo
->
addItem
(
to_string
(
rand
()
%
300
).
c_str
());
}
void
PaperGraphWidget
::
handleSelectionChanged
(
int
idx
)
...
...
PaperGraph/PaperGraphWidget.h
View file @
8fea7b4
...
...
@@ -30,6 +30,8 @@ private:
QGraphicsScene
*
scene
;
GraphItem
*
graphItem
=
nullptr
;
QComboBox
*
testCombo
;
};
#endif // PAPERGRAPHWIDGET_H
...
...
Please
register
or
login
to post a comment