Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
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 (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 #ifndef QmitkComboBoxStepThrough_h
14 #define QmitkComboBoxStepThrough_h
15 
16 #include <QComboBox>
17 
24 class QmitkComboBoxStepThrough : public QComboBox
25 {
26  Q_OBJECT
27 
28 signals:
33  void SignalReachedEnd(bool);
34 
39  void SignalReachedBegin(bool);
40 
41 public slots:
46  void OnSetPreviousIndex();
47 
52  void OnSetNextIndex();
53 
54 private slots:
58  void OnCurrentIndexChanged(int);
59 
60 public:
61  QmitkComboBoxStepThrough(QWidget* parent = nullptr);
62  ~QmitkComboBoxStepThrough() override;
63 
64  // --> Overwritten superclass methods
65  void addItem( const QString & text, const QVariant & userData = QVariant() );
66  void addItem( const QIcon & icon, const QString & text, const QVariant & userData = QVariant() );
67  void addItems( const QStringList & texts );
68 
69  void insertItem( int index, const QString & text, const QVariant & userData = QVariant() );
70  void insertItem( int index, const QIcon & icon, const QString & text, const QVariant & userData = QVariant() );
71  void insertItems( int index, const QStringList & list );
72  // Overwritten superclass methods <--
73 
74 private:
75  int m_LastMaxIndex;
76  int m_LastIndex;
77 };
78 
79 #endif
QmitkComboBoxStepThrough::addItems
void addItems(const QStringList &texts)
QmitkComboBoxStepThrough::OnSetPreviousIndex
void OnSetPreviousIndex()
QmitkComboBoxStepThrough::~QmitkComboBoxStepThrough
~QmitkComboBoxStepThrough() override
QmitkComboBoxStepThrough::OnSetNextIndex
void OnSetNextIndex()
QmitkComboBoxStepThrough::insertItem
void insertItem(int index, const QString &text, const QVariant &userData=QVariant())
QmitkComboBoxStepThrough::insertItems
void insertItems(int index, const QStringList &list)
QmitkComboBoxStepThrough::addItem
void addItem(const QString &text, const QVariant &userData=QVariant())
QmitkComboBoxStepThrough::SignalReachedEnd
void SignalReachedEnd(bool)
QmitkComboBoxStepThrough
Extension of QComboBox which offers stepping through the values.
Definition: QmitkComboBoxStepThrough.h:24
QmitkComboBoxStepThrough::SignalReachedBegin
void SignalReachedBegin(bool)
QmitkComboBoxStepThrough::QmitkComboBoxStepThrough
QmitkComboBoxStepThrough(QWidget *parent=nullptr)