Skip to content

Commit

Permalink
Added a new icon for Remove Error Bars on the graph menu
Browse files Browse the repository at this point in the history
To Test:
1. Start Mantidplot, load some data and create a line graph
1. With the graph selected open the graph menu
1. the Add error bars and remove error bars icons should be different and make sense.

re #3812
  • Loading branch information
NickDraper committed Mar 4, 2014
1 parent 44da0a1 commit e64be91
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -12783,7 +12783,7 @@ void ApplicationWindow::createActions()
actionAddErrorBars->setShortcut( tr("Ctrl+B") );
connect(actionAddErrorBars, SIGNAL(activated()), this, SLOT(addErrorBars()));

actionRemoveErrorBars = new QAction(QIcon(getQPixmap("errors_xpm")), tr("Remove Error Bars..."), this);
actionRemoveErrorBars = new QAction(QIcon(getQPixmap("errors_remove_xpm")), tr("Remove Error Bars..."), this);
//actionRemoveErrorBars->setShortcut( tr("Ctrl+B") );
connect(actionRemoveErrorBars, SIGNAL(activated()), this, SLOT(removeErrorBars()));

Expand Down
25 changes: 25 additions & 0 deletions Code/Mantid/MantidPlot/src/pixmaps.cpp
Expand Up @@ -8477,6 +8477,30 @@ static const char *errors_xpm[]={
" . ",
"..."};

/* XPM */
static const char *errors_remove_xpm[]={
/* width height num_colors chars_per_pixel */
"11 11 5 1",
/* colors */
" c None",
". c #000000",
"X c #ff6666",
"o c #ff0000",
"O c #980000",
/* pixels */
" ... Xo",
" . XoX",
" . XoX ",
" .XoX ",
" .OoX ",
" OoO ",
" XoO. ",
" XoX. ",
" XoX . ",
"XoX . ",
"oX ... "
};

static const char *curves_xpm[]={
"14 16 5 1",
" c None",
Expand Down Expand Up @@ -12902,6 +12926,7 @@ QPixmap getQPixmap(const std::string &name)
else if (name == "logo_xpm") return QPixmap(logo_xpm);
else if (name == "hand_xpm") return QPixmap(hand_xpm);
else if (name == "errors_xpm") return QPixmap(errors_xpm);
else if (name == "errors_remove_xpm") return QPixmap(errors_remove_xpm);
else if (name == "curves_xpm") return QPixmap(curves_xpm);
else if (name == "arrow_xpm") return QPixmap(arrow_xpm);
else if (name == "legend_xpm") return QPixmap(legend_xpm);
Expand Down

0 comments on commit e64be91

Please sign in to comment.