Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryQModelIndexObject.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "berryQModelIndexObject.h"
18 
19 namespace berry
20 {
21 
22 QModelIndexObject::QModelIndexObject(const QModelIndex& index) :
23  m_QModelIndex(index)
24 {
25 
26 }
27 
28 const QModelIndex& QModelIndexObject::GetQModelIndex() const
29 {
30  return m_QModelIndex;
31 }
32 
33 bool QModelIndexObject::operator==(const Object* obj) const
34 {
35  if (const QModelIndexObject* other = dynamic_cast<const QModelIndexObject*>(obj))
36  {
37  return m_QModelIndex == other->m_QModelIndex;
38  }
39 
40  return false;
41 }
42 
43 }
const QModelIndex & GetQModelIndex() const
bool operator==(const Object *obj) const override
QModelIndexObject(const QModelIndex &index)
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78