|
|
|
@ -352,41 +352,68 @@ void MainWindow::setUpMainToolbar()
|
|
|
|
|
|
|
|
|
|
/// @bug or a feature? no underline here
|
|
|
|
|
m_addNode = new QAction(tr("Add node (ins)"), this);
|
|
|
|
|
connect(m_addNode, SIGNAL(activated()), m_graphicsView, SLOT(insertNode()));
|
|
|
|
|
connect(m_addNode, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(insertNode()));
|
|
|
|
|
|
|
|
|
|
m_delNode = new QAction(tr("Del node (del)"), this);
|
|
|
|
|
connect(m_delNode, SIGNAL(activated()), m_graphicsView, SLOT(removeNode()));
|
|
|
|
|
connect(m_delNode, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(removeNode()));
|
|
|
|
|
|
|
|
|
|
m_editNode = new QAction(tr("Edit node (F2, dubclick)"), this);
|
|
|
|
|
connect(m_editNode, SIGNAL(activated()), m_graphicsView, SLOT(editNode()));
|
|
|
|
|
connect(m_editNode, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(editNode()));
|
|
|
|
|
|
|
|
|
|
/// @todo pass ctrl
|
|
|
|
|
m_scaleUpNode = new QAction(tr("ScaleUp Node (Ctrl +)"), this);
|
|
|
|
|
m_scaleDownNode = new QAction(tr("ScaleDown Node (Ctrl -)"), this);
|
|
|
|
|
|
|
|
|
|
m_nodeColor = new QAction(tr("Node color (c)"), this);
|
|
|
|
|
connect(m_nodeColor, SIGNAL(activated()), m_graphicsView, SLOT(nodeColor()));
|
|
|
|
|
connect(m_nodeColor, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(nodeColor()));
|
|
|
|
|
|
|
|
|
|
m_nodeTextColor = new QAction(tr("Node textcolor (t)"), this);
|
|
|
|
|
connect(m_nodeTextColor, SIGNAL(activated()), m_graphicsView, SLOT(nodeTextColor()));
|
|
|
|
|
connect(m_nodeTextColor, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(nodeTextColor()));
|
|
|
|
|
|
|
|
|
|
m_addEdge = new QAction(tr("Add edge (a)"), this);
|
|
|
|
|
connect(m_addEdge, SIGNAL(activated()), m_graphicsView, SLOT(addEdge()));
|
|
|
|
|
connect(m_addEdge, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(addEdge()));
|
|
|
|
|
|
|
|
|
|
m_delEdge = new QAction(tr("Del edge (d)"), this);
|
|
|
|
|
connect(m_delEdge, SIGNAL(activated()), m_graphicsView, SLOT(removeEdge()));
|
|
|
|
|
connect(m_delEdge, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(removeEdge()));
|
|
|
|
|
|
|
|
|
|
m_moveNode = new QAction(tr("Move node\n(Ctrl cursor, drag)"), this);
|
|
|
|
|
m_moveNode->setDisabled(true);
|
|
|
|
|
|
|
|
|
|
m_subtree = new QAction(tr("Change on wholesubtree\n(Ctrl shift)"), this);
|
|
|
|
|
m_subtree->setDisabled(true);
|
|
|
|
|
|
|
|
|
|
m_zoomIn = new QAction(tr("Zoom in (+, scrollup)"), this);
|
|
|
|
|
connect(m_zoomIn, SIGNAL(activated()), m_graphicsView, SLOT(zoomIn()));
|
|
|
|
|
connect(m_zoomIn, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(zoomIn()));
|
|
|
|
|
|
|
|
|
|
m_zoomOut = new QAction(tr("Zoom out (-, scrolldown)"), this);
|
|
|
|
|
connect(m_zoomOut, SIGNAL(activated()), m_graphicsView, SLOT(zoomOut()));
|
|
|
|
|
connect(m_zoomOut, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(zoomOut()));
|
|
|
|
|
|
|
|
|
|
m_esc = new QAction(tr("Leave editing,\nedge eadd/remove (esc)"), this);
|
|
|
|
|
connect(m_esc, SIGNAL(activated()), m_graphicsView, SLOT(nodeLostFocus()));
|
|
|
|
|
connect(m_esc, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(nodeLostFocus()));
|
|
|
|
|
|
|
|
|
|
m_hintMode = new QAction(tr("Hint mode (f)"), this);
|
|
|
|
|
connect(m_hintMode, SIGNAL(activated()), m_graphicsView, SLOT(hintMode()));
|
|
|
|
|
connect(m_hintMode, SIGNAL(activated()), m_graphicsView,
|
|
|
|
|
SLOT(hintMode()));
|
|
|
|
|
|
|
|
|
|
m_showMainToolbar = new QAction(tr("Show main toolbar\n(Ctrl m)"), this);
|
|
|
|
|
m_showMainToolbar->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
|
|
|
|
|
connect(m_showMainToolbar, SIGNAL(activated()), this, SLOT(showMainToolbar()));
|
|
|
|
|
m_showStatusIconToolbar = new QAction(tr("Insert status icons\n(Ctrl i)"), this);
|
|
|
|
|
connect(m_showStatusIconToolbar, SIGNAL(activated()), this, SLOT(showStatusIconToolbar()));
|
|
|
|
|
connect(m_showMainToolbar, SIGNAL(activated()), this,
|
|
|
|
|
SLOT(showMainToolbar()));
|
|
|
|
|
|
|
|
|
|
m_showStatusIconToolbar = new QAction(tr("Insert status icons\n(Ctrl i)"),
|
|
|
|
|
this);
|
|
|
|
|
connect(m_showStatusIconToolbar, SIGNAL(activated()), this,
|
|
|
|
|
SLOT(showStatusIconToolbar()));
|
|
|
|
|
|
|
|
|
|
m_ui->mainToolBar->addAction(m_addNode);
|
|
|
|
|
m_ui->mainToolBar->addAction(m_delNode);
|
|
|
|
|