Skip to content

Commit

Permalink
Refs #10348 Use properties for hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Oct 22, 2014
1 parent ba3032e commit d6137c2
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -3,8 +3,11 @@

#include <QStyledItemDelegate>

#include "MantidAPI/AlgorithmManager.h"
#include "MantidQtMantidWidgets/HintingLineEdit.h"

using namespace Mantid::API;
using namespace Mantid::Kernel;
using namespace MantidQt::MantidWidgets;

namespace MantidQt
Expand All @@ -22,7 +25,12 @@ namespace MantidQt
Q_UNUSED(index);

std::map<std::string,std::string> hints;

//Create hints
IAlgorithm_sptr algReflOne = AlgorithmManager::Instance().create("ReflectometryReductionOneAuto");
auto properties = algReflOne->getProperties();
for(auto it = properties.begin(); it != properties.end(); ++it)
hints[(*it)->name()] = (*it)->briefDocumentation();

auto editor = new HintingLineEdit(parent, hints);
editor->setFrame(false);
Expand Down

0 comments on commit d6137c2

Please sign in to comment.