3 #include "AbstractPlotTool.h"
27 QString selectWindowWhatsThis =
28 "<b>Function:</b> This will allow the selection of a window to place new "
29 "plot curves into. Current curves in this window will be replaced by "
30 "new plot curves. You cannot paste plot curves into this window.";
51 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
73 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
75 window->
paint(vp, painter);
93 QHBoxLayout *layout =
new QHBoxLayout;
94 layout->addWidget(
new QLabel(
"Plot Into:"));
96 layout->addStretch(1);
97 toolBarWidget->setLayout(layout);
128 if (viewport == activeViewport ||
130 viewports.append(viewport);
149 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
151 windows.append(window);
168 if (currentIndex != -1) {
194 QVariant windowVariant = QVariant::fromValue((
PlotWindow *) window);
196 if (currentWindowIndex != -1) {
225 newCurve->setTitle(name);
248 if (curIndex != -1) {
252 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
257 if (!window && createIfNeeded) {
294 connect(newPlotWindow, SIGNAL(closed()),
295 newPlotWindow, SLOT(deleteLater()));
297 QString originalTitle = newPlotWindow->windowTitle();
298 QString titleToTry = originalTitle;
299 bool titleUsed =
false;
304 if (titleNumber > 1) {
305 titleToTry = originalTitle +
" " + QString::number(titleNumber);
311 titleUsed = titleUsed ||
316 newPlotWindow->setWindowTitle(titleToTry);
322 newPlotWindow->windowTitle(), QVariant::fromValue(newPlotWindow));
325 connect(newPlotWindow, SIGNAL(destroyed(
QObject *)),
327 connect(newPlotWindow, SIGNAL(plotChanged()),
330 return newPlotWindow;
354 viewport->viewport()->repaint();