VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkQtChartAxisOptions.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00020 00023 00024 #ifndef _vtkQtChartAxisOptions_h 00025 #define _vtkQtChartAxisOptions_h 00026 00027 00028 #include "vtkQtChartExport.h" 00029 #include <QObject> 00030 00031 #include <QColor> // Needed for member variable 00032 #include <QFont> // Needed for member variable 00033 #include <QString> // Needed for return value 00034 00035 class QVariant; 00036 00037 00042 class VTKQTCHART_EXPORT vtkQtChartAxisOptions : public QObject 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 enum NotationType 00048 { 00049 Standard = 0, 00050 Exponential, 00051 Engineering, 00052 StandardOrExponential 00053 }; 00054 00055 enum AxisGridColor 00056 { 00057 Lighter = 0, 00058 Specified 00059 }; 00060 00061 enum AxisScale 00062 { 00063 Linear, 00064 Logarithmic 00065 }; 00066 00067 public: 00071 vtkQtChartAxisOptions(QObject *parent=0); 00072 00076 vtkQtChartAxisOptions(const vtkQtChartAxisOptions &other); 00077 virtual ~vtkQtChartAxisOptions() {} 00078 00083 bool isVisible() const {return this->Visible;} 00084 00088 void setVisible(bool visible); 00089 00094 bool areLabelsVisible() const {return this->ShowLabels;} 00095 00099 void setLabelsVisible(bool visible); 00100 00105 bool isGridVisible() const {return this->ShowGrid;} 00106 00110 void setGridVisible(bool visible); 00111 00116 const QColor &getAxisColor() const {return this->AxisColor;} 00117 00126 void setAxisColor(const QColor &color); 00127 00132 const QColor &getLabelColor() const {return this->LabelColor;} 00133 00137 void setLabelColor(const QColor &color); 00138 00143 const QFont &getLabelFont() const {return this->LabelFont;} 00144 00148 void setLabelFont(const QFont &font); 00149 00154 AxisScale getAxisScale() const {return this->Scale;} 00155 00159 void setAxisScale(AxisScale scale); 00160 00166 int getPrecision() const {return this->Precision;} 00167 00172 void setPrecision(int precision); 00173 00179 NotationType getNotation() const {return this->Notation;} 00180 00185 void setNotation(NotationType notation); 00186 00195 void setGridColorType(AxisGridColor type); 00196 00202 AxisGridColor getGridColorType() const {return this->GridType;} 00203 00214 QColor getGridColor() const; 00215 00224 void setGridColor(const QColor &color); 00225 00231 vtkQtChartAxisOptions &operator=(const vtkQtChartAxisOptions &other); 00232 00238 QString formatValue(const QVariant &value) const; 00239 00240 signals: 00242 void visibilityChanged(); 00243 00245 void colorChanged(); 00246 00248 void fontChanged(); 00249 00251 void axisScaleChanged(); 00252 00254 void presentationChanged(); 00255 00257 void gridChanged(); 00258 00259 private: 00261 AxisScale Scale; 00262 00264 NotationType Notation; 00265 00267 AxisGridColor GridType; 00268 00269 QColor AxisColor; 00270 QColor GridColor; 00271 QColor LabelColor; 00272 QFont LabelFont; 00273 int Precision; 00274 bool Visible; 00275 bool ShowLabels; 00276 bool ShowGrid; 00277 }; 00278 00279 #endif