|
27 | 27 | #include <QMenu> |
28 | 28 | #include <QMetaType> |
29 | 29 | #include <QtCore> |
| 30 | +#include <QPushbutton> |
30 | 31 |
|
31 | 32 | #include <algorithm> |
32 | 33 | #include <functional> |
@@ -232,24 +233,30 @@ ScatterplotPlugin::ScatterplotPlugin(const PluginFactory* factory) : |
232 | 233 | auto& selectionAction = _settingsAction.getSelectionAction(); |
233 | 234 |
|
234 | 235 | getSamplerAction().initialize(this, &selectionAction.getPixelSelectionAction(), &selectionAction.getSamplerPixelSelectionAction()); |
235 | | - getSamplerAction().setViewGeneratorFunction([this](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QString { |
236 | | - QStringList localPointIndices, globalPointIndices; |
| 236 | + //getSamplerAction().setViewGeneratorFunction([this](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QString { |
| 237 | + // QStringList localPointIndices, globalPointIndices; |
237 | 238 |
|
238 | | - for (const auto& localPointIndex : toolTipContext["LocalPointIndices"].toList()) |
239 | | - localPointIndices << QString::number(localPointIndex.toInt()); |
| 239 | + // for (const auto& localPointIndex : toolTipContext["LocalPointIndices"].toList()) |
| 240 | + // localPointIndices << QString::number(localPointIndex.toInt()); |
240 | 241 |
|
241 | | - for (const auto& globalPointIndex : toolTipContext["GlobalPointIndices"].toList()) |
242 | | - globalPointIndices << QString::number(globalPointIndex.toInt()); |
| 242 | + // for (const auto& globalPointIndex : toolTipContext["GlobalPointIndices"].toList()) |
| 243 | + // globalPointIndices << QString::number(globalPointIndex.toInt()); |
243 | 244 |
|
244 | | - if (localPointIndices.isEmpty()) |
245 | | - return {}; |
| 245 | + // if (localPointIndices.isEmpty()) |
| 246 | + // return {}; |
246 | 247 |
|
247 | | - return QString("<table> \ |
248 | | - <tr> \ |
249 | | - <td><b>Point ID's: </b></td> \ |
250 | | - <td>%1</td> \ |
251 | | - </tr> \ |
252 | | - </table>").arg(globalPointIndices.join(", ")); |
| 248 | + // return QString("<table> \ |
| 249 | + // <tr> \ |
| 250 | + // <td><b>Point ID's: </b></td> \ |
| 251 | + // <td>%1</td> \ |
| 252 | + // </tr> \ |
| 253 | + // </table>").arg(globalPointIndices.join(", ")); |
| 254 | + //}); |
| 255 | + |
| 256 | + auto widget = new QPushButton(); |
| 257 | + |
| 258 | + getSamplerAction().setWidgetViewGeneratorFunction([this, widget](const ViewPluginSamplerAction::SampleContext& toolTipContext) -> QWidget* { |
| 259 | + return widget; |
253 | 260 | }); |
254 | 261 |
|
255 | 262 | //getSamplerAction().setViewingMode(ViewPluginSamplerAction::ViewingMode::Tooltip); |
|
0 commit comments