2016-08-02 00:28:56 +02:00
|
|
|
#ifndef TOOLTIP_H
|
|
|
|
#define TOOLTIP_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QList>
|
2019-11-15 23:05:22 +01:00
|
|
|
#include <QVector>
|
2018-09-30 12:16:41 +02:00
|
|
|
#include "common/kv.h"
|
2016-08-02 00:28:56 +02:00
|
|
|
|
|
|
|
class ToolTip
|
|
|
|
{
|
|
|
|
public:
|
2021-08-04 08:57:42 +02:00
|
|
|
const QList<KV<QString, QString> > &list() const {return _list;}
|
2021-10-04 21:00:29 +02:00
|
|
|
const QVector<QString> &images() const {return _images;}
|
2021-08-04 08:57:42 +02:00
|
|
|
|
|
|
|
bool isEmpty() const
|
|
|
|
{
|
|
|
|
return _list.isEmpty() && _images.isEmpty();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator==(const ToolTip &other) const
|
|
|
|
{
|
|
|
|
return (_list == other._list && _images == other._images);
|
|
|
|
}
|
|
|
|
bool operator!=(const ToolTip &other) const
|
|
|
|
{
|
|
|
|
return (_list != other._list || _images != other._images);
|
|
|
|
}
|
|
|
|
|
|
|
|
void insert(const QString &key, const QString &value)
|
|
|
|
{
|
|
|
|
_list.append(KV<QString, QString>(key, value));
|
|
|
|
}
|
2021-10-04 21:00:29 +02:00
|
|
|
void setImages(const QVector<QString> &images)
|
2021-08-04 08:57:42 +02:00
|
|
|
{
|
|
|
|
_images = images;
|
|
|
|
}
|
2016-08-02 00:28:56 +02:00
|
|
|
|
|
|
|
private:
|
2019-08-01 08:36:58 +02:00
|
|
|
QList<KV<QString, QString> > _list;
|
2021-10-04 21:00:29 +02:00
|
|
|
QVector<QString> _images;
|
2016-08-02 00:28:56 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TOOLTIP_H
|