1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/GUI/tooltip.h

45 lines
883 B
C
Raw Normal View History

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"
2019-03-15 19:39:52 +01:00
#include "data/imageinfo.h"
2016-08-02 00:28:56 +02:00
class ToolTip
{
public:
const QList<KV<QString, QString> > &list() const {return _list;}
const QVector<ImageInfo> &images() const {return _images;}
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));
}
void setImages(const QVector<ImageInfo> &images)
{
_images = images;
}
2016-08-02 00:28:56 +02:00
private:
QList<KV<QString, QString> > _list;
2019-11-15 22:10:55 +01:00
QVector<ImageInfo> _images;
2016-08-02 00:28:56 +02:00
};
#endif // TOOLTIP_H