diff --git a/Modules/QmitkExt/CMakeLists.txt b/Modules/QmitkExt/CMakeLists.txt index 7e34aab28c..35a84a9cf8 100644 --- a/Modules/QmitkExt/CMakeLists.txt +++ b/Modules/QmitkExt/CMakeLists.txt @@ -1,6 +1,6 @@ MITK_CREATE_MODULE( QmitkExt - INCLUDE_DIRS QmitkApplicationBase QmitkPropertyObservers QmitkFunctionalityComponents vtkQtChartHeaders + INCLUDE_DIRS QmitkApplicationBase QmitkPropertyObservers QmitkFunctionalityComponents DEPENDS MitkExt Qmitk qwt qxt PlanarFigure SceneSerialization QT_MODULE ) diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChart.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChart.h deleted file mode 100644 index 934720971c..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChart.h +++ /dev/null @@ -1,230 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtBarChart.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtBarChart.h -/// \date February 15, 2008 - -#ifndef _vtkQtBarChart_h -#define _vtkQtBarChart_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesLayer.h" - -class vtkQtBarChartInternal; -class vtkQtBarChartOptions; -class vtkQtBarChartSeriesOptions; - - -/// \class vtkQtBarChart -/// \brief -/// The vtkQtBarChart class is used to display a bar chart. -class VTKQTCHART_EXPORT vtkQtBarChart : public vtkQtChartSeriesLayer -{ - Q_OBJECT - -public: - vtkQtBarChart(); - virtual ~vtkQtBarChart(); - - /// \name Setup Methods - //@{ - virtual void setChartArea(vtkQtChartArea *area); - - virtual void setModel(vtkQtChartSeriesModel *model); - //@} - - /// \name Drawing Parameters - //@{ - /// \brief - /// Gets the bar chart drawing options. - /// \return - /// A pointer to the bar chart drawing options. - vtkQtBarChartOptions *getOptions() const {return this->Options;} - - /// \brief - /// Sets the bar chart drawing options. - /// - /// This method sets all the options at once, which can prevent - /// unnecessary view updates. - /// - /// \param options The new bar chart drawing options. - void setOptions(const vtkQtBarChartOptions &options); - - /// \brief - /// Gets the bar chart series options. - /// \param series The series index. - /// \return - /// A pointer to the bar chart series options. - vtkQtBarChartSeriesOptions *getBarSeriesOptions(int series) const; - - virtual QPixmap getSeriesIcon(int series) const; - //@} - - /// \name Layout Methods - //@{ - virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; - - virtual void layoutChart(const QRectF &area); - - virtual bool getHelpText(const QPointF &point, QString &text); - - /// \brief - /// Notifies the chart layer that a resize interaction has finished. - /// - /// The chart bar tree is not updated while the chart is in an - /// interactive state. It is updated in this method if needed. - virtual void finishInteractiveResize(); - //@} - - /// \name Selection Methods - //@{ - virtual void getSeriesAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getSeriesIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - //@} - - /// \name QGraphicsItem Methods - //@{ - virtual QRectF boundingRect() const; - - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - //@} - -public slots: - /// \brief - /// Refreshes the bar chart data from the model. - /// - /// The currently displayed data is cleaned up. If a model is set, - /// it is used to populate the bar chart. - void reset(); - -protected: - /// \brief - /// Creates a new bar chart series options object. - /// \param parent The parent object. - /// \return - /// A pointer to the new bar chart series options object. - virtual vtkQtChartSeriesOptions *createOptions(QObject *parent); - - /// \brief - /// Sets up the series options defaults. - /// \param options The new series options object. - virtual void setupOptions(vtkQtChartSeriesOptions *options); - -private slots: - /// \brief - /// Prepares the bar chart for a series insertion. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void prepareSeriesInsert(int first, int last); - - /// \brief - /// Inserts bar chart series at the given indexes. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void insertSeries(int first, int last); - - /// \brief - /// Removes the specified series from the chart. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void startSeriesRemoval(int first, int last); - - /// \brief - /// Finishes the domain changes after removing the series. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void finishSeriesRemoval(int first, int last); - - /// Requests a chart layout when the axis corner option changes. - void handleAxesCornerChange(); - - /// Changes the bar outline style. - void handleOutlineChange(); - - /// \brief - /// Changes the series visibility. - /// - /// The signal sender is used to determine which series has changed. - /// - /// \param visible True if the series should be shown. - void handleSeriesVisibilityChange(bool visible); - - /// \brief - /// Changes the series pen. - /// \param pen The new series pen. - void handleSeriesPenChange(const QPen &pen); - - /// \brief - /// Changes the series brush. - /// \param brush The new series brush. - void handleSeriesBrushChange(const QBrush &brush); - - /// \brief - /// Called to set up the highlights. - /// - /// The set up request is ignored if the model is being changed. - void updateHighlights(); - -private: - /// \brief - /// Adds the domain for the given series to the current domain. - /// \param series The series index. - /// \param seriesGroup Used to return the series group index. - /// \return - /// True if the domain was modified. - bool addSeriesDomain(int series, int &seriesGroup); - - /// \brief - /// Calculates the domain for the given series group. - /// \param seriesGroup The series group index. - void calculateDomain(int seriesGroup); - - /// \brief - /// Creates an ordered list of series bars. - /// \param seriesGroup The series group index. - void createBarList(int seriesGroup); - - /// \brief - /// Builds the bar tree for the given series group. - /// \param seriesGroup The series group index. - void buildBarTree(int seriesGroup); - -private: - vtkQtBarChartInternal *Internal; ///< Stores the bar series. - vtkQtBarChartOptions *Options; ///< Stores the drawing options. - bool InModelChange; ///< Used for selection changes. - bool BuildNeeded; ///< Used when resizing interactively. - -private: - vtkQtBarChart(const vtkQtBarChart &); - vtkQtBarChart &operator=(const vtkQtBarChart &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartOptions.h deleted file mode 100644 index 6b69c438ac..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartOptions.h +++ /dev/null @@ -1,187 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtBarChartOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtBarChartOptions.h -/// \date February 22, 2008 - -#ifndef _vtkQtBarChartOptions_h -#define _vtkQtBarChartOptions_h - -#include "vtkQtChartExport.h" -#include - -#include "vtkQtChartLayer.h" // needed for enum -#include // needed for static member - -class vtkQtChartHelpFormatter; - - -/// \class vtkQtBarChartOptions -/// \brief -/// The vtkQtBarChartOptions class stores the drawing options for a -/// bar chart. -/// -/// The default settings are as follows: -/// \li axes: \c BottomLeft -/// \li bar group fraction: 0.7 -/// \li bar width fraction: 0.9 -/// \li outline style: \c Darker -/// \li selection background: \c LightBlue -class VTKQTCHART_EXPORT vtkQtBarChartOptions : public QObject -{ - Q_OBJECT - -public: - enum OutlineStyle - { - Darker = 0, ///< Draws the bar outline in a darker color. - Black ///< Draws a black bar outline. - }; - -public: - /// \brief - /// Creates a bar chart options instance. - /// \param parent The parent object. - vtkQtBarChartOptions(QObject *parent=0); - - /// \brief - /// Makes a copy of another bar chart options instance. - /// \param other The bar chart options to copy. - vtkQtBarChartOptions(const vtkQtBarChartOptions &other); - virtual ~vtkQtBarChartOptions(); - - /// \brief - /// Gets the pair of axes used by the bar chart. - /// \return - /// The pair of axes used by the bar chart. - vtkQtChartLayer::AxesCorner getAxesCorner() const {return this->AxesCorner;} - - /// \brief - /// Sets the pair of axes used by the bar chart. - /// \param axes The new chart axes. - void setAxesCorner(vtkQtChartLayer::AxesCorner axes); - - /// \brief - /// Gets the bar group fraction. - /// - /// The bar group fraction is used to set the spacing between the - /// groups of bars. For a bar chart with one series, this also sets - /// the width of the bars. - /// - /// \return - /// The bar group fraction. - float getBarGroupFraction() const {return this->GroupFraction;} - - /// \brief - /// Sets the bar group fraction. - /// \param fraction The new bar group fraction. - void setBarGroupFraction(float fraction); - - /// \brief - /// Gets the bar width fraction. - /// - /// The bar width fraction is used to set the spacing between the - /// bars of different series. - /// - /// \return - /// The bar width fraction. - float getBarWidthFraction() const {return this->BarFraction;} - - /// \brief - /// Sets the bar width fraction. - /// \param fraction The new bar width fraction. - void setBarWidthFraction(float fraction); - - /// \brief - /// Gets the outline style for the bars. - /// \return - /// The current outline style. - OutlineStyle getOutlineStyle() const {return this->OutlineType;} - - /// \brief - /// Sets the outline style for the bars. - /// - /// The default style is \c Darker. - /// - /// \param style The outline style to use. - void setOutlineStyle(OutlineStyle style); - - /// \brief - /// Gets the highlight background color. - /// \return - /// The current highlight background color. - const QColor &getHighlightColor() const {return this->Highlight;} - - /// \brief - /// Sets the highlight background color. - /// \param color The color for the highlight background. - void setHighlightColor(const QColor &color); - - /// \brief - /// Gets the chart help text formatter. - /// - /// The help text formatter stores the format string. It is also - /// used to generate the help text. - /// - /// \return - /// A pointer to the chart help text formatter. - vtkQtChartHelpFormatter *getHelpFormat() {return this->Help;} - - /// \brief - /// Gets the chart help text formatter. - /// \return - /// A pointer to the chart help text formatter. - const vtkQtChartHelpFormatter *getHelpFormat() const {return this->Help;} - - /// \brief - /// Makes a copy of another bar chart options instance. - /// \param other The bar chart options to copy. - /// \return - /// A reference to the object being assigned. - vtkQtBarChartOptions &operator=(const vtkQtBarChartOptions &other); - -signals: - /// Emitted when the bar chart axes change. - void axesCornerChanged(); - - /// Emitted when bar group or bar width fractions change. - void barFractionsChanged(); - - /// Emitted when the outline style changes. - void outlineStyleChanged(); - - /// Emitted when the highlight color changes. - void highlightChanged(); - -public: - /// Defines the default highlight background. - static const QColor LightBlue; - -private: - /// Stores the highlight background color. - QColor Highlight; - vtkQtChartLayer::AxesCorner AxesCorner; ///< Stores the chart axes. - OutlineStyle OutlineType; ///< Stores the outline style. - vtkQtChartHelpFormatter *Help; ///< Stores the help text format. - float GroupFraction; ///< Stores the bar group fraction. - float BarFraction; ///< Stores the bar width fraction. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartSeriesOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartSeriesOptions.h deleted file mode 100644 index 0162e7a91a..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtBarChartSeriesOptions.h +++ /dev/null @@ -1,54 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtBarChartSeriesOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtBarChartSeriesOptions.h -/// \date February 22, 2008 - -#ifndef _vtkQtBarChartSeriesOptions_h -#define _vtkQtBarChartSeriesOptions_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesOptions.h" - - -/// \class vtkQtBarChartSeriesOptions -/// \brief -/// The vtkQtBarChartSeriesOptions class stores the drawing options -/// for a bar chart series. -class VTKQTCHART_EXPORT vtkQtBarChartSeriesOptions : - public vtkQtChartSeriesOptions -{ - Q_OBJECT - -public: - /// \brief - /// Creates a bar chart series options object. - /// \param parent The parent object. - vtkQtBarChartSeriesOptions(QObject *parent=0); - virtual ~vtkQtBarChartSeriesOptions() {} - - /// \brief - /// Sets the series brush using the style generator. - /// \param style The style index for the generator. - /// \param generator The style generator to use. - virtual void setStyle(int style, vtkQtChartStyleGenerator *generator); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartArea.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartArea.h deleted file mode 100644 index fab3e934f5..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartArea.h +++ /dev/null @@ -1,275 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartArea.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartArea.h -/// \date February 1, 2008 - -#ifndef _vtkQtChartArea_h -#define _vtkQtChartArea_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartAreaInternal; -class vtkQtChartAxisLayer; -class vtkQtChartContentsSpace; -class vtkQtChartInteractor; -class vtkQtChartLayer; -class vtkQtChartMouseBox; -class vtkQtChartStyleManager; -class QCursor; -class QString; - - -/// \class vtkQtChartArea -/// \brief -/// The vtkQtChartArea class manages the chart axes and layers. -class VTKQTCHART_EXPORT vtkQtChartArea : public QGraphicsView -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart area instance. - /// \param parent The parent widget. - vtkQtChartArea(QWidget *parent=0); - virtual ~vtkQtChartArea(); - - /// \name Layer Methods - //@{ - /// \brief - /// Adds a chart layer to the top of the layer list. - /// \param chart The chart to add to the list. - /// \sa vtkQtChartArea::insertLayer(int, vtkQtChartLayer *) - void addLayer(vtkQtChartLayer *chart); - - /// \brief - /// Inserts a chart layer in the layer list. - /// - /// The chart layers are drawn in the order they reside in the list - /// of layers. A chart at the beginning of the list is drawn - /// underneath the other layers. A chart at the end of the list is - /// drawn on top of the other layers. - /// - /// The chart area has two built in chart layers: the grid and axis - /// layers. By default, the grid layer is on the bottom and the axis - /// layer is on the next layer. The index of these layers can be - /// used to place other layers in the chart. - /// - /// \param index Where to insert the chart. - /// \param chart The chart to insert in the list. - /// \sa - /// vtkQtChartArea::getGridLayerIndex(), - /// vtkQtChartArea::getAxisLayerIndex() - void insertLayer(int index, vtkQtChartLayer *chart); - - /// \brief - /// Removes a chart layer from the layer list. - /// \param chart The chart to remove from the list. - void removeLayer(vtkQtChartLayer *chart); - - /// \brief - /// Gets the number of chart layers in the list. - /// \return - /// The number of chart layers in the list. - int getNumberOfLayers() const; - - /// \brief - /// Gets the chart layer at the specified index. - /// \param index The index of the layer. - /// \return - /// A pointer to the chart layer at the specified index. - vtkQtChartLayer *getLayer(int index) const; - - /// \brief - /// Gets the chart layer with the specified chart type. - /// \param chartName The chart type name to find. - /// \return - /// A pointer to the chart layer with the specified chart type. - vtkQtChartLayer *getLayer(const QString &chartName) const; - - /// \brief - /// Gets the chart axis layer. - /// \return - /// A pointer to the chart axis layer. - vtkQtChartAxisLayer *getAxisLayer() const; - - /// \brief - /// Gets the index for the axis layer. - /// \return - /// The index for the axis layer. - int getAxisLayerIndex() const; - - /// \brief - /// Gets the index for the grid layer. - /// \return - /// The index for the grid layer. - int getGridLayerIndex() const; - //@} - - /// \name Interaction Methods - //@{ - /// \brief - /// Gets the current chart interactor. - /// \return - /// A pointer to the current chart interactor. - vtkQtChartInteractor *getInteractor() const; - - /// \brief - /// Sets the chart interactor. - /// - /// This method sets up the interactor to work with the chart. The - /// contents space and mouse box are set on the interactor. - /// - /// \param interactor The new chart interactor. - void setInteractor(vtkQtChartInteractor *interactor); - - /// \brief - /// Gets the contents space object. - /// \return - /// A pointer to the contents space object. - vtkQtChartContentsSpace *getContentsSpace() const; - - /// \brief - /// Gets the mouse box object. - /// \return - /// A pointer to the mouse box object. - vtkQtChartMouseBox *getMouseBox() const; - - /// \brief - /// Notifies the chart layers that a resize interaction has started. - /// - /// Chart layers can use this method to reduce the processing load - /// during an interaction. - void startInteractiveResize(); - - /// \brief - /// Gets whether or no the chart is interactively resizing. - /// \return - /// True if the chart is interactively resizing. - bool isInteractivelyResizing() const; - - /// Notifies the chart layers that a resize interaction has finished. - void finishInteractiveResize(); - //@} - - /// \brief - /// Gets the style manager for layers that want unique styles. - /// \return - /// A pointer to the style manager. - vtkQtChartStyleManager *getStyleManager() const; - -public slots: - /// Calculates the axis and chart layout. - void layoutChart(); - - /// Merges layout requests into one delayed layout event. - void updateLayout(); - -signals: - /// Emitted when a delayed chart layout is needed. - void delayedLayoutNeeded(); - - /// \brief - /// Emitted when a chart layer has been inserted. - /// \param index The index of the layer. - /// \param chart The chart layer that was inserted. - void layerInserted(int index, vtkQtChartLayer *chart); - - /// \brief - /// Emitted before a chart layer is removed. - /// \param index The index of the layer. - /// \param chart The chart layer that will be removed. - void removingLayer(int index, vtkQtChartLayer *chart); - - /// \brief - /// Emitted when a chart layer has been removed. - /// \param index The index of the layer. - /// \param chart The chart layer that was removed. - void layerRemoved(int index, vtkQtChartLayer *chart); - -protected: - /// \brief - /// Updates the layout when the font changes. - /// \param e Event specific information. - /// \return - /// True if the event was handled. - virtual bool viewportEvent(QEvent *e); - - /// \brief - /// Updates the layout when the size changes. - /// \param e Event specific information. - virtual void resizeEvent(QResizeEvent *e); - - /// \name Interaction Methods - //@{ - /// \brief - /// Handles the key press events for the chart. - /// - /// All the interaction events are forwarded to the vtkQtChartInteractor. - /// It is up to the interactor object to accept or ignore the events. - /// - /// \param e Event specific information. - virtual void keyPressEvent(QKeyEvent *e); - - /// \brief - /// Handles the mouse press events for the chart. - /// \param e Event specific information. - virtual void mousePressEvent(QMouseEvent *e); - - /// \brief - /// Handles the mouse move events for the chart. - /// \param e Event specific information. - virtual void mouseMoveEvent(QMouseEvent *e); - - /// \brief - /// Handles the mouse release events for the chart. - /// \param e Event specific information. - virtual void mouseReleaseEvent(QMouseEvent *e); - - /// \brief - /// Handles the mouse double click events for the chart. - /// \param e Event specific information. - virtual void mouseDoubleClickEvent(QMouseEvent *e); - - /// \brief - /// Handles the mouse wheel events for the chart. - /// \param e Event specific information. - virtual void wheelEvent(QWheelEvent *e); - //@} - -private slots: - /// Updates the layout after a zoom change. - void handleZoomChange(); - - /// \brief - /// Changes the view cursor to the requested one. - /// \param newCursor The new view cursor. - void changeCursor(const QCursor &newCursor); - -private: - vtkQtChartAreaInternal *Internal; ///< Stores the list of chart layers. - -private: - vtkQtChartArea(const vtkQtChartArea &); - vtkQtChartArea &operator=(const vtkQtChartArea &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxis.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxis.h deleted file mode 100644 index eee36d878e..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxis.h +++ /dev/null @@ -1,476 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxis.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxis.h -/// \date February 1, 2008 - -#ifndef _vtkQtChartAxis_h -#define _vtkQtChartAxis_h - -#include "vtkQtChartExport.h" -#include -#include - -#include "vtkQtChartGraphicsItemTypes.h" // needed for enum - -class vtkQtChartAxisInternal; -class vtkQtChartAxisModel; -class vtkQtChartAxisOptions; -class vtkQtChartContentsArea; -class vtkQtChartContentsSpace; -class QGraphicsLineItem; -class QVariant; - - -/// \class vtkQtChartAxis -/// \brief -/// The vtkQtChartAxis class is used to display a cartesian axis. -class VTKQTCHART_EXPORT vtkQtChartAxis : public QObject, public QGraphicsItem -{ - Q_OBJECT - -public: - enum AxisLocation - { - Left = 0, ///< The axis is on the left of the chart. - Bottom, ///< The axis is on the bottom of the chart. - Right, ///< The axis is on the right of the chart. - Top ///< The axis is on the top of the chart. - }; - - enum AxisDomain - { - UnsupportedDomain = -1, - Number = 0, ///< Domain for int and double. - Date, ///< Domain for QDate and QDateTime. - Time, ///< Domain for QTime. - String ///< Domain for QString. - }; - - enum {Type = vtkQtChart_AxisType}; - -public: - /// \brief - /// Creates a chart axis view. - /// \param location Where on the chart the axis will be drawn. - /// \param parent The parent item. - vtkQtChartAxis(AxisLocation location, QGraphicsItem *parent=0); - virtual ~vtkQtChartAxis(); - - virtual int type() const {return vtkQtChartAxis::Type;} - - /// \name Setup Methods - //@{ - /// \brief - /// Gets the axis location on the chart. - /// \return - /// The axis location on the chart. - AxisLocation getLocation() const {return this->Location;} - - /// \brief - /// Gets the chart axis model. - /// \return - /// A pointer to the chart axis model. - vtkQtChartAxisModel *getModel() const {return this->Model;} - - /// \brief - /// Sets the chart axis model. - /// \param model The model to display. - void setModel(vtkQtChartAxisModel *model); - - /// \brief - /// Sets the neighboring axes if any. - /// - /// The neighboring axes are used when laying out the axis. The - /// axis pixel positions are adjusted to accound for the space - /// requirements of its neighbors. - /// - /// \param atMin The axis at the minimum value end. - /// \param atMax The axis at the maximum value end. - void setNeigbors(const vtkQtChartAxis *atMin, const vtkQtChartAxis *atMax); - - /// \brief - /// Sets the parallel axis. - /// \param across The axis parallel to this one. - void setParallelAxis(const vtkQtChartAxis *across); - - /// \brief - /// Sets the axis' contents space object. - /// \param contents The new contents space object. - void setContentsSpace(const vtkQtChartContentsSpace *contents); - - /// \brief - /// Sets whether or not data is available for the axis. - /// - /// This parameter is used when the best fit range is zero. If data - /// is available, the axis generates labels around the data value. - /// This is needed when the data points are the same value for an - /// axis, such as a vertical or horizontal line on a line chart. - /// - /// \param available True if data is available. - void setDataAvailable(bool available); - - /// \brief - /// Gets whether or not the axis labels are generated from the - /// view size. - /// \return - /// True if the axis labels are generated from the view size. - bool isBestFitGenerated() const; - - /// \brief - /// Sets whether or not the axis labels are generated from the - /// view size. - /// \param on True if the axis labels should be generated. - void setBestFitGenerated(bool on); - - /// \brief - /// Gets the value range used when generating the axis labels. - /// \param min Used to return the minimum value. - /// \param max Used to return the maximum value. - void getBestFitRange(QVariant &min, QVariant &max) const; - - /// \brief - /// Sets the value range used when generating the axis labels. - /// \param min The minimum value. - /// \param max The maximum value. - void setBestFitRange(const QVariant &min, const QVariant &max); - - /// \brief - /// Gets whether or not range padding is used. - /// - /// This setting only affects the best-fit layout. When range - /// padding is used, the axis makes sure there is space between - /// the best-fit range and the actual minimum and maximum labels. - /// - /// \return - /// True if range padding is used. - bool isRangePaddingUsed() const; - - /// \brief - /// Sets whether or not range padding is used. - /// \param padRange True if range padding should be used. - void setRangePaddingUsed(bool padRange); - - /// \brief - /// Gets whether or not the range is expanded to zero. - /// - /// This setting only affects the best-fit layout. If the range - /// does not include zero, the range is expanded to include it. - /// This is used by the bar chart to make sure the minimum bar has - /// some length to it. - /// - /// \return - /// True if the range is expanded to zero. - bool isExpansionToZeroUsed() const; - - /// \brief - /// Sets whether or not the range is expanded to zero. - /// \param expand True if the range should be expanded to zero. - void setExpansionToZeroUsed(bool expand); - - /// \brief - /// Gets whether or not extra space is added around the axis tick - /// marks. - /// - /// This setting does not affect the best-fit layout. Extra space is - /// added before the minimum and after the maximum. This is usefull - /// for chart objects that expand around the tick mark like the bar - /// in a bar chart. - /// - /// \return - /// True if extra space is added around the axis tick marks. - bool isExtraSpaceUsed() const; - - /// \brief - /// Sets whether or not extra space is added around the axis tick - /// marks. - /// \param addSpace True if space should be added around the axis - /// tick marks. - void setExtraSpaceUsed(bool addSpace); - - /// \brief - /// Gets whether or not the space for the axis is too small. - /// \return - /// True if the space for the axis is too small. - bool isSpaceTooSmall() const; - - /// \brief - /// Sets whether or not the space for the axis is too small. - /// \param tooSmall True if the space for the axis is too small. - void setSpaceTooSmall(bool tooSmall); - //@} - - /// \name Drawing Parameters - //@{ - /// \brief - /// Gets the chart axis drawing options. - /// \return - /// A pointer to the chart axis drawing options. - vtkQtChartAxisOptions *getOptions() const {return this->Options;} - - /// \brief - /// Sets the chart axis drawing options. - /// - /// This method sets all the axis options at once, which can prevent - /// unnecessary view updates. - /// - /// \param options The new axis drawing options. - void setOptions(const vtkQtChartAxisOptions &options); - //@} - - /// \name Display Methods - //@{ - /// \brief - /// Used to layout the chart axis. - /// - /// This method must be called before the axis can be drawn. - /// - /// \param area The total chart area. - void layoutAxis(const QRectF &area); - - /// \brief - /// Used to adjust the bounding width for the axis. - /// - /// This method only affects left and right locations. It is called - /// after the neighboring axes have been layed out. The neighboring - /// axes may need more space to display the labels. - void adjustAxisLayout(); - - /// \brief - /// Gets the space needed for the axis. - /// - /// If the axis is horizontal, the space needed is the preferred - /// height. If the axis is vertical, the space needed is the - /// preferred width. The preferred height can be obtained at any - /// time. The preferred width is only valid after a layout. - /// - /// \return - /// The space needed for the axis. - float getPreferredSpace() const; - - /// \brief - /// Gets the axis label font height. - /// \return - /// The axis label font height. - float getFontHeight() const; - - /// \brief - /// Gets the maximum label width. - /// - /// The maximum label width is only valid after a layout. - /// - /// \return - /// The maximum label width. - float getMaxLabelWidth() const; - - /// \brief - /// Gets the length of the axis label tick marks. - /// \return - /// The length of the axis label tick marks. - float getTickLength() const; - - /// \brief - /// Gets the length of the small axis label tick marks. - /// \return - /// The length of the small axis label tick marks. - float getSmallTickLength() const; - - /// \brief - /// Gets the distance between the axis label and the tick mark. - /// return - /// The distance between the axis label and the tick mark. - float getTickLabelSpacing() const; - - /// \brief - /// Gets whether or not logarithmic scale can be used. - /// \return - /// True if logarithmic scale can be used. - bool isLogScaleAvailable() const; - - /// \brief - /// Paints the chart axis using the given painter. - /// \param painter The painter to use. - /// \param option The area to paint and the level of detail. - /// \param widget The widget being painted. - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - //@} - - /// \name Location Methods - //@{ - virtual QRectF boundingRect() const; - - /// \brief - /// Gets the bounding rectangle for the axis. - /// - /// The bounding box returned is only valid after a layout. The - /// rectangle is in chart coordinates. - /// - /// \return - /// The bounding rectangle for the axis. - QRectF getBounds() const; - - /// \brief - /// Gets wether or not the given label tickmark is visible. - /// \param index The index of the label. - /// \return - /// True if the given label tickmark is visible. - bool isLabelTickVisible(int index) const; - - /// \brief - /// Gets the location of the given label. - /// \param index The index of the label. - /// \return - /// The location of the given label. - float getLabelLocation(int index) const; - - /// \brief - /// Gets the current axis domain. - /// \return - /// The current axis domain. - AxisDomain getAxisDomain() const; - - /// \brief - /// Gets whether or not the given value is in the axis domain. - /// \param value The value to test. - /// \return - /// True if the given value is in the axis domain. - bool isValueInDomain(const QVariant &value) const; - - /// \brief - /// Gets the pixel location for the given value. - /// - /// The pixel location relates to the orientation of the axis. - /// - /// \param value The value to map. - /// \return - /// The pixel location for the given value. - float getPixel(const QVariant &value) const; - - /// \brief - /// Gets the pixel location for zero. - /// - /// For int and double domains, the pixel location returned is - /// limited by the axis pixel range. For non-numeric domains, the - /// axis minimum pixel location is returned. - /// - /// \return - /// The pixel location for zero. - float getZeroPixel() const; - //@} - - /// \brief - /// Gets whether or not logarithmic scale can be used for the - /// given range. - /// \param min The range minimum. - /// \param max The range maximum. - /// \return - /// True if logarithmic scale can be used for the given range. - static bool isLogScaleValid(const QVariant &min, const QVariant &max); - -signals: - /// Emitted when the axis needs to be layed out again. - void layoutNeeded(); - - /// \brief - /// Emitted when the pixel-value scale changes. - /// - /// The pixel-value scale is only modified inside the axis layout - /// method. Charts using this signal should never emit - /// \c layoutNeeded when responding to this signal. Instead, set a - /// flag to use when the chart layout method is called. - void pixelScaleChanged(); - -public slots: - /// Resets the chart axis view. - void reset(); - - /// \brief - /// Sets the contents offset for the axis. - /// \param offset The new contents offset. - void setOffset(float offset); - -private slots: - /// Updates the layout for the new font. - void handleFontChange(); - - /// Updates the labels with the new presentation. - void handlePresentationChange(); - - /// Updates the axis and label colors. - void handleColorChange(); - - /// Updates the layout for the new axis scale. - void handleAxisScaleChange(); - - /// \brief - /// Adds the new label in the given location. - /// \param index Where to insert the new label. - void insertLabel(int index); - - /// \brief - /// Cleans up the view data for the given index. - /// \param index The label being removed. - void startLabelRemoval(int index); - - /// \brief - /// Finishes the label removal by requesting a relayout. - /// \param index The label being removed. - void finishLabelRemoval(int index); - -private: - /// \brief - /// Get the estimated maximum label width. - /// - /// This method is used when using a best-fit layout. The label - /// width is estimated using the min and max values. - /// - /// \param minimum The minimum value. - /// \param maximum The maximum value. - /// \return - /// The estimated maximum label width. - float getLabelWidthGuess(const QVariant &minimum, - const QVariant &maximum) const; - - /// \brief - /// Generates labels for a linear, best-fit layout. - /// \param contents The axis contents area. - void generateLabels(const QRectF &contents); - - /// \brief - /// Generates labels for a logarithmic, best-fit layout. - /// \param contents The axis contents area. - void generateLogLabels(const QRectF &contents); - -public: - static const double MinLogValue; ///< Stores the log scale minimum. - -private: - vtkQtChartAxisInternal *Internal; ///< Stores the view data. - vtkQtChartAxisOptions *Options; ///< Stores the drawing options. - vtkQtChartAxisModel *Model; ///< Stores the list of labels. - const vtkQtChartAxis *AtMin; ///< Stores the axis at the min. - const vtkQtChartAxis *AtMax; ///< Stores the axis at the max. - const vtkQtChartAxis *Across; ///< Stores the parallel axis. - const vtkQtChartContentsSpace *Zoom; ///< Stores the contents space. - AxisLocation Location; ///< Stores the axis location. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisCornerDomain.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisCornerDomain.h deleted file mode 100644 index ee08b18a9d..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisCornerDomain.h +++ /dev/null @@ -1,156 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisCornerDomain.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisCornerDomain.h -/// \date March 3, 2008 - -#ifndef _vtkQtChartAxisCornerDomain_h -#define _vtkQtChartAxisCornerDomain_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartAxis.h" // needed for enum - -class vtkQtChartAxisCornerDomainInternal; -class vtkQtChartAxisDomainPriority; -class vtkQtChartSeriesDomain; - - -/// \class vtkQtChartAxisCornerDomain -/// \brief -/// The vtkQtChartAxisCornerDomain class is used to merge similar -/// domains for a pair of axes. -class VTKQTCHART_EXPORT vtkQtChartAxisCornerDomain -{ -public: - vtkQtChartAxisCornerDomain(); - vtkQtChartAxisCornerDomain(const vtkQtChartAxisCornerDomain &other); - ~vtkQtChartAxisCornerDomain(); - - /// \brief - /// Gets the number of domains. - /// - /// Compatible domains are merged together. The number of domains is - /// the number of different types of domains added to the corner. - /// - /// \return - /// The number of domains. - int getNumberOfDomains() const; - - /// \brief - /// Gets the domain for the given index. - /// \param index The domain index. - /// \return - /// A pointer to the domain at the given index. - const vtkQtChartSeriesDomain *getDomain(int index) const; - - /// \brief - /// Gets the domain for the given index. - /// \param index The domain index. - /// \return - /// A pointer to the domain at the given index. - vtkQtChartSeriesDomain *getDomain(int index); - - /// \brief - /// Gets the best domain match for the given priorities. - /// \param xPriority The x-axis priority. - /// \param yPriority The y-axis priority. - /// \return - /// A pointer to the domain for the given priorities. - const vtkQtChartSeriesDomain *getDomain( - const vtkQtChartAxisDomainPriority &xPriority, - const vtkQtChartAxisDomainPriority &yPriority) const; - - /// \brief - /// Gets the best domain match for the given type and priority. - /// \param xDomain The domain type for the x-axis. - /// \param yPriority The y-axis priority. - /// \return - /// A pointer to the domain for the given type and priority. - const vtkQtChartSeriesDomain *getDomain( - vtkQtChartAxis::AxisDomain xDomain, - const vtkQtChartAxisDomainPriority &yPriority) const; - - /// \brief - /// Gets the best domain match for the given type and priority. - /// \param xPriority The x-axis priority. - /// \param yDomain The domain type for the y-axis. - /// \return - /// A pointer to the domain for the given type and priority. - const vtkQtChartSeriesDomain *getDomain( - const vtkQtChartAxisDomainPriority &xPriority, - vtkQtChartAxis::AxisDomain yDomain) const; - - /// \brief - /// Gets the best domain match for the given types. - /// \param xDomain The domain type for the x-axis. - /// \param yDomain The domain type for the y-axis. - /// \param index Used to return the index of the returned domain. - /// \return - /// A pointer to the domain for the given types. - const vtkQtChartSeriesDomain *getDomain( - vtkQtChartAxis::AxisDomain xDomain, - vtkQtChartAxis::AxisDomain yDomain, int *index=0) const; - - /// \brief - /// Merges the given domain with the current domains. - /// - /// If the domain is compatible with one of the current domains, it - /// is merged. Otherwise, the domain is added to the list. The index - /// can be used to get a pointer to the combined or newly created - /// domain. - /// - /// \param domain The domain to add. - /// \param index Used to return the index where the domain was added. - /// \return - /// True if the new domain changed the current domains. - bool mergeDomain(const vtkQtChartSeriesDomain &domain, int *index=0); - - /// \brief - /// Removes the domain at the specified index. - /// \param index The index to remove. - void removeDomain(int index); - - /// Removes all the domains. - void clear(); - - /// \brief - /// Sets the preferences for the horizontal axis. - /// \param padRange True if the range should be padded. - /// \param expandToZero True if the range should be expanded to zero. - /// \param addSpace True if space should be added to the end labels. - void setHorizontalPreferences(bool padRange, bool expandToZero, - bool addSpace); - - /// \brief - /// Sets the preferences for the vertical axis. - /// \param padRange True if the range should be padded. - /// \param expandToZero True if the range should be expanded to zero. - /// \param addSpace True if space should be added to the end labels. - void setVerticalPreferences(bool padRange, bool expandToZero, - bool addSpace); - - vtkQtChartAxisCornerDomain &operator=( - const vtkQtChartAxisCornerDomain &other); - -private: - vtkQtChartAxisCornerDomainInternal *Internal; ///< Stores the domains. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomain.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomain.h deleted file mode 100644 index a0b47905c5..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomain.h +++ /dev/null @@ -1,263 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisDomain.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisDomain.h -/// \date February 14, 2008 - -#ifndef _vtkQtChartAxisDomain_h -#define _vtkQtChartAxisDomain_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartAxis.h" // needed for enum -#include // needed for parameter -#include // needed for parameter/enum - - -/// \class vtkQtChartAxisDomain -/// \brief -/// The vtkQtChartAxisDomain class is used to merge similar domains -/// for an axis. -class VTKQTCHART_EXPORT vtkQtChartAxisDomain -{ -public: - vtkQtChartAxisDomain(); - vtkQtChartAxisDomain(const vtkQtChartAxisDomain &other); - ~vtkQtChartAxisDomain() {} - - /// \name Setup Methods - //@{ - /// \brief - /// Gets whether or not the domain is empty. - /// - /// The domain is empty if both the range and list are empty. - /// - /// \return - /// True if the domain is empty. - bool isEmpty() const; - - /// \brief - /// Gets whether or not the range is inside the list. - /// \return - /// True if the range is inside the list. - bool isRangeInList() const; - - /// \brief - /// Gets the axis domain type. - /// \return - /// The axis domain type. - vtkQtChartAxis::AxisDomain getDomainType() const; - - /// \brief - /// Gets the QVariant domain type. - /// \return - /// The QVariant domain type. - QVariant::Type getVariantType() const; - - /// \brief - /// Gets whether or not the given type is compatible with the - /// current domain type. - /// \param domain The QVariant domain type. - /// \return - /// True if the given type is compatible with the current domain. - bool isTypeCompatible(QVariant::Type domain) const; - - /// \brief - /// Gets the current domain. - /// \param isRange Used to return whether or not the domain is a range. - /// \return - /// A reference to the current domain values. - const QList &getDomain(bool &isRange) const; - - /// \brief - /// Sets the domain to the given range. - /// \param range A list of two values. - void setRange(const QList &range); - - /// \brief - /// Sets the domain to the given list of values. - /// \note - /// The list should be sorted before calling this method. - /// \param domain The list of domain values. - void setDomain(const QList &domain); - - /// \brief - /// Merges the given range with the current domain. - /// \param range A list of two values. - /// \return - /// True if the merge was successful. - bool mergeRange(const QList &range); - - /// \brief - /// Merges the given list with the current domain. - /// \note - /// The list should be sorted before calling this method. - /// \param domain The list of domain values. - /// \return - /// True if the merge was successful. - bool mergeDomain(const QList &domain); - - /// \brief - /// Merges the given domain with the current domain. - /// - /// The axis domain preferences are merged as well as the domain - /// values. - /// - /// \param other The domain to merge. - /// \return - /// True if the merge was successful. - bool mergeDomain(const vtkQtChartAxisDomain &other); - - /// Clears the domain contents. - void clear(); - //@} - - /// \name Preference Methods - //@{ - /// \brief - /// Gets whether or not the range should be padded. - /// \return - /// True if the range should be padded. - bool isRangePaddingUsed() const {return this->PadRange;} - - /// \brief - /// Sets whether or not the range should be padded. - /// \param padRange True if the range should be padded. - void setRangePaddingUsed(bool padRange) {this->PadRange = padRange;} - - /// \brief - /// Gets whether or not the range should be expanded to zero. - /// \return - /// True if the range should be expanded to zero. - bool isExpansionToZeroUsed() const {return this->ExpandToZero;} - - /// \brief - /// Sets whether or not the range should be expanded to zero. - /// \param expand True if the range should be expanded to zero. - void setExpansionToZeroUsed(bool expand) {this->ExpandToZero = expand;} - - /// \brief - /// Gets whether or not space should be added to the end labels. - /// \return - /// True if space should be added to the end labels. - bool isExtraSpaceUsed() const {return this->AddSpace;} - - /// \brief - /// Sets whether or not space should be added to the end labels. - /// \param addSpace True if space should be added to the end labels. - void setExtraSpaceUsed(bool addSpace) {this->AddSpace = addSpace;} - - /// \brief - /// Sets the axis preferences. - /// \param padRange True if the range should be padded. - /// \param expandToZero True if the range should be expanded to zero. - /// \param addSpace True if space should be added to the end labels. - void setPreferences(bool padRange, bool expandToZero, bool addSpace); - //@} - - vtkQtChartAxisDomain &operator=(const vtkQtChartAxisDomain &other); - -public: - /// \brief - /// Translates the QVariant type to axis domain type. - /// \param domain The QVariant domain type. - /// \return - /// The axis domain type. - static vtkQtChartAxis::AxisDomain getAxisDomain(QVariant::Type domain); - - /// \brief - /// Sorts the list of variants according to value. - /// - /// The list of variants is sorted according to value using a quick - /// sort algorithm. The list is sorted in place and non-recursively. - /// - /// \param list The list of shapes to be sorted. - static void sort(QList &list); - -private: - /// \brief - /// Merges the given numeric range with the current domain. - /// - /// The numeric values are promoted to doubles if there is a mix of - /// int and double. - /// - /// \param range A list of two numbers. - /// \return - /// True if the merge was successful. - bool mergeNumberRange(const QList &range); - - /// \brief - /// Merges the given numeric list with the current domain. - /// \param domain The list of domain numbers. - /// \return - /// True if the merge was successful. - bool mergeNumberDomain(const QList &domain); - - /// \brief - /// Merges the given string list with the current domain. - /// - /// New strings are appended to the list. Duplicate strings are not - /// added. - /// - /// \param domain The list of domain strings. - /// \return - /// True if the merge was successful. - bool mergeStringDomain(const QList &domain); - - /// \brief - /// Merges the given date range with the current domain. - /// - /// The date values are promoted to date-time if there is a mix of - /// date and date-time. - /// - /// \param range A list of two dates. - /// \return - /// True if the merge was successful. - bool mergeDateRange(const QList &range); - - /// \brief - /// Merges the given date list with the current domain. - /// \param domain The list of domain dates. - /// \return - /// True if the merge was successful. - bool mergeDateDomain(const QList &domain); - - /// \brief - /// Merges the given time range with the current domain. - /// \param range A list of two times. - /// \return - /// True if the merge was successful. - bool mergeTimeRange(const QList &range); - - /// \brief - /// Merges the given time list with the current domain. - /// \param domain The list of domain times. - /// \return - /// True if the merge was successful. - bool mergeTimeDomain(const QList &domain); - -private: - QList List; ///< Stores the domain list. - QList Range; ///< Stores the domain range. - bool PadRange; ///< True if the range should be padded. - bool ExpandToZero; ///< True if the range should be expanded to zero. - bool AddSpace; ///< True if space should be added to the end labels. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomainPriority.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomainPriority.h deleted file mode 100644 index 277af4e215..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisDomainPriority.h +++ /dev/null @@ -1,77 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisDomainPriority.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisDomainPriority.h -/// \date February 14, 2008 - -#ifndef _vtkQtChartAxisDomainPriority_h -#define _vtkQtChartAxisDomainPriority_h - -#include "vtkQtChartExport.h" -#include // Needed for parameter and return type. - - -/// \class vtkQtChartAxisDomainPriority -/// \brief -/// The vtkQtChartAxisDomainPriority class stores the domain -/// priority order. -class VTKQTCHART_EXPORT vtkQtChartAxisDomainPriority -{ -public: - enum DomainType - { - Number = 0, ///< Domain for int and double. - Date, ///< Domain for QDate and QDateTime. - Time, ///< Domain for QTime. - String ///< Domain for QString. - }; - -public: - vtkQtChartAxisDomainPriority(); - vtkQtChartAxisDomainPriority(const vtkQtChartAxisDomainPriority &other); - ~vtkQtChartAxisDomainPriority() {} - - /// \brief - /// Gets the default domain priority order. - /// \return - /// The default domain priority order. - QList getDefaultOrder() const; - - /// \brief - /// Gets the current domain priority order. - /// \return - /// A reference to the domain priority order. - const QList &getOrder() const {return this->Order;} - - /// \brief - /// Sets the domain priority order. - /// \param order The new domain priority order. - void setOrder(const QList &order); - - vtkQtChartAxisDomainPriority &operator=( - const vtkQtChartAxisDomainPriority &other); - bool operator==(const vtkQtChartAxisDomainPriority &other) const; - bool operator!=(const vtkQtChartAxisDomainPriority &other) const; - -private: - QList Order; ///< Stores the domain priority order. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisLayer.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisLayer.h deleted file mode 100644 index b76e3914cb..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisLayer.h +++ /dev/null @@ -1,197 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisLayer.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisLayer.h -/// \date February 1, 2008 - -#ifndef _vtkQtChartAxisLayer_h -#define _vtkQtChartAxisLayer_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartLayer.h" -#include "vtkQtChartAxis.h" // Needed for enum - -class vtkQtChartAxisDomain; -class vtkQtChartAxisDomainPriority; -class vtkQtChartAxisLayerItem; -class QFont; -class QGraphicsRectItem; - - -/// \class vtkQtChartAxisLayer -/// \brief -/// The vtkQtChartAxisLayer class is used to display the chart axes. -class VTKQTCHART_EXPORT vtkQtChartAxisLayer : public vtkQtChartLayer -{ - Q_OBJECT - -public: - enum AxisBehavior - { - ChartSelect = 0, ///< The axis labels are determined by the charts. - BestFit, ///< The axis labels are determined by space. - FixedInterval ///< The axis labels are fixed. - }; - - enum {Type = vtkQtChart_AxisLayerType}; - -public: - vtkQtChartAxisLayer(); - virtual ~vtkQtChartAxisLayer(); - - /// \name Axis Methods - //@{ - /// \brief - /// Gets the axis in the specified location. - /// \param location The location of the axis. - /// \return - /// A pointer to the specified axis. - vtkQtChartAxis *getAxis(vtkQtChartAxis::AxisLocation location) const; - - /// \brief - /// Gets the horizontal axis in the specified pair. - /// \param axes The pair of chart axes. - /// \return - /// A pointer to the specified axis. - vtkQtChartAxis *getHorizontalAxis(vtkQtChartLayer::AxesCorner axes) const; - - /// \brief - /// Gets the vertical axis in the specified pair. - /// \param axes The pair of chart axes. - /// \return - /// A pointer to the specified axis. - vtkQtChartAxis *getVerticalAxis(vtkQtChartLayer::AxesCorner axes) const; - - /// \brief - /// Gets the layout behavior for the specified axis. - /// \param location The location of the axis. - /// \return - /// The layout behavior for the specified axis. - AxisBehavior getAxisBehavior(vtkQtChartAxis::AxisLocation location) const; - - /// \brief - /// Sets the layout behavior for the specified axis. - /// \param location The location of the axis. - /// \param behavior The new layout behavior. - void setAxisBehavior(vtkQtChartAxis::AxisLocation location, - AxisBehavior behavior); - - /// \brief - /// Gets the domain priority order for the given axis. - /// \param location The location of the axis. - /// \return - /// A reference to the domain priority order. - const vtkQtChartAxisDomainPriority &getAxisDomainPriority( - vtkQtChartAxis::AxisLocation location) const; - - /// \brief - /// Sets the domain priority order for the given axis. - /// \param location The location of the axis. - /// \param priority The new domain priority order. - void setAxisDomainPriority(vtkQtChartAxis::AxisLocation location, - const vtkQtChartAxisDomainPriority &priority); - //@} - - /// \brief - /// Used to layout the chart axes. - /// - /// The \c area passed to this method is the total chart area. The - /// axis layer uses the whole area to layout the axes. Once the - /// layout is complete, the space inside the axes is passed to the - /// other chart layers. - /// - /// \param area The area the axes should occupy. - /// \sa - /// vtkQtChartAxisLayer::getLayerBounds() - virtual void layoutChart(const QRectF &area); - - /// \brief - /// Sets the chart area that contains this layer. - /// - /// The contents space object for the axes is set to the one used - /// by the chart area. - /// - /// \param area The new chart area. - virtual void setChartArea(vtkQtChartArea *area); - - /// \brief - /// Gets the area inside the chart axes. - /// \return - /// The area inside the chart axes. - QRectF getLayerBounds() const {return this->LayerBounds;} - - virtual QRectF boundingRect() const; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - -public slots: - /// Sets a flag to gather the chart domains during layout. - void handleChartRangeChange(); - - /// Clears the flag to gather the chart domains during layout. - void cancelChartRangeChange(); - -private: - /// Sets up the axis objects for the chart. - void setupAxesCorner(); - - /// \brief - /// Gets the domain type for the given axis. - /// \param location The location of the axis. - /// \return - /// The axis domain type. - vtkQtChartAxis::AxisDomain getAxisDomain( - vtkQtChartAxis::AxisLocation location) const; - - /// \brief - /// Gets the corner for the given set of axes. - /// \param first The location of the first axis. - /// \param second The location of the second axis. - /// \return - /// The corner for the given set of axes. - vtkQtChartLayer::AxesCorner getCorner(vtkQtChartAxis::AxisLocation first, - vtkQtChartAxis::AxisLocation second) const; - - /// \brief - /// Finds the domain for the axis based on the chart domains. - /// \param axis The location of the axis. - /// \param neighbor The location of the neighboring axis. - /// \param neighborDomain The domain type of the neighboring axis. - /// \param layerDomain The chart layer domains. - /// \param axisDomain Used to return the axis domain. - void findAxisDomain(vtkQtChartAxis::AxisLocation axis, - vtkQtChartAxis::AxisLocation neighbor, - vtkQtChartAxis::AxisDomain neighborDomain, - const vtkQtChartLayerDomain &layerDomain, - vtkQtChartAxisDomain &axisDomain) const; - -private: - QRectF LayerBounds; ///< Stores the layer bounds. - QGraphicsRectItem *Border; ///< Draws the layer boundary. - vtkQtChartAxis *Axis[4]; ///< Stores the axis objects. - vtkQtChartAxisLayerItem *Option[4]; ///< Stores the axis behaviors. - bool RangeChanged; ///< True if the range has changed. - -private: - vtkQtChartAxisLayer(const vtkQtChartAxisLayer &); - vtkQtChartAxisLayer &operator=(const vtkQtChartAxisLayer &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisModel.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisModel.h deleted file mode 100644 index be2f5813ec..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisModel.h +++ /dev/null @@ -1,131 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisModel.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisModel.h -/// \date 2/5/2008 - -#ifndef _vtkQtChartAxisModel_h -#define _vtkQtChartAxisModel_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartAxisModelInternal; -class QVariant; - - -/// \class vtkQtChartAxisModel -/// \brief -/// The vtkQtChartAxisModel class stores the labels for a chart axis. -class VTKQTCHART_EXPORT vtkQtChartAxisModel : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart axis model. - /// \param parent The parent object. - vtkQtChartAxisModel(QObject *parent=0); - virtual ~vtkQtChartAxisModel(); - - /// \brief - /// Adds a label to the chart axis. - /// \param label The label to add. - void addLabel(const QVariant &label); - - /// \brief - /// Adds a label to the chart axis. - /// \param index Where to insert the label. - /// \param label The label to add. - void insertLabel(int index, const QVariant &label); - - /// \brief - /// Removes a label from the chart axis. - /// \param index The index of the label to remove. - void removeLabel(int index); - - /// Removes all the labels from the chart axis. - void removeAllLabels(); - - /// \brief - /// Blocks the model modification signals. - /// - /// This method should be called before making multiple changes to - /// the model. It will prevent the view from updating before the - /// changes are complete. Once all the changes are made, the - /// \c finishModifyingData method should be called to notify the - /// view of the changes. - /// - /// \sa vtkQtChartAxisModel::finishModifyingData() - void startModifyingData(); - - /// \brief - /// Unblocks the model modification signals. - /// - /// The \c labelsReset signal is emitted to synchronize the view. - /// - /// \sa vtkQtChartAxisModel::startModifyingData() - void finishModifyingData(); - - /// \brief - /// Gets the number of labels in the chart axis. - /// \return - /// The number of labels in the chart axis. - int getNumberOfLabels() const; - - /// \brief - /// Gets a specified chart axis label. - /// \param index Which chart axis to get. - /// \param label Used to return the label. - void getLabel(int index, QVariant &label) const; - - /// \brief - /// Gets the index of the given label. - /// \param label The label value to find. - /// \return - /// The index of the label or -1 if not found. - int getLabelIndex(const QVariant &label) const; - -signals: - /// \brief - /// Emitted when a new label is added. - /// \param index Where the label was added. - void labelInserted(int index); - - /// \brief - /// Emitted before a label is removed. - /// \param index The index being removed. - void removingLabel(int index); - - /// \brief - /// Emitted after a label is removed. - /// \param index The index being removed. - void labelRemoved(int index); - - /// Emitted when the axis labels are reset. - void labelsReset(); - -private: - vtkQtChartAxisModelInternal *Internal; ///< Stores the list of labels. - bool InModify; ///< True when blocking signals. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisOptions.h deleted file mode 100644 index aa9e0da487..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartAxisOptions.h +++ /dev/null @@ -1,279 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartAxisOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartAxisOptions.h -/// \date 2/6/2008 - -#ifndef _vtkQtChartAxisOptions_h -#define _vtkQtChartAxisOptions_h - - -#include "vtkQtChartExport.h" -#include - -#include // Needed for member variable -#include // Needed for member variable -#include // Needed for return value - -class QVariant; - - -/// \class vtkQtChartAxisOptions -/// \brief -/// The vtkQtChartAxisOptions class stores the drawing options for a -/// chart axis. -class VTKQTCHART_EXPORT vtkQtChartAxisOptions : public QObject -{ - Q_OBJECT - -public: - enum NotationType - { - Standard = 0, - Exponential, - Engineering, - StandardOrExponential - }; - - enum AxisGridColor - { - Lighter = 0, ///< The grid color is based on the axis color. - Specified ///< The grid color is specified. - }; - - enum AxisScale - { - Linear, ///< Use a linear scale. - Logarithmic ///< Use a logarithmic scale. - }; - -public: - /// \brief - /// Creates a chart axis options instance. - /// \param parent The parent object. - vtkQtChartAxisOptions(QObject *parent=0); - - /// \brief - /// Makes a copy of another axis options instance. - /// \param other The axis options to copy. - vtkQtChartAxisOptions(const vtkQtChartAxisOptions &other); - virtual ~vtkQtChartAxisOptions() {} - - /// \brief - /// Gets whether or not the axis is visible. - /// \return - /// True if the axis is visible. - bool isVisible() const {return this->Visible;} - - /// \brief - /// Sets whether or not the axis should be visible. - /// \param visible True if the axis should be visible. - void setVisible(bool visible); - - /// \brief - /// Gets whether or not the axis labels are visible. - /// \return - /// True if the axis labels are visible. - bool areLabelsVisible() const {return this->ShowLabels;} - - /// \brief - /// Sets whether or not the axis labels should be visible. - /// \param visible True if the axis labels should be visible. - void setLabelsVisible(bool visible); - - /// \brief - /// Gets whether or not the axis grid is visible. - /// \return - /// True if the axis grid is visible. - bool isGridVisible() const {return this->ShowGrid;} - - /// \brief - /// Sets whether or not the axis grid should be visible. - /// \param visible True if the axis grid should be visible. - void setGridVisible(bool visible); - - /// \brief - /// Gets the axis color. - /// \return - /// The axis color. - const QColor &getAxisColor() const {return this->AxisColor;} - - /// \brief - /// Sets the axis color. - /// - /// If the grid color is tied to the axis color, the grid - /// color will also be set. - /// - /// \param color The new axis color. - /// \sa vtkQtChartAxisOptions::setGridColorType(AxisGridColor) - void setAxisColor(const QColor &color); - - /// \brief - /// Gets the color of the axis labels. - /// \return - /// The color of the axis labels. - const QColor &getLabelColor() const {return this->LabelColor;} - - /// \brief - /// Sets the color of the axis labels. - /// \param color The new axis label color. - void setLabelColor(const QColor &color); - - /// \brief - /// Gets the font used to draw the axis labels. - /// \return - /// The font used to draw the axis labels. - const QFont &getLabelFont() const {return this->LabelFont;} - - /// \brief - /// Sets the font used to draw the axis labels. - /// \param font The font to use. - void setLabelFont(const QFont &font); - - /// \brief - /// Gets the axis scale (linear or logarithmic). - /// \return - /// The axis scale. - AxisScale getAxisScale() const {return this->Scale;} - - /// \brief - /// Sets the axis scale (linear or logarithmic). - /// \param scale The new axis scale. - void setAxisScale(AxisScale scale); - - /// \brief - /// Gets the decimal precision of the axis labels. - /// \return - /// The decimal precision of the axis labels. - /// \sa pqChartValue::getString() - int getPrecision() const {return this->Precision;} - - /// \brief - /// Sets the decimal precision of the axis labels. - /// \param precision The number of decimal places to use. - /// \sa pqChartValue::getString() - void setPrecision(int precision); - - /// \brief - /// Gets the notation type for the axis labels. - /// \return - /// The notation type for the axis labels. - /// \sa pqChartValue::getString() - NotationType getNotation() const {return this->Notation;} - - /// \brief - /// Sets the notation type for the axis labels. - /// \param notation The new axis notation type. - /// \sa pqChartValue::getString() - void setNotation(NotationType notation); - - /// \brief - /// Sets the axis grid color type. - /// - /// The axis grid color type determines if the grid color is - /// tied to the axis color. If the grid color type is \c Lighter, - /// the grid color will be a lighter version of the axis color. - /// - /// \param type The new axis grid color type. - void setGridColorType(AxisGridColor type); - - /// \brief - /// Gets the axis grid color type. - /// \return - /// The axis grid color type. - /// \sa vtkQtChartAxisOptions::setGridColorType(AxisGridColor) - AxisGridColor getGridColorType() const {return this->GridType;} - - /// \brief - /// Gets the axis grid color. - /// - /// If the grid color type is \c Lighter, the color returned will be - /// a lighter version of the axis color. Otherwise, the specified - /// color will be returned. - /// - /// \return - /// The axis grid color. - /// \sa vtkQtChartAxisOptions::setGridColorType(AxisGridColor) - QColor getGridColor() const; - - /// \brief - /// Sets the axis grid color. - /// - /// If the axis grid color type is \c Lighter, calling this method - /// will not change the color used for drawing the grid. It will - /// still set the specified grid color in case the type changes. - /// - /// \param color The new axis grid color. - void setGridColor(const QColor &color); - - /// \brief - /// Makes a copy of another axis options instance. - /// \param other The axis options to copy. - /// \return - /// A reference to the object being assigned. - vtkQtChartAxisOptions &operator=(const vtkQtChartAxisOptions &other); - - /// \brief - /// Formats the given value according to the axis options. - /// \param value The value to convert to a string. - /// \return - /// The value formatted as a string. - QString formatValue(const QVariant &value) const; - -signals: - /// Emitted when the axis or label visibility changes. - void visibilityChanged(); - - /// Emitted when the axis or label color changes. - void colorChanged(); - - /// Emitted when the label font changes. - void fontChanged(); - - /// Emitted when the axis scale changes. - void axisScaleChanged(); - - /// Emitted when the precision or notation changes. - void presentationChanged(); - - /// Emitted when the grid color or visibility changes. - void gridChanged(); - -private: - /// Stores the axis scale type (linear or logarithmic). - AxisScale Scale; - - /// Stores the axis label notation type. - NotationType Notation; - - /// Stores the grid color type (lighter or specified). - AxisGridColor GridType; - - QColor AxisColor; ///< Stores the axis color. - QColor GridColor; ///< Stores the specified grid color. - QColor LabelColor; ///< Stores the color for the axis labels. - QFont LabelFont; ///< Stores the font for the axis labels. - int Precision; ///< Stores axis label precision. - bool Visible; ///< True if the axis should be drawn. - bool ShowLabels; ///< True if the labels should be drawn. - bool ShowGrid; ///< True if the grid should be drawn. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBar.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBar.h deleted file mode 100644 index 52bcde5d2d..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBar.h +++ /dev/null @@ -1,80 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartBar.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartBar.h -/// \date November 13, 2008 - -#ifndef _vtkQtChartBar_h -#define _vtkQtChartBar_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartShape.h" - - -/// \class vtkQtChartBar -/// \brief -/// The vtkQtChartBar class defines a bar used by the chart bar -/// locator. -class VTKQTCHART_EXPORT vtkQtChartBar : public vtkQtChartShape -{ -public: - vtkQtChartBar(); - - /// \brief - /// Constructs a chart bar shape. - /// \param series The series index. - /// \param index The index in the given series. - vtkQtChartBar(int series, int index); - vtkQtChartBar(const vtkQtChartBar &other); - virtual ~vtkQtChartBar(); - - vtkQtChartBar &operator=(const vtkQtChartBar &other); - - virtual void getBounds(QRectF &bounds) const; - virtual bool contains(const QPointF &point) const; - virtual bool intersects(const QRectF &area) const; - - /// \brief - /// Sets the bar shape. - /// \param rectangle The new bar shape. - virtual void setRectangle(const QRectF &rectangle) {this->setBar(rectangle);} - - /// \brief - /// Gets the bar shape. - /// \return - /// The bar rectangle. - QRectF &getBar() {return *this->Bar;} - - /// \brief - /// Gets the bar shape. - /// \return - /// The bar rectangle. - const QRectF &getBar() const {return *this->Bar;} - - /// \brief - /// Sets the bar shape. - /// \param bar The new bar rectangle. - void setBar(const QRectF &bar); - -private: - QRectF *Bar; ///< Stores the rectangle. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBarLocator.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBarLocator.h deleted file mode 100644 index 2894ff1cfa..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartBarLocator.h +++ /dev/null @@ -1,220 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartBarLocator.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartBarLocator.h -/// \date October 1, 2008 - -#ifndef _vtkQtChartBarLocator_h -#define _vtkQtChartBarLocator_h - -#include "vtkQtChartExport.h" -#include // Needed for parameter. -#include // Needed for parameter. - -class vtkQtChartBar; -class QPointF; -class QRectF; - - -/// \class vtkQtChartBarLocatorNode -/// \brief -/// The vtkQtChartBarLocatorNode class is used to build a tree of -/// chart bar shapes. -class VTKQTCHART_EXPORT vtkQtChartBarLocatorNode -{ -public: - /// \brief - /// Constructs a chart bar locator node. - /// \param element The chart bar element to wrap. - vtkQtChartBarLocatorNode(vtkQtChartBar *element=0); - ~vtkQtChartBarLocatorNode(); - - /// \brief - /// Gets whether or not the bounding area contains the given point. - /// \param point The position to evaluate. - /// \return - /// True if the bounding area contains the given point. - bool contains(const QPointF &point) const; - - /// \brief - /// Gets whether or not the bounding area intersects the given area. - /// \param area The rectangle to evaluate. - /// \return - /// True if the bounding area intersects the given area. - bool intersects(const QRectF &area) const; - - /// \brief - /// Gets the bounding rectangle. - /// \return - /// The bounding rectangle. - const QRectF &getBounds() const {return *this->Bounds;} - - /// \brief - /// Sets the bounding rectangle. - /// \param bounds The new bounding rectangle. - void setBounds(const QRectF &bounds); - - /// \brief - /// Gets the chart shape element. - /// \return - /// A pointer to the chart shape element. - vtkQtChartBar *getElement() const {return this->Element;} - - /// \brief - /// Sets the chart shape element. - /// \param element The new chart shape element. - void setElement(vtkQtChartBar *element); - - /// \brief - /// Gets the parent node. - /// \return - /// A pointer to the parent node. - vtkQtChartBarLocatorNode *getParent() const {return this->Parent;} - - /// \brief - /// Sets the parent node. - /// \param parent The new parent node. - void setParent(vtkQtChartBarLocatorNode *parent) {this->Parent = parent;} - - /// \brief - /// Gets whether or not the node has children. - /// \return - /// True if the node has children. - bool hasChildren() const {return this->First || this->Second;} - - /// \brief - /// Gets the first child node. - /// \return - /// A pointer to the first child node. - vtkQtChartBarLocatorNode *getFirst() const {return this->First;} - - /// \brief - /// Sets the first child node. - /// \param first The first child node. - void setFirst(vtkQtChartBarLocatorNode *first) {this->First = first;} - - /// \brief - /// Gets the second child node. - /// \return - /// A pointer to the second child node. - vtkQtChartBarLocatorNode *getSecond() const {return this->Second;} - - /// \brief - /// Sets the second child node. - /// \param second The second child node. - void setSecond(vtkQtChartBarLocatorNode *second) {this->Second = second;} - - /// \brief - /// Updates the bounding rectangle. - /// - /// The bounding rectangle is the bounds of the element or the - /// bounds of the child nodes. - void updateBounds(); - -private: - QRectF *Bounds; ///< Stores the bounding rectangle. - vtkQtChartBar *Element; ///< Stores the shape element. - vtkQtChartBarLocatorNode *Parent; ///< Stores the parent node. - vtkQtChartBarLocatorNode *First; ///< Stores the first child node. - vtkQtChartBarLocatorNode *Second; ///< Stores the second child node. - -private: - vtkQtChartBarLocatorNode(const vtkQtChartBarLocatorNode &); - vtkQtChartBarLocatorNode &operator=(const vtkQtChartBarLocatorNode &); -}; - - -/// \class vtkQtChartBarLocator -/// \brief -/// The vtkQtChartBarLocator class is used to locate bars in a tree -/// structure. -/// -/// The tree is built from a list of bars. The leaf nodes store the -/// bars. The bounding rectangles can be updated if the layout -/// remains unchanged. -class VTKQTCHART_EXPORT vtkQtChartBarLocator -{ -public: - vtkQtChartBarLocator(); - ~vtkQtChartBarLocator(); - - /// Removes all the tree items. - void clear(); - - /// \brief - /// Builds a bar tree from the ordered list of rectangles. - /// - /// The bar pointers are stored by the tree and should not be - /// deleted until the tree has been cleared. - /// - /// \param list The ordered list of rectangles. - void build(const QList &list); - - /// \brief - /// Updates the bounding rectangles in the bar tree. - /// - /// The nodes are traversed from last to first. The bounding - /// rectangle of each node is updated using the bar if it is a leaf - /// or the bounds of the children otherwise. - void update(); - - /// \brief - /// Gets the bar at the specified point. - /// \param point The point to search. - /// \return - /// A pointer to the bar at the given point. - vtkQtChartBar *getItemAt(const QPointF &point) const; - - /// \brief - /// Gets the bars in the specified rectangle. - /// \param area The rectangle to search. - /// \return - /// The list of bars in the given rectangle. - QList getItemsIn(const QRectF &area) const; - - /// \brief - /// Gets the last node in the tree. - /// \return - /// A pointer to the last node in the tree. - vtkQtChartBarLocatorNode *getLast(); - - /// \brief - /// Gets the previous node in the tree. - /// \param node The node to search from. - /// \return - /// A pointer to the previous node in the tree. - vtkQtChartBarLocatorNode *getPrevious(vtkQtChartBarLocatorNode *node); - -private: - /// \brief - /// Builds a bar tree from the ordered list of items. - /// \param list The ordered list of items. - void buildTree(QLinkedList &list) const; - -private: - vtkQtChartBarLocatorNode *Root; ///< Stores the tree root. - QList Items; ///< Stores the item list. - -private: - vtkQtChartBarLocator(const vtkQtChartBarLocator &); - vtkQtChartBarLocator &operator=(const vtkQtChartBarLocator &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColorStyleGenerator.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColorStyleGenerator.h deleted file mode 100644 index d0cea59303..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColorStyleGenerator.h +++ /dev/null @@ -1,148 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartColorStyleGenerator.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartColorStyleGenerator.h -/// \date September 22, 2008 - -#ifndef _vtkQtChartColorStyleGenerator_h -#define _vtkQtChartColorStyleGenerator_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartStyleGenerator.h" -#include "vtkQtChartColors.h" // Needed for enum. - -class vtkQtChartColorStyleGeneratorInternal; - - -/// \class vtkQtChartColorStyleGenerator -/// \brief -/// The vtkQtChartColorStyleGenerator class generates series drawing -/// options using color and pen style. -class VTKQTCHART_EXPORT vtkQtChartColorStyleGenerator : - public vtkQtChartStyleGenerator -{ - Q_OBJECT - -public: - /// \brief - /// Creates a color/style generator. - /// \param parent The parent object. - /// \param scheme The initial color scheme. - vtkQtChartColorStyleGenerator(QObject *parent=0, - vtkQtChartColors::ColorScheme scheme=vtkQtChartColors::Spectrum); - virtual ~vtkQtChartColorStyleGenerator(); - - /// \name vtkQtChartStyleGenerator Methods - //@{ - /// \brief - /// Gets the brush for the specified series index. - /// - /// If the index is greater than the internal color list, the index - /// will be wrapped around repeating the colors. - /// - /// \param index The series index. - /// \return - /// The brush for the specified series index. - virtual QBrush getSeriesBrush(int index) const; - - /// \brief - /// Gets the pen for the specified series index. - /// - /// If the index is greater than the internal color list, the index - /// will be wrapped around repeating the colors. The repeated - /// colors will have the next pen style in the list. - /// - /// \param index The series index. - /// \return - /// The pen for the specified series index. - virtual QPen getSeriesPen(int index) const; - //@} - - /// \name Color Methods - //@{ - /// \brief - /// Gets the list of colors. - /// \return - /// A pointer to the list of colors. - vtkQtChartColors *getColors() {return this->Colors;} - - /// \brief - /// Gets the list of colors. - /// \return - /// A pointer to the list of colors. - const vtkQtChartColors *getColors() const {return this->Colors;} - //@} - - /// \name Pen Style Methods - //@{ - /// \brief - /// Gets the number of pen styles in the style list. - /// \return - /// The number of pen styles in the style list. - int getNumberOfStyles() const; - - /// \brief - /// Gets a pen style from the pen styles list. - /// - /// This method provides access to the list of styles. If the index - /// is out of range, a default style will be returned. - /// - /// \param index The list index for the style. - /// \return - /// The pen style for the given index. - /// \sa vtkQtChartStyleGenerator::getSeriesPen(int) - Qt::PenStyle getPenStyle(int index) const; - - /// \brief - /// Sets the pen style for the given index. - /// - /// This method does nothing if the index is out of range. - /// - /// \param index Which pen style to modify. - /// \param style The new pen style. - void setPenStyle(int index, Qt::PenStyle style); - - /// Clears the list of pen styles. - void clearPenStyles(); - - /// \brief - /// Adds a pen style to the list of pen styles. - /// \param style The new pen style to add. - void addPenStyle(Qt::PenStyle style); - - /// \brief - /// Inserts a new pen style into the list of pen styles. - /// \param index Where to insert the new pen style. - /// \param style The new pen style to insert. - void insertPenStyle(int index, Qt::PenStyle style); - - /// \brief - /// Removes the pen style for the given index. - /// \param index Which pen style to remove from the list. - void removePenStyle(int index); - //@} - -private: - /// Stores the list of pen styles. - vtkQtChartColorStyleGeneratorInternal *Internal; - vtkQtChartColors *Colors; ///< Stores the color list. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColors.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColors.h deleted file mode 100644 index eecc6a3b93..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartColors.h +++ /dev/null @@ -1,147 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartColors.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartColors.h -/// \date September 22, 2008 - -#ifndef _vtkQtChartColors_h -#define _vtkQtChartColors_h - -#include "vtkQtChartExport.h" -#include // Needed for return type. - -class vtkQtChartColorsInternal; - - -/// \class vtkQtChartColors -/// \brief -/// The vtkQtChartColors class stores a list of colors. -class VTKQTCHART_EXPORT vtkQtChartColors -{ -public: - enum ColorScheme - { - Spectrum = 0, ///< 7 different hues. - Warm, ///< 6 warm colors (red to yellow). - Cool, ///< 7 cool colors (green to purple). - Blues, ///< 7 different blues. - WildFlower, ///< 7 colors from blue to magenta. - Citrus, ///< 6 colors from green to orange. - Custom ///< User specified color scheme. - }; - -public: - /// \brief - /// Creates a chart colors instance. - /// \param scheme The initial color scheme. - vtkQtChartColors(ColorScheme scheme=Spectrum); - - /// \brief - /// Makes a copy of another chart colors instance. - /// \param other The chart colors to copy. - vtkQtChartColors(const vtkQtChartColors &other); - ~vtkQtChartColors(); - - /// \brief - /// Makes a copy of another chart colors instance. - /// \param other The chart colors to copy. - /// \return - /// A reference to the object being assigned. - vtkQtChartColors &operator=(const vtkQtChartColors &other); - - /// \brief - /// Gets the current color scheme. - /// \return - /// The current color scheme. - ColorScheme getColorScheme() const {return this->Scheme;} - - /// \brief - /// Sets the color scheme. - /// - /// The color scheme will automatically be changed to \c Custom if - /// the color list is modified. - /// - /// \param scheme The new color scheme. - void setColorScheme(ColorScheme scheme); - - /// \brief - /// Gets the number of colors in the color list. - /// \return - /// The number of colors in the color list. - int getNumberOfColors() const; - - /// \brief - /// Gets the color for the given index. - /// \return - /// The color for the given index. - QColor getColor(int index) const; - - /// \brief - /// Sets the color for the given index. - /// - /// This method does nothing if the index is out of range. - /// - /// \param index Which color to modify. - /// \param color The new color. - void setColor(int index, const QColor &color); - - /// Clears the list of colors. - void clearColors(); - - /// \brief - /// Adds a color to the list of colors. - /// \param color The new color to add. - void addColor(const QColor &color); - - /// \brief - /// Inserts a new color into the list of colors. - /// \param index Where to insert the new color. - /// \param color The new color to insert. - void insertColor(int index, const QColor &color); - - /// \brief - /// Removes the color for the given index. - /// \param index Which color to remove from the list. - void removeColor(int index); - -public: - /// \brief - /// Creates a lighter color from the given color. - /// - /// The \c QColor::light method does not work for black. This - /// function uses a 3D equation in rgb space to compute the - /// lighter color, which works for all colors including black. - /// the factor determines how light the new color will be. The - /// factor is used to find the point between the current color - /// and white. - /// - /// \param color The starting color. - /// \param factor A percentage (0.0 to 1.0) of the distance from - /// the given color to white. - /// \return - /// The new lighter color. - static QColor lighter(const QColor color, float factor=0.7); - -private: - vtkQtChartColorsInternal *Internal; ///< Stores the color list. - ColorScheme Scheme; ///< Stores the color scheme. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsArea.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsArea.h deleted file mode 100644 index 202f255544..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsArea.h +++ /dev/null @@ -1,65 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartContentsArea.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartContentsArea.h -/// \date 2/8/2008 - -#ifndef _vtkQtChartContentsArea_h -#define _vtkQtChartContentsArea_h - -#include "vtkQtChartExport.h" -#include - -#include "vtkQtChartGraphicsItemTypes.h" // needed for enum - - -class VTKQTCHART_EXPORT vtkQtChartContentsArea : public QGraphicsItem -{ -public: - enum {Type = vtkQtChart_ContentsAreaType}; - -public: - vtkQtChartContentsArea(QGraphicsItem *parent=0, QGraphicsScene *scene=0); - virtual ~vtkQtChartContentsArea() {} - - /// \brief - /// Sets the x offset. - /// \param offset The new x offset. - void setXOffset(float offset); - - /// \brief - /// Sets the y offset. - /// \param offset The new y offset. - void setYOffset(float offset); - - virtual int type() const {return vtkQtChartContentsArea::Type;} - virtual QRectF boundingRect() const; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - -private: - void updateMatrix(); - -private: - float XOffset; - float YOffset; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsSpace.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsSpace.h deleted file mode 100644 index 0ecc201372..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartContentsSpace.h +++ /dev/null @@ -1,378 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartContentsSpace.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartContentsSpace.h -/// \date 2/7/2008 - -#ifndef _vtkQtChartContentsSpace_h -#define _vtkQtChartContentsSpace_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartContentsSpaceInternal; -class QPoint; -class QPointF; -class QRectF; - - -/// \class vtkQtChartContentsSpace -/// \brief -/// The vtkQtChartContentsSpace class defines the contents space -/// for a chart. -class VTKQTCHART_EXPORT vtkQtChartContentsSpace : public QObject -{ - Q_OBJECT - -public: - enum ZoomFlags - { - ZoomBoth, ///< Zoom in both directions. - ZoomXOnly, ///< Zoom only in the x-direction. - ZoomYOnly ///< Zoom only in the y-direction. - }; - -public: - /// \brief - /// Creates a chart contents space instance. - /// \param parent The parent object. - vtkQtChartContentsSpace(QObject *parent=0); - virtual ~vtkQtChartContentsSpace(); - - /// \name Contents Methods - //@{ - /// \brief - /// Gets the x offset. - /// \return - /// The x offset. - float getXOffset() const {return this->OffsetX;} - - /// \brief - /// Gets the y offset. - /// \return - /// The y offset. - float getYOffset() const {return this->OffsetY;} - - /// \brief - /// Gets the maximum x offset. - /// \return - /// The maximum x offset. - float getMaximumXOffset() const {return this->MaximumX;} - - /// \brief - /// Gets the maximum y offset. - /// \return - /// The maximum y offset. - float getMaximumYOffset() const {return this->MaximumY;} - - /// \brief - /// Gets the contents width. - /// \return - /// The contents width. - float getContentsWidth() const; - - /// \brief - /// Gets the contents height. - /// \return - /// The contents height. - float getContentsHeight() const; - - /// \brief - /// Translates a point to layer contents coordinates. - /// - /// The point is adjusted from widget origin to layer bounds origin. - /// The point is also translated to account for panning offset. - /// - /// \param point The point to translate. - void translateToLayerContents(QPointF &point) const; - - /// \brief - /// Translates a point to layer contents coordinates. - /// - /// The rectangle is adjusted from widget origin to layer bounds - /// origin. The rectangle is also translated to account for panning - /// offset. - /// - /// \param area The rectangle to translate. - void translateToLayerContents(QRectF &area) const; - //@} - - /// \name Size Methods - //@{ - /// \brief - /// Gets the width of the chart. - /// \return - /// The width of the chart. - float getChartWidth() const {return this->Width;} - - /// \brief - /// Gets the height of the chart. - /// \return - /// The height of the chart. - float getChartHeight() const {return this->Height;} - - /// \brief - /// Sets the size of the chart. - /// - /// The chart size must be set in order to zoom in or out. The - /// contents size methods are only valid when the chart size is set. - /// - /// \param width The chart width. - /// \param height The chart height. - void setChartSize(float width, float height); - - /// \brief - /// Gets the chart layer bounds. - /// \param bounds Used to return the chart layer bounds. - void getChartLayerBounds(QRectF &bounds) const; - - /// \brief - /// Sets the chart layer bounds. - /// \param bounds The chart layer bounds. - void setChartLayerBounds(const QRectF &bounds); - //@} - - /// \name Zoom Methods - //@{ - /// \brief - /// Gets the x-axis zoom factor. - /// \return - /// The x-axis zoom factor. - float getXZoomFactor() const {return this->ZoomFactorX;} - - /// \brief - /// Gets the y-axis zoom factor. - /// \return - /// The y-axis zoom factor. - float getYZoomFactor() const {return this->ZoomFactorY;} - - /// \brief - /// Zooms the chart to the given factor. - /// \param factor The new zoom factor for both axes. - /// \sa vtkQtChartContentsSpace::zoomToFactor(float, float) - void zoomToFactor(float factor); - - /// \brief - /// Zooms the chart to the given factors. - /// - /// The zoom factors of the chart are independent of each other. In - /// other words, the x-axis can be zoomed to a different factor - /// than the y-axis. - /// - /// When the zoom factors are changed, the new zoom viewport will - /// be added to the zoom history. The zoom history can be navigated - /// using the \c historyNext and \c historyPrevious methods. The - /// user can also navigate through the history using the keyboard - /// shortcuts. - /// - /// \param xFactor The x-axis zoom factor. - /// \param yFactor The y-axis zoom factor. - void zoomToFactor(float xFactor, float yFactor); - - /// \brief - /// Zooms only the x-axis to a given factor. - /// \param factor The x-axis zoom factor. - /// \sa vtkQtChartContentsSpace::zoomToFactor(float, float) - void zoomToFactorX(float factor); - - /// \brief - /// Zooms only the y-axis to a given factor. - /// \param factor The y-axis zoom factor. - /// \sa vtkQtChartContentsSpace::zoomToFactor(float, float) - void zoomToFactorY(float factor); - - /// \brief - /// Zooms in by a predetermined factor. - /// \param flags Used to change the interaction slightly. - void zoomIn(ZoomFlags flags); - - /// \brief - /// Zooms out by a predetermined factor. - /// \param flags Used to change the interaction slightly. - void zoomOut(ZoomFlags flags); - //@} - - /// \name Mouse Interactions - //@{ - /// \brief - /// Signals the start of a mouse move interaction. - /// - /// While an interaction is in progress, the zoom history will not - /// be updated. When \c finishInteraction is called, the history is - /// updated if the zoom factors have changed. - /// - /// \sa vtkQtChartContentsSpace::finishInteraction() - void startInteraction(); - - /// \brief - /// Gets whether or not an interaction is currently in progress. - /// \return - /// True if an interaction is currently in progress. - /// \sa vtkQtChartContentsSpace::startInteraction(), - /// vtkQtChartContentsSpace::finishInteraction() - bool isInInteraction() const; - - /// \brief - /// Signals the end of a mouse move interaction. - /// \sa vtkQtChartContentsSpace::startInteraction() - void finishInteraction(); - //@} - - /// \name History Methods - //@{ - /// \brief - /// Gets whether or not a previous zoom viewport is available. - /// \return - /// True if a previous zoom viewport is available. - bool isHistoryPreviousAvailable() const; - - /// \brief - /// Gets whether or not a forward zoom viewport is available. - /// \return - /// True if a forward zoom viewport is available. - bool isHistoryNextAvailable() const; - //@} - -public slots: - /// \brief - /// Sets the x offset. - /// \param offset The new x offset. - void setXOffset(float offset); - - /// \brief - /// Sets the y offset. - /// \param offset The new y offset. - void setYOffset(float offset); - - /// \brief - /// Sets the maximum x offset. - /// \param maximum The maximum x offset. - void setMaximumXOffset(float maximum); - - /// \brief - /// Sets the maximum y offset. - /// \param maximum The maximum y offset. - void setMaximumYOffset(float maximum); - - /// Pans up by a predetermined amount. - void panUp(); - - /// Pans down by a predetermined amount. - void panDown(); - - /// Pans left by a predetermined amount. - void panLeft(); - - /// Pans right by a predetermined amount. - void panRight(); - - /// Resets the zoom factors to 1. - void resetZoom(); - - /// Changes the view to the next one in the history. - void historyNext(); - - /// Changes the view to the previous one in the history. - void historyPrevious(); - -public: - /// \brief - /// Gets the zoom factor step. - /// \return - /// The zoom factor step. - /// \sa vtkQtChartContentsSpace::zoomIn(ZoomFlags), - /// vtkQtChartContentsSpace::zoomOut(ZoomFlags) - static float getZoomFactorStep(); - - /// \brief - /// Sets the zoom factor step. - /// \param step The new zoom factor step. - static void setZoomFactorStep(float step); - - /// \brief - /// Gets the pan step. - /// \return - /// The pan step. - /// \sa vtkQtChartContentsSpace::panUp(), - /// vtkQtChartContentsSpace::panDown(), - /// vtkQtChartContentsSpace::panLeft(), - /// vtkQtChartContentsSpace::panRight(), - static float getPanStep(); - - /// \brief - /// Sets the pan step. - /// \param step The new pan step. - static void setPanStep(float step); - -signals: - /// \brief - /// Emitted when the x offset has changed. - /// \param offset The new x offset. - void xOffsetChanged(float offset); - - /// \brief - /// Emitted when the y offset has changed. - /// \param offset The new y offset. - void yOffsetChanged(float offset); - - /// \brief - /// Emitted when the maximum offsets have changed. - /// - /// This signal is sent when either or both of the offsets have - /// changed. Sending the changes as one improves the chart layout. - /// - /// \param xMaximum The maximum x offset. - /// \param yMaximum The maximum y offset. - void maximumChanged(float xMaximum, float yMaximum); - - /// \brief - /// Emitted when the view history availability changes. - /// \param available True if there is a history item available - /// before the current one. - void historyPreviousAvailabilityChanged(bool available); - - /// \brief - /// Emitted when the view history availability changes. - /// \param available True if there is a history item available - /// after the current one. - void historyNextAvailabilityChanged(bool available); - -private: - /// Adds the current zoom viewport to the history. - void addHistory(); - -private: - /// Keeps track of mouse position and history. - vtkQtChartContentsSpaceInternal *Internal; - float OffsetX; ///< Stores the x offset. - float OffsetY; ///< Stores the y offset. - float MaximumX; ///< Stores the maximum x offset. - float MaximumY; ///< Stores the maximum y offset. - float Width; ///< Stores the chart width. - float Height; ///< Stores the chart height. - float ZoomFactorX; ///< Stores the x-axis zoom factor. - float ZoomFactorY; ///< Stores the y-axis zoom factor. - - static float ZoomFactorStep; ///< Stores the zoom factor step. - static float PanStep; ///< Stores the pan step. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartExport.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartExport.h deleted file mode 100644 index b3cb6d06cc..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartExport.h +++ /dev/null @@ -1,42 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartExport.h.in,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartExport.h -/// \brief -/// Used to switch between dll import and export on windows. -/// \date February 1, 2008 - -#ifndef __vtkQtChartExport_h -#define __vtkQtChartExport_h - -#define VTKQTCHART_BUILD_SHARED_LIBS - -#if defined(WIN32) && defined(VTKQTCHART_BUILD_SHARED_LIBS) -# if defined(vtkQtChart_EXPORTS) -# define VTKQTCHART_EXPORT __declspec(dllexport) -# else -# define VTKQTCHART_EXPORT __declspec(dllimport) -# endif -#else -# define VTKQTCHART_EXPORT -#endif - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGraphicsItemTypes.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGraphicsItemTypes.h deleted file mode 100644 index 9f030a4bc1..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGraphicsItemTypes.h +++ /dev/null @@ -1,50 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartGraphicsItemTypes.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartGraphicsItemTypes.h -/// \date June 18, 2008 - -#ifndef _vtkQtChartGraphicsItemTypes_h -#define _vtkQtChartGraphicsItemTypes_h - -#include // needed for variable - -enum vtkQtChartGraphicsItemTypes -{ - vtkQtChart_AxisType = QGraphicsItem::UserType + 1, - vtkQtChart_AxisItemType, - vtkQtChart_AxisLayerType, - vtkQtChart_BarChartType, - vtkQtChart_BarChartItemType, - vtkQtChart_ContentsAreaType, - vtkQtChart_GridLayerType, - vtkQtChart_GridLayerItemType, - vtkQtChart_LayerType, - vtkQtChart_LineChartType, - vtkQtChart_LineChartItemType, - vtkQtChart_PointMarkerType, - vtkQtChart_PolylineItemType, - vtkQtChart_SeriesLayerType, - vtkQtChart_StackedChartType, - vtkQtChart_StatisticalBoxChartType, - vtkQtChart_StatisticalBoxChartItemType -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGridLayer.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGridLayer.h deleted file mode 100644 index 200946c734..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartGridLayer.h +++ /dev/null @@ -1,87 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartGridLayer.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartGridLayer.h -/// \date February 1, 2008 - -#ifndef _vtkQtChartGridLayer_h -#define _vtkQtChartGridLayer_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartLayer.h" - -class vtkQtChartAxis; - - -/// \class vtkQtChartGridLayer -/// \brief -/// The vtkQtChartGridLayer class is used to dislpay the chart -/// background grid. -class VTKQTCHART_EXPORT vtkQtChartGridLayer : public vtkQtChartLayer -{ - Q_OBJECT - -public: - enum {Type = vtkQtChart_GridLayerType}; - -public: - vtkQtChartGridLayer(); - virtual ~vtkQtChartGridLayer(); - - virtual void setChartArea(vtkQtChartArea *area); - - virtual void layoutChart(const QRectF &area); - - virtual QRectF boundingRect() const; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - -public slots: - /// \brief - /// Sets the x-axis pan offset. - /// \param xOffset The new x-axis pan offset. - void setXOffset(float xOffset); - - /// \brief - /// Sets the y-axis pan offset. - /// \param yOffset The new y-axis pan offset. - void setYOffset(float yOffset); - -private slots: - /// Updates the grid when the options change. - void handleGridChange(); - -private: - /// \brief - /// Draws the grid for the given axis. - /// \param painter The painter to use. - /// \param axis The axis to draw. - void drawAxisGrid(QPainter *painter, vtkQtChartAxis *axis); - -private: - vtkQtChartAxis *Axis[4]; ///< Stores the axis objects. - QSizeF *Bounds; ///< Stores the bounds. - -private: - vtkQtChartGridLayer(const vtkQtChartGridLayer &); - vtkQtChartGridLayer &operator=(const vtkQtChartGridLayer &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartHelpFormatter.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartHelpFormatter.h deleted file mode 100644 index 50f694ac49..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartHelpFormatter.h +++ /dev/null @@ -1,76 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartHelpFormatter.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartHelpFormatter.h -/// \date June 5, 2008 - -#ifndef _vtkQtChartHelpFormatter_h -#define _vtkQtChartHelpFormatter_h - -#include "vtkQtChartExport.h" -#include // needed for return type - -class QStringList; - - -/// \class vtkQtChartHelpFormatter -/// \brief -/// The vtkQtChartHelpFormatter class is used to generate help text -/// from a format string. -class VTKQTCHART_EXPORT vtkQtChartHelpFormatter -{ -public: - vtkQtChartHelpFormatter(); - - /// \brief - /// Creates a help formatter instance. - /// \param format The help string format. - vtkQtChartHelpFormatter(const QString &format); - ~vtkQtChartHelpFormatter() {} - - /// \brief - /// Gets the help string format. - /// \return - /// A reference to the help string format. - const QString &getFormat() const {return this->Format;} - - /// \brief - /// Sets the help string format. - /// \param format The help string format. - void setFormat(const QString &format) {this->Format = format;} - - /// \brief - /// Creates a help string for the given parameters. - /// - /// The series name replaces all instances of %s in the format - /// string. The data list replaces %1, %2, ... %n in the format - /// string. the list will only replace numbers up to its length. - /// - /// \param series The series name. - /// \param data The list of data arguments. - /// \return - /// The formatted help string. - QString getHelpText(const QString &series, const QStringList &data) const; - -private: - QString Format; ///< Stores the help format. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractor.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractor.h deleted file mode 100644 index 1d0f132c06..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractor.h +++ /dev/null @@ -1,280 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartInteractor.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartInteractor.h -/// \date 5/2/2007 - -#ifndef _vtkQtChartInteractor_h -#define _vtkQtChartInteractor_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartArea; -class vtkQtChartContentsSpace; -class vtkQtChartInteractorInternal; -class vtkQtChartInteractorModeList; -class vtkQtChartMouseBox; -class vtkQtChartMouseFunction; -class QCursor; -class QKeyEvent; -class QMouseEvent; -class QRect; -class QWheelEvent; - - -/*! - * \class vtkQtChartInteractor - * \brief - * The vtkQtChartInteractor class is used to interact with a chart. - * - * The contents space and mouse box object used by the chart are - * shared among the mouse functions. The contents space object is - * used to convert widget coordinates to contents coordinates. It is - * also used to pan and zoom the contents. The chart uses the mouse - * box to draw a dashed rectangle on top of the chart. Mouse - * functions can use this rectangle for selection or zooming. - * - * The keyboard shortcuts are as follows: - * \code - * Plus...................Zoom in. - * Minus..................Zoom out. - * Ctrl+Plus..............Horizontally zoom in. - * Ctrl+minus.............Horizontally zoom out. - * Alt+Plus...............Vertically zoom in. - * Alt+minus..............Vertically zoom out. - * Up.....................Pan up. - * Down...................Pan down. - * Left...................Pan left. - * Right..................Pan right. - * Alt+Left...............Go to previous view in the history. - * Alt+Right..............Go to next view in the history. - * \endcode - */ -class VTKQTCHART_EXPORT vtkQtChartInteractor : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart interactor instance. - /// \param parent The parent object. - vtkQtChartInteractor(QObject *parent=0); - virtual ~vtkQtChartInteractor(); - - /// \name Setup Methods - //@{ - /// \brief - /// Gets the chart area. - /// \return - /// A pointer to the chart area. - vtkQtChartArea *getChartArea() const {return this->ChartArea;} - - /// \brief - /// Sets the chart area. - /// \param area The new chart area. - void setChartArea(vtkQtChartArea *area) {this->ChartArea = area;} - //@} - - /// \name Configuration Methods - //@{ - /// \brief - /// Sets the given function on the indicated mouse button. - /// - /// This method clears any functions currently assigned to the - /// given button before adding the new function. - /// - /// \param button The mouse button to assign the function to. - /// \param function The mouse function to add. - /// \param modifiers The keyboard modifiers used to activate the - /// function. - void setFunction(Qt::MouseButton button, vtkQtChartMouseFunction *function, - Qt::KeyboardModifiers modifiers=Qt::NoModifier); - - /// \brief - /// Sets the given function on the mouse wheel. - /// \param function The mouse function to add. - /// \param modifiers The keyboard modifiers used to activate the - /// function. - void setWheelFunction(vtkQtChartMouseFunction *function, - Qt::KeyboardModifiers modifiers=Qt::NoModifier); - - /// \brief - /// Adds the given function to the indicated mouse button. - /// - /// If the new function is not combinable, it will be added to its - /// own interaction mode. If the function is combinable, it is - /// added to the first mode that does not have the given modifiers. - /// - /// \param button The mouse button to assign the function to. - /// \param function The mouse function to add. - /// \param modifiers The keyboard modifiers used to activate the - /// function. - void addFunction(Qt::MouseButton button, vtkQtChartMouseFunction *function, - Qt::KeyboardModifiers modifiers=Qt::NoModifier); - - /// \brief - /// Adds the given function to the mouse wheel. - /// \param function The mouse function to add. - /// \param modifiers The keyboard modifiers used to activate the - /// function. - void addWheelFunction(vtkQtChartMouseFunction *function, - Qt::KeyboardModifiers modifiers=Qt::NoModifier); - - /// \brief - /// Removes the given function from its assigned button. - /// \param function The mouse function to remove. - void removeFunction(vtkQtChartMouseFunction *function); - - /// \brief - /// Removes all the functions assigned to the given button. - /// \param button The mouse button to clear. - void removeFunctions(Qt::MouseButton button); - - /// Removes all the functions assigned to the mouse wheel. - void removeWheelFunctions(); - - /// Removes all the functions from all the buttons. - void removeAllFunctions(); - - /// \brief - /// Gets the number of modes on a mouse button. - /// \param button The mouse button. - /// \return - /// The number of modes on a mouse button. - int getNumberOfModes(Qt::MouseButton button) const; - - /// \brief - /// Gets the current mode for the given button. - /// \param button The mouse button. - /// \return - /// The current mode for the given button. - int getMode(Qt::MouseButton button) const; - - /// \brief - /// Sets the current mode for the given button. - /// \param button The mouse button. - /// \param index The new interaction mode. - void setMode(Qt::MouseButton button, int index); - - /// \brief - /// Gets the number of modes on the mouse wheel. - /// \return - /// The number of modes on the mouse wheel. - int getNumberOfWheelModes() const; - - /// \brief - /// Gets the current mode for the mouse wheel. - /// \return - /// The current mode for the mouse wheel. - int getWheelMode() const; - - /// \brief - /// Sets the current mode for the mouse wheel. - /// \param index The new interaction mode. - void setWheelMode(int index); - //@} - - /// \name Interaction Methods - //@{ - /// \brief - /// Handles the key press events for the chart. - /// \param e Event specific information. - virtual bool keyPressEvent(QKeyEvent *e); - - /// \brief - /// Calls the appropriate function to handle the mouse press. - /// - /// The mouse button and that button's current mode are used to - /// determine the function to call. If a function on another button - /// owns the mouse, the event will be ignored. - /// - /// \param e Event specific information. - virtual void mousePressEvent(QMouseEvent *e); - - /// \brief - /// Calls the appropriate function to handle the mouse move. - /// \param e Event specific information. - virtual void mouseMoveEvent(QMouseEvent *e); - - /// \brief - /// Calls the appropriate function to handle the mouse release. - /// \param e Event specific information. - virtual void mouseReleaseEvent(QMouseEvent *e); - - /// \brief - /// Calls the appropriate function to handle the double click. - /// \param e Event specific information. - virtual void mouseDoubleClickEvent(QMouseEvent *e); - - /// \brief - /// Handles the mouse wheel events for the chart. - /// \param e Event specific information. - virtual void wheelEvent(QWheelEvent *e); - //@} - -signals: - /// \brief - /// Emitted when the mouse cursor needs to be changed. - /// \param cursor The new cursor to use. - void cursorChangeRequested(const QCursor &cursor); - -private slots: - /// \brief - /// Called to begin a new mouse state. - /// - /// Only one mouse function can own the mouse at one time. - /// - /// \param owner The mouse function requesting the mouse state. - void beginState(vtkQtChartMouseFunction *owner); - - /// \brief - /// Called to end the current mouse state. - /// - /// Only the current owner should end the current state. - /// - /// \param owner The mouse function releasing the mouse state. - void endState(vtkQtChartMouseFunction *owner); - -private: - /// \brief - /// Adds the given function to the given list. - /// \param list The list to add the function to. - /// \param function The mouse function to add. - /// \param modifiers The keyboard modifiers used to activate the - /// function. - void addFunction(vtkQtChartInteractorModeList *list, - vtkQtChartMouseFunction *function, Qt::KeyboardModifiers modifiers); - - /// \brief - /// Removes all the functions assigned to the given list. - /// \param list The list of functions to clear. - void removeFunctions(vtkQtChartInteractorModeList *list); - -private: - /// Stores the mouse function configuration. - vtkQtChartInteractorInternal *Internal; - vtkQtChartArea *ChartArea; ///< Stores the chart area. - Qt::KeyboardModifier XModifier; ///< Stores the zoom x-only modifier. - Qt::KeyboardModifier YModifier; ///< Stores the zoom y-only modifier. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractorSetup.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractorSetup.h deleted file mode 100644 index d4df2a0c0c..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartInteractorSetup.h +++ /dev/null @@ -1,85 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartInteractorSetup.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartInteractorSetup.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartInteractorSetup_h -#define _vtkQtChartInteractorSetup_h - - -#include "vtkQtChartExport.h" - -class vtkQtChartArea; -class vtkQtChartMouseSelection; - - -/// \class vtkQtChartInteractorSetup -/// \brief -/// The vtkQtChartInteractorSetup class is used to set up the chart -/// interactor. -class VTKQTCHART_EXPORT vtkQtChartInteractorSetup -{ -public: - vtkQtChartInteractorSetup() {} - ~vtkQtChartInteractorSetup() {} - - /// \brief - /// Creates the default interactor setup for the given chart. - /// - /// Selection is set on the left mouse button. All the zoom - /// functionality is added to the middle button. The panning - /// capability is added to the right button. The separate zooming - /// functions are accessed using keyboard modifiers. - /// \li No modifiers: regular drag zoom. - /// \li Control: x-only drag zoom. - /// \li Alt: y-only drag zoom. - /// \li Shift: zoom box. - /// - /// The interactor is created as a child of the chart area. The - /// mouse functions are created as children of the interactor. - /// - /// \param area The chart to add the interactor to. - /// \return - /// A pointer to the mouse selection handler. - static vtkQtChartMouseSelection *createDefault(vtkQtChartArea *area); - - /// \brief - /// Creates an interactor with the zoom functionality on separate - /// buttons. - /// - /// The panning capability is added to the left button along with - /// selection. The left button interaction mode must be set to - /// access the different functionality. The zoom box function is - /// set on the right button. The rest of the zoom capability is - /// added to the middle button. X-only and y-only zooms are - /// accessed using the control and alt modifiers respectively. If - /// no modifiers are pressed, regular drag zoom is activated. - /// - /// The interactor is created as a child of the chart area. The - /// mouse functions are created as children of the interactor. - /// - /// \param area The chart to add the interactor to. - /// \return - /// A pointer to the mouse selection handler. - static vtkQtChartMouseSelection *createSplitZoom(vtkQtChartArea *area); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayer.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayer.h deleted file mode 100644 index 803d82abd6..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayer.h +++ /dev/null @@ -1,152 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartLayer.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartLayer.h -/// \date February 1, 2008 - -#ifndef _vtkQtChartLayer_h -#define _vtkQtChartLayer_h - -#include "vtkQtChartExport.h" -#include -#include - -#include "vtkQtChartGraphicsItemTypes.h" // needed for enum - -class vtkQtChartAxis; -class vtkQtChartLayerDomain; -class vtkQtChartArea; -class QPainter; - - -/// \class vtkQtChartLayer -/// \brief -/// The vtkQtChartLayer class is the base class for all chart -/// drawing layers. -class VTKQTCHART_EXPORT vtkQtChartLayer : public QObject, public QGraphicsItem -{ - Q_OBJECT - -public: - enum AxesCorner - { - BottomLeft = 0, ///< Uses the bottom and left axes. - BottomRight, ///< Uses the bottom and right axes. - TopLeft, ///< Uses the top and left axes. - TopRight ///< Uses the top and right axes. - }; - - enum {Type = vtkQtChart_LayerType}; - -public: - vtkQtChartLayer(); - virtual ~vtkQtChartLayer() {} - - virtual int type() const {return vtkQtChartLayer::Type;} - - /// \brief - /// Gets the chart area containing this layer. - /// \return - /// A pointer to the chart area. - vtkQtChartArea *getChartArea() const {return this->ChartArea;} - - /// \brief - /// Sets the chart area that contains this layer. - /// - /// The chart area will call this method when the layer is added to - /// it. The layer can overload this method to perform any setup it - /// needs to. - /// - /// \param area The new chart area. - virtual void setChartArea(vtkQtChartArea *area) {this->ChartArea = area;} - - /// \brief - /// Gets the chart layer's domain. - /// - /// The layer should use the \c mergeDomain method of the \c domain - /// parameter to add its domains. The domains from all of the chart - /// layers will be combined using the \c domain object. - /// - /// \param domain Used to return the chart layer's domain. - virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; - - /// \brief - /// Used to layout the chart layer. - /// - /// Use the \c AxisDomain from the relevant axes to determine if - /// the chart data can be displayed. The domain priority for the - /// axes can override a layer's desired domain. - /// - /// \param area The area the chart should occupy. - virtual void layoutChart(const QRectF &area)=0; - - /// \brief - /// Used to filter items while drawing. - /// - /// Items can be filtered in two ways. First, this method can - /// return true to skip drawing the item. Second, the painter can - /// be modified to clip the item. The default implementation simply - /// returns false. - /// - /// \note - /// The painter is in scene coordinates when passed in. It will - /// be transformed to item coordinates after this call. To clip - /// in item coordinates, use the item's paint method. - /// \param item One of the layer's child items. - /// \param painter The painter used to draw the item. - /// \return - /// True if the item should not be drawn. - virtual bool drawItemFilter(QGraphicsItem *item, QPainter *painter); - - /// \brief - /// Gets the help text for the given location. - /// - /// When the chart receives a help event, the layers are searched, - /// in order, for help text at the help event location. If a layer - /// has an item at the location, it should return true. - /// - /// \param point The help location in scene coordinates. - /// \param text Used to return the help text. - /// \return - /// True if help text is found for the given location. - virtual bool getHelpText(const QPointF &point, QString &text); - - /// Notifies the chart layer that a resize interaction has started. - virtual void startInteractiveResize() {} - - /// Notifies the chart layer that a resize interaction has finished. - virtual void finishInteractiveResize() {} - -signals: - /// Emitted when the layer layout needs to be calculated. - void layoutNeeded(); - - /// \brief - /// Emitted when the axis range for the layer has changed. - /// \note - /// This signal should be emitted before the \c layoutNeeded - /// signal to be effective. - void rangeChanged(); - -protected: - vtkQtChartArea *ChartArea; ///< Stores the containing chart area. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayerDomain.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayerDomain.h deleted file mode 100644 index c122a117fe..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLayerDomain.h +++ /dev/null @@ -1,66 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartLayerDomain.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartLayerDomain.h -/// \date March 4, 2008 - -#ifndef _vtkQtChartLayerDomain_h -#define _vtkQtChartLayerDomain_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartLayer.h" // needed for enum - -class vtkQtChartAxisCornerDomain; - - -/// \class vtkQtChartLayerDomain -/// \brief -/// The vtkQtChartLayerDomain class is used to merge chart layer -/// domains. -class VTKQTCHART_EXPORT vtkQtChartLayerDomain -{ -public: - vtkQtChartLayerDomain(); - ~vtkQtChartLayerDomain(); - - /// \brief - /// Gets the domain for the specified corner. - /// \param corner The chart corner. - /// \return - /// A pointer to the merged domain for the specified corner. - const vtkQtChartAxisCornerDomain *getDomain( - vtkQtChartLayer::AxesCorner corner) const; - - /// \brief - /// Merges the domain for the given corner with the current - /// domains. - /// \param domain The domain to add. - /// \param corner The chart corner for the domain. - void mergeDomain(const vtkQtChartAxisCornerDomain &domain, - vtkQtChartLayer::AxesCorner corner); - - /// Removes all the domains. - void clear(); - -private: - vtkQtChartAxisCornerDomain *Domains[4]; ///< Stores the domains. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegend.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegend.h deleted file mode 100755 index 34e4694a56..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegend.h +++ /dev/null @@ -1,246 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartLegend.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartLegend.h -/// \date February 12, 2008 - -#ifndef _vtkQtChartLegend_h -#define _vtkQtChartLegend_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartLegendInternal; -class vtkQtChartLegendModel; -class QFont; -class QPainter; -class QPoint; -class QRect; - - -/// \class vtkQtChartLegend -/// \brief -/// The vtkQtChartLegend class displays a chart legend. -/// -/// A vtkQtChartLegendModel is used to describe the entries. Each entry -/// can have an icon and a label. The icon is used to visually -/// identify the series on the chart. For a line chart series, the -/// image should be drawn in the same color and line style. -class VTKQTCHART_EXPORT vtkQtChartLegend : public QWidget -{ - Q_OBJECT - -public: - enum LegendLocation - { - Left = 0, ///< Place the legend on the left of the chart. - Top, ///< Place the legend on the top of the chart. - Right, ///< Place the legend on the right of the chart. - Bottom ///< Place the legend on the bottom of the chart. - }; - - enum ItemFlow - { - LeftToRight = 0, ///< Items are arranged left to right. - TopToBottom ///< Items are arranged top to bottom. - }; - -public: - /// \brief - /// Creates a chart legend instance. - /// \param parent The parent widget. - vtkQtChartLegend(QWidget *parent=0); - virtual ~vtkQtChartLegend(); - - /// \name Setup Methods - //@{ - /// \brief - /// Gets the legend model. - /// \return - /// A pointer to the legend model. - vtkQtChartLegendModel *getModel() const {return this->Model;} - - /// \brief - /// Gets the legend location. - /// \return - /// The legend location. - LegendLocation getLocation() const {return this->Location;} - - /// \brief - /// Sets the legend location. - /// - /// The chart uses the location to place the legend in the - /// appropriate place. The combination of location and flow - /// determine how the legend looks. - /// - /// \param location The new legend location. - void setLocation(LegendLocation location); - - /// \brief - /// Gets the legend item flow. - /// \return - /// The legend item flow. - ItemFlow getFlow() const {return this->Flow;} - - /// \brief - /// Sets the legend item flow. - /// - /// The flow is used to determine the layout direction of the - /// legend entries. Depending on the location, the same flow type - /// can look different. - /// - /// \param flow The new item flow. - void setFlow(ItemFlow flow); - //@} - - /// \brief - /// Gets the panning offset. - /// \return - /// The current panning offset. - int getOffset() const; - - /// \brief - /// Gets the preferred size of the chart legend. - /// \return - /// The preferred size of the chart legend. - virtual QSize sizeHint() const {return this->Bounds;} - - /// \brief - /// Draws the legend using the given painter. - /// \param painter The painter to use. - void drawLegend(QPainter &painter); - -signals: - /// Emitted when the legend location is changed. - void locationChanged(); - -public slots: - /// Resets the chart legend. - void reset(); - - /// \brief - /// Sets the visibility for the given entry. - /// \param index The legend index of the entry. - /// \param visible True if the entry should be visible. - void setEntryVisible(int index, bool visible); - - /// \brief - /// Sets the visibility for the given set of entries. - /// \param first The first index of the entry range. - /// \param last The last index of the entry range. - /// \param visible True if the entry should be visible. - void setEntriesVisible(int first, int last, bool visible); - - /// \brief - /// Sets the panning offset. - /// - /// The offset is applied to the x or y axis depending on the - /// legend's location. - /// - /// \param offset The new panning offset. - void setOffset(int offset); - -protected slots: - /// \brief - /// Inserts a new entry in the legend. - /// \param index Where to insert the entry. - void insertEntry(int index); - - /// \brief - /// Starts the entry removal process. - /// \param index The entry being removed. - void startEntryRemoval(int index); - - /// \brief - /// Finishes the entry removal process. - /// \param index The entry that was removed. - void finishEntryRemoval(int index); - - /// \brief - /// Updates the text for the given entry. - /// \param index The index of the modified entry. - void updateEntryText(int index); - -protected: - /// \brief - /// Updates the layout when the font changes. - /// \param e Event specific information. - /// \return - /// True if the event was handled. - virtual bool event(QEvent *e); - - /// \brief - /// Draws the chart title. - /// \param e Event specific information. - virtual void paintEvent(QPaintEvent *e); - - /// \brief - /// Updates the maximum offset when the size changes. - /// \param e Event specific information. - virtual void resizeEvent(QResizeEvent *e); - - /// \brief - /// Used for panning the contents of the legend. - /// - /// The widget cursor is set for panning. - /// - /// \param e Event specific information. - virtual void mousePressEvent(QMouseEvent *e); - - /// \brief - /// Used for panning the contents of the legend. - /// - /// The conents are moved by changing the offset. - /// - /// \param e Event specific information. - virtual void mouseMoveEvent(QMouseEvent *e); - - /// \brief - /// Used for panning the contents of the legend. - /// - /// The widget cursor is reset after panning. - /// - /// \param e Event specific information. - virtual void mouseReleaseEvent(QMouseEvent *e); - -private: - /// Calculates the preferred size of the chart legend. - void calculateSize(); - - /// Sets the maximum offset using the contents size. - void updateMaximum(); - -private: - vtkQtChartLegendInternal *Internal; ///< Stores the graphical items. - vtkQtChartLegendModel *Model; ///< A pointer to the model. - LegendLocation Location; ///< Stores the legend location. - ItemFlow Flow; ///< Stores the order of the items. - QSize Bounds; ///< Stores the prefered size. - int IconSize; ///< Stores the icon size. - int TextSpacing; ///< The space between icon and text. - int Margin; ///< The margin around the entries. - -private: - vtkQtChartLegend(const vtkQtChartLegend &); - vtkQtChartLegend &operator=(const vtkQtChartLegend &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendManager.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendManager.h deleted file mode 100644 index 528f2f6cbf..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendManager.h +++ /dev/null @@ -1,172 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartLegendManager.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartLegendManager.h -/// \date January 8, 2009 - -#ifndef _vtkQtChartLegendManager_h -#define _vtkQtChartLegendManager_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartArea; -class vtkQtChartLayer; -class vtkQtChartLegend; -class vtkQtChartLegendManagerInternal; -class vtkQtChartLegendModel; -class vtkQtChartSeriesLayer; -class vtkQtChartSeriesModel; - - -/// \class vtkQtChartLegendManager -/// \brief -/// The vtkQtChartLegendManager class builds a chart legend from the -/// chart series layers. -class VTKQTCHART_EXPORT vtkQtChartLegendManager : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart legend manager instance. - /// \param parent The parent object. - vtkQtChartLegendManager(QObject *parent=0); - virtual ~vtkQtChartLegendManager(); - - /// \name Setup Methods - //@{ - /// \brief - /// Sets the chart area that holds the chart series layers. - /// \param area The new chart area. - void setChartArea(vtkQtChartArea *area); - - /// \brief - /// Sets the chart legend to manage. - /// \param legend The new chart legend. - void setChartLegend(vtkQtChartLegend *legend); - //@} - -public slots: - /// \brief - /// Inserts a chart layer at the given index. - /// \param index The index of the layer. - /// \param chart The chart layer that was inserted. - void insertLayer(int index, vtkQtChartLayer *chart); - - /// \brief - /// Removes the specified chart layer from the list. - /// \param index The index of the layer. - /// \param chart The chart layer that will be removed. - void removeLayer(int index, vtkQtChartLayer *chart); - - /// \brief - /// Sets the visibility for the series in the given chart layer. - /// \param chart The chart layer. - /// \param visible True if the layer series should be visible. - void setLayerVisible(vtkQtChartLayer *chart, bool visible); - -private slots: - /// \brief - /// Changes the series model for a series layer. - /// \param previous The previous series model. - /// \param current The current series model. - void changeModel(vtkQtChartSeriesModel *previous, - vtkQtChartSeriesModel *current); - - /// \brief - /// Sets the visibility for the given series. - /// \param series The chart series index. - /// \param visible True if the series should be visible. - void updateSeriesVisibility(int series, bool visible); - - /// \brief - /// Updates the legend model for series changes. - /// \param first The first index of the series range. - /// \param last The last index of the series range. - void updateModelEntries(int first, int last); - - /// Inserts all the series for the model sending the signal. - void insertModelEntries(); - - /// \brief - /// Inserts the given series for the model sending the signal. - /// \param first The first index of the series range. - /// \param last The last index of the series range. - void insertModelEntries(int first, int last); - - /// Removes all the series for the model sending the signal. - void removeModelEntries(); - - /// \brief - /// Removes the given series for the model sending the signal. - /// \param first The first index of the series range. - /// \param last The last index of the series range. - void removeModelEntries(int first, int last); - -private: - /// \brief - /// Gets the starting legend index for the given chart layer. - /// \param chart The chart series layer. - /// \return - /// The starting legend index for the given chart layer. - int getLegendIndex(vtkQtChartSeriesLayer *chart); - - /// \brief - /// Gets the starting legend index for the given chart model. - /// \param model The chart series model. - /// \param chart Used to return the model's chart layer. - /// \return - /// The starting legend index for the given chart model. - int getLegendIndex(vtkQtChartSeriesModel *model, - vtkQtChartSeriesLayer **chart=0); - - /// \brief - /// Inserts entries into the chart legend. - /// \param legend The chart legend model to modify. - /// \param index The starting legend index for the chart layer. - /// \param chart The chart series layer. - /// \param model The chart series model. - /// \param first The first model index in the series range. - /// \param last The last model index in the series range. - void insertLegendEntries(vtkQtChartLegendModel *legend, int index, - vtkQtChartSeriesLayer *chart, vtkQtChartSeriesModel *model, - int first, int last); - - /// \brief - /// Removes entries from the chart legend. - /// \param legend The chart legend model to modify. - /// \param index The starting legend index for the chart layer. - /// \param first The first model index in the series range. - /// \param last The last model index in the series range. - void removeLegendEntries(vtkQtChartLegendModel *legend, int index, - int first, int last); - -private: - vtkQtChartLegendManagerInternal *Internal; ///< Stores the layers. - vtkQtChartArea *Area; ///< Stores the chart area. - vtkQtChartLegend *Legend; ///< Stores the chart legend. - -private: - vtkQtChartLegendManager(const vtkQtChartLegendManager &); - vtkQtChartLegendManager &operator=(const vtkQtChartLegendManager &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendModel.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendModel.h deleted file mode 100755 index e4df3316df..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartLegendModel.h +++ /dev/null @@ -1,173 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartLegendModel.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartLegendModel.h -/// \date February 12, 2008 - -#ifndef _vtkQtChartLegendModel_h -#define _vtkQtChartLegendModel_h - - -#include "vtkQtChartExport.h" -#include -#include // Needed for return type -#include // Needed for return type - -class vtkQtChartLegendModelInternal; -class vtkQtPointMarker; -class QPen; - - -/// \class vtkQtChartLegendModel -/// \brief -/// The vtkQtChartLegendModel class stores the data for a chart legend. -class VTKQTCHART_EXPORT vtkQtChartLegendModel : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart legend model. - /// \param parent The parent object. - vtkQtChartLegendModel(QObject *parent=0); - virtual ~vtkQtChartLegendModel(); - - /// \brief - /// Adds an entry to the chart legend. - /// \param icon The series identifying image. - /// \param text The series label. - /// \return - /// The id for the inserted entry or zero for failure. - int addEntry(const QPixmap &icon, const QString &text); - - /// \brief - /// Inserts an entry into the chart legend. - /// \param index Where to place the new entry. - /// \param icon The series identifying image. - /// \param text The series label. - /// \return - /// The id for the inserted entry or zero for failure. - int insertEntry(int index, const QPixmap &icon, const QString &text); - - /// \brief - /// Removes an entry from the chart legend. - /// \param index The index of the entry to remove. - void removeEntry(int index); - - /// Removes all the entries from the legend. - void removeAllEntries(); - - /// \brief - /// Blocks the model modification signals. - /// - /// This method should be called before making multiple changes to - /// the model. It will prevent the view from updating before the - /// changes are complete. Once all the changes are made, the - /// \c finishModifyingData method should be called to notify the - /// view of the changes. - /// - /// \sa vtkQtChartLegendModel::finishModifyingData() - void startModifyingData(); - - /// \brief - /// Unblocks the model modification signals. - /// - /// The \c entriesReset signal is emitted to synchronize the view. - /// - /// \sa vtkQtChartLegendModel::startModifyingData() - void finishModifyingData(); - - /// \brief - /// Gets the number of entries in the legend. - /// \return - /// The number of entries in the legend. - int getNumberOfEntries() const; - - /// \brief - /// Gets the index for the given id. - /// \param id The entry identifier. - /// \return - /// The index for the entry that matches the id or -1 if there is - /// no matching entry. - int getIndexForId(unsigned int id) const; - - /// \brief - /// Gets the icon for the given index. - /// \param index The index of the entry. - /// \return - /// The icon for the given index or a null pixmap if the index is - /// out of bounds. - QPixmap getIcon(int index) const; - - /// \brief - /// Sets the icon for the given index. - /// \param index The index of the entry. - /// \param icon The new series icon. - void setIcon(int index, const QPixmap &icon); - - /// \brief - /// Gets the text for the given index. - /// \param index The index of the entry. - /// \return - /// The text for the given index or a null string if the index is - /// out of bounds. - QString getText(int index) const; - - /// \brief - /// Sets the text for the given index. - /// \param index The index of the entry. - /// \param text The new series label. - void setText(int index, const QString &text); - -signals: - /// \brief - /// Emitted when a new entry is added. - /// \param index Where the entry was added. - void entryInserted(int index); - - /// \brief - /// Emitted before an entry is removed. - /// \param index The index being removed. - void removingEntry(int index); - - /// \brief - /// Emitted after an entry is removed. - /// \param index The index being removed. - void entryRemoved(int index); - - /// Emitted when the legend entries are reset. - void entriesReset(); - - /// \brief - /// Emitted when the icon for an entry has changed. - /// \param index The index of the entry that changed. - void iconChanged(int index); - - /// \brief - /// Emitted when the text for an entry has changed. - /// \param index The index of the entry that changed. - void textChanged(int index); - -private: - vtkQtChartLegendModelInternal *Internal; ///< Stores the legend items. - bool InModify; ///< True when blocking signals. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseBox.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseBox.h deleted file mode 100644 index 3466cf38f7..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseBox.h +++ /dev/null @@ -1,147 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMouseBox.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMouseBox.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartMouseBox_h -#define _vtkQtChartMouseBox_h - - -#include "vtkQtChartExport.h" -#include - -class QGraphicsView; -class QPoint; -class QPointF; -class QRectF; - - -/*! - * \class vtkQtChartMouseBox - * \brief - * The vtkQtChartMouseBox class is used to draw a mouse box that - * can be used for zooming or selection. - * - * To use the vtkQtChartMouseBox, code needs to be added to several - * key methods. The drag box interaction starts in the mouse press - * event. The box grows or shrinks in the mouse move event. In the - * mouse release event, the box is finalized and used for its - * intent (zoom, select, etc.). - * - * In the mouse press event, the mouse location needs to be saved. - * The position should be in the mouse box's parent coordinates. - * \code - * void SomeClass::mousePressEvent(QMouseEvent *e) - * { - * this->mouseBox->setStartingPosition(e->pos()); - * this->mouseBox->setVisible(true); - * } - * \endcode - * - * In the mouse move event, the drag box needs to be updated. The - * point set in the mouse press event should remain unchanged until - * the mouse release event. If your class watches all mouse move - * events, make sure the box is only updated for drag events. - * \code - * void SomeClass::mouseMoveEvent(QMouseEvent *e) - * { - * this->mouseBox->adjustRectangle(e->pos()); - * } - * \endcode - * - * In the mouse release event, the drag box needs to be updated - * with the release location before using it. After using the box, - * it should be hidden. - * \code - * void SomeClass::mouseReleaseEvent(QMouseEvent *e) - * { - * this->mouseBox->adjustRectangle(e->pos()); - * ... - * this->mouseBox->setVisible(false); - * } - * \endcode - */ -class VTKQTCHART_EXPORT vtkQtChartMouseBox : public QObject -{ - Q_OBJECT - -public: - vtkQtChartMouseBox(QGraphicsView *view); - ~vtkQtChartMouseBox(); - - /// \brief - /// Gets whether or not the mouse box is visible. - /// \return - /// True if the mouse box should be painted. - bool isVisible() const {return this->Showing;} - - /// \brief - /// Sets whether or not the mouse box is visible. - /// \param visible True if the mouse box should be painted. - void setVisible(bool visible); - - /// \brief - /// Gets the mouse box starting position. - /// \return - /// A reference to the mouse box starting position. - const QPointF &getStartingPosition() const; - - /// \brief - /// Sets the mouse box starting position. - /// - /// The starting position should be set before calling - /// \c adjustRectangle. The starting position and adjustment - /// positions should be in view coordinates. - /// - /// \param start The original mouse press location in view coordinates. - /// \sa vtkQtChartMouseBox::adjustRectangle(const QPointF &) - void setStartingPosition(const QPoint &start); - - /// \brief - /// Adjusts the boundary of the mouse box. - /// - /// The selection or zoom box should contain the original mouse - /// down location and the current mouse location. This method - /// is used to adjust the box based on the current mouse location. - /// - /// \param current The current position of the mouse in view coordinates. - void adjustRectangle(const QPoint ¤t); - - /// \brief - /// Gets the current mouse box. - /// \return - /// A reference to the mouse box. - const QRectF &getRectangle() const; - -signals: - // \brief - // Emitted when the mouse box changes. - // \param area The area to repaint in scene coordinates. - void updateNeeded(const QRectF &area); - -private: - QGraphicsView *View; ///< Stores the graphics view. - QPointF *Last; ///< Stores the mouse down location. - QRectF *Box; ///< Stores the mouse box. - bool Showing; ///< True if the mouse box should be painted. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseFunction.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseFunction.h deleted file mode 100644 index 070ffe0006..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseFunction.h +++ /dev/null @@ -1,143 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMouseFunction.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMouseFunction.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartMouseFunction_h -#define _vtkQtChartMouseFunction_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartArea; -class QCursor; -class QMouseEvent; -class QRectF; -class QWheelEvent; - - -/// \class vtkQtChartMouseFunction -/// \brief -/// The vtkQtChartMouseFunction class is the base class for all chart -/// mouse functions. -class VTKQTCHART_EXPORT vtkQtChartMouseFunction : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart mouse function instance. - /// \param parent The parent object. - vtkQtChartMouseFunction(QObject *parent=0); - virtual ~vtkQtChartMouseFunction() {} - - /// \brief - /// Gets whether or not the function is combinable. - /// - /// If a function can be combined with other functions on the same - /// mouse button mode, this method should return true. Functions - /// are combined using keyboard modifiers. If a function uses the - /// keyboard modifiers, it should return false. - /// - /// \return - /// True if the other functions can be combined with this one. - virtual bool isCombinable() const {return true;} - - /// \brief - /// Gets whether or not the function owns the mouse. - /// \return - /// True if the function owns the mouse. - bool isMouseOwner() const {return this->OwnsMouse;} - - /// \brief - /// Sets whether or not the function owns the mouse. - /// \param owns True if the function owns the mouse. - /// \sa - // vtkQtChartMouseFunction::interactionStarted(vtkQtChartMouseFunction *) - virtual void setMouseOwner(bool owns) {this->OwnsMouse = owns;} - - /// \brief - /// Called to handle the mouse press event. - /// \param e Event specific information. - /// \param chart The chart area. - /// \return - /// True if the event was used. - virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart)=0; - - /// \brief - /// Called to handle the mouse move event. - /// \param e Event specific information. - /// \param chart The chart area. - /// \return - /// True if the event was used. - virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart)=0; - - /// \brief - /// Called to handle the mouse release event. - /// \param e Event specific information. - /// \param chart The chart area. - /// \return - /// True if the event was used. - virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart)=0; - - /// \brief - /// Called to handle the double click event. - /// \param e Event specific information. - /// \param chart The chart area. - /// \return - /// True if the event was used. - virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart)=0; - - /// \brief - /// Called to handle the wheel event. - /// \param e Event specific information. - /// \param chart The chart area. - /// \return - /// True if the event was used. - virtual bool wheelEvent(QWheelEvent *e, vtkQtChartArea *chart); - -signals: - /// \brief - /// Emitted when a function interaction has started. - /// - /// A mouse function should not assume it has ownership after - /// emitting this signal. The interactor will call \c setMouseOwner - /// if no other function owns the mouse. - /// - /// \param function The function requesting mouse ownership. - void interactionStarted(vtkQtChartMouseFunction *function); - - /// \brief - /// Emitted when a function has finished an interaction state. - /// \param function The function releasing mouse control. - void interactionFinished(vtkQtChartMouseFunction *function); - - /// \brief - /// Emitted when the mouse cursor needs to be changed. - /// \param cursor The new cursor to use. - void cursorChangeRequested(const QCursor &cursor); - -private: - bool OwnsMouse; ///< True if the function owns mouse control. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMousePan.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMousePan.h deleted file mode 100644 index d8131a1e97..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMousePan.h +++ /dev/null @@ -1,67 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMousePan.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMousePan.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartMousePan_h -#define _vtkQtChartMousePan_h - - -#include "vtkQtChartExport.h" -#include "vtkQtChartMouseFunction.h" - -class vtkQtChartContentsSpace; -class vtkQtChartMousePanInternal; -class QMouseEvent; - - -/// \class vtkQtChartMousePan -/// \brief -/// The vtkQtChartMousePan class pans the contents in response to -/// mouse events. -class VTKQTCHART_EXPORT vtkQtChartMousePan : public vtkQtChartMouseFunction -{ -public: - /// \brief - /// Creates a mouse pan instance. - /// \param parent Te parent object. - vtkQtChartMousePan(QObject *parent=0); - virtual ~vtkQtChartMousePan(); - - /// \name vtkQtChartMouseFunction Methods - //@{ - virtual void setMouseOwner(bool owns); - - virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart); - //@} - -private: - vtkQtChartMousePanInternal *Internal; ///< Stores the last mouse position. - -private: - vtkQtChartMousePan(const vtkQtChartMousePan &); - vtkQtChartMousePan &operator=(const vtkQtChartMousePan &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelection.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelection.h deleted file mode 100644 index 9b316372c2..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelection.h +++ /dev/null @@ -1,123 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMouseSelection.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMouseSelection.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartMouseSelection_h -#define _vtkQtChartMouseSelection_h - - -#include "vtkQtChartExport.h" -#include "vtkQtChartMouseFunction.h" - -class vtkQtChartArea; -class vtkQtChartMouseSelectionHandler; -class vtkQtChartMouseSelectionInternal; -class QMouseEvent; -class QString; -class QStringList; - - -/// \class vtkQtChartMouseSelection -/// \brief -/// The vtkQtChartMouseSelection class is used to select chart elements -/// based on the current selection mode. -class VTKQTCHART_EXPORT vtkQtChartMouseSelection : - public vtkQtChartMouseFunction -{ - Q_OBJECT - -public: - /// \brief - /// Creates a mouse selection object. - /// \param parent The parent object. - vtkQtChartMouseSelection(QObject *parent=0); - virtual ~vtkQtChartMouseSelection(); - - /// \name Configuration Methods - //@{ - virtual bool isCombinable() const {return false;} - - /// \brief - /// Gets the name of current selection mode. - /// \return - /// The name of the current selection mode. - const QString &getSelectionMode() const; - - /// \brief - /// Gets the list of selection modes. - /// \return - /// The list of selection modes. - const QStringList &getModeList() const; - - /// \brief - /// Adds a selection handler to the list. - /// - /// The selection mode list is rebuilt when a new handler is added. - /// - /// \param handler The new selection handler. - void addHandler(vtkQtChartMouseSelectionHandler *handler); - - /// \brief - /// Inserts a selection handler into the list. - /// \param index Where to insert the handler. - /// \param handler The new selection handler. - void insertHandler(int index, vtkQtChartMouseSelectionHandler *handler); - - /// \brief - /// Removes the given selection handler from the list. - /// \param handler The selection handler to remove. - void removeHandler(vtkQtChartMouseSelectionHandler *handler); - //@} - - /// \name Interaction Methods - //@{ - virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart); - //@} - -public slots: - /// \brief - /// Sets the current selection mode. - /// \param mode The name of the new selection mode. - void setSelectionMode(const QString &mode); - -signals: - /// Emitted when the list of available modes changes. - void modeListChanged(); - - /// \brief - /// Emitted when the selection mode changes. - /// \param mode The name of the new selection mode. - void selectionModeChanged(const QString &mode); - -private: - /// Stores the mode data and selection handlers. - vtkQtChartMouseSelectionInternal *Internal; - -private: - vtkQtChartMouseSelection(const vtkQtChartMouseSelection &); - vtkQtChartMouseSelection &operator=(const vtkQtChartMouseSelection &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelectionHandler.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelectionHandler.h deleted file mode 100644 index ed612adb2a..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseSelectionHandler.h +++ /dev/null @@ -1,119 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMouseSelectionHandler.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMouseSelectionHandler.h -/// \date March 19, 2008 - -#ifndef _vtkQtChartMouseSelectionHandler_h -#define _vtkQtChartMouseSelectionHandler_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartArea; -class vtkQtChartMouseBox; -class QMouseEvent; -class QString; -class QStringList; - - -/// \class vtkQtChartMouseSelectionHandler -/// \brief -/// The vtkQtChartMouseSelectionHandler class is the base class for -/// all selection handlers. -class VTKQTCHART_EXPORT vtkQtChartMouseSelectionHandler : public QObject -{ -public: - /// \brief - /// Creates a mouse selection handler. - /// \param parent The parent object. - vtkQtChartMouseSelectionHandler(QObject *parent=0); - virtual ~vtkQtChartMouseSelectionHandler() {} - - /// \brief - /// Gets the number of mouse modes. - /// \return - /// The number of mouse modes. - virtual int getNumberOfModes() const=0; - - /// \brief - /// Gets the list of mouse mode names. - /// \param list Used to return the list of modes. - virtual void getModeList(QStringList &list) const=0; - - /// \brief - /// Handles the mouse press event. - /// \param mode The current mouse mode. - /// \param e The mouse event. - /// \param chart The chart area. - /// \return - /// True if the event was handled. - virtual bool mousePressEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart)=0; - - /// \brief - /// Gets whether or not mouse move is available for the given mode. - /// \param mode The mouse mode name. - /// \return - /// True if mouse move is available for the given mode. - virtual bool isMouseMoveAvailable(const QString &mode) const=0; - - /// \brief - /// Starts a mouse move for the given mode. - /// \param mode The mouse mode to start. - /// \param chart The chart area. - virtual void startMouseMove(const QString &mode, vtkQtChartArea *chart)=0; - - /// \brief - /// Handles the mouse move event. - /// \param mode The current mouse mode. - /// \param e The mouse event. - /// \param chart The chart area. - virtual void mouseMoveEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart)=0; - - /// \brief - /// Finishes a mouse move for the given mode. - /// \param mode The mouse mode to finish. - /// \param chart The chart area. - virtual void finishMouseMove(const QString &mode, vtkQtChartArea *chart)=0; - - /// \brief - /// Handles the mouse release event. - /// \param mode The current mouse mode. - /// \param e The mouse event. - /// \param chart The chart area. - /// \return - /// True if the event was handled. - virtual bool mouseReleaseEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart)=0; - - /// \brief - /// Handles the mouse double click event. - /// \param mode The current mouse mode. - /// \param e The mouse event. - /// \param chart The chart area. - /// \return - /// True if the event was handled. - virtual bool mouseDoubleClickEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart)=0; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseZoom.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseZoom.h deleted file mode 100644 index af815962a5..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartMouseZoom.h +++ /dev/null @@ -1,157 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartMouseZoom.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartMouseZoom.h -/// \date March 11, 2008 - -#ifndef _vtkQtChartMouseZoom_h -#define _vtkQtChartMouseZoom_h - - -#include "vtkQtChartExport.h" -#include "vtkQtChartMouseFunction.h" - -class vtkQtChartArea; -class vtkQtChartMouseZoomInternal; -class QCursor; -class QMouseEvent; - - -/// \class vtkQtChartMouseZoom -/// \brief -/// The vtkQtChartMouseZoom class zooms the contents in response to -/// mouse events. -class VTKQTCHART_EXPORT vtkQtChartMouseZoom : public vtkQtChartMouseFunction -{ -public: - enum ZoomFlags - { - ZoomBoth, ///< Zoom in both directions. - ZoomXOnly, ///< Zoom only in the x-direction. - ZoomYOnly ///< Zoom only in the y-direction. - }; - -public: - /// \brief - /// Creates a new mouse zoom object. - /// \param parent The parent object. - vtkQtChartMouseZoom(QObject *parent=0); - virtual ~vtkQtChartMouseZoom(); - - /// \name vtkQtChartMouseFunction Methods - //@{ - virtual void setMouseOwner(bool owns); - - virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool wheelEvent(QWheelEvent *e, vtkQtChartArea *chart); - //@} - - /// \brief - /// Gets the zoom flags used during interaction. - /// \return - /// The zoom flags used during interaction. - ZoomFlags getFlags() const {return this->Flags;} - -protected: - /// \brief - /// Sets the zoom flags to use during interaction. - /// \param flags The zoom flags to use. - void setFlags(ZoomFlags flags) {this->Flags = flags;} - -private: - vtkQtChartMouseZoomInternal *Internal; ///< Stores the last position. - ZoomFlags Flags; ///< Stores the zoom flags. - -private: - vtkQtChartMouseZoom(const vtkQtChartMouseZoom &); - vtkQtChartMouseZoom &operator=(const vtkQtChartMouseZoom &); -}; - - -/// \class vtkQtChartMouseZoomX -/// \brief -/// The vtkQtChartMouseZoomX class zooms the contents in the x-direction. -class VTKQTCHART_EXPORT vtkQtChartMouseZoomX : public vtkQtChartMouseZoom -{ -public: - /// \brief - /// Creates a new mouse zoom-x object. - /// \param parent The parent object. - vtkQtChartMouseZoomX(QObject *parent=0); - virtual ~vtkQtChartMouseZoomX() {} - -private: - vtkQtChartMouseZoomX(const vtkQtChartMouseZoomX &); - vtkQtChartMouseZoomX &operator=(const vtkQtChartMouseZoomX &); -}; - - -/// \class vtkQtChartMouseZoomY -/// \brief -/// The vtkQtChartMouseZoomY class zooms the contents in the y-direction. -class VTKQTCHART_EXPORT vtkQtChartMouseZoomY : public vtkQtChartMouseZoom -{ -public: - /// \brief - /// Creates a new mouse zoom-y object. - /// \param parent The parent object. - vtkQtChartMouseZoomY(QObject *parent=0); - virtual ~vtkQtChartMouseZoomY() {} - -private: - vtkQtChartMouseZoomY(const vtkQtChartMouseZoomY &); - vtkQtChartMouseZoomY &operator=(const vtkQtChartMouseZoomY &); -}; - - -/// \class vtkQtChartMouseZoomBox -/// \brief -/// The vtkQtChartMouseZoomBox class zooms the contents to a rectangle. -class VTKQTCHART_EXPORT vtkQtChartMouseZoomBox : public vtkQtChartMouseFunction -{ -public: - /// \brief - /// Creates a new mouse zoom box object. - /// \param parent The parent object. - vtkQtChartMouseZoomBox(QObject *parent=0); - virtual ~vtkQtChartMouseZoomBox(); - - /// \name vtkQtChartMouseFunction Methods - //@{ - virtual void setMouseOwner(bool owns); - - virtual bool mousePressEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseMoveEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseReleaseEvent(QMouseEvent *e, vtkQtChartArea *chart); - virtual bool mouseDoubleClickEvent(QMouseEvent *e, vtkQtChartArea *chart); - //@} - -private: - QCursor *ZoomCursor; ///< Stores the zoom cursor. - -private: - vtkQtChartMouseZoomBox(const vtkQtChartMouseZoomBox &); - vtkQtChartMouseZoomBox &operator=(const vtkQtChartMouseZoomBox &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartPenBrushGenerator.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartPenBrushGenerator.h deleted file mode 100644 index 20edd817e5..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartPenBrushGenerator.h +++ /dev/null @@ -1,188 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartPenBrushGenerator.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartPenBrushGenerator.h -/// \date September 22, 2008 - -#ifndef _vtkQtChartPenBrushGenerator_h -#define _vtkQtChartPenBrushGenerator_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartStyleGenerator.h" - -class vtkQtChartColors; -class vtkQtChartPenBrushGeneratorInternal; - - -/// \class vtkQtChartPenBrushGenerator -/// \brief -/// The vtkQtChartPenBrushGenerator class generates series drawing -/// options using pen and brush lists. -class VTKQTCHART_EXPORT vtkQtChartPenBrushGenerator : - public vtkQtChartStyleGenerator -{ - Q_OBJECT - -public: - /// \brief - /// Creates a pen/brush generator. - /// \param parent The parent object. - vtkQtChartPenBrushGenerator(QObject *parent=0); - virtual ~vtkQtChartPenBrushGenerator(); - - /// \name vtkQtChartStyleGenerator Methods - //@{ - /// \brief - /// Gets the brush for the specified series index. - /// - /// If the index is greater than the internal brush list, the index - /// will be wrapped to repeat the brushes. - /// - /// \param index The series index. - /// \return - /// The brush for the specified series index. - virtual QBrush getSeriesBrush(int index) const; - - /// \brief - /// Gets the pen for the specified series index. - /// - /// If the index is greater than the internal pen list, the index - /// will be wrapped to repeat the pens. - /// - /// \param index The series index. - /// \return - /// The pen for the specified series index. - virtual QPen getSeriesPen(int index) const; - //@} - - /// \name Brush Methods - //@{ - /// \brief - /// Gets the number of brushes (fill styles) in the list. - /// \return - /// The number of brushes (fill styles) in the list. - int getNumberOfBrushes() const; - - /// \brief - /// Gets a fill style from the list. - /// - /// The index must be in the range [0, getNumberOfBrushes()-1]. If - /// it is not, an error message will be printed and an empty QBrush - /// will be returned. - /// - /// \param index The index of the brush. - /// \return - /// The fill style for the given index. - QBrush getBrush(int index) const; - - /// \brief - /// Sets the fill style for the given index. - /// - /// This method will do nothing if the index is out of range. - /// - /// \param index The brush list index. - /// \param brush The new fill style. - void setBrush(int index, const QBrush &brush); - - /// Clears the list of brushes (fill styles). - void clearBrushes(); - - /// \brief - /// Adds the color list to the brush list. - /// \param colors The list of colors to add. - void addBrushes(const vtkQtChartColors &colors); - - /// \brief - /// Adds a new brush to the list of fill styles. - /// \param brush The fill style to add. - void addBrush(const QBrush &brush); - - /// \brief - /// Inserts a new brush into the list of fill styles. - /// \param index Where to insert the brush. - /// \param brush The fill style to insert. - void insertBrush(int index, const QBrush &brush); - - /// \brief - /// Removes the brush at the given index. - /// \param index The index of the brush to remove. - void removeBrush(int index); - //@} - - /// \name Pen Methods - //@{ - /// \brief - /// Gets the number of pens (stroke styles) in the list. - /// \return - /// The number of pens (stroke styles) in the list. - int getNumberOfPens() const; - - /// \brief - /// Gets a stroke style from the list. - /// - /// The index must be in the range [0, getNumberOfPens()-1]. If it - /// is not, an error message will be printed and an empty QPen will - /// be returned. - /// - /// \param index The index of the pen. - /// \return - /// The stroke style for the given index. - QPen getPen(int index) const; - - /// \brief - /// Sets the stroke style for the given index. - /// - /// This method will do nothing if the index is out of range. - /// - /// \param index The pen list index. - /// \param pen The new stroke style. - void setPen(int index, const QPen &pen); - - /// Clears the list of pens (stroke styles). - void clearPens(); - - /// \brief - /// Adds the color list to the pen list. - /// \param colors The list of colors to add. - void addPens(const vtkQtChartColors &colors); - - /// \brief - /// Adds a pen to the list of stroke styles. - /// \param pen The stroke style to add. - void addPen(const QPen &pen); - - /// \brief - /// Inserts a pen into the list of stroke styles. - /// \param index Where to insert the pen. - /// \param pen The stroke style to insert. - void insertPen(int index, const QPen &pen); - - /// \brief - /// Removes the pen at the given index. - /// \param index The index of the pen to remove. - void removePen(int index); - //@} - -private: - /// Stores the pen and brush lists. - vtkQtChartPenBrushGeneratorInternal *Internal; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartQuad.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartQuad.h deleted file mode 100644 index 42030cfc73..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartQuad.h +++ /dev/null @@ -1,86 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartQuad.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartQuad.h -/// \date November 13, 2008 - -#ifndef _vtkQtChartQuad_h -#define _vtkQtChartQuad_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartShape.h" - -class QPolygonF; - - -/// \class vtkQtChartQuad -/// \brief -/// The vtkQtChartQuad class defines a quad used by the chart shape -/// locator. -class VTKQTCHART_EXPORT vtkQtChartQuad : public vtkQtChartShape -{ -public: - vtkQtChartQuad(); - - /// \brief - /// Creates a quad instance. - /// \param series The chart series. - /// \param index The chart series index. - vtkQtChartQuad(int series, int index); - vtkQtChartQuad(const vtkQtChartQuad &other); - virtual ~vtkQtChartQuad(); - - vtkQtChartQuad &operator=(const vtkQtChartQuad &other); - - virtual void getBounds(QRectF &bounds) const; - virtual bool contains(const QPointF &point) const; - virtual bool intersects(const QRectF &area) const; - - /// \brief - /// Sets the quad shape. - /// - /// The polygon should be a list of four points. The points should - /// form a convex, clock-wise loop. - /// - /// \param polygon The list of points to define the quad. - virtual void setPolygon(const QPolygonF &polygon) {this->setPoints(polygon);} - - /// \brief - /// Gets the list of quad points. - /// \return - /// The list of quad points. - const QPolygonF &getPoints() const; - - /// \brief - /// Sets the quad shape. - /// \param points The list of points to define the quad. - void setPoints(const QPolygonF &points); - - /// \brief - /// Sets the point for the given index. - /// \param index The index of the quad point. - /// \param point The new point. - void setPoint(int index, const QPointF &point); - -private: - QPolygonF *Points; ///< Stores the four points. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartScene.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartScene.h deleted file mode 100644 index a784b72e60..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartScene.h +++ /dev/null @@ -1,73 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartScene.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartScene.h -/// \date March 12, 2008 - -#ifndef _vtkQtChartScene_h -#define _vtkQtChartScene_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartMouseBox; - - -/// \class vtkQtChartScene -/// \brief -/// The vtkQtChartScene class is used to draw the mouse box and make -/// it possible for chart layers to clip correctly. -class VTKQTCHART_EXPORT vtkQtChartScene : public QGraphicsScene -{ -public: - /// \brief - /// Creates a chart scene. - /// \param parent The parent object. - vtkQtChartScene(QObject *parent=0); - virtual ~vtkQtChartScene() {} - - /// \brief - /// Sets the chart mouse box. - /// \param box The chart mouse box. - void setMouseBox(vtkQtChartMouseBox *box) {this->Box = box;} - -protected: - /// \brief - /// Allows the chart layers to clip their objects. - /// \param painter The painter to use. - /// \param numItems The length of the \c items array. - /// \param items The list of graphics items to draw. - /// \param options The graphics item painting options. - /// \param widget The widget being painted. - virtual void drawItems(QPainter *painter, int numItems, - QGraphicsItem **items, const QStyleOptionGraphicsItem *options, - QWidget *widget=0); - - /// \brief - /// Draws the chart mouse box in the foreground. - /// \param painter The painter to use. - /// \param area The area to update. - virtual void drawForeground(QPainter *painter, const QRectF &area); - -private: - vtkQtChartMouseBox *Box; ///< Stores the mouse box. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomain.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomain.h deleted file mode 100644 index 499265b259..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomain.h +++ /dev/null @@ -1,74 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesDomain.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesDomain.h -/// \date March 3, 2008 - -#ifndef _vtkQtChartSeriesDomain_h -#define _vtkQtChartSeriesDomain_h - -#include "vtkQtChartExport.h" - -class vtkQtChartAxisDomain; -class vtkQtChartSeriesDomainInternal; - - -/// \class vtkQtChartSeriesDomain -/// \brief -/// The vtkQtChartSeriesDomain class is used to associate the two -/// domains for a series. -class VTKQTCHART_EXPORT vtkQtChartSeriesDomain -{ -public: - vtkQtChartSeriesDomain(); - vtkQtChartSeriesDomain(const vtkQtChartSeriesDomain &other); - ~vtkQtChartSeriesDomain(); - - /// \brief - /// Gets the x-axis domain for the series. - /// \return - /// A reference to the x-axis domain. - const vtkQtChartAxisDomain &getXDomain() const; - - /// \brief - /// Gets the x-axis domain for the series. - /// \return - /// A reference to the x-axis domain. - vtkQtChartAxisDomain &getXDomain(); - - /// \brief - /// Gets the y-axis domain for the series. - /// \return - /// A reference to the y-axis domain. - const vtkQtChartAxisDomain &getYDomain() const; - - /// \brief - /// Gets the y-axis domain for the series. - /// \return - /// A reference to the y-axis domain. - vtkQtChartAxisDomain &getYDomain(); - - vtkQtChartSeriesDomain &operator=(const vtkQtChartSeriesDomain &other); - -private: - vtkQtChartSeriesDomainInternal *Internal; ///< Stores the domains. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomainGroup.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomainGroup.h deleted file mode 100644 index 152e048403..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesDomainGroup.h +++ /dev/null @@ -1,135 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesDomainGroup.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesDomainGroup.h -/// \date March 6, 2008 - -#ifndef _vtkQtChartSeriesDomainGroup_h -#define _vtkQtChartSeriesDomainGroup_h - -#include "vtkQtChartExport.h" -#include // needed for return type - - -/// \class vtkQtChartSeriesDomainGroup -/// \brief -/// The vtkQtChartSeriesDomainGroup class is used to group together -/// series with similar domains. -class VTKQTCHART_EXPORT vtkQtChartSeriesDomainGroup -{ -public: - /// \brief - /// Creates a chart series domain group. - /// \param sortSeries True if the series should be sorted when added - /// to a group. - vtkQtChartSeriesDomainGroup(bool sortSeries=false); - virtual ~vtkQtChartSeriesDomainGroup() {} - - /// \brief - /// Gets the number of groups. - /// \return - /// The number of groups. - int getNumberOfGroups() const; - - /// \brief - /// Gets the number of series in the given group. - /// \param group The group index. - /// \return - /// The number of series in the group. - int getNumberOfSeries(int group) const; - - /// \brief - /// Gets the list of series in the given group. - /// \param group The group index. - /// \return - /// The list of series in the given group. - QList getGroup(int group) const; - - /// \brief - /// Finds the group index for the given series. - /// \param series The series to look up. - /// \return - /// The group index of the series or -1 on failure. - int findGroup(int series) const; - - /// \brief - /// Updates the series indexes prior to an insert. - /// \param seriesFirst The first index to be inserted. - /// \param seriesLast The last index to be inserted. - virtual void prepareInsert(int seriesFirst, int seriesLast); - - /// \brief - /// Inserts a new series in the specified group. - /// \param series The new series. - /// \param group The group index. - virtual void insertSeries(int series, int group); - - /// Sorts the newly inserted series if sorting is enabled. - void finishInsert(); - - /// \brief - /// Removes a series from its group. - /// \param series The series to remove. - /// \return - /// The series group index. - virtual int removeSeries(int series); - - /// \brief - /// Updates the series indexes after a removal. - /// \param seriesFirst The first index removed. - /// \param seriesLast The last index removed. - virtual void finishRemoval(int seriesFirst=-1, int seriesLast=-1); - - /// Removes all the series groups. - virtual void clear(); - -public: - /// \brief - /// Merges two sorted lists of series indexes. - /// \param target The list where the result will be stored. - /// \param source The list of seires to merge. - static void mergeSeriesLists(QList &target, const QList &source); - -protected: - /// \brief - /// Inserts a new group in the list. - /// - /// Subclasses can override this method to set up data structures - /// associated with the series group. - /// - /// \param group The group index. - virtual void insertGroup(int group); - - /// \brief - /// Removes a group from the list. - /// - /// Subclasses should override this method to clean up any data - /// structures associated with the series group. - /// - /// \param group The group index. - virtual void removeGroup(int group); - -private: - QList > Groups; ///< Stores the series groups. - QList > ToSort; ///< Stores the new series groups. - bool SortSeries; ///< True if series are sorted. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesLayer.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesLayer.h deleted file mode 100644 index d78b39e2b2..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesLayer.h +++ /dev/null @@ -1,230 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesLayer.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesLayer.h -/// \date February 14, 2008 - -#ifndef _vtkQtChartSeriesLayer_h -#define _vtkQtChartSeriesLayer_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartLayer.h" -#include // needed for return type - -class vtkQtChartContentsArea; -class vtkQtChartSeriesModel; -class vtkQtChartSeriesOptions; -class vtkQtChartSeriesSelection; -class vtkQtChartSeriesSelectionModel; -class QPointF; -class QRectF; - - -/// \class vtkQtChartSeriesLayer -/// \brief -/// The vtkQtChartSeriesLayer class is the base class for chart -/// layers that use the chart series model. -/// -/// It stores the pointer to the chart series model and the list of -/// options for the series. The series options are created using the -/// \c createOptions method. Subclasses should overload this method to -/// create the appropriate type of options object. -class VTKQTCHART_EXPORT vtkQtChartSeriesLayer : public vtkQtChartLayer -{ - Q_OBJECT - -public: - enum {Type = vtkQtChart_SeriesLayerType}; - -public: - vtkQtChartSeriesLayer(bool useContents=true); - virtual ~vtkQtChartSeriesLayer() {} - - /// \brief - /// Sets the chart area for the chart layer. - /// - /// If the model is set before the chart layer is added to a chart - /// area, series options will not be available. Setting the chart - /// area will create the series options for the model in this case. - /// Subclasses can extend this method to handle the new options. - /// - /// \param area The new chart area. - virtual void setChartArea(vtkQtChartArea *area); - - /// \brief - /// Gets the chart series model. - /// \return - /// A pointer to the chart series model. - vtkQtChartSeriesModel *getModel() const {return this->Model;} - - /// \brief - /// Sets the chart series model. - /// \param model The new chart series model. - virtual void setModel(vtkQtChartSeriesModel *model); - - /// \brief - /// Gets the drawing options for the given series. - /// \param series The index of the series. - /// \return - /// A pointer to the drawing options for the given series. - vtkQtChartSeriesOptions *getSeriesOptions(int series) const; - - /// \brief - /// Gets the index for the given series options. - /// \param options The series options object. - /// \return - /// The index for the given series options. - int getSeriesOptionsIndex(vtkQtChartSeriesOptions *options) const; - - /// \brief - /// Gets the icon for a given series. - /// - /// The icon is used by the chart legend. - /// - /// \param series The index of the series. - /// \return - /// A pixmap representation of the series. - virtual QPixmap getSeriesIcon(int series) const; - - /// \brief - /// Gets the chart series selection model. - /// \return - /// A pointer to the chart series selection model. - vtkQtChartSeriesSelectionModel *getSelectionModel() const; - - /// \brief - /// Gets the list of series at a given position. - /// \param point The position in scene coordinates. - /// \param selection Used to return the list of series. - virtual void getSeriesAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - /// \brief - /// Gets the list of points at a given position. - /// \param point The position in scene coordinates. - /// \param selection Used to return the list of points. - virtual void getPointsAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - /// \brief - /// Gets the list of series in a given area. - /// \param area The rectangle in scene coordinates. - /// \param selection Used to return the list of series. - virtual void getSeriesIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - - /// \brief - /// Gets the list of points in a given area. - /// \param area The rectangle in scene coordinates. - /// \param selection Used to return the list of points. - virtual void getPointsIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - -public slots: - /// \brief - /// Sets the contents x-axis offset. - /// \param offset The new x-axis offset. - void setXOffset(float offset); - - /// \brief - /// Sets the contents y-axis offset. - /// \param offset The new y-axis offset. - void setYOffset(float offset); - - /// Resets the series options for the model. - void resetSeriesOptions(); - -signals: - /// \brief - /// Emitted when the series model is changed. - /// \param previous The previous series model. - /// \param current The current series model. - void modelChanged(vtkQtChartSeriesModel *previous, - vtkQtChartSeriesModel *current); - - /// \brief - /// Emitted when the name or icon changes for a set of series. - /// \param first The first series index of the range. - /// \param last The last series index of the range. - void modelSeriesChanged(int first, int last); - - /// \brief - /// Emitted when the visibility for a series has changed. - /// \param series The index of the series. - /// \param visible True if the series is visible. - void modelSeriesVisibilityChanged(int series, bool visible); - -protected: - /// \brief - /// Creates an options object for a series. - /// \note - /// Subclasses should only create the options in this method. Use - /// the \c setupOptions to set up connections. - /// \param parent The parent of the options object. - /// \return - /// A pointer to a new options object. - /// \sa - /// vtkQtChaerSeriesLayer::setupOptions(vtkQtChartSeriesOptions *) - virtual vtkQtChartSeriesOptions *createOptions(QObject *parent) = 0; - - /// \brief - /// Sets up the options object. - /// - /// The style has been reserved and set before this method is called. - /// Signal connections should be set up here in order to avoid slot - /// calls during setup. - /// - /// \param options The newly created series options. - virtual void setupOptions(vtkQtChartSeriesOptions *options) = 0; - -private slots: - /// \brief - /// Inserts new options for the given series. - /// \param first The first index of the new series. - /// \param last The last index of the new series. - void insertSeriesOptions(int first, int last); - - /// \brief - /// Removes options for the given series. - /// \param first The first index of the series to remove. - /// \param last The last index of the series to remove. - void removeSeriesOptions(int first, int last); - -private: - /// Removes all the series options. - void clearOptions(); - -protected: - /// Stores the series/point selection. - vtkQtChartSeriesSelectionModel *Selection; - vtkQtChartSeriesModel *Model; ///< Stores the series model. - vtkQtChartContentsArea *Contents; ///< Used for panning. - -private: - /// Stores the series options. - QList Options; - -private: - vtkQtChartSeriesLayer(const vtkQtChartSeriesLayer &); - vtkQtChartSeriesLayer &operator=(const vtkQtChartSeriesLayer &); -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModel.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModel.h deleted file mode 100644 index 59a8d67283..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModel.h +++ /dev/null @@ -1,117 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesModel.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesModel.h -/// \date February 8, 2008 - -#ifndef _vtkQtChartSeriesModel_h -#define _vtkQtChartSeriesModel_h - -#include "vtkQtChartExport.h" -#include // Needed for return type. -#include // Needed for return type. - - -/// \class vtkQtChartSeriesModel -/// \brief -/// The vtkQtChartSeriesModel class is the base class for all chart -/// series models. -class VTKQTCHART_EXPORT vtkQtChartSeriesModel : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart series model. - /// \param parent The parent object. - vtkQtChartSeriesModel(QObject *parent=0); - virtual ~vtkQtChartSeriesModel() {} - - /// \brief - /// Gets the number of series in the model. - /// \return - /// The number of series in the model. - virtual int getNumberOfSeries() const = 0; - - /// \brief - /// Gets the number of values in a series. - /// \param series The series index. - /// \return - /// The number of values in a series. - virtual int getNumberOfSeriesValues(int series) const = 0; - - /// \brief - /// Gets the name for the given series. - /// \param series The series index. - /// \return - /// The name for the given series. - virtual QVariant getSeriesName(int series) const = 0; - - /// \brief - /// Gets the series value for the given index and component. - /// \param series The series index. - /// \param index The index in the given series. - /// \param component The component index. - /// \return - /// The series value for the given index and component. - virtual QVariant getSeriesValue(int series, int index, - int component) const = 0; - - /// \brief - /// Gets the value range for a series component. - /// \param series The series index. - /// \param component The component index. - /// \return - /// The value range for a series component. - virtual QList getSeriesRange(int series, int component) const = 0; - -signals: - /// Emitted when the model is about to be reset. - void modelAboutToBeReset(); - - /// Emitted when the model has been reset. - void modelReset(); - - /// \brief - /// Emitted when series will be inserted into the model. - /// \param first The first index to be added. - /// \param last The last index to be added. - void seriesAboutToBeInserted(int first, int last); - - /// \brief - /// Emitted when series have been inserted into the model. - /// \param first The first index that was inserted. - /// \param last The last index that was inserted. - void seriesInserted(int first, int last); - - /// \brief - /// Emitted when series will be removed from the model. - /// \param first The first index to be removed. - /// \param last The last index to be removed. - void seriesAboutToBeRemoved(int first, int last); - - /// \brief - /// Emitted when series have been removed from the model. - /// \param first The first index that was removed. - /// \param last The last index that was removed. - void seriesRemoved(int first, int last); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelCollection.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelCollection.h deleted file mode 100644 index a0cda25c41..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelCollection.h +++ /dev/null @@ -1,138 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesModelCollection.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesModelCollection.h -/// \date February 8, 2008 - -#ifndef _vtkQtChartSeriesModelCollection_h -#define _vtkQtChartSeriesModelCollection_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesModel.h" - - -/// \class vtkQtChartSeriesModelCollection -/// \brief -/// The vtkQtChartSeriesModelCollection class is used to combine -/// chart series models. -/// -/// The collection maps the overall series index to the model -/// specific series index. -class VTKQTCHART_EXPORT vtkQtChartSeriesModelCollection : - public vtkQtChartSeriesModel -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart series model collection. - /// \param parent The parent object. - vtkQtChartSeriesModelCollection(QObject *parent=0); - virtual ~vtkQtChartSeriesModelCollection() {} - - /// \name vtkQtChartSeriesModel Methods - //@{ - virtual int getNumberOfSeries() const; - virtual int getNumberOfSeriesValues(int series) const; - virtual QVariant getSeriesName(int series) const; - virtual QVariant getSeriesValue(int series, int index, int component) const; - virtual QList getSeriesRange(int series, int component) const; - //@} - - /// \brief - /// Adds a series model to the collection. - /// \param model The series model to add. - void addSeriesModel(vtkQtChartSeriesModel *model); - - /// \brief - /// Removes a series model from the collection. - /// \param model The series model to remove. - void removeSeriesModel(vtkQtChartSeriesModel *model); - - /// \brief - /// Gets the number of series models in the collection. - /// \return - /// The number of series models in the collection. - int getNumberOfSeriesModels() const; - - /// \brief - /// Gets the series model at the specified index. - /// \param index The series model index. - /// \return - /// A pointer to the series model. - vtkQtChartSeriesModel *getSeriesModel(int index) const; - -protected slots: - /// \brief - /// Called when a series is about to be inserted into a model. - /// - /// This method uses the signal sender to determine which model has - /// changed. It then maps the model series indexes to collection - /// series indexes and re-emits the signal. - /// - /// \param first The first model series index. - /// \param last The last model series index. - void onSeriesAboutToBeInserted(int first, int last); - - /// \brief - /// Called when a series is inserted into a model. - /// \param first The first model series index. - /// \param last The last model series index. - void onSeriesInserted(int first, int last); - - /// \brief - /// Called when a series is about to be removed from a model. - /// \param first The first model series index. - /// \param last The last model series index. - void onSeriesAboutToBeRemoved(int first, int last); - - /// \brief - /// Called when a series is removed from a model. - /// \param first The first model series index. - /// \param last The last model series index. - void onSeriesRemoved(int first, int last); - -private: - /// \brief - /// Gets the series model for the given index. - /// \param series The collection series index. Used to return the - /// model series index. - /// \return - /// A pointer to the series model. - vtkQtChartSeriesModel *modelForSeries(int &series) const; - - /// \brief - /// Gets the first series in the given model. - /// \param model The series model. - /// \return - /// The first series in the given model. - int seriesForModel(vtkQtChartSeriesModel *model) const; - -private: - QList Models; ///< Stores the models. - -private: - vtkQtChartSeriesModelCollection(const vtkQtChartSeriesModelCollection &); - vtkQtChartSeriesModelCollection &operator=( - const vtkQtChartSeriesModelCollection &); -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelRange.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelRange.h deleted file mode 100644 index 53d669e14b..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesModelRange.h +++ /dev/null @@ -1,103 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesModelRange.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesModelRange.h -/// \date February 19, 2008 - -#ifndef _vtkQtChartSeriesModelRange_h -#define _vtkQtChartSeriesModelRange_h - -#include "vtkQtChartExport.h" -#include -#include // Needed for return type. -#include // Needed for return type. - -class vtkQtChartSeriesModel; - - -/// \class vtkQtChartSeriesModelRange -/// \brief -/// The vtkQtChartSeriesModelRange class stores the series ranges -/// for a series model. -class VTKQTCHART_EXPORT vtkQtChartSeriesModelRange : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart series model range. - /// \param model The series model to use. - vtkQtChartSeriesModelRange(vtkQtChartSeriesModel *model); - ~vtkQtChartSeriesModelRange() {} - - /// \brief - /// Initializes the series ranges. - /// \param xShared True if the series share the same x-axis array. - void initializeRanges(bool xShared=false); - - /// \brief - /// Gets whether or not the series share the same x-axis array. - /// \return - /// True if the series share the same x-axis array. - bool isXRangeShared() const {return this->XRangeShared;} - - /// \brief - /// Gets the value range for a series component. - /// \param series The series index. - /// \param component The component index. - /// \return - /// The value range for a series component. - QList getSeriesRange(int series, int component) const; - -private slots: - /// Recalculates the series ranges. - void resetSeries(); - - /// \brief - /// Adds series ranges to the list. - /// - /// The range for each series is calculated when it is added. - /// - /// \param first The first series index. - /// \param last The last series index. - void insertSeries(int first, int last); - - /// \brief - /// Removes series ranges from the list. - /// \param first The first series index. - /// \param last The last series index. - void removeSeries(int first, int last); - -private: - /// \brief - /// Calculates the range for the given series component. - /// \param series The series index. - /// \param component The component index. - /// \return - /// The value range for a series component. - QList computeSeriesRange(int series, int component); - -private: - QList > Range[2]; ///< Stores the series ranges. - vtkQtChartSeriesModel *Model; ///< Stores the series model. - bool XRangeShared; ///< True if the series share the same x-axis array. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesOptions.h deleted file mode 100644 index 5015029632..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesOptions.h +++ /dev/null @@ -1,126 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesOptions.h -/// \date February 15, 2008 - -#ifndef _vtkQtChartSeriesOptions_h -#define _vtkQtChartSeriesOptions_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartStyleGenerator; -class QBrush; -class QPen; - - -/// \class vtkQtChartSeriesOptions -/// \brief -/// The vtkQtChartSeriesOptions class stores the common series -/// drawing options. -class VTKQTCHART_EXPORT vtkQtChartSeriesOptions : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a series options object. - /// \param parent The parent object. - vtkQtChartSeriesOptions(QObject *parent=0); - vtkQtChartSeriesOptions(const vtkQtChartSeriesOptions &other); - virtual ~vtkQtChartSeriesOptions(); - - vtkQtChartSeriesOptions &operator=(const vtkQtChartSeriesOptions &other); - - /// \brief - /// Gets the style generator index for the series. - /// \return - /// The style generator index for the series. - int getStyle() const {return this->Style;} - - /// \brief - /// Sets the style generator index for the series. - /// - /// This method only sets the style index. It can be overridden to - /// use the generator to set other series options. - /// - /// \param style The style index for the generator. - /// \param generator The style generator to use. - virtual void setStyle(int style, vtkQtChartStyleGenerator *generator); - - /// \brief - /// Gets whether or not the series should be visible. - /// \return - /// True if the series should be visible. - bool isVisible() const {return this->Visible;} - - /// \brief - /// Sets whether or not the series should be visible. - /// \param visible True if the series should be visible. - void setVisible(bool visible); - - /// \brief - /// Gets the series pen. - /// \return - /// A reference to the series pen. - const QPen &getPen() const; - - /// \brief - /// Sets the series pen. - /// \param pen The new series pen. - void setPen(const QPen &pen); - - /// \brief - /// Gets the series brush. - /// \return - /// A reference to the series brush. - const QBrush &getBrush() const; - - /// \brief - /// Sets the series brush. - /// \param brush The new series brush. - void setBrush(const QBrush &brush); - -signals: - /// \brief - /// Emitted when the series visibility option has changed. - /// \param visible True if the series should be displayed. - void visibilityChanged(bool visible); - - /// \brief - /// Emitted when the series pen option has changed. - /// \param pen The new series pen. - void penChanged(const QPen &pen); - - /// \brief - /// Emitted when the series brush option has changed. - /// \param brush The new series brush. - void brushChanged(const QBrush &brush); - -private: - QPen *Pen; ///< Stores the series pen. - QBrush *Brush; ///< Stores the series brush. - int Style; ///< Stores the style generator index. - bool Visible; ///< True if the series should be displayed. -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelection.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelection.h deleted file mode 100644 index 0438a53efc..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelection.h +++ /dev/null @@ -1,251 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesSelection.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesSelection.h -/// \date March 14, 2008 - -#ifndef _vtkQtChartSeriesSelection_h -#define _vtkQtChartSeriesSelection_h - -#include "vtkQtChartExport.h" -#include // needed for typedef -#include // needed for typedef - -typedef QList > vtkQtChartIndexRangeList; -typedef QPair vtkQtChartIndexRange; - - -/// \class vtkQtChartSeriesSelectionItem -/// \brief -/// The vtkQtChartSeriesSelectionItem class stores a list of index -/// ranges. -class VTKQTCHART_EXPORT vtkQtChartSeriesSelectionItem -{ -public: - vtkQtChartSeriesSelectionItem(); - vtkQtChartSeriesSelectionItem(int series); - vtkQtChartSeriesSelectionItem(const vtkQtChartSeriesSelectionItem &other); - ~vtkQtChartSeriesSelectionItem() {} - - vtkQtChartSeriesSelectionItem &operator=( - const vtkQtChartSeriesSelectionItem &other); - - int Series; ///< Stores the series index. - vtkQtChartIndexRangeList Points; ///< Stores the list of ranges. -}; - - -/// \class vtkQtChartSeriesSelection -/// \brief -/// The vtkQtChartSeriesSelection class is used for series and point -/// selection. -class VTKQTCHART_EXPORT vtkQtChartSeriesSelection -{ -public: - enum SelectionType - { - NoSelection = 0, ///< No selection is made. - SeriesSelection, ///< The selection contains series indexes. - PointSelection ///< The selection contains point indexes. - }; - -public: - vtkQtChartSeriesSelection(); - vtkQtChartSeriesSelection(const vtkQtChartSeriesSelection &other); - ~vtkQtChartSeriesSelection() {} - - /// \brief - /// Gets whether or not the selection is empty. - /// \return - /// True if the selection is empty. - bool isEmpty() const; - - /// \brief - /// Gets the selection type. - /// \return - /// The selection type. - SelectionType getType() const; - - /// Clears the selection lists. - bool clear(); - - /// \name Series Selection Methods - //@{ - /// \brief - /// Gets the list of selected series ranges. - /// \return - /// A reference to the list of selected series ranges. - const vtkQtChartIndexRangeList &getSeries() const; - - /// \brief - /// Sets the list of selected series ranges. - /// \param series The new list of selected series ranges. - /// \return - /// True if the selection was modified. - bool setSeries(const vtkQtChartIndexRangeList &series); - - /// \brief - /// Sets the list of selected series ranges. - /// \param series The series index range to select. - /// \return - /// True if the selection was modified. - bool setSeries(const vtkQtChartIndexRange &series); - - /// \brief - /// Adds the list of series ranges to the selection. - /// \param series The list of selected series ranges to add. - /// \return - /// True if the selection was modified. - bool addSeries(const vtkQtChartIndexRangeList &series); - - /// \brief - /// Adds the series index range to the selection. - /// \param series The series index range to add. - /// \return - /// True if the selection was modified. - bool addSeries(const vtkQtChartIndexRange &series); - - /// \brief - /// Subtracts the list of series ranges from the selection. - /// \param series The list of selected series ranges to subtract. - /// \return - /// True if the selection was modified. - bool subtractSeries(const vtkQtChartIndexRangeList &series); - - /// \brief - /// Subtracts the series index range from the selection. - /// \param series The series index range to subtract. - /// \return - /// True if the selection was modified. - bool subtractSeries(const vtkQtChartIndexRange &series); - - /// \brief - /// Selects unique series from the given list and the selection. - /// \param series The list of series ranges. - /// \return - /// True if the selection was modified. - bool xorSeries(const vtkQtChartIndexRangeList &series); - - /// \brief - /// Selects unique series from the given range and the selection. - /// \param series The series index range. - /// \return - /// True if the selection was modified. - bool xorSeries(const vtkQtChartIndexRange &series); - - /// \brief - /// Trims the selected series to the given bounds. - /// \param minimum The minimum series index. - /// \param maximum The maximum series index. - void limitSeries(int minimum, int maximum); - //@} - - /// \name Point Selection Methods - //@{ - /// \brief - /// Gets the list of selected point ranges. - /// \return - /// A reference to the list of selected point ranges. - const QList &getPoints() const; - - /// \brief - /// Sets the list of selected point ranges. - /// \param points The new list of selected point ranges. - /// \return - /// True if the selection was modified. - bool setPoints(const QList &points); - - /// \brief - /// Adds the list of point ranges to the selection. - /// \param points The list of selected point ranges to add. - /// \return - /// True if the selection was modified. - bool addPoints(const QList &points); - - /// \brief - /// Subtracts the list of point ranges from the selection. - /// \param points The list of selected point ranges to subtract. - /// \return - /// True if the selection was modified. - bool subtractPoints(const QList &points); - - /// \brief - /// Subtracts all the selected points in the given series from - /// the selection. - /// \param series The list of series ranges to subtract. - /// \return - /// True if the selection was modified. - bool subtractPoints(const vtkQtChartIndexRange &series); - - /// \brief - /// Selects unique points from the given list and the selection. - /// \param points The list of point ranges. - /// \return - /// True if the selection was modified. - bool xorPoints(const QList &points); - - /// \brief - /// Gets the list of series that have selected points. - /// \return - /// The list of series that have selected points. - QList getPointSeries() const; - - /// \brief - /// Trims the selected point indexes for the given series. - /// \param series The series index. - /// \param minimum The minimum point index. - /// \param maximum The maximum point index. - void limitPoints(int series, int minimum, int maximum); - //@} - - vtkQtChartSeriesSelection &operator=(const vtkQtChartSeriesSelection &other); - -private: - /// \brief - /// Adds the source ranges to the target ranges. - /// \param source The list of index ranges to add. - /// \param target The list of index ranges to be added to. - /// \return - /// True if the target list was modified in the union. - bool addRanges(const vtkQtChartIndexRangeList &source, - vtkQtChartIndexRangeList &target); - - /// \brief - /// Subtracts the source ranges from the target ranges. - /// \param source The list of index ranges to subtract. - /// \param target The list of index ranges to be subtracted from. - /// \return - /// True if the target list was modified in the subtraction. - bool subtractRanges(const vtkQtChartIndexRangeList &source, - vtkQtChartIndexRangeList &target); - - /// \brief - /// Trims the index ranges to be within the given bounds. - /// \param list The index ranges to limit. - /// \param minimum The minimum index. - /// \param maximum The maximum index. - void limitRanges(vtkQtChartIndexRangeList &list, int minimum, int maximum); - -private: - vtkQtChartIndexRangeList Series; ///< Stores the selected series. - QList Points; ///< Stores the selected points. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionHandler.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionHandler.h deleted file mode 100644 index 1e7dd45bf2..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionHandler.h +++ /dev/null @@ -1,115 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesSelectionHandler.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesSelectionHandler.h -/// \date March 19, 2008 - -#ifndef _vtkQtChartSeriesSelectionHandler_h -#define _vtkQtChartSeriesSelectionHandler_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartMouseSelectionHandler.h" - -class vtkQtChartSeriesLayer; -class vtkQtChartSeriesSelectionHandlerInternal; - - -/// \class vtkQtChartSeriesSelectionHandler -/// \brief -/// The vtkQtChartSeriesSelectionHandler class handles mouse -/// selection for chart series layers. -class VTKQTCHART_EXPORT vtkQtChartSeriesSelectionHandler : - public vtkQtChartMouseSelectionHandler -{ -public: - /// \brief - /// Creates a chart series selection handler. - /// \param parent The parent object. - vtkQtChartSeriesSelectionHandler(QObject *parent=0); - virtual ~vtkQtChartSeriesSelectionHandler(); - - /// \name Setup Methods - //@{ - /// \brief - /// Sets the mode names for series and point selection. - /// - /// Pass in an empty string to prevent that mode type. - /// - /// \param series The name of the series selection mode. - /// \param points The name of the point selection mode. - void setModeNames(const QString &series, const QString &points); - - /// \brief - /// Sets the allowed modifiers for the selection modes. - /// - /// If the shift modifier is allowed, the selection handler will - /// allow the user to select contiguous items. If the control - /// modifier is allowed, the selection handler will allow the user - /// to do xor selection. - /// - /// \param series The allowed series mode modifiers. - /// \param points The allowed point mode modifiers. - void setMousePressModifiers(Qt::KeyboardModifiers series, - Qt::KeyboardModifiers points); - - /// \brief - /// Gets the chart layer associated with the handler. - /// \return - /// A pointer to the chart layer. - vtkQtChartSeriesLayer *getLayer() const {return this->Layer;} - - /// \brief - /// Sets the chart layer associated with the handler. - /// \param layer The chart layer for the handler to use. - void setLayer(vtkQtChartSeriesLayer *layer) {this->Layer = layer;} - //@} - - /// \name vtkQtChartMouseSelectionHandler Methods - //@{ - virtual int getNumberOfModes() const; - virtual void getModeList(QStringList &list) const; - - virtual bool mousePressEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart); - virtual bool isMouseMoveAvailable(const QString &mode) const; - virtual void startMouseMove(const QString &mode, vtkQtChartArea *chart); - virtual void mouseMoveEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart); - virtual void finishMouseMove(const QString &mode, vtkQtChartArea *chart); - virtual bool mouseReleaseEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart); - virtual bool mouseDoubleClickEvent(const QString &mode, QMouseEvent *e, - vtkQtChartArea *chart); - //@} - -protected: - vtkQtChartSeriesLayer *Layer; ///< Stores the chart layer. - -private: - /// Stores the selection information. - vtkQtChartSeriesSelectionHandlerInternal *Internal; - -private: - vtkQtChartSeriesSelectionHandler(const vtkQtChartSeriesSelectionHandler &); - vtkQtChartSeriesSelectionHandler &operator=( - const vtkQtChartSeriesSelectionHandler &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionModel.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionModel.h deleted file mode 100644 index e114cf759c..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartSeriesSelectionModel.h +++ /dev/null @@ -1,221 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartSeriesSelectionModel.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartSeriesSelectionModel.h -/// \date March 14, 2008 - -#ifndef _vtkQtChartSeriesSelectionModel_h -#define _vtkQtChartSeriesSelectionModel_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartSeriesModel; -class vtkQtChartSeriesSelection; - - -/// \class vtkQtChartSeriesSelectionModel -/// \brief -/// The vtkQtChartSeriesSelectionModel class ties a series selection -/// to a series model. -class VTKQTCHART_EXPORT vtkQtChartSeriesSelectionModel : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a series selection model. - /// \param parent The parent object. - vtkQtChartSeriesSelectionModel(QObject *parent=0); - virtual ~vtkQtChartSeriesSelectionModel(); - - /// \brief - /// Gets the series model associated with the selection model. - /// \return - /// The series model associated with the selection model. - vtkQtChartSeriesModel *getModel() const {return this->Model;} - - /// \brief - /// Sets the series model associated with the selection model. - /// \param model The new series model. - void setModel(vtkQtChartSeriesModel *model); - - /// \brief - /// Gets whether or not the selection model is in an interactive - /// change. - /// \return - /// Trure if the selection model is in an interactive change. - /// \sa vtkQtChartSeriesSelectionModel::beginInteractiveChange() - bool isInInteractiveChange() const {return this->InInteractMode;} - - /// \brief - /// Called to begin an interactive selection change. - /// - /// Interactive selection changes such as a selection box can send - /// a lot of change signals as the user drags the mouse around. The - /// chart needs to update the selection based on those signals in - /// order for the user to see the changes. If an expensive process - /// is attached to the selection change signal, this can cause a - /// visible slow-down in the application. This method allows the - /// selection to keep the chart painter up to date while allowing - /// the expensive process to delay execution. - /// - /// The interactive controller should call this method before - /// starting a change such as with a selection box. It should call - /// the \c endInteractiveChange method when the interaction is done. - /// The expensive process should listen to the \c selectionChanged - /// and \c interactionFinished signals. The \c interactionFinished - /// is emitted at the end of the interactive change. In order to - /// keep track of non-interactive changes, the \c selectionChanged - /// signal must be monitored. This signal will be emitted for every - /// selection change. Therefore, the listening code should check - /// to see if the model is in an interactive change before executing - /// an expensive process. - void beginInteractiveChange(); - - /// \brief - /// Called to end an interactive selection change. - /// \sa vtkQtChartSeriesSelectionModel::beginInteractiveChange() - void endInteractiveChange(); - - /// \brief - /// Gets whether or not the selection is empty. - /// \return - /// True if the selection is empty. - bool isSelectionEmpty() const; - - /// \brief - /// Gets the current selection. - /// \return - /// A reference to the current selection. - const vtkQtChartSeriesSelection &getSelection() const; - - /// Selects all the model series. - void selectAllSeries(); - - /// Selects all the model points. - void selectAllPoints(); - - /// Clears the selection. - void selectNone(); - - /// Inverts the selection. - void selectInverse(); - - /// \brief - /// Sets the current selection. - /// \param selection The new selection. - void setSelection(const vtkQtChartSeriesSelection &selection); - - /// \brief - /// Adds to the current selection. - /// \param selection The selection to add. - void addSelection(const vtkQtChartSeriesSelection &selection); - - /// \brief - /// Subtracts from the current selection. - /// \param selection The selection to subtract. - void subtractSelection(const vtkQtChartSeriesSelection &selection); - - /// \brief - /// Performs an exclusive or between the specified selection and - /// the current selection. - /// \param selection The selection to modify the current selection. - void xorSelection(const vtkQtChartSeriesSelection &selection); - -signals: - /// \brief - /// Emitted when the selection changes. - /// \param list The list of selected series/points. - void selectionChanged(const vtkQtChartSeriesSelection &list); - - /// \brief - /// Emitted when an interactive selection change is finished. - /// - /// This signal can be used to delay expensive processes until - /// after the selection change is complete. - /// - /// \sa vtkQtChartSeriesSelectionModel::beginInteractiveChange() - void interactionFinished(); - -public slots: - /// \name Model Modification Handlers - //@{ - /// \brief - /// Begins the model reset process. - /// - /// The selection model is cleared. The selection changed signal - /// is emitted when the model finishes resetting. - void beginModelReset(); - - /// Ends the model reset process. - void endModelReset(); - - /// \brief - /// Begins the series insertion process. - /// - /// The indexes for the series in the selection model are updated - /// to reflect the changes. The selection changed signal is emitted - /// when the insertion is completed. - /// - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void beginInsertSeries(int first, int last); - - /// \brief - /// Ends the series insertion process. - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void endInsertSeries(int first, int last); - - /// \brief - /// Begins the series removal process. - /// - /// Any reference to the removed range is deleted from the selection - /// model. The selection indexes are updated to reflect the change. - /// The selection changed signal is emitted when the removal is - /// completed. - /// - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void beginRemoveSeries(int first, int last); - - /// \brief - /// Ends the series removal process. - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void endRemoveSeries(int first, int last); - //@} - -private: - /// \brief - /// Trims the selection to ranges valid for the model. - /// \param list The selection to limit. - void limitSelection(vtkQtChartSeriesSelection &list); - -private: - /// Stores the series selection. - vtkQtChartSeriesSelection *Selection; - vtkQtChartSeriesModel *Model; ///< A pointer to the model. - bool PendingSignal; ///< Used during model changes. - bool InInteractMode; ///< True if in interact mode. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShape.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShape.h deleted file mode 100644 index bd07ce4191..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShape.h +++ /dev/null @@ -1,152 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartShape.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartShape.h -/// \date November 13, 2008 - -#ifndef _vtkQtChartShape_h -#define _vtkQtChartShape_h - -#include "vtkQtChartExport.h" - -class QPointF; -class QPolygonF; -class QRectF; - - -/// \class vtkQtChartShape -/// \brief -/// The vtkQtChartShape class is the base class for shapes used in -/// the chart shape locators. -class VTKQTCHART_EXPORT vtkQtChartShape -{ -public: - enum BoundingBoxCode - { - Left = 0x01000000, ///< Left of bounding box. - Top = 0x00010000, ///< Above the bounding box. - Right = 0x00000100, ///< Right of bounding box. - Bottom = 0x00000001 ///< Below the bounding box. - }; - -public: - vtkQtChartShape(); - - /// \brief - /// Constructs a chart shape. - /// \param series The series index. - /// \param index The index in the given series. - vtkQtChartShape(int series, int index); - vtkQtChartShape(const vtkQtChartShape &other); - virtual ~vtkQtChartShape() {} - - vtkQtChartShape &operator=(const vtkQtChartShape &other); - - /// \brief - /// Gets the bounding box for the shape. - /// \param bounds Used to return the bounding box. - virtual void getBounds(QRectF &bounds) const = 0; - - /// \brief - /// Gets whether or not the shape contains the given point. - /// \param point The position to evaluate. - /// \return - /// True if the shape contains the given point. - virtual bool contains(const QPointF &point) const = 0; - - /// \brief - /// Gets whether or not the shape intersects the given area. - /// \param area The area to evaluate. - /// \return - /// True if the shape intersects the given area. - virtual bool intersects(const QRectF &area) const = 0; - - /// \brief - /// Sets the shape for rectangular types. - /// - /// This method can be used to set the shape. The default - /// implementation does nothing. This is useful for objects that - /// have a rectangular shape. - /// - /// \param rectangle The new shape. - /// \sa vtkQtChartShape::setPolygon(const QPolygonF &) - virtual void setRectangle(const QRectF &rectangle); - - /// \brief - /// Sets the shape for polygonal types. - /// - /// This method can be used to set the shape. The default - /// implementation does nothing. This is useful for objects that - /// have a polygonal shape. - /// - /// \param polygon The new shape. - /// \sa vtkQtChartShape::setRectangle(const QRectF &) - virtual void setPolygon(const QPolygonF &polygon); - - /// \brief - /// Gets the series number. - /// \return - /// The series number. - int getSeries() const {return this->Series;} - - /// \brief - /// Sets the series number. - /// \param series The new series number. - void setSeries(int series) {this->Series = series;} - - /// \brief - /// Gets the index in the series. - /// \return - /// The index in the series. - int getIndex() const {return this->Index;} - - /// \brief - /// Sets the index in the series. - /// \param index The new index in the series. - void setIndex(int index) {this->Index = index;} - -public: - /// \brief - /// Gets the bounding box code for the given point and rectangle. - /// - /// This method combines the x and y bounding box codes. - /// - /// \param point The position to evaluate. - /// \param bounds The bounding box. - static int getBoundingBoxCode(const QPointF &point, const QRectF &bounds); - - /// \brief - /// Gets the bounding box code for the given coordinate and rectangle. - /// \param x The x position to evaluate. - /// \param bounds The bounding box. - static int getXBoundingBoxCode(float x, const QRectF &bounds); - - /// \brief - /// Gets the bounding box code for the given coordinate and rectangle. - /// \param y The y position to evaluate. - /// \param bounds The bounding box. - static int getYBoundingBoxCode(float y, const QRectF &bounds); - -private: - int Series; ///< Stores the series. - int Index; ///< Stores the index. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShapeLocator.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShapeLocator.h deleted file mode 100644 index 8621278028..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartShapeLocator.h +++ /dev/null @@ -1,231 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartShapeLocator.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartShapeLocator.h -/// \date October 15, 2008 - -#ifndef _vtkQtChartShapeLocator_h -#define _vtkQtChartShapeLocator_h - -#include "vtkQtChartExport.h" -#include // Needed for parameter. -#include // Needed for parameter. - -class vtkQtChartShape; -class QPointF; -class QRectF; - - -/// \class vtkQtChartShapeLocatorNode -/// \brief -/// The vtkQtChartShapeLocatorNode class is used to build a tree of -/// chart shapes. -class VTKQTCHART_EXPORT vtkQtChartShapeLocatorNode -{ -public: - /// \brief - /// Constructs a chart shape locator node. - /// \param element The chart shape element to wrap. - vtkQtChartShapeLocatorNode(vtkQtChartShape *element=0); - ~vtkQtChartShapeLocatorNode(); - - /// \brief - /// Gets whether or not the bounding area contains the given point. - /// \param point The position to evaluate. - /// \return - /// True if the bounding area contains the given point. - bool contains(const QPointF &point) const; - - /// \brief - /// Gets whether or not the bounding area intersects the given area. - /// \param area The rectangle to evaluate. - /// \return - /// True if the bounding area intersects the given area. - bool intersects(const QRectF &area) const; - - /// \brief - /// Gets the bounding rectangle. - /// \return - /// The bounding rectangle. - const QRectF &getBounds() const {return *this->Bounds;} - - /// \brief - /// Sets the bounding rectangle. - /// \param bounds The new bounding rectangle. - void setBounds(const QRectF &bounds); - - /// \brief - /// Gets the chart shape element. - /// \return - /// A pointer to the chart shape element. - vtkQtChartShape *getElement() const {return this->Element;} - - /// \brief - /// Sets the chart shape element. - /// \param element The new chart shape element. - void setElement(vtkQtChartShape *element); - - /// \brief - /// Gets the parent node. - /// \return - /// A pointer to the parent node. - vtkQtChartShapeLocatorNode *getParent() const {return this->Parent;} - - /// \brief - /// Sets the parent node. - /// \param parent The new parent node. - void setParent(vtkQtChartShapeLocatorNode *parent) {this->Parent = parent;} - - /// \brief - /// Gets whether or not the node has children. - /// \return - /// True if the node has children. - bool hasChildren() const {return this->Nodes.size() > 0;} - - /// \brief - /// Gets the list of child nodes. - /// \return - /// The list of child nodes. - const QList &getNodes() const {return this->Nodes;} - - /// \brief - /// Gets the list of child nodes. - /// \return - /// The list of child nodes. - QList &getNodes() {return this->Nodes;} - - /// \brief - /// Updates the bounding rectangle. - /// - /// The bounding rectangle is the bounds of the element or the - /// bounds of the child nodes. - void updateBounds(); - -private: - QRectF *Bounds; ///< Stores the bounds. - vtkQtChartShape *Element; ///< Stores the shape. - vtkQtChartShapeLocatorNode *Parent; ///< Stores the parent node. - QList Nodes; ///< Stores the child nodes. - -private: - vtkQtChartShapeLocatorNode(const vtkQtChartShapeLocatorNode &); - vtkQtChartShapeLocatorNode &operator=(const vtkQtChartShapeLocatorNode &); -}; - - -/// \class vtkQtChartShapeLocator -/// \brief -/// The vtkQtChartShapeLocator class is used to locate shapes in a -/// tree structure. -/// -/// The tree is built from a table of shapes. The leaf nodes store the -/// shapes and use them for searches. The parent nodes in the tree use -/// the bounding rectangle for searches. The bounding rectangles can -/// be updated if the layout remains unchanged. -class VTKQTCHART_EXPORT vtkQtChartShapeLocator -{ -public: - vtkQtChartShapeLocator(); - ~vtkQtChartShapeLocator(); - - /// Removes all the tree items. - void clear(); - - /// \brief - /// Builds a shape tree from the ordered table of shapes. - /// - /// The shape pointers are stored by the tree and should not be - /// deleted until the tree has been cleared. - /// - /// \param table The ordered table of shapes. - void build(const QList > &table); - - /// \brief - /// Builds a shape tree from the list of shapes. - /// - /// The list of shapes should be sorted in the x-axis direction - /// before calling this method. The list will be divided into a - /// table and sorted in the y-axis direction before building the - /// tree. The shape pointers are stored by the tree and should not - /// be deleted until the tree has been cleared. - /// - /// \param list The list of shapes. - void build(const QList &list); - - /// \brief - /// Updates the bounding rectangles in the shape tree. - /// - /// The nodes are traversed from last to first. The bounding - /// rectangle of each node is updated using the shape if it is a - /// leaf or the bounds of the children otherwise. - void update(); - - /// \brief - /// Gets the shapes at the specified point. - /// \param point The point to search. - /// \return - /// The list of shapes at the given point. - QList getItemsAt(const QPointF &point) const; - - /// \brief - /// Gets the shapes in the specified rectangle. - /// \param area The rectangle to search. - /// \return - /// The list of shapes in the given rectangle. - QList getItemsIn(const QRectF &area) const; - - /// \brief - /// Gets the last node in the tree. - /// \return - /// A pointer to the last node in the tree. - vtkQtChartShapeLocatorNode *getLast(); - - /// \brief - /// Gets the previous node in the tree. - /// \param node The node to search from. - /// \return - /// A pointer to the previous node in the tree. - vtkQtChartShapeLocatorNode *getPrevious(vtkQtChartShapeLocatorNode *node); - -public: - /// \brief - /// Sorts the list of shapes according to the y value. - /// - /// The list of shapes is sorted by the y-axis value using a quick - /// sort algorithm. The list is sorted in place and non-recursively. - /// - /// \param list The list of shapes to be sorted. - static void sort(QList &list); - -private: - /// \brief - /// Builds a shape tree from the ordered table of items. - /// \param table the ordered table of items. - void build(QLinkedList > &table); - -private: - vtkQtChartShapeLocatorNode *Root; ///< Stores the root node. - -private: - vtkQtChartShapeLocator(const vtkQtChartShapeLocator &); - vtkQtChartShapeLocator &operator=(const vtkQtChartShapeLocator &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleGenerator.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleGenerator.h deleted file mode 100644 index 98b3ba611c..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleGenerator.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; -*- */ - -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartStyleGenerator.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartStyleGenerator.h -/// \date February 15, 2008 - -#ifndef __vtkQtChartStyleGenerator_h -#define __vtkQtChartStyleGenerator_h - -#include "vtkQtChartExport.h" -#include -#include // Needed for return value. -#include // Needed for return value. - - -/// \class vtkQtChartStyleGenerator -/// \brief -/// The vtkQtChartStyleGenerator class is the base class for all -/// series options generators. -class VTKQTCHART_EXPORT vtkQtChartStyleGenerator : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart style generator. - /// \param parent The parent object. - vtkQtChartStyleGenerator(QObject *parent=0); - virtual ~vtkQtChartStyleGenerator() {} - - /// \brief - /// Gets the brush for the specified series index. - /// \param index The series index. - /// \return - /// The brush for the specified series index. - virtual QBrush getSeriesBrush(int index) const = 0; - - /// \brief - /// Gets the pen for the specified series index. - /// \param index The series index. - /// \return - /// The pen for the specified series index. - virtual QPen getSeriesPen(int index) const = 0; -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleManager.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleManager.h deleted file mode 100644 index 08a3c1329a..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartStyleManager.h +++ /dev/null @@ -1,92 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartStyleManager.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartStyleManager.h -/// \date February 15, 2008 - -#ifndef _vtkQtChartStyleManager_h -#define _vtkQtChartStyleManager_h - - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartStyleGenerator; - - -/// \class vtkQtChartStyleManager -/// \brief -/// The vtkQtChartStyleManager class allows several chart layers -/// to share the same style generator. -/// -/// Sharing a style generator keeps the style from repeating. This is -/// useful when several chart layers are displayed in the same chart. -/// For example, a line chart and a bar chart can share a style -/// generator to make sure that none of the series are the same color. -class VTKQTCHART_EXPORT vtkQtChartStyleManager : public QObject -{ -public: - /// \brief - /// Creates a chart style manager. - /// \param parent The parent object. - vtkQtChartStyleManager(QObject *parent=0); - virtual ~vtkQtChartStyleManager() {} - - /// \brief - /// Gets the options generator. - /// \return - /// A pointer to the options generator. - vtkQtChartStyleGenerator *getGenerator(); - - /// \brief - /// Sets the options generator. - /// \param generator The new options generator. - void setGenerator(vtkQtChartStyleGenerator *generator); - - /// \brief - /// Reserves a style index for the style generator. - /// - /// The index returned is the lowest index available. If there are - /// empty spots from removals, the index will come from the first - /// empty spot. - /// - /// \return - /// The reserved style index for the style generator. - int reserveStyle(); - - /// \brief - /// Releases a series style index. - /// - /// When an index is released, the empty spot is saved so it can be - /// used for the next reservation. - /// - /// \param index The style index to release. - void releaseStyle(int index); - -private: - /// Stores the default style generator. - vtkQtChartStyleGenerator *DefaultGenerator; - - /// Stores the current style generator. - vtkQtChartStyleGenerator *Generator; - QList Ids; ///< Stores the list of available indexes. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTableSeriesModel.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTableSeriesModel.h deleted file mode 100644 index 8b44727021..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTableSeriesModel.h +++ /dev/null @@ -1,140 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartTableSeriesModel.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartTableSeriesModel.h -/// \date February 11, 2008 - -#ifndef _vtkQtChartTableSeriesModel_h -#define _vtkQtChartTableSeriesModel_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesModel.h" - -class vtkQtChartSeriesModelRange; -class QAbstractItemModel; -class QModelIndex; - - -/// \class vtkQtChartTableSeriesModel -/// \brief -/// The vtkQtChartTableSeriesModel class is a chart series model -/// proxy for a QAbstractItemModel table. -class VTKQTCHART_EXPORT vtkQtChartTableSeriesModel : - public vtkQtChartSeriesModel -{ - Q_OBJECT - -public: - /// \brief - /// Creates a table series model. - /// \param model The item model to display. - /// \param parent The parent object. - vtkQtChartTableSeriesModel(QAbstractItemModel *model, QObject *parent=0); - virtual ~vtkQtChartTableSeriesModel() {} - - /// \brief - /// Gets whether or not columns are series. - /// \return - /// True if columns are series. - bool getColumnsAsSeries() const; - - /// \brief - /// Sets whether or not columns are series. - /// \param columnsAsSeries True if columns are series. - void setColumnsAsSeries(bool columnsAsSeries); - - /// \name vtkQtChartSeriesModel Methods - //@{ - virtual int getNumberOfSeries() const; - virtual int getNumberOfSeriesValues(int series) const; - virtual QVariant getSeriesName(int series) const; - virtual QVariant getSeriesValue(int series, int index, int component) const; - virtual QList getSeriesRange(int series, int component) const; - //@} - -protected slots: - /// \brief - /// Called when the item model is about to insert rows. - /// \param index The parent model index. - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void rowsAboutToBeInserted(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model has inserted rows. - /// \param index The parent model index. - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void rowsInserted(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model is about to insert columns. - /// \param index The parent model index. - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void columnsAboutToBeInserted(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model has inserted columns. - /// \param index The parent model index. - /// \param first The first index of the insertion range. - /// \param last The last index of the insertion range. - void columnsInserted(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model is about to remove rows. - /// \param index The parent model index. - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void rowsAboutToBeRemoved(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model has removed rows. - /// \param index The parent model index. - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void rowsRemoved(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model is about to remove columns. - /// \param index The parent model index. - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void columnsAboutToBeRemoved(const QModelIndex &index, int first, int last); - - /// \brief - /// Called when the item model has removed columns. - /// \param index The parent model index. - /// \param first The first index of the removal range. - /// \param last The last index of the removal range. - void columnsRemoved(const QModelIndex &index, int first, int last); - -protected: - QAbstractItemModel *Model; ///< Stores the item model. - vtkQtChartSeriesModelRange *Range; ///< Stores the series ranges. - bool ColumnsAsSeries; ///< True if columns are series. - -private: - vtkQtChartTableSeriesModel(const vtkQtChartTableSeriesModel &); - vtkQtChartTableSeriesModel &operator=(const vtkQtChartTableSeriesModel &); -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTitle.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTitle.h deleted file mode 100644 index 28f34d98ea..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartTitle.h +++ /dev/null @@ -1,125 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartTitle.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartTitle.h -/// \date 11/17/2006 - -#ifndef _vtkQtChartTitle_h -#define _vtkQtChartTitle_h - - -#include "vtkQtChartExport.h" -#include -#include // Needed for return type - -class QPainter; - - -/// \class vtkQtChartTitle -/// \brief -/// The vtkQtChartTitle class is used to draw a chart title. -/// -/// The text for the title can be drawn horizontally or vertically. -/// This allows the title to be used on a vertical axis. -class VTKQTCHART_EXPORT vtkQtChartTitle : public QWidget -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart title instance. - /// \param orient The orientation of the title. - /// \param parent The parent widget. - vtkQtChartTitle(Qt::Orientation orient=Qt::Horizontal, QWidget *parent=0); - virtual ~vtkQtChartTitle() {} - - /// \brief - /// Gets the orientation of the chart title. - /// \return - /// The orientation of the chart title. - Qt::Orientation getOrientation() const {return this->Orient;} - - /// \brief - /// Sets the orientation of the chart title. - /// \param orient The orientation of the title. - void setOrientation(Qt::Orientation orient); - - /// \brief - /// Gets the chart title text. - /// \return - /// The chart title text. - QString getText() const {return this->Text;} - - /// \brief - /// Sets the chart title text. - /// \param text The text to display. - void setText(const QString &text); - - /// \brief - /// Gets the text alignment flags for the title. - /// \return - /// The text alignment flags for the title. - int getTextAlignment() const {return this->Align;} - - /// \brief - /// Sets the text alignment flags for the title. - /// \param flags The text alignment flags to use. - void setTextAlignment(int flags) {this->Align = flags;} - - /// \brief - /// Gets the preferred size of the chart title. - /// \return - /// The preferred size of the chart title. - virtual QSize sizeHint() const {return this->Bounds;} - - /// \brief - /// Draws the title using the given painter. - /// \param painter The painter to use. - void drawTitle(QPainter &painter); - -signals: - /// Emitted when the title orientation has changed. - void orientationChanged(); - -protected: - /// \brief - /// Updates the layout when the font changes. - /// \param e Event specific information. - /// \return - /// True if the event was handled. - virtual bool event(QEvent *e); - - /// \brief - /// Draws the chart title. - /// \param e Event specific information. - virtual void paintEvent(QPaintEvent *e); - -private: - /// Calculates the preferred size of the chart title. - void calculateSize(); - -private: - QString Text; ///< Stores the display text. - QSize Bounds; ///< Stores the preferred size. - Qt::Orientation Orient; ///< Stores the title orientation. - int Align; ///< Stores the text alignment flags. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartWidget.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartWidget.h deleted file mode 100644 index 625c8a185c..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartWidget.h +++ /dev/null @@ -1,164 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartWidget.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartWidget.h -/// \date 11/21/2006 - -#ifndef _vtkQtChartWidget_h -#define _vtkQtChartWidget_h - - -#include "vtkQtChartExport.h" -#include -#include "vtkQtChartAxis.h" // Needed for enum - -class vtkQtChartLegend; -class vtkQtChartTitle; -class vtkQtChartArea; -class QGridLayout; -class QHBoxLayout; -class QPrinter; -class QString; -class QStringList; -class QVBoxLayout; - - - -/// \class vtkQtChartWidget -/// \brief -/// The vtkQtChartWidget class is a container for the chart widgets. -/// -/// The main charting widget is the chart area. It holds the chart -/// layers. The title and legend widgets are arranged around the -/// chart area. A title can be added for each axis as well as an -/// overall title for the chart. -/// -/// The main chart area is created and owned by the chart widget. The -/// other widgets should be created and passed in. -class VTKQTCHART_EXPORT vtkQtChartWidget : public QWidget -{ - Q_OBJECT - -public: - /// \brief - /// Creates a chart widget instance. - /// \param parent The parent widget. - vtkQtChartWidget(QWidget *parent=0); - virtual ~vtkQtChartWidget(); - - /// \brief - /// Gets the overall title for the chart. - /// \return - /// A pointer to the overall title for the chart. - vtkQtChartTitle *getTitle() const {return this->Title;} - - /// \brief - /// Sets the overall title for the chart. - /// \param title The new chart title. - void setTitle(vtkQtChartTitle *title); - - /// \brief - /// Gets the chart legend. - /// \return - /// A pointer to the chart legend. - vtkQtChartLegend *getLegend() const {return this->Legend;} - - /// \brief - /// Sets the chart legend. - /// \param legend The new chart legend. - void setLegend(vtkQtChartLegend *legend); - - /// \brief - /// Gets the main chart area. - /// \return - /// A pointer to the main chart area. - vtkQtChartArea *getChartArea() const {return this->Charts;} - - /// \brief - /// Gets the title for the given axis location. - /// \param axis The axis location on the chart. - /// \return - /// A pointer to the axis title. - vtkQtChartTitle *getAxisTitle(vtkQtChartAxis::AxisLocation axis) const; - - /// \brief - /// Sets the title for the given axis location. - /// \param axis The axis location on the chart. - /// \param title The new axis title. - void setAxisTitle(vtkQtChartAxis::AxisLocation axis, vtkQtChartTitle *title); - - /// \brief - /// Gets the preferred size of the chart. - /// \return - /// The preferred size of the chart. - virtual QSize sizeHint() const; - -public slots: - /// \brief - /// Prints the chart using the given printer. - /// \param printer The printer to use. - void printChart(QPrinter &printer); - - /// \brief - /// Saves a screenshot of the chart to the given files. - /// \param files The list of files to write. - void saveChart(const QStringList &files); - - /// \brief - /// Saves a screenshot of the chart to the given file. - /// \param filename The name of the file to write. - void saveChart(const QString &filename); - -signals: - /// \brief - /// Emitted when a new chart title has been set. - /// \param title The new chart title. - void newChartTitle(vtkQtChartTitle *title); - - /// \brief - /// Emitted when a new chart legend has been set. - /// \param legend The new chart legend. - void newChartLegend(vtkQtChartLegend *legend); - - /// \brief - /// Emitted when a new axis title has been set. - /// \param axis The axis location. - /// \param title The new axis title. - void newAxisTitle(vtkQtChartAxis::AxisLocation axis, vtkQtChartTitle *title); - -private slots: - /// Moves the legend when the location changes. - void changeLegendLocation(); - -private: - vtkQtChartTitle *Title; ///< Stores the chart title. - vtkQtChartLegend *Legend; ///< Stores the chart legend. - vtkQtChartArea *Charts; ///< Stores the chart area. - vtkQtChartTitle *LeftTitle; ///< Stores the left axis title. - vtkQtChartTitle *TopTitle; ///< Stores the top axis title. - vtkQtChartTitle *RightTitle; ///< Stores the right axis title. - vtkQtChartTitle *BottomTitle; ///< Stores the bottom axis title. - QVBoxLayout *TitleLayout; ///< Layout for the chart title. - QGridLayout *LegendLayout; ///< Layout for the chart legend. - QVBoxLayout *TopLayout; ///< Layout for the top and bottom titles. - QHBoxLayout *ChartLayout; ///< Layout for the chart and other titles. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartZoomHistory.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartZoomHistory.h deleted file mode 100644 index b703b520b4..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtChartZoomHistory.h +++ /dev/null @@ -1,211 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtChartZoomHistory.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtChartZoomHistory.h -/// \date 2/7/2008 - -#ifndef _vtkQtChartZoomHistory_h -#define _vtkQtChartZoomHistory_h - - -#include "vtkQtChartExport.h" - -class vtkQtChartZoomHistoryInternal; - - -/// \class vtkQtChartZoomViewport -/// \brief -/// The vtkQtChartZoomViewport class stores the position and zoom -/// factors for a viewport. -/// -/// The position stores the top-left corner of the viewport in -/// content coordinates. The zoom factors are stored as percentages. -class VTKQTCHART_EXPORT vtkQtChartZoomViewport -{ -public: - vtkQtChartZoomViewport(); - ~vtkQtChartZoomViewport() {} - - /// \brief - /// Sets the viewport position coordinates. - /// \param x The x coordinate. - /// \param y The y coordinate. - /// \sa vtkQtChartZoomViewport::getXPosition(), - /// vtkQtChartZoomViewport::getYPosition() - void setPosition(float x, float y); - - /// \brief - /// Sets the zoom percentages. - /// \param x The x-axis zoom factor. - /// \param y The y-axis zoom factor. - /// \sa vtkQtChartZoomViewport::getXZoom(), - /// vtkQtChartZoomViewport::getYZoom() - void setZoom(float x, float y); - - /// \brief - /// Gets the x coordinate of the viewport. - /// \return - /// The x coordinate of the viewport. - /// \sa vtkQtChartZoomViewport::setPosition(float, float) - float getXPosition() const {return this->X;} - - /// \brief - /// Gets the y coordinate of the viewport. - /// \return - /// The y coordinate of the viewport. - /// \sa vtkQtChartZoomViewport::setPosition(float, float) - float getYPosition() const {return this->Y;} - - /// \brief - /// Gets the x-axis zoom factor. - /// \return - /// The x-axis zoom factor. - /// \sa vtkQtChartZoomViewport::setZoom(float, float) - float getXZoom() const {return this->XFactor;} - - /// \brief - /// Gets the y-axis zoom factor. - /// \return - /// The y-axis zoom factor. - /// \sa vtkQtChartZoomViewport::setZoom(float, float) - float getYZoom() const {return this->YFactor;} - -private: - float X; ///< Stores the x position coordinate. - float Y; ///< Stores the y position coordinate. - float XFactor; ///< Stores the x-axis zoom factor. - float YFactor; ///< Stores the y-axis zoom factor. -}; - - -/// \class vtkQtChartZoomHistory -/// \brief -/// The vtkQtChartZoomHistory class stores a list of -/// vtkQtChartZoomViewport objects. -/// -/// The zoom history contains a list of zoom viewports. The list is -/// ordered chronologically, and contains an index to the current item. -/// The history list is limited to a certain number of items. The -/// default limit is 10, but it can be changed using the \c setLimit -/// method. -/// -/// When adding items to the history list, the new item will become -/// the current item. The front of the list may be trimmed to stay -/// within limits. If the current item is in the middle of the list, -/// the subsequent items will be removed before adding the new item -/// to the end of the list. -/// -/// The history list is navigated using the \c getPrevious and -/// \c getNext methods. You can also use the \c getCurrent method to -/// get the current item without changing the index. -/// -/// \sa vtkQtChartZoomHistory::setLimit(int), -/// vtkQtChartZoomHistory::addHistory(float, float, float, float), -/// vtkQtChartZoomHistory::getNext(), -/// vtkQtChartZoomHistory::getPrevious(), -/// vtkQtChartZoomHistory::getCurrent() -class VTKQTCHART_EXPORT vtkQtChartZoomHistory -{ -public: - vtkQtChartZoomHistory(); - ~vtkQtChartZoomHistory(); - - /// \brief - /// Sets the maximum number of items in the history. - /// \param limit The maximum number of entries. - void setLimit(int limit); - - /// \brief - /// Gets the maximum number of items in the history. - /// \return - /// The maximum number of entries. - int getLimit() const {return this->Allowed;} - - /// \brief - /// Adds a zoom viewport to the history list. - /// - /// The new item will become the current item in the list. If the - /// current item is not at the end of the list, all the subsequent - /// items will be removed. If the list is longer than the allowed - /// limit, items will be removed from the front of the list. - /// - /// \param x The x position of the viewport. - /// \param y The y position of the viewport. - /// \param xZoom The x-axis zoom factor for the viewport. - /// \param yZoom The y-axis zoom factor for the viewport. - /// \sa vtkQtChartZoomHistory::updatePosition(float, float) - void addHistory(float x, float y, float xZoom, float yZoom); - - /// \brief - /// Used to update the viewport position for the current - /// zoom factors. - /// - /// This method allows the current zoom viewport to be updated when - /// the user changes the viewport position by panning or scrolling. - /// - /// \param x The x position of the viewport. - /// \param y The y position of the viewport. - /// \sa vtkQtChartZoomHistory::addHistory(float, float, float, float) - void updatePosition(float x, float y); - - /// \brief - /// Gets whether or not a zoom viewport is before the current. - /// \return - /// True if a zoom viewport is before the current. - bool isPreviousAvailable() const; - - /// \brief - /// Gets whether or not a zoom viewport is after the current. - /// \return - /// True if a zoom viewport is after the current. - bool isNextAvailable() const; - - /// \brief - /// Gets the current zoom viewport. - /// \return - /// A pointer to the current zoom viewport or null if the list - /// is empty. - const vtkQtChartZoomViewport *getCurrent() const; - - /// \brief - /// Gets the previous zoom viewport in the history. - /// \return - /// A pointer to the previous zoom viewport or null if the - /// beginning of the list is reached. - /// \sa vtkQtChartZoomHistory::getNext() - const vtkQtChartZoomViewport *getPrevious(); - - /// \brief - /// Gets the next zoom viewport in the history. - /// \return - /// A pointer to the next zoom viewport or null if the end - /// of the list is reached. - /// \sa vtkQtChartZoomHistory::getPrevious() - const vtkQtChartZoomViewport *getNext(); - -private: - /// Stores the zoom viewport list. - vtkQtChartZoomHistoryInternal *Internal; - - int Current; ///< Stores the current item index. - int Allowed; ///< Stores the list length limit. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChart.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChart.h deleted file mode 100644 index fabb4f1f01..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChart.h +++ /dev/null @@ -1,235 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtLineChart.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtLineChart.h -/// \date February 14, 2008 - -#ifndef _vtkQtChartLineLayer_h -#define _vtkQtChartLineLayer_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesLayer.h" - -class vtkQtLineChartInternal; -class vtkQtLineChartOptions; -class vtkQtLineChartSeriesOptions; - - -/// \class vtkQtLineChart -/// \brief -/// The vtkQtLineChart class is used to display a line chart. -class VTKQTCHART_EXPORT vtkQtLineChart : public vtkQtChartSeriesLayer -{ - Q_OBJECT - -public: - enum {Type = vtkQtChart_LineChartType}; - -public: - vtkQtLineChart(); - virtual ~vtkQtLineChart(); - - /// \name Setup Methods - //@{ - virtual void setChartArea(vtkQtChartArea *area); - - virtual void setModel(vtkQtChartSeriesModel *model); - //@} - - /// \name Drawing Parameters - //@{ - /// \brief - /// Gets the line chart drawing options. - /// \return - /// A pointer to the line chart drawing options. - vtkQtLineChartOptions *getOptions() const {return this->Options;} - - /// \brief - /// Sets the line chart drawing options. - /// - /// This method sets all the options at once, which can prevent - /// unnecessary view updates. - /// - /// \param options The new line chart drawing options. - void setOptions(const vtkQtLineChartOptions &options); - - /// \brief - /// Gets the line chart series options. - /// \param series The series index. - /// \return - /// A pointer to the line chart series options. - vtkQtLineChartSeriesOptions *getLineSeriesOptions(int series) const; - - virtual QPixmap getSeriesIcon(int series) const; - //@} - - /// \name Layout Methods - //@{ - virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; - - virtual void layoutChart(const QRectF &area); - - virtual bool getHelpText(const QPointF &point, QString &text); - - /// \brief - /// Notifies the chart layer that a resize interaction has finished. - /// - /// The chart search trees are not updated while the chart is in an - /// interactive state. It is updated in this method if needed. - virtual void finishInteractiveResize(); - //@} - - /// \name Selection Methods - //@{ - virtual void getSeriesAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getSeriesIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - //@} - - /// \name QGraphicsItem Methods - //@{ - virtual QRectF boundingRect() const; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget); - //@} - -public slots: - /// \brief - /// Refreshes the line chart data from the model. - /// - /// The currently displayed data is cleaned up. If a model is set, - /// it is used to populate the line chart. - void reset(); - -protected: - /// \brief - /// Creates a new line chart series options object. - /// \param parent The parent object. - /// \return - /// A pointer to the new line chart series options object. - virtual vtkQtChartSeriesOptions *createOptions(QObject *parent); - - /// \brief - /// Sets up the series options defaults. - /// \param options The new series options object. - virtual void setupOptions(vtkQtChartSeriesOptions *options); - -private slots: - /// \brief - /// Prepares the line chart for a series insertion. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void prepareSeriesInsert(int first, int last); - - /// \brief - /// Inserts line chart series at the given indexes. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void insertSeries(int first, int last); - - /// \brief - /// Removes the specified series from the chart. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void startSeriesRemoval(int first, int last); - - /// \brief - /// Finishes removing the series by updating the layout. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void finishSeriesRemoval(int first, int last); - - /// \brief - /// Changes the series visibility. - /// - /// The signal sender is used to determine which series has changed. - /// - /// \param visible True if the series should be shown. - void handleSeriesVisibilityChange(bool visible); - - /// \brief - /// Changes the series axes corner. - /// - /// Both of the domains are updated for the change. - /// - /// \param corner The new axes corner. - /// \param previous The previous axes corner. - void handleSeriesAxesCornerChange(int corner, int previous); - - /// \brief - /// Changes the series point visibility. - /// \param visible True if the series points should be shown. - void handleSeriesPointVisibilityChange(bool visible); - - /// Changes the series point marker. - void handleSeriesPointMarkerChange(); - - /// \brief - /// Changes the series pen. - /// \param pen The new series pen. - void handleSeriesPenChange(const QPen &pen); - - /// \brief - /// Changes the series brush. - /// \param brush The new series brush. - void handleSeriesBrushChange(const QBrush &brush); - - /// \brief - /// Called to update the highlights. - /// - /// The update request is ignored if the model is being changed. - void updateHighlights(); - -private: - /// \brief - /// Adds the domain for the given series to the given domain. - /// \param series The series index. - /// \param corner Which domain set to update. - /// \param seriesGroup Used to return the domain group. - /// \return - /// True if the domain was modified. - bool addSeriesDomain(int series, vtkQtChartLayer::AxesCorner corner, - int *seriesGroup); - - /// \brief - /// Calculates the domain for the given series group. - /// \param seriesGroup The series group index. - /// \param corner Which domain set to update. - void calculateDomain(int seriesGroup, vtkQtChartLayer::AxesCorner corner); - - /// Builds the search trees for the line chart. - void buildTree(); - -private: - vtkQtLineChartInternal *Internal; ///< Stores the view data. - vtkQtLineChartOptions *Options; ///< Stores the drawing options. - bool InModelChange; ///< Used for selection changes. - bool BuildNeeded; ///< Used when resizing interactively. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartOptions.h deleted file mode 100644 index 4742e21b4a..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartOptions.h +++ /dev/null @@ -1,79 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtLineChartOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtLineChartOptions.h -/// \date June 6, 2008 - -#ifndef _vtkQtLineChartOptions_h -#define _vtkQtLineChartOptions_h - -#include "vtkQtChartExport.h" -#include - -class vtkQtChartHelpFormatter; - - -/// \class vtkQtLineChartOptions -/// \brief -/// The vtkQtLineChartOptions class stores the line chart options. -class VTKQTCHART_EXPORT vtkQtLineChartOptions : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a line chart options instance. - /// \param parent The parent object. - vtkQtLineChartOptions(QObject *parent=0); - - /// \brief - /// Makes a copy of another line chart options instance. - /// \param other The line chart options to copy. - vtkQtLineChartOptions(const vtkQtLineChartOptions &other); - virtual ~vtkQtLineChartOptions(); - - /// \brief - /// Gets the chart help text formatter. - /// - /// The help text formatter stores the format string. It is also - /// used to generate the help text. - /// - /// \return - /// A pointer to the chart help text formatter. - vtkQtChartHelpFormatter *getHelpFormat() {return this->Help;} - - /// \brief - /// Gets the chart help text formatter. - /// \return - /// A pointer to the chart help text formatter. - const vtkQtChartHelpFormatter *getHelpFormat() const {return this->Help;} - - /// \brief - /// Makes a copy of another line chart options instance. - /// \param other The line chart options to copy. - /// \return - /// A reference to the object being assigned. - vtkQtLineChartOptions &operator=(const vtkQtLineChartOptions &other); - -private: - vtkQtChartHelpFormatter *Help; ///< Stores the help text format. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartSeriesOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartSeriesOptions.h deleted file mode 100644 index 04cfded15f..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtLineChartSeriesOptions.h +++ /dev/null @@ -1,128 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtLineChartSeriesOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtLineChartSeriesOptions.h -/// \date February 15, 2008 - -#ifndef _vtkQtLineChartSeriesOptions_h -#define _vtkQtLineChartSeriesOptions_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesOptions.h" -#include "vtkQtChartLayer.h" // needed for enum -#include "vtkQtPointMarker.h" // needed for enum - -class QSizeF; - - -/// \class vtkQtLineChartSeriesOptions -/// \brief -/// The vtkQtLineChartSeriesOptions class stores the options for a -/// line chart series. -class VTKQTCHART_EXPORT vtkQtLineChartSeriesOptions : - public vtkQtChartSeriesOptions -{ - Q_OBJECT - -public: - /// \brief - /// Creates a line chart series options object. - /// \param parent The parent object. - vtkQtLineChartSeriesOptions(QObject *parent=0); - virtual ~vtkQtLineChartSeriesOptions(); - - /// \brief - /// Sets the style generator index for the series. - /// - /// This method uses the style generator to assign the initial pen - /// for the series. - /// - /// \param style The style index for the generator. - /// \param generator The style generator to use. - virtual void setStyle(int style, vtkQtChartStyleGenerator *generator); - - /// \brief - /// Gets the axes corner for the series. - /// \return - /// The axes corner for the series. - vtkQtChartLayer::AxesCorner getAxesCorner() const; - - /// \brief - /// Sets the axes corner for the series. - /// \param axes The new axes corner for the series. - void setAxesCorner(vtkQtChartLayer::AxesCorner axes); - - /// \brief - /// Gets whether or not the series points should be visible. - /// \return - /// True if the series points should be visible. - bool arePointsVisible() const {return this->ShowPoints;} - - /// \brief - /// Sets whether or not the series points should be visible. - /// \param visible True if the series points should be visible. - void setPointsVisible(bool visible); - - /// \brief - /// Gets the series marker style. - /// \return - /// The series marker style. - vtkQtPointMarker::MarkerStyle getMarkerStyle() const; - - /// \brief - /// Sets the series marker style. - /// \param style The new series marker style. - void setMarkerStyle(vtkQtPointMarker::MarkerStyle style); - - /// \brief - /// Gets the marker size for the series. - /// \return - /// A reference to the series marker size. - const QSizeF &getMarkerSize() const; - - /// \brief - /// Sets the marker size for the series. - /// \param size The new series marker size. - void setMarkerSize(const QSizeF &size); - -signals: - /// \brief - /// Emitted when the series axes corner changes. - /// \param corner The new axes corner. - /// \param previous The previous axes corner. - void axesCornerChanged(int corner, int previous); - - /// \brief - /// Emitted when the series point visibility changes. - /// \param visible True if the series points should be visible. - void pointVisibilityChanged(bool visible); - - /// Emitted when the point marker style or size has changed. - void pointMarkerChanged(); - -protected: - vtkQtChartLayer::AxesCorner AxesCorner; ///< Stores the axes corner. - vtkQtPointMarker::MarkerStyle PointStyle; ///< Stores the marker style. - QSizeF *PointSize; ///< Stores the marker size. - bool ShowPoints; ///< True if points are shown. -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPointMarker.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPointMarker.h deleted file mode 100755 index b26f24d304..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPointMarker.h +++ /dev/null @@ -1,72 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtPointMarker.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtPointMarker.h -/// \date February 12, 2008 - -#ifndef _vtkQtPointMarker_h -#define _vtkQtPointMarker_h - - -#include "vtkQtChartExport.h" -#include -#include - -class QPainter; - - -/// \class vtkQtPointMarker -/// \brief -/// The vtkQtPointMarker class is used to draw a shape at a point. -class VTKQTCHART_EXPORT vtkQtPointMarker -{ -public: - enum MarkerStyle - { - Cross = 0, ///< Draws a cross. - Plus, ///< Draws a plus. - Square, ///< Draws a square. - Circle, ///< Draws a circle. - Diamond, ///< Draws a diamond. - - /// The next available style for extension classes. - UserStyle = 32 - }; - -public: - vtkQtPointMarker(const QSizeF &size, MarkerStyle style=Circle); - virtual ~vtkQtPointMarker(); - - virtual void paint(QPainter *painter); - - QSizeF getSize() const; - void setSize(const QSizeF &size); - - MarkerStyle getStyle() const {return this->Style;} - void setStyle(MarkerStyle style); - -protected: - QRectF Rect; - -private: - MarkerStyle Style; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPolylineItem.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPolylineItem.h deleted file mode 100644 index 4bd4e390ce..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtPolylineItem.h +++ /dev/null @@ -1,69 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtPolylineItem.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtPolylineItem.h -/// \date February 6, 2008 - -#ifndef _vtkQtPolylineItem_h -#define _vtkQtPolylineItem_h - -#include "vtkQtChartExport.h" -#include - -#include "vtkQtChartGraphicsItemTypes.h" // needed for enum - -class QPen; -class QPolygonF; - - -class VTKQTCHART_EXPORT vtkQtPolylineItem : public QGraphicsItem -{ -public: - enum {Type = vtkQtChart_PolylineItemType}; - -public: - vtkQtPolylineItem(QGraphicsItem *parent=0, QGraphicsScene *scene=0); - virtual ~vtkQtPolylineItem(); - - const QPen& pen() const; - void setPen(const QPen& p); - - void setPolyline(const QPolygonF& line); - const QPolygonF& polyline() const; - - virtual int type() const {return vtkQtPolylineItem::Type;} - virtual QRectF boundingRect() const; - virtual QPainterPath shape() const; - virtual bool contains(const QPointF &point) const; - - virtual void paint(QPainter* p, const QStyleOptionGraphicsItem* option, - QWidget* widget); - -private: - bool doesLineCrossBox(const QPointF &point1, const QPointF &point2, - const QRectF &box) const; - -protected: - QPen* Pen; - QPolygonF* Polyline; -}; - -#endif - diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtSeriesFilterLineEdit.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtSeriesFilterLineEdit.h deleted file mode 100755 index 0c6a539619..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtSeriesFilterLineEdit.h +++ /dev/null @@ -1,54 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtSeriesFilterLineEdit.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtSeriesFilterLineEdit.h -/// \date February 12, 2008 - -#ifndef _vtkQtSeriesFilterLineEdit_h -#define _vtkQtSeriesFilterLineEdit_h - -#include "vtkQtChartExport.h" - -#include - -class vtkQtChartSeriesLayer; - -/// \class vtkQtSeriesFilterLineEdit -/// \brief -/// The vtkQtSeriesFilterLineEdit class is used to filter series in a chart -class VTKQTCHART_EXPORT vtkQtSeriesFilterLineEdit : public QLineEdit -{ - Q_OBJECT - -public: - vtkQtSeriesFilterLineEdit(QWidget* parent = 0); - virtual ~vtkQtSeriesFilterLineEdit(); - - void setLayer(vtkQtChartSeriesLayer* layer); - vtkQtChartSeriesLayer* getLayer(); - -private slots: - void filterSeries(const QString& text); - -private: - vtkQtChartSeriesLayer* Layer; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChart.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChart.h deleted file mode 100644 index 34d56d754d..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChart.h +++ /dev/null @@ -1,255 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStackedChart.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStackedChart.h -/// \date February 27, 2008 - -#ifndef _vtkQtChartStackedLayer_h -#define _vtkQtChartStackedLayer_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesLayer.h" - -class vtkQtStackedChartInternal; -class vtkQtStackedChartOptions; -class vtkQtStackedChartSeriesOptions; - - -/// \class vtkQtStackedChart -/// \brief -/// The vtkQtStackedChart class is used to display a stacked chart. -class VTKQTCHART_EXPORT vtkQtStackedChart : public vtkQtChartSeriesLayer -{ - Q_OBJECT - -public: - vtkQtStackedChart(); - virtual ~vtkQtStackedChart(); - - /// \name Setup Methods - //@{ - virtual void setChartArea(vtkQtChartArea *area); - - virtual void setModel(vtkQtChartSeriesModel *model); - //@} - - /// \name Drawing Parameters - //@{ - /// \brief - /// Gets the stacked chart drawing options. - /// \return - /// A pointer to the stacked chart drawing options. - vtkQtStackedChartOptions *getOptions() const {return this->Options;} - - /// \brief - /// Sets the stacked chart drawing options. - /// - /// This method sets all the options at once, which can prevent - /// unnecessary view updates. - /// - /// \param options The new stacked chart drawing options. - void setOptions(const vtkQtStackedChartOptions &options); - - /// \brief - /// Gets the stacked chart series options. - /// \param series The series index. - /// \return - /// A pointer to the stacked chart series options. - vtkQtStackedChartSeriesOptions *getStackedSeriesOptions(int series) const; - - virtual QPixmap getSeriesIcon(int series) const; - //@} - - /// \name Layout Methods - //@{ - virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; - - virtual void layoutChart(const QRectF &area); - - virtual bool getHelpText(const QPointF &point, QString &text); - - /// \brief - /// Notifies the chart layer that a resize interaction has finished. - /// - /// The chart quad tree is not updated while the chart is in an - /// interactive state. It is updated in this method if needed. - virtual void finishInteractiveResize(); - //@} - - /// \name Selection Methods - //@{ - virtual void getSeriesAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getSeriesIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - //@} - - /// \name QGraphicsItem Methods - //@{ - virtual QRectF boundingRect() const; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - //@} - -public slots: - /// \brief - /// Refreshes the stacked chart data from the model. - /// - /// The currently displayed data is cleaned up. If a model is set, - /// it is used to populate the stacked chart. - void reset(); - -protected: - /// \brief - /// Creates a new stacked chart series options object. - /// \param parent The parent object. - /// \return - /// A pointer to the new stacked chart series options object. - virtual vtkQtChartSeriesOptions *createOptions(QObject *parent); - - /// \brief - /// Sets up the series options defaults. - /// \param options The new series options object. - virtual void setupOptions(vtkQtChartSeriesOptions *options); - -private slots: - /// \brief - /// Prepares the stacked chart for a series insertion. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void prepareSeriesInsert(int first, int last); - - /// \brief - /// Inserts stacked chart series at the given indexes. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void insertSeries(int first, int last); - - /// \brief - /// Removes the specified series from the chart. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void startSeriesRemoval(int first, int last); - - /// \brief - /// Finishes the domain changes after removing the series. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void finishSeriesRemoval(int first, int last); - - /// Requests a chart layout when the axis corner option changes. - void handleAxesCornerChange(); - - /// Updates the chart when the sumation type has changed. - void handleSumationChange(); - - /// Updates the chart when the gradient option has changed. - void handleGradientChange(); - - /// \brief - /// Changes the series visibility. - /// - /// The signal sender is used to determine which series has changed. - /// - /// \param visible True if the series should be shown. - void handleSeriesVisibilityChange(bool visible); - - /// \brief - /// Changes the series pen. - /// \param pen The new series pen. - void handleSeriesPenChange(const QPen &pen); - - /// \brief - /// Changes the series brush. - /// \param brush The new series brush. - void handleSeriesBrushChange(const QBrush &brush); - - /// \brief - /// Called to layout the highlights. - /// - /// The layout request is ignored if the model is being changed. - void updateHighlights(); - - /// Called by the animation timeline to animate hiding a series. - void seriesVisibilityAnimate(qreal time); - - /// Called by the animation timeline when animation is finished. - void seriesVisibilityAnimateFinished(); - -private: - /// Called to layout the highlights. - void layoutHighlights(); - - /// \brief - /// Adds the domain for the given series to the current domain. - /// \param series The series index - /// \param seriesGroup Used to return the domain group. - void addSeriesDomain(int series, int *seriesGroup); - - /// \brief - /// Updates the series table index map. - /// \param seriesGroup The domain group to update. - void updateItemMap(int seriesGroup); - - /// \brief - /// Creates the table for the given series domain group. - /// \param seriesGroup The domain group index. - void createTable(int seriesGroup); - - /// \brief - /// Normalizes the table for the given series domain group. - /// \param seriesGroup The domain group index. - void normalizeTable(int seriesGroup); - - /// \brief - /// Calculates the x-axis domain for the given domain group. - /// \param seriesGroup The domain group index. - void calculateXDomain(int seriesGroup); - - /// \brief - /// Calculates the y-axis domain for the given domain group. - /// \param seriesGroup The domain group index. - void calculateYDomain(int seriesGroup); - - /// \brief - /// Creates an ordered table of series quadrilaterals. - /// \param seriesGroup The domain group index. - void createQuadTable(int seriesGroup); - - /// \brief - /// Builds the quad tree for the given domain group. - /// \param seriesGroup The domain group index. - void buildQuadTree(int seriesGroup); - -private: - vtkQtStackedChartInternal *Internal; ///< Stores the series. - vtkQtStackedChartOptions *Options; ///< Stores the drawing options. - bool InModelChange; ///< Used for selection changes. - bool BuildNeeded; ///< Used when resizing interactively. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartOptions.h deleted file mode 100644 index 07af4b21cd..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartOptions.h +++ /dev/null @@ -1,131 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStackedChartOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStackedChartOptions.h -/// \date February 27, 2008 - -#ifndef _vtkQtStackedChartOptions_h -#define _vtkQtStackedChartOptions_h - -#include "vtkQtChartExport.h" -#include -#include "vtkQtChartLayer.h" // needed for enum - -class vtkQtChartHelpFormatter; - - -/// \class vtkQtStackedChartOptions -/// \brief -/// The vtkQtStackedChartOptions class stores the stacked chart -/// options. -class VTKQTCHART_EXPORT vtkQtStackedChartOptions : public QObject -{ - Q_OBJECT - -public: - /// \brief - /// Creates a stacked chart options instance. - /// \param parent The parent object. - vtkQtStackedChartOptions(QObject *parent=0); - - /// \brief - /// Makes a copy of another stacked chart options instance. - /// \param other The stacked chart options to copy. - vtkQtStackedChartOptions(const vtkQtStackedChartOptions &other); - virtual ~vtkQtStackedChartOptions(); - - /// \brief - /// Gets the pair of axes used by the stacked chart. - /// \return - /// The pair of axes used by the bar chart. - vtkQtChartLayer::AxesCorner getAxesCorner() const {return this->Axes;} - - /// \brief - /// Sets the pair of axes used by the stacked chart. - /// \param axes The new chart axes. - void setAxesCorner(vtkQtChartLayer::AxesCorner axes); - - /// \brief - /// Gets whether or not the sum is normalized. - /// \return - /// True if the sum is normalized. - bool isSumNormalized() const {return this->Normalized;} - - /// \brief - /// Sets whether or not the sum is normalized. - /// \param normalized True if the sum should be normalized. - void setSumNormalized(bool normalized); - - /// \brief - /// Gets whether or not gradients are displayed. - /// \return - /// True if the stacked series should be displayed with a gradient. - bool isGradientDislpayed() const {return this->Gradient;} - - /// \brief - /// Sets whether or not gradients are displayed. - /// \param gradient True if gradients should be displayed. - void setGradientDisplayed(bool gradient); - - /// \brief - /// Gets the chart help text formatter. - /// - /// The help text formatter stores the format string. It is also - /// used to generate the help text. - /// - /// \return - /// A pointer to the chart help text formatter. - vtkQtChartHelpFormatter *getHelpFormat() {return this->Help;} - - /// \brief - /// Gets the chart help text formatter. - /// \return - /// A pointer to the chart help text formatter. - const vtkQtChartHelpFormatter *getHelpFormat() const {return this->Help;} - - /// \brief - /// Makes a copy of another stacked chart options instance. - /// \param other The stacked chart options to copy. - /// \return - /// A reference to the object being assigned. - vtkQtStackedChartOptions &operator=(const vtkQtStackedChartOptions &other); - -signals: - /// Emitted when the stacked chart axes change. - void axesCornerChanged(); - - /// Emitted when the sumation normalization changes. - void sumationChanged(); - - /// Emitted when the gradient option changes. - void gradientChanged(); - -private: - vtkQtChartLayer::AxesCorner Axes; ///< Stores the chart axes. - vtkQtChartHelpFormatter *Help; ///< Stores the help text format. - - /// True if the sum should be normalized. - bool Normalized; - - /// True if the stacked series should be displayed with a gradient. - bool Gradient; -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartSeriesOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartSeriesOptions.h deleted file mode 100644 index d1a32d87e7..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStackedChartSeriesOptions.h +++ /dev/null @@ -1,59 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStackedChartSeriesOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStackedChartSeriesOptions.h -/// \date February 27, 2008 - -#ifndef _vtkQtStackedChartSeriesOptions_h -#define _vtkQtStackedChartSeriesOptions_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesOptions.h" - - -/// \class vtkQtStackedChartSeriesOptions -/// \brief -/// The vtkQtStackedChartSeriesOptions class stores the options for -/// a stacked chart series. -class VTKQTCHART_EXPORT vtkQtStackedChartSeriesOptions : - public vtkQtChartSeriesOptions -{ - Q_OBJECT - -public: - /// \brief - /// Creates a stacked chart series options object. - /// \param parent The parent object. - vtkQtStackedChartSeriesOptions(QObject *parent=0); - virtual ~vtkQtStackedChartSeriesOptions() {} - - /// \brief - /// Sets the style generator index for the series. - /// - /// This method uses the style generator to assign the initial - /// brush and pen for the series. The pen is based on the brush - /// color. - /// - /// \param style The style index for the generator. - /// \param generator The style generator to use. - virtual void setStyle(int style, vtkQtChartStyleGenerator *generator); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChart.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChart.h deleted file mode 100644 index 78c77aa6dd..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChart.h +++ /dev/null @@ -1,233 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStatisticalBoxChart.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStatisticalBoxChart.h -/// \date May 15, 2008 - -#ifndef _vtkQtStatisticalBoxChart_h -#define _vtkQtStatisticalBoxChart_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesLayer.h" - -class vtkQtStatisticalBoxChartInternal; -class vtkQtStatisticalBoxChartOptions; -class vtkQtStatisticalBoxChartSeriesOptions; - - -/// \class vtkQtStatisticalBoxChart -/// \brief -/// The vtkQtStatisticalBoxChart class is used to display a statistical box chart. -class VTKQTCHART_EXPORT vtkQtStatisticalBoxChart : public vtkQtChartSeriesLayer -{ - Q_OBJECT - -public: - vtkQtStatisticalBoxChart(); - virtual ~vtkQtStatisticalBoxChart(); - - /// \name Setup Methods - //@{ - virtual void setChartArea(vtkQtChartArea *area); - - virtual void setModel(vtkQtChartSeriesModel *model); - //@} - - /// \name Drawing Parameters - //@{ - /// \brief - /// Gets the box chart drawing options. - /// \return - /// A pointer to the box chart drawing options. - vtkQtStatisticalBoxChartOptions *getOptions() const {return this->Options;} - - /// \brief - /// Sets the box chart drawing options. - /// - /// This method sets all the options at once, which can prevent - /// unnecessary view updates. - /// - /// \param options The new box chart drawing options. - void setOptions(const vtkQtStatisticalBoxChartOptions &options); - - /// \brief - /// Gets the statistical box chart series options. - /// \param series The series index. - /// \return - /// A pointer to the statistical box chart series options. - vtkQtStatisticalBoxChartSeriesOptions *getBoxSeriesOptions(int series) const; - - virtual QPixmap getSeriesIcon(int series) const; - //@} - - /// \name Layout Methods - //@{ - virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const; - - virtual void layoutChart(const QRectF &area); - - virtual bool getHelpText(const QPointF &point, QString &text); - - /// \brief - /// Notifies the chart layer that a resize interaction has finished. - /// - /// The chart search tree is not updated while the chart is in an - /// interactive state. It is updated in this method if needed. - virtual void finishInteractiveResize(); - //@} - - /// \name Selection Methods - //@{ - virtual void getSeriesAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsAt(const QPointF &point, - vtkQtChartSeriesSelection &selection) const; - - virtual void getSeriesIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - - virtual void getPointsIn(const QRectF &area, - vtkQtChartSeriesSelection &selection) const; - //@} - - /// \name QGraphicsItem Methods - //@{ - virtual QRectF boundingRect() const; - - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, - QWidget *widget=0); - //@} - -public slots: - /// \brief - /// Refreshes the statistical box chart data from the model. - /// - /// The currently displayed data is cleaned up. If a model is set, - /// it is used to populate the statistical box chart. - void reset(); - -protected: - /// \brief - /// Creates a new statistical box chart series options object. - /// \param parent The parent object. - /// \return - /// A pointer to the new statistical box chart series options object. - virtual vtkQtChartSeriesOptions *createOptions(QObject *parent); - - /// \brief - /// Sets up the series options defaults. - /// \param options The new series options object. - virtual void setupOptions(vtkQtChartSeriesOptions *options); - -private slots: - /// \brief - /// Prepares the statistical box chart for a series insertion. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void prepareSeriesInsert(int first, int last); - - /// \brief - /// Inserts statistical box chart series at the given indexes. - /// \param first The first series index to be added. - /// \param last The last series index to be added. - void insertSeries(int first, int last); - - /// \brief - /// Removes the specified series from the chart. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void startSeriesRemoval(int first, int last); - - /// \brief - /// Finishes the domain changes after removing the series. - /// \param first The first series index to be removed. - /// \param last The last series index to be removed. - void finishSeriesRemoval(int first, int last); - - /// Requests a chart layout when the axis corner option changes. - void handleAxesCornerChange(); - - /// Changes the box outline style. - void handleOutlineChange(); - - /// \brief - /// Changes the series visibility. - /// - /// The signal sender is used to determine which series has changed. - /// - /// \param visible True if the series should be shown. - void handleSeriesVisibilityChange(bool visible); - - /// \brief - /// Changes the series pen. - /// \param pen The new series pen. - void handleSeriesPenChange(const QPen &pen); - - /// \brief - /// Changes the series brush. - /// \param brush The new series brush. - void handleSeriesBrushChange(const QBrush &brush); - - /// Changes the series point marker. - void handleSeriesPointMarkerChanged(); - - /// \brief - /// Called to set up the highlights. - /// - /// The set up request is ignored if the model is being changed. - void updateHighlights(); - -private: - /// \brief - /// Adds the domain for the given series to the current domain. - /// \param series The series index. - /// \param seriesGroup Used to return the series group index. - /// \return - /// True if the domain was modified. - bool addSeriesDomain(int series, int &seriesGroup); - - /// \brief - /// Calculates the domain for the given series group. - /// \param seriesGroup The series group index. - void calculateDomain(int seriesGroup); - - /// \brief - /// Creates an ordered table of series shapes. - /// \param seriesGroup The series group index. - void createShapeTable(int seriesGroup); - - /// \brief - /// Builds the shape tree for the given series group. - /// \param seriesGroup The series group index. - void buildShapeTree(int seriesGroup); - -private: - vtkQtStatisticalBoxChartInternal *Internal; ///< Stores the box series. - vtkQtStatisticalBoxChartOptions *Options; ///< Stores the drawing options. - bool InModelChange; ///< Used for selection changes. - bool BuildNeeded; ///< Used for interactive resize. - -private: - vtkQtStatisticalBoxChart(const vtkQtStatisticalBoxChart &); - vtkQtStatisticalBoxChart &operator=(const vtkQtStatisticalBoxChart &); -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartOptions.h deleted file mode 100644 index b7537faa2e..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartOptions.h +++ /dev/null @@ -1,166 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStatisticalBoxChartOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStatisticalBoxChartOptions.h -/// \date May 15, 2008 - -#ifndef _vtkQtStatisticalBoxChartOptions_h -#define _vtkQtStatisticalBoxChartOptions_h - -#include "vtkQtChartExport.h" -#include - -#include "vtkQtChartLayer.h" // needed for enum - -class vtkQtChartHelpFormatter; - - -/// \class vtkQtStatisticalBoxChartOptions -/// \brief -/// The vtkQtStatisticalBoxChartOptions class stores the drawing options for a -/// box chart. -/// -/// The default settings are as follows: -/// \li axes: \c BottomLeft -/// \li box width fraction: 0.8 -/// \li outline style: \c Darker -class VTKQTCHART_EXPORT vtkQtStatisticalBoxChartOptions : public QObject -{ - Q_OBJECT - -public: - enum OutlineStyle - { - Darker, ///< Draws the box outline in a darker color. - Black ///< Draws a black box outline. - }; - -public: - /// \brief - /// Creates a box chart options instance. - /// \param parent The parent object. - vtkQtStatisticalBoxChartOptions(QObject *parent=0); - - /// \brief - /// Makes a copy of another box chart options instance. - /// \param other The box chart options to copy. - vtkQtStatisticalBoxChartOptions( - const vtkQtStatisticalBoxChartOptions &other); - virtual ~vtkQtStatisticalBoxChartOptions() {} - - /// \brief - /// Gets the pair of axes used by the box chart. - /// \return - /// The pair of axes used by the box chart. - vtkQtChartLayer::AxesCorner getAxesCorner() const {return this->AxesCorner;} - - /// \brief - /// Sets the pair of axes used by the box chart. - /// \param axes The new chart axes. - void setAxesCorner(vtkQtChartLayer::AxesCorner axes); - - /// \brief - /// Gets the box width fraction. - /// - /// The box width fraction is used to set the spacing between the - /// boxs of different series. - /// - /// \return - /// The box width fraction. - float getBoxWidthFraction() const {return this->BoxFraction;} - - /// \brief - /// Sets the box width fraction. - /// \param fraction The new box width fraction. - void setBoxWidthFraction(float fraction); - - /// \brief - /// Gets the outline style for the boxes. - /// \return - /// The current outline style. - OutlineStyle getOutlineStyle() const {return this->OutlineType;} - - /// \brief - /// Sets the outline style for the boxes. - /// - /// The default style is \c Darker. - /// - /// \param style The outline style to use. - void setOutlineStyle(OutlineStyle style); - - /// \brief - /// Gets the chart help text formatter. - /// - /// The help text formatter stores the format string. It is also - /// used to generate the help text. - /// - /// \return - /// A pointer to the chart help text formatter. - vtkQtChartHelpFormatter *getHelpFormat() {return this->Help;} - - /// \brief - /// Gets the chart help text formatter. - /// \return - /// A pointer to the chart help text formatter. - const vtkQtChartHelpFormatter *getHelpFormat() const {return this->Help;} - - /// \brief - /// Gets the outlier help text formatter. - /// - /// The help text formatter stores the format string. It is also - /// used to generate the help text. - /// - /// \return - /// A pointer to the outlier help text formatter. - vtkQtChartHelpFormatter *getOutlierFormat() {return this->Outlier;} - - /// \brief - /// Gets the outlier help text formatter. - /// \return - /// A pointer to the outlier help text formatter. - const vtkQtChartHelpFormatter *getOutlierFormat() const {return this->Outlier;} - - /// \brief - /// Makes a copy of another box chart options instance. - /// \param other The box chart options to copy. - /// \return - /// A reference to the object being assigned. - vtkQtStatisticalBoxChartOptions &operator=( - const vtkQtStatisticalBoxChartOptions &other); - -signals: - /// Emitted when the box chart axes change. - void axesCornerChanged(); - - /// Emitted when the box width fraction changes. - void boxFractionChanged(); - - /// Emitted when the outline style changes. - void outlineStyleChanged(); - -private: - vtkQtChartLayer::AxesCorner AxesCorner; ///< Stores the chart axes. - OutlineStyle OutlineType; ///< Stores the outline style. - vtkQtChartHelpFormatter *Help; ///< Stores the help text format. - vtkQtChartHelpFormatter *Outlier; ///< Stores the outlier text format. - float BoxFraction; ///< Stores the box width fraction. -}; - -#endif diff --git a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartSeriesOptions.h b/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartSeriesOptions.h deleted file mode 100644 index a2556969b1..0000000000 --- a/Modules/QmitkExt/vtkQtChartHeaders/vtkQtStatisticalBoxChartSeriesOptions.h +++ /dev/null @@ -1,91 +0,0 @@ -/*========================================================================= - - Program: Visualization Toolkit - Module: $RCSfile: vtkQtStatisticalBoxChartSeriesOptions.h,v $ - - Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen - All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -/*------------------------------------------------------------------------- - Copyright 2008 Sandia Corporation. - Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, - the U.S. Government retains certain rights in this software. --------------------------------------------------------------------------*/ - -/// \file vtkQtStatisticalBoxChartSeriesOptions.h -/// \date May 15, 2008 - -#ifndef _vtkQtStatisticalBoxChartSeriesOptions_h -#define _vtkQtStatisticalBoxChartSeriesOptions_h - -#include "vtkQtChartExport.h" -#include "vtkQtChartSeriesOptions.h" -#include "vtkQtPointMarker.h" // needed for enum - -class QSizeF; - - -/// \class vtkQtStatisticalBoxChartSeriesOptions -/// \brief -/// The vtkQtStatisticalBoxChartSeriesOptions class stores the -/// options for a statistical box chart series. -class VTKQTCHART_EXPORT vtkQtStatisticalBoxChartSeriesOptions : - public vtkQtChartSeriesOptions -{ - Q_OBJECT - -public: - /// \brief - /// Creates a statistical box chart series options object. - /// \param parent The parent object. - vtkQtStatisticalBoxChartSeriesOptions(QObject *parent=0); - virtual ~vtkQtStatisticalBoxChartSeriesOptions(); - - /// \brief - /// Sets the style generator index for the series. - /// - /// This method uses the style generator to assign the initial brush - /// for the series. - /// - /// \param style The style index for the generator. - /// \param generator The style generator to use. - virtual void setStyle(int style, vtkQtChartStyleGenerator *generator); - - /// \brief - /// Gets the series marker style. - /// \return - /// The series marker style. - vtkQtPointMarker::MarkerStyle getMarkerStyle() const; - - /// \brief - /// Sets the series marker style. - /// \param style The new series marker style. - void setMarkerStyle(vtkQtPointMarker::MarkerStyle style); - - /// \brief - /// Gets the marker size for the series. - /// \return - /// A reference to the series marker size. - const QSizeF &getMarkerSize() const; - - /// \brief - /// Sets the marker size for the series. - /// \param size The new series marker size. - void setMarkerSize(const QSizeF &size); - -signals: - /// Emitted when the point marker style or size has changed. - void pointMarkerChanged(); - -protected: - vtkQtPointMarker::MarkerStyle PointStyle; ///< Stores the marker style. - QSizeF *PointSize; ///< Stores the marker size. -}; - -#endif