9#include "AbstractPlotTool.h"
15#include <QStackedWidget>
18#include "CubePlotCurve.h"
19#include "MdiCubeViewport.h"
37 QString selectWindowWhatsThis =
38 "<b>Function:</b> This will allow the selection of a window to place new "
39 "plot curves into. Current curves in this window will be replaced by "
40 "new plot curves. You cannot paste plot curves into this window.";
61 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
83 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
85 window->
paint(vp, painter);
103 QHBoxLayout *layout =
new QHBoxLayout;
104 layout->addWidget(
new QLabel(
"Plot Into:"));
106 layout->addStretch(1);
107 toolBarWidget->setLayout(layout);
109 return toolBarWidget;
138 if (viewport == activeViewport ||
140 viewports.append(viewport);
159 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
161 windows.append(window);
178 if (currentIndex != -1) {
202 QVariant windowVariant = QVariant::fromValue((
PlotWindow *) window);
204 if (currentWindowIndex != -1) {
233 newCurve->setTitle(name);
256 if (curIndex != -1) {
260 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
265 if (!window && createIfNeeded) {
302 connect(newPlotWindow, SIGNAL(closed()),
303 newPlotWindow, SLOT(deleteLater()));
305 QString originalTitle = newPlotWindow->windowTitle();
306 QString titleToTry = originalTitle;
307 bool titleUsed =
false;
312 if (titleNumber > 1) {
313 titleToTry = originalTitle +
" " + QString::number(titleNumber);
319 titleUsed = titleUsed ||
324 newPlotWindow->setWindowTitle(titleToTry);
330 newPlotWindow->windowTitle(), QVariant::fromValue(newPlotWindow));
333 connect(newPlotWindow, SIGNAL(destroyed(
QObject *)),
335 connect(newPlotWindow, SIGNAL(plotChanged()),
338 return newPlotWindow;
362 viewport->viewport()->repaint();
virtual QString fileName() const
Returns the opened cube's filename.
This is a plot curve with information relating it to a particular cube or region of a cube.
QStringList sourceCube() const
This method returns the cube view port associated with the curve.
Cube display widget for certain Isis MDI applications.
bool isLinked() const
Is the viewport linked with other viewports.
void setColor(const QColor &color)
Set the color of this curve and it's markers.
Units
These are all the possible units for the x or y data in a plot curve.
void setPen(const QPen &pen)
Sets the plot pen to the passed-in pen.
void showWindow()
Shows the plot window, and raises it to the front of any overlapping sibling widgets.
virtual void update(MdiCubeViewport *activeViewport)
This is provided to allow children to react to tool updates.
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
Paint plot curve information onto the viewport.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.