Showing
2 changed files
with
15 additions
and
2 deletions
... | @@ -11,7 +11,7 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent) | ... | @@ -11,7 +11,7 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent) |
11 | View *view = new View("temp view"); | 11 | View *view = new View("temp view"); |
12 | view->view()->setScene(scene); | 12 | view->view()->setScene(scene); |
13 | 13 | ||
14 | - QVBoxLayout *layout = new QVBoxLayout; | 14 | + //QVBoxLayout *layout = new QVBoxLayout; |
15 | //QComboBox *combo = new QComboBox; | 15 | //QComboBox *combo = new QComboBox; |
16 | //combo->addItem("conf/iastedCSN/KeimS06"); | 16 | //combo->addItem("conf/iastedCSN/KeimS06"); |
17 | //combo->addItem("conf/iastedCSN/Mojumdar06"); | 17 | //combo->addItem("conf/iastedCSN/Mojumdar06"); |
... | @@ -19,7 +19,15 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent) | ... | @@ -19,7 +19,15 @@ PaperGraphWidget::PaperGraphWidget(QWidget *parent) |
19 | //connect(combo, SIGNAL(currentIndexChanged(int)), | 19 | //connect(combo, SIGNAL(currentIndexChanged(int)), |
20 | // this, SLOT(handleSelectionChanged(int))); | 20 | // this, SLOT(handleSelectionChanged(int))); |
21 | //layout->addWidget(combo); | 21 | //layout->addWidget(combo); |
22 | - layout->addWidget(view); | 22 | + QGridLayout *layout = new QGridLayout; |
23 | + | ||
24 | + //test | ||
25 | + QLabel *testLabel = new QLabel(tr("&Test label")); | ||
26 | + testCombo = new QComboBox; | ||
27 | + testLabel->setBuddy(testCombo); | ||
28 | + layout->addWidget(testLabel, 0, 0); | ||
29 | + layout->addWidget(testCombo, 0, 1); | ||
30 | + layout->addWidget(view, 1, 0, 1, 2); | ||
23 | setLayout(layout); | 31 | setLayout(layout); |
24 | 32 | ||
25 | setWindowTitle(tr("dblp paper graph visualization")); | 33 | setWindowTitle(tr("dblp paper graph visualization")); |
... | @@ -63,6 +71,9 @@ void PaperGraphWidget::reset_color() | ... | @@ -63,6 +71,9 @@ void PaperGraphWidget::reset_color() |
63 | void PaperGraphWidget::test() | 71 | void PaperGraphWidget::test() |
64 | { | 72 | { |
65 | //test | 73 | //test |
74 | + testCombo->addItem(to_string(rand() % 300).c_str()); | ||
75 | + testCombo->addItem(to_string(rand() % 300).c_str()); | ||
76 | + testCombo->addItem(to_string(rand() % 300).c_str()); | ||
66 | } | 77 | } |
67 | 78 | ||
68 | void PaperGraphWidget::handleSelectionChanged(int idx) | 79 | void PaperGraphWidget::handleSelectionChanged(int idx) | ... | ... |
... | @@ -30,6 +30,8 @@ private: | ... | @@ -30,6 +30,8 @@ private: |
30 | 30 | ||
31 | QGraphicsScene *scene; | 31 | QGraphicsScene *scene; |
32 | GraphItem *graphItem = nullptr; | 32 | GraphItem *graphItem = nullptr; |
33 | + | ||
34 | + QComboBox *testCombo; | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | #endif // PAPERGRAPHWIDGET_H | 37 | #endif // PAPERGRAPHWIDGET_H | ... | ... |
-
Please register or login to post a comment