조성현

add test action

......@@ -48,6 +48,10 @@ void MainWindow::createActions()
resetColorAct = new QAction(tr("Reset colors"), this);
resetColorAct->setStatusTip(tr("Reset all node's color"));
connect(resetColorAct, &QAction::triggered, this, &MainWindow::reset_color);
testAct = new QAction(tr("test action"), this);
testAct->setStatusTip(tr("test test"));
connect(testAct, &QAction::triggered, this, &MainWindow::test);
}
void MainWindow::createMenus()
......@@ -59,6 +63,9 @@ void MainWindow::createMenus()
actionMenu->addAction(mightKnowAct);
actionMenu->addAction(topkAct);
actionMenu->addAction(resetColorAct);
testMenu = menuBar()->addMenu(tr("&Test"));
testMenu->addAction(testAct);
}
//////////////////////////////////////////////////////////////////
......@@ -84,3 +91,8 @@ void MainWindow::reset_color()
{
graphWidget->reset_color();
}
void MainWindow::test()
{
graphWidget->test();
}
\ No newline at end of file
......
......@@ -24,6 +24,10 @@ private:
QAction *mightKnowAct;
QAction *topkAct;
QAction *resetColorAct;
//test
QMenu *testMenu;
QAction *testAct;
private:
void createActions();
......@@ -34,6 +38,8 @@ private slots:
void might_know();
void topk();
void reset_color();
//test
void test();
};
#endif // MAINWINDOW_H
......
......@@ -60,6 +60,11 @@ void PaperGraphWidget::reset_color()
scene->update();
}
void PaperGraphWidget::test()
{
//test
}
void PaperGraphWidget::handleSelectionChanged(int idx)
{
QMessageBox::information(this, "QCombobox",
......
......@@ -19,6 +19,9 @@ public:
void topk();
void reset_color();
//test
void test();
private slots:
void handleSelectionChanged(int idx);
......