Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit 1a7539f2 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Issue #44: Declared all constructors as explicit where applicable.

parent 81b17c8e
...@@ -66,7 +66,7 @@ namespace campvis { ...@@ -66,7 +66,7 @@ namespace campvis {
* Creates a new DataContainerInspectorCanvas. * Creates a new DataContainerInspectorCanvas.
* \param parent Parent Qt widget, may be 0 (default) * \param parent Parent Qt widget, may be 0 (default)
*/ */
DataContainerInspectorCanvas(QWidget* parent = 0); explicit DataContainerInspectorCanvas(QWidget* parent = 0);
/** /**
* Destructor. * Destructor.
......
...@@ -71,7 +71,7 @@ namespace campvis { ...@@ -71,7 +71,7 @@ namespace campvis {
* Creates a new DataContainerInspectorWidget. * Creates a new DataContainerInspectorWidget.
* \param parent Parent Qt widget, may be 0 (default) * \param parent Parent Qt widget, may be 0 (default)
*/ */
DataContainerInspectorWidget(QWidget* parent = 0); explicit DataContainerInspectorWidget(QWidget* parent = 0);
/** /**
* Destructor. * Destructor.
......
...@@ -49,7 +49,7 @@ namespace campvis { ...@@ -49,7 +49,7 @@ namespace campvis {
*/ */
class DataContainerTreeRootItem : public TreeItem { class DataContainerTreeRootItem : public TreeItem {
public: public:
DataContainerTreeRootItem(TreeItem* parent = 0); explicit DataContainerTreeRootItem(TreeItem* parent = 0);
virtual ~DataContainerTreeRootItem(); virtual ~DataContainerTreeRootItem();
/// \see TreeItem::getData() /// \see TreeItem::getData()
...@@ -98,7 +98,7 @@ namespace campvis { ...@@ -98,7 +98,7 @@ namespace campvis {
Q_OBJECT Q_OBJECT
public: public:
DataContainerTreeModel(QObject *parent = 0); explicit DataContainerTreeModel(QObject *parent = 0);
~DataContainerTreeModel(); ~DataContainerTreeModel();
void setData(const DataContainer* dataContainer); void setData(const DataContainer* dataContainer);
...@@ -147,7 +147,7 @@ namespace campvis { ...@@ -147,7 +147,7 @@ namespace campvis {
* Creates a new DataContainerTreeWidget. * Creates a new DataContainerTreeWidget.
* \param parent Parent widget * \param parent Parent widget
*/ */
DataContainerTreeWidget(QWidget* parent = 0); explicit DataContainerTreeWidget(QWidget* parent = 0);
/** /**
* Destructor * Destructor
......
...@@ -48,7 +48,7 @@ namespace campvis { ...@@ -48,7 +48,7 @@ namespace campvis {
* *
* \param parent the QTextEdit to install the LogHighlighter on * \param parent the QTextEdit to install the LogHighlighter on
*/ */
LogHighlighter(QTextEdit* parent); explicit LogHighlighter(QTextEdit* parent);
/** /**
* Destructor. * Destructor.
......
...@@ -58,7 +58,7 @@ namespace campvis { ...@@ -58,7 +58,7 @@ namespace campvis {
* Creates a new DataContainerInspectorWidget. * Creates a new DataContainerInspectorWidget.
* \param parent Parent Qt widget, may be 0 (default) * \param parent Parent Qt widget, may be 0 (default)
*/ */
LogViewerWidget(QWidget* parent = 0); explicit LogViewerWidget(QWidget* parent = 0);
/** /**
* Destructor. * Destructor.
......
...@@ -62,7 +62,7 @@ namespace campvis { ...@@ -62,7 +62,7 @@ namespace campvis {
* Creates a new TumVis Main window for \a application. * Creates a new TumVis Main window for \a application.
* \param application CampVisApplication to create a GUI for. * \param application CampVisApplication to create a GUI for.
*/ */
MainWindow(CampVisApplication* application); explicit MainWindow(CampVisApplication* application);
/** /**
* Destructor, make sure to call before destroying the application * Destructor, make sure to call before destroying the application
......
...@@ -54,7 +54,7 @@ namespace campvis { ...@@ -54,7 +54,7 @@ namespace campvis {
* \param parent the window's parent * \param parent the window's parent
* \param flags options customizing the frame of the subwindow * \param flags options customizing the frame of the subwindow
*/ */
PipelineMdiSubWindow(QWidget* parent = 0, Qt::WindowFlags flags = 0); explicit PipelineMdiSubWindow(QWidget* parent = 0, Qt::WindowFlags flags = 0);
/** /**
* Cancel the dragging of the window. * Cancel the dragging of the window.
......
...@@ -49,7 +49,7 @@ namespace campvis { ...@@ -49,7 +49,7 @@ namespace campvis {
*/ */
class PipelineTreeRootItem : public TreeItem { class PipelineTreeRootItem : public TreeItem {
public: public:
PipelineTreeRootItem(TreeItem* parent = 0); explicit PipelineTreeRootItem(TreeItem* parent = 0);
virtual ~PipelineTreeRootItem(); virtual ~PipelineTreeRootItem();
/// \see TreeItem::getData() /// \see TreeItem::getData()
...@@ -101,7 +101,7 @@ namespace campvis { ...@@ -101,7 +101,7 @@ namespace campvis {
Q_OBJECT Q_OBJECT
public: public:
PipelineTreeModel(QObject *parent = 0); explicit PipelineTreeModel(QObject *parent = 0);
~PipelineTreeModel(); ~PipelineTreeModel();
void setData(const std::vector<AbstractPipeline*>& pipelines); void setData(const std::vector<AbstractPipeline*>& pipelines);
...@@ -141,7 +141,7 @@ namespace campvis { ...@@ -141,7 +141,7 @@ namespace campvis {
* Creates a new PipelineTreeWidget. * Creates a new PipelineTreeWidget.
* \param parent Parent widget * \param parent Parent widget
*/ */
PipelineTreeWidget(QWidget* parent = 0); explicit PipelineTreeWidget(QWidget* parent = 0);
/** /**
* Destructor * Destructor
......
...@@ -50,6 +50,7 @@ namespace campvis { ...@@ -50,6 +50,7 @@ namespace campvis {
, _color(color) , _color(color)
{ {
setMinimumHeight(16); setMinimumHeight(16);
setMinimumWidth(32);
} }
const QColor& ColorPickerWidget::color() const { const QColor& ColorPickerWidget::color() const {
......
...@@ -68,7 +68,7 @@ namespace campvis { ...@@ -68,7 +68,7 @@ namespace campvis {
* \param parent Parent Qt widget * \param parent Parent Qt widget
* \param f Qt WindowFlags * \param f Qt WindowFlags
*/ */
ColorPickerWidget(const QColor& color = QColor::fromRgba(qRgba(0, 0, 0, 255)), QWidget* parent=0, Qt::WindowFlags f=0); explicit ColorPickerWidget(const QColor& color = QColor::fromRgba(qRgba(0, 0, 0, 255)), QWidget* parent=0, Qt::WindowFlags f=0);
/** /**
* Returns the current color of the widget. * Returns the current color of the widget.
......
...@@ -46,7 +46,7 @@ namespace campvis { ...@@ -46,7 +46,7 @@ namespace campvis {
* counting mechanism. Make sure not to interfere with it or delete \a data yourself! * counting mechanism. Make sure not to interfere with it or delete \a data yourself!
* \param data Data for the QtDataHandle * \param data Data for the QtDataHandle
*/ */
QtDataHandle(AbstractData* data = 0) explicit QtDataHandle(AbstractData* data = 0)
: DataHandle(data) : DataHandle(data)
{} {}
...@@ -55,7 +55,7 @@ namespace campvis { ...@@ -55,7 +55,7 @@ namespace campvis {
* \note If \a rhs is not shareable, this implies a copy of the data! * \note If \a rhs is not shareable, this implies a copy of the data!
* \param rhs Source QtDataHandle * \param rhs Source QtDataHandle
*/ */
QtDataHandle(const QtDataHandle& rhs) explicit QtDataHandle(const QtDataHandle& rhs)
: DataHandle(rhs) : DataHandle(rhs)
{} {}
...@@ -64,7 +64,7 @@ namespace campvis { ...@@ -64,7 +64,7 @@ namespace campvis {
* \note If \a rhs is not shareable, this implies a copy of the data! * \note If \a rhs is not shareable, this implies a copy of the data!
* \param rhs Source DataHandle * \param rhs Source DataHandle
*/ */
explicit QtDataHandle(const DataHandle& rhs) QtDataHandle(const DataHandle& rhs)
: DataHandle(rhs) : DataHandle(rhs)
{} {}
......
...@@ -55,7 +55,7 @@ namespace campvis { ...@@ -55,7 +55,7 @@ namespace campvis {
* \param canvas the pipeline's canvas * \param canvas the pipeline's canvas
* \param parent the widget's parent * \param parent the widget's parent
*/ */
VisualizationPipelineWidget(QWidget* canvas, QWidget* parent = 0); explicit VisualizationPipelineWidget(QWidget* canvas, QWidget* parent = 0);
/** /**
* Enter the widget into forced drag mode. * Enter the widget into forced drag mode.
......
...@@ -30,7 +30,7 @@ namespace campvis { ...@@ -30,7 +30,7 @@ namespace campvis {
* \param showCat should the category be printed along with the messages * \param showCat should the category be printed along with the messages
* \param showLevel should the LogLevel be printed along with the messages * \param showLevel should the LogLevel be printed along with the messages
*/ */
BufferingLog(unsigned int maxSize, QObject* parent = 0, bool dateStamping = true, explicit BufferingLog(unsigned int maxSize, QObject* parent = 0, bool dateStamping = true,
bool timeStamping = true, bool showCat = true, bool showLevel = true); bool timeStamping = true, bool showCat = true, bool showLevel = true);
virtual ~BufferingLog() {} virtual ~BufferingLog() {}
bool isOpen() { return true; } bool isOpen() { return true; }
......
...@@ -31,7 +31,7 @@ namespace campvis { ...@@ -31,7 +31,7 @@ namespace campvis {
* \param showCat should the category be printed along with the messages * \param showCat should the category be printed along with the messages
* \param showLevel should the LogLevel be printed along with the messages * \param showLevel should the LogLevel be printed along with the messages
*/ */
QTextEditLog(QTextEdit* logDisplay, QObject* parent = 0, bool dateStamping = true, explicit QTextEditLog(QTextEdit* logDisplay, QObject* parent = 0, bool dateStamping = true,
bool timeStamping = true, bool showCat = true, bool showLevel = true); bool timeStamping = true, bool showCat = true, bool showLevel = true);
virtual ~QTextEditLog() {} virtual ~QTextEditLog() {}
bool isOpen() { return true; } bool isOpen() { return true; }
......
...@@ -44,7 +44,7 @@ namespace campvis { ...@@ -44,7 +44,7 @@ namespace campvis {
* Creates a new TreeItem * Creates a new TreeItem
* \param parent Parent item, will take ownership of this TreeItem. * \param parent Parent item, will take ownership of this TreeItem.
*/ */
TreeItem(TreeItem* parent = 0); explicit TreeItem(TreeItem* parent = 0);
/** /**
* Destuctor, also deletes all child items. * Destuctor, also deletes all child items.
......
...@@ -48,7 +48,7 @@ namespace campvis { ...@@ -48,7 +48,7 @@ namespace campvis {
* \param size Size of the transfer function texture * \param size Size of the transfer function texture
* \param intensityDomain Intensity Domain where the transfer function is mapped to during classification * \param intensityDomain Intensity Domain where the transfer function is mapped to during classification
*/ */
Geometry1DTransferFunction(size_t size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f)); explicit Geometry1DTransferFunction(size_t size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f));
/** /**
* Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context! * Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context!
......
...@@ -48,7 +48,7 @@ namespace campvis { ...@@ -48,7 +48,7 @@ namespace campvis {
* \param size Size of the transfer function texture * \param size Size of the transfer function texture
* \param intensityDomain Intensity Domain where the transfer function is mapped to during classification * \param intensityDomain Intensity Domain where the transfer function is mapped to during classification
*/ */
Geometry2DTransferFunction(const tgt::svec2& size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f)); explicit Geometry2DTransferFunction(const tgt::svec2& size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f));
/** /**
* Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context! * Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context!
......
...@@ -44,7 +44,7 @@ namespace campvis { ...@@ -44,7 +44,7 @@ namespace campvis {
* \param size Size of the transfer function texture * \param size Size of the transfer function texture
* \param intensityDomain Intensity Domain where the transfer function is mapped to during classification * \param intensityDomain Intensity Domain where the transfer function is mapped to during classification
*/ */
SimpleTransferFunction(size_t size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f)); explicit SimpleTransferFunction(size_t size, const tgt::vec2& intensityDomain = tgt::vec2(0.f, 1.f));
/** /**
* Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context! * Destructor, make sure to delete the OpenGL texture beforehand by calling deinit() with a valid OpenGL context!
......
...@@ -47,7 +47,7 @@ namespace campvis { ...@@ -47,7 +47,7 @@ namespace campvis {
class TFGeometry1D { class TFGeometry1D {
public: public:
struct KeyPoint { struct KeyPoint {
KeyPoint(float position, const tgt::col4& color) explicit KeyPoint(float position, const tgt::col4& color)
: _position(position) : _position(position)
, _color(color) , _color(color)
{}; {};
...@@ -60,7 +60,7 @@ namespace campvis { ...@@ -60,7 +60,7 @@ namespace campvis {
* Creates a new TFGeometry1D * Creates a new TFGeometry1D
* \param Bounds Bounds of the position of the geometry in texture coordinates. * \param Bounds Bounds of the position of the geometry in texture coordinates.
*/ */
TFGeometry1D(const std::vector<KeyPoint>& keyPoints); explicit TFGeometry1D(const std::vector<KeyPoint>& keyPoints);
/** /**
* Virtual destructor * Virtual destructor
......
...@@ -47,7 +47,7 @@ namespace campvis { ...@@ -47,7 +47,7 @@ namespace campvis {
class TFGeometry2D { class TFGeometry2D {
public: public:
struct KeyPoint { struct KeyPoint {
KeyPoint(const tgt::vec2& position, const tgt::col4& color) explicit KeyPoint(const tgt::vec2& position, const tgt::col4& color)
: _position(position) : _position(position)
, _color(color) , _color(color)
{}; {};
...@@ -60,7 +60,7 @@ namespace campvis { ...@@ -60,7 +60,7 @@ namespace campvis {
* Creates a new TFGeometry2D * Creates a new TFGeometry2D
* \param Bounds Bounds of the position of the geometry in texture coordinates. * \param Bounds Bounds of the position of the geometry in texture coordinates.
*/ */
TFGeometry2D(const std::vector<KeyPoint>& keyPoints); explicit TFGeometry2D(const std::vector<KeyPoint>& keyPoints);
/** /**
* Virtual destructor * Virtual destructor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment