//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      GUI/View/Setup/FrameActions.cpp
//! @brief     Implements class FrameActions and global pointer gActions.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#include "GUI/View/Setup/FrameActions.h"

FrameActions* gActions; //<! Global pointer to single instance.

FrameActions::FrameActions()
{
    toggle_mask_value = new QAction("Toggle mask value");

    raise_mask = new QAction("Rise mask up");
    raise_mask->setIcon(QIcon(":/images/maskeditor_bringtofront.svg"));
    raise_mask->setToolTip("Rise selected mask one level up (PgUp)");
    raise_mask->setShortcuts(QKeySequence::MoveToPreviousPage);

    lower_mask = new QAction("Lower mask down");
    lower_mask->setIcon(QIcon(":/images/maskeditor_sendtoback.svg"));
    lower_mask->setToolTip("Lower selected mask one level down (PgDown)");
    lower_mask->setShortcuts(QKeySequence::MoveToNextPage);

    delete_mask = new QAction("Remove mask");
    delete_mask->setToolTip("Remove selected mask (Del)");
    delete_mask->setShortcuts(QKeySequence::Delete);

    delete_projection = new QAction("Remove selected");
    delete_projection->setToolTip("Remove selected projection (Del)");
    delete_projection->setShortcuts(QKeySequence::Delete);

    reset_view = new QAction("Reset view");
    reset_view->setIcon(QIcon(":/images/camera-metering-center.svg"));
    reset_view->setToolTip("Reset view: all axes will be set to default");

    save_plot = new QAction("Save");
    save_plot->setIcon(QIcon(":/images/content-save-outline.svg"));
    save_plot->setToolTip("Save Plot");

    save_projections = new QAction("Save projections");
    save_projections->setIcon(QIcon(":/images/maskeditor_save.svg"));
    save_projections->setToolTip("Save created projections in multi-column ASCII file.");

    toggle_properties_panel = new QAction("Properties");
    toggle_properties_panel->setIcon(QIcon(":/images/dock-right.svg"));
    toggle_properties_panel->setToolTip("Toggle properties panel");
    toggle_properties_panel->setCheckable(true);
}
