Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkComboBoxStepThrough.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
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 #ifndef QmitkComboBoxStepThrough_H
18 #define QmitkComboBoxStepThrough_H
19 
20 #include <QComboBox>
21 
28 class QmitkComboBoxStepThrough : public QComboBox
29 {
30  Q_OBJECT
31 
32 signals:
37  void SignalReachedEnd(bool);
38 
43  void SignalReachedBegin(bool);
44 
45 public slots:
50  void OnSetPreviousIndex();
51 
56  void OnSetNextIndex();
57 
58 private slots:
62  void OnCurrentIndexChanged(int);
63 
64 public:
65  QmitkComboBoxStepThrough(QWidget* parent = nullptr);
67 
68  // --> Overwritten superclass methods
69  void addItem( const QString & text, const QVariant & userData = QVariant() );
70  void addItem( const QIcon & icon, const QString & text, const QVariant & userData = QVariant() );
71  void addItems( const QStringList & texts );
72 
73  void insertItem( int index, const QString & text, const QVariant & userData = QVariant() );
74  void insertItem( int index, const QIcon & icon, const QString & text, const QVariant & userData = QVariant() );
75  void insertItems( int index, const QStringList & list );
76  // Overwritten superclass methods <--
77 
78 private:
79  int m_LastMaxIndex;
80  int m_LastIndex;
81 };
82 
83 #endif // QmitkComboBoxStepThrough_H
void addItem(const QString &text, const QVariant &userData=QVariant())
Extension of QComboBox which offers stepping through the values.
void insertItems(int index, const QStringList &list)
void addItems(const QStringList &texts)
QmitkComboBoxStepThrough(QWidget *parent=nullptr)
void insertItem(int index, const QString &text, const QVariant &userData=QVariant())