2016-08-02 00:28:56 +02:00
|
|
|
#include "tooltip.h"
|
|
|
|
|
|
|
|
void ToolTip::insert(const QString &key, const QString &value)
|
|
|
|
{
|
2016-08-02 20:46:22 +02:00
|
|
|
QPair<QString, QString> entry(key, value);
|
|
|
|
_list.append(entry);
|
2016-08-02 00:28:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QString ToolTip::toString()
|
|
|
|
{
|
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++)
|
2016-08-02 20:46:22 +02:00
|
|
|
ret += "<tr><td align=\"right\"><b>" + _list.at(i).first
|
|
|
|
+ ": </b></td><td>" + _list.at(i).second + "</td></tr>";
|
|
|
|
|
|
|
|
ret += "</table>";
|
2016-08-02 00:28:56 +02:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|