CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Loading...
Searching...
No Matches
ctkVTKScalarBarWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkVTKScalarBarWidget_h
22#define __ctkVTKScalarBarWidget_h
23
24// Qt includes
25#include <QWidget>
26
27// CTK includes
28#include <ctkPimpl.h>
29#include "ctkVisualizationVTKWidgetsExport.h"
30#include "ctkVTKObject.h"
31
32class ctkVTKScalarBarWidgetPrivate;
33class vtkScalarBarWidget;
34
36class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKScalarBarWidget : public QWidget
37{
38 Q_OBJECT;
40
41public:
43 ctkVTKScalarBarWidget(QWidget* parentWidget = 0);
44 ctkVTKScalarBarWidget(vtkScalarBarWidget* scalarBar, QWidget* parentWidget = 0);
46
47 vtkScalarBarWidget* scalarBarWidget()const;
48
49 bool display()const;
52 int numberOfLabels()const;
53 QString title()const;
54 QString labelsFormat()const;
55
56public Q_SLOTS:
57 void setScalarBarWidget(vtkScalarBarWidget* scalarBar);
58
59 void setDisplay(bool visible);
60 void setMaxNumberOfColors(int colorCount);
61 void setNumberOfLabels(int labelCount);
62 void setTitle(const QString& title);
63 void setLabelsFormat(const QString& format);
64
65Q_SIGNALS:
66 void modified();
67
68protected Q_SLOTS:
70
71protected:
72 QScopedPointer<ctkVTKScalarBarWidgetPrivate> d_ptr;
73
74private:
75 Q_DECLARE_PRIVATE(ctkVTKScalarBarWidget);
76 Q_DISABLE_COPY(ctkVTKScalarBarWidget);
77};
78
79#endif
void setTitle(const QString &title)
virtual ~ctkVTKScalarBarWidget()
ctkVTKScalarBarWidget(vtkScalarBarWidget *scalarBar, QWidget *parentWidget=0)
ctkVTKScalarBarWidget(QWidget *parentWidget=0)
Constructors.
void setLabelsFormat(const QString &format)
QString labelsFormat() const
void setDisplay(bool visible)
int maxNumberOfColors() const
Returns -1 if not scalarbar is set.
void setNumberOfLabels(int labelCount)
void setScalarBarWidget(vtkScalarBarWidget *scalarBar)
int numberOfLabels() const
vtkScalarBarWidget * scalarBarWidget() const
QString title() const
void setMaxNumberOfColors(int colorCount)
bool display() const
QScopedPointer< ctkVTKScalarBarWidgetPrivate > d_ptr
#define QVTK_OBJECT
Define VTK/Qt event/slot connection utility methods. It is a convenient macro that declares and defin...