Commit 06a00097 authored by Jan Möbius's avatar Jan Möbius

Removed WhatsThisGenerator from Baseinterface

parent 45a9891c
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#pragma once #pragma once
#include <OpenFlipper/common/Types.hh> #include <OpenFlipper/common/Types.hh>
#include "WhatsThisGenerator.hh"
/** \file BaseInterface.hh /** \file BaseInterface.hh
......
...@@ -821,7 +821,38 @@ deleteData() { ...@@ -821,7 +821,38 @@ deleteData() {
} }
/** Returns a flat, human readable representation of all comments. */ QString& BaseObject::getCommentByKey(const QString &key) {
return commentsByKey_[key];
}
const QString BaseObject::getCommentByKey(const QString &key) const {
return commentsByKey_.value(key);
}
bool BaseObject::hasCommentForKey(const QString &key) const {
return commentsByKey_.contains(key);
}
bool BaseObject::hasComments() const {
return !commentsByKey_.empty();
}
void BaseObject::clearComment(const QString &key) {
commentsByKey_.remove(key);
}
void BaseObject::clearAllComments() {
commentsByKey_.clear();
}
const QMap<QString, QString>& BaseObject::getAllComments() const {
return commentsByKey_;
}
const QString BaseObject::getAllCommentsFlat() const { const QString BaseObject::getAllCommentsFlat() const {
QStringList result; QStringList result;
......
...@@ -541,41 +541,27 @@ class DLLEXPORT BaseObject : public QObject { ...@@ -541,41 +541,27 @@ class DLLEXPORT BaseObject : public QObject {
* If no comment with the specified exists, an empty * If no comment with the specified exists, an empty
* one is created. * one is created.
*/ */
QString &getCommentByKey(const QString &key) { QString &getCommentByKey(const QString &key);
return commentsByKey_[key];
}
/** \brief Get comment for the specified key. /** \brief Get comment for the specified key.
* *
* If no comment with the specified exists, an empty comment * If no comment with the specified exists, an empty comment
* is returned (but not inserted into the map). * is returned (but not inserted into the map).
*/ */
const QString getCommentByKey(const QString &key) const { const QString getCommentByKey(const QString &key) const;
return commentsByKey_.value(key);
}
/** Returns true if a comment for the specified key exists, false otherwise. */ /** Returns true if a comment for the specified key exists, false otherwise. */
bool hasCommentForKey(const QString &key) const { bool hasCommentForKey(const QString &key) const;
return commentsByKey_.contains(key);
}
/** Indicates whether any comment has been supplied for this object. */ /** Indicates whether any comment has been supplied for this object. */
bool hasComments() const { bool hasComments() const;
return !commentsByKey_.empty();
}
void clearComment(const QString &key) { void clearComment(const QString &key);
commentsByKey_.remove(key);
}
void clearAllComments() { void clearAllComments();
commentsByKey_.clear();
}
/** Returns a reference to all comments. */ /** Returns a reference to all comments. */
const QMap<QString, QString> &getAllComments() const { const QMap<QString, QString> &getAllComments() const;
return commentsByKey_;
}
/** Returns a flat, human readable representation of all comments. */ /** Returns a flat, human readable representation of all comments. */
const QString getAllCommentsFlat() const; const QString getAllCommentsFlat() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment