Commit c461b44e authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Add some more actions

parent 46534e85
......@@ -7,6 +7,20 @@ KAlgebraPage
{
id: page
anchors.margins: 0
contextualActions: [
Action {
text: i18n("View Grid")
checkable: true
checked: view.showGrid
onToggled: view.showGrid = checked
},
Action {
text: i18n("Reset Viewport")
onTriggered: view.resetViewport()
}
//custom viewport?
]
Rectangle {
anchors.fill: parent
......
......@@ -24,6 +24,14 @@ import widgets 1.0
KAlgebraPage
{
id: page
contextualActions: [
Action {
text: i18n("Reset Viewport")
onTriggered: view.resetViewport()
}
]
Graph3D
{
id: view
......
......@@ -308,7 +308,7 @@ KAlgebra::KAlgebra(QWidget *parent)
t_menu = menuBar()->addMenu(i18n("3D &Graph"));
QAction* t_actions[5];
t_menu->addAction(KStandardAction::save(this, SLOT(save3DGraph()), this));
t_menu->addAction(QIcon::fromTheme(QStringLiteral("zoom-original")), i18n("&Reset View"), m_graph3d, [this]() { m_graph3d->resetView(); });
t_menu->addAction(QIcon::fromTheme(QStringLiteral("zoom-original")), i18n("&Reset View"), m_graph3d, [this]() { m_graph3d->resetViewport(); });
t_menu->addSeparator();
t_actions[2] = t_menu->addAction(i18n("Dots"), this, SLOT(set_dots()));
t_actions[3] = t_menu->addAction(i18n("Lines"), this, SLOT(set_lines()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment