3 #include "AbstractPlotTool.h"
9 #include <QStackedWidget>
31 QString selectWindowWhatsThis =
32 "<b>Function:</b> This will allow the selection of a window to place new "
33 "plot curves into. Current curves in this window will be replaced by "
34 "new plot curves. You cannot paste plot curves into this window.";
55 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
77 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
79 window->
paint(vp, painter);
97 QHBoxLayout *layout =
new QHBoxLayout;
98 layout->addWidget(
new QLabel(
"Plot Into:"));
100 layout->addStretch(1);
101 toolBarWidget->setLayout(layout);
103 return toolBarWidget;
132 if (viewport == activeViewport ||
134 viewports.append(viewport);
153 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
155 windows.append(window);
172 if (currentIndex != -1) {
198 QVariant windowVariant = QVariant::fromValue((
PlotWindow *) window);
200 if (currentWindowIndex != -1) {
229 newCurve->setTitle(name);
252 if (curIndex != -1) {
256 if (!windowVariant.isNull() && windowVariant.canConvert<
PlotWindow *>()) {
261 if (!window && createIfNeeded) {
298 connect(newPlotWindow, SIGNAL(closed()),
299 newPlotWindow, SLOT(deleteLater()));
301 QString originalTitle = newPlotWindow->windowTitle();
302 QString titleToTry = originalTitle;
303 bool titleUsed =
false;
308 if (titleNumber > 1) {
309 titleToTry = originalTitle +
" " + QString::number(titleNumber);
315 titleUsed = titleUsed ||
320 newPlotWindow->setWindowTitle(titleToTry);
326 newPlotWindow->windowTitle(), QVariant::fromValue(newPlotWindow));
329 connect(newPlotWindow, SIGNAL(destroyed(
QObject *)),
331 connect(newPlotWindow, SIGNAL(plotChanged()),
334 return newPlotWindow;
358 viewport->viewport()->repaint();
Cube display widget for certain Isis MDI applications.
QStringList sourceCube() const
This method returns the cube view port associated with the curve.
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
Paint plot curve information onto the viewport.
Cube * cube() const
Return the cube associated with viewport.
This is a plot curve with information relating it to a particular cube or region of a cube...
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.
virtual void update(MdiCubeViewport *activeViewport)
This is provided to allow children to react to tool updates.
void showWindow()
Shows the plot window, and raises it to the front of any overlapping sibling widgets.
QString fileName() const
Returns the opened cube's filename.
void setPen(const QPen &pen)
Sets the plot pen to the passed-in pen.
Units
These are all the possible units for the x or y data in a plot curve.