Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
berryQModelIndexObject.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "berryQModelIndexObject.h"
14 
15 namespace berry
16 {
17 
18 QModelIndexObject::QModelIndexObject(const QModelIndex& index) :
19  m_QModelIndex(index)
20 {
21 
22 }
23 
24 const QModelIndex& QModelIndexObject::GetQModelIndex() const
25 {
26  return m_QModelIndex;
27 }
28 
29 bool QModelIndexObject::operator==(const Object* obj) const
30 {
31  if (const QModelIndexObject* other = dynamic_cast<const QModelIndexObject*>(obj))
32  {
33  return m_QModelIndex == other->m_QModelIndex;
34  }
35 
36  return false;
37 }
38 
39 }
bool operator==(const Object *obj) const override
QModelIndexObject(const QModelIndex &index)
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
const QModelIndex & GetQModelIndex() const