Skip to content
Snippets Groups Projects
Commit a4b23260 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm namespace prefix

parent bcb936cb
No related branches found
No related tags found
1 merge request!2117Merge some files concerned with font sizes; rectify '@brief' lines in file headers
......@@ -27,8 +27,8 @@ FitParameterDelegate::FitParameterDelegate(QObject* parent)
void FitParameterDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const
{
if (GUI::View::PropertyEditorFactory::hasStringRepresentation(index)) {
QString text = GUI::View::PropertyEditorFactory::toString(index);
if (PropertyEditorFactory::hasStringRepresentation(index)) {
QString text = PropertyEditorFactory::toString(index);
paintCustomLabel(painter, option, index, text);
} else
QStyledItemDelegate::paint(painter, option, index);
......@@ -105,7 +105,7 @@ QWidget* FitParameterDelegate::createEditorFromIndex(const QModelIndex& index,
{
if (index.internalPointer()) {
auto* item = static_cast<QObject*>(index.internalPointer());
return GUI::View::PropertyEditorFactory::CreateEditor(item, parent);
return PropertyEditorFactory::CreateEditor(item, parent);
}
return nullptr;
}
......
......@@ -41,7 +41,7 @@ bool isComboProperty(const QVariant& variant)
} // namespace
bool GUI::View::PropertyEditorFactory::hasStringRepresentation(const QModelIndex& index)
bool PropertyEditorFactory::hasStringRepresentation(const QModelIndex& index)
{
auto variant = index.data();
if (isComboProperty(variant))
......@@ -52,7 +52,7 @@ bool GUI::View::PropertyEditorFactory::hasStringRepresentation(const QModelIndex
return false;
}
QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index)
QString PropertyEditorFactory::toString(const QModelIndex& index)
{
auto variant = index.data();
if (isComboProperty(variant))
......@@ -67,7 +67,7 @@ QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index)
return "";
}
QWidget* GUI::View::PropertyEditorFactory::CreateEditor(QObject* item, QWidget* parent)
QWidget* PropertyEditorFactory::CreateEditor(QObject* item, QWidget* parent)
{
CustomEditor* result(nullptr);
......
......@@ -3,7 +3,7 @@
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/View/PropertyEditor/PropertyEditorFactory.h
//! @brief Defines namespace GUI::View::PropertyEditorFactory
//! @brief Defines namespace PropertyEditorFactory
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -19,7 +19,7 @@
//! Creates editors for SessionItems.
namespace GUI::View::PropertyEditorFactory {
namespace PropertyEditorFactory {
//! Returns true if the index data has known (custom) conversion to string.
bool hasStringRepresentation(const QModelIndex& index);
......@@ -30,6 +30,6 @@ QString toString(const QModelIndex& index);
//! Creates an editor suitable for editing of item.value()
QWidget* CreateEditor(QObject* item, QWidget* parent = nullptr);
} // namespace GUI::View::PropertyEditorFactory
} // namespace PropertyEditorFactory
#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_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