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();
|
|
|
|
|
2016-08-02 20:46:22 +02:00
|
|
|
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()
|
|
|
|
+ ": </b></td><td>" + _list.at(i).value() + "</td></tr>";
|
2016-08-02 20:46:22 +02:00
|
|
|
|
|
|
|
ret += "</table>";
|
2016-08-02 00:28:56 +02:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|