1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/GUI/tooltip.cpp

23 lines
425 B
C++
Raw Normal View History

2016-08-02 00:28:56 +02:00
#include "tooltip.h"
void ToolTip::insert(const QString &key, const QString &value)
{
2018-09-30 12:16:41 +02:00
_list.append(KV(key, value));
2016-08-02 00:28:56 +02:00
}
QString ToolTip::toString()
{
2019-01-31 01:46:53 +01:00
if (_list.isEmpty())
return QString();
QString ret = "<table>";
2016-08-02 00:28:56 +02:00
for (int i = 0; i < _list.count(); i++)
2018-09-30 12:16:41 +02:00
ret += "<tr><td align=\"right\"><b>" + _list.at(i).key()
+ ":&nbsp;</b></td><td>" + _list.at(i).value() + "</td></tr>";
ret += "</table>";
2016-08-02 00:28:56 +02:00
return ret;
}