Skip to content
Snippets Groups Projects
Commit 7ad98e22 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Rearranged parentship in ProjectionEditorActions

parent ef915b93
No related branches found
No related tags found
No related merge requests found
...@@ -24,27 +24,26 @@ ProjectionsEditorActions::ProjectionsEditorActions(QWidget* parent) ...@@ -24,27 +24,26 @@ ProjectionsEditorActions::ProjectionsEditorActions(QWidget* parent)
: QObject(parent) : QObject(parent)
, m_resetViewAction(new QAction(this)) , m_resetViewAction(new QAction(this))
, m_togglePanelAction(new QAction(this)) , m_togglePanelAction(new QAction(this))
, m_deleteAction(new QAction("Remove selected", this))
, m_model(nullptr) , m_model(nullptr)
, m_selectionModel(nullptr) , m_selectionModel(nullptr)
{ {
// Actions for top toolbar // Actions for top toolbar
m_resetViewAction = new QAction(this);
m_resetViewAction->setText("Reset"); m_resetViewAction->setText("Reset");
m_resetViewAction->setIcon(QIcon(":/images/toolbar16light_refresh.svg")); m_resetViewAction->setIcon(QIcon(":/images/toolbar16light_refresh.svg"));
m_resetViewAction->setToolTip("Reset View"); m_resetViewAction->setToolTip("Reset View");
connect(m_resetViewAction, SIGNAL(triggered()), this, SIGNAL(resetViewRequest())); connect(m_resetViewAction, &QAction::triggered,
this, &ProjectionsEditorActions::resetViewRequest);
m_togglePanelAction = new QAction(this);
m_togglePanelAction->setText("Properties"); m_togglePanelAction->setText("Properties");
m_togglePanelAction->setIcon(QIcon(":/images/toolbar16light_propertypanel.svg")); m_togglePanelAction->setIcon(QIcon(":/images/toolbar16light_propertypanel.svg"));
m_togglePanelAction->setToolTip("Toggle Property Panel"); m_togglePanelAction->setToolTip("Toggle Property Panel");
connect(m_togglePanelAction, SIGNAL(triggered()), this, SIGNAL(propertyPanelRequest())); connect(m_togglePanelAction, &QAction::triggered,
this, &ProjectionsEditorActions::propertyPanelRequest);
m_deleteAction = new QAction(QStringLiteral("Remove selected"), parent);
m_deleteAction->setToolTip("Remove selected (Del)"); m_deleteAction->setToolTip("Remove selected (Del)");
m_deleteAction->setShortcuts(QKeySequence::Delete); m_deleteAction->setShortcuts(QKeySequence::Delete);
parent->addAction(m_deleteAction); connect(m_deleteAction, &QAction::triggered, this, &ProjectionsEditorActions::onDeleteAction);
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(onDeleteAction()));
} }
void ProjectionsEditorActions::setModel(SessionModel* maskModel, const QModelIndex& rootIndex) void ProjectionsEditorActions::setModel(SessionModel* maskModel, const QModelIndex& rootIndex)
......
...@@ -51,9 +51,9 @@ private: ...@@ -51,9 +51,9 @@ private:
QAction* m_resetViewAction; QAction* m_resetViewAction;
QAction* m_togglePanelAction; QAction* m_togglePanelAction;
QAction* m_deleteAction; QAction* m_deleteAction;
SessionModel *m_model; SessionModel* m_model;
QModelIndex m_rootIndex; //! Index in the model corresponding to IntensityDataItem QModelIndex m_rootIndex; //! Index in the model corresponding to IntensityDataItem
QItemSelectionModel *m_selectionModel; QItemSelectionModel* m_selectionModel;
}; };
#endif // PROJECTIONSEDITORACTIONS_H #endif // PROJECTIONSEDITORACTIONS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment