QMultiComboBox.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2010 Richard Steffen and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: rsteffen@messbild.de, rsteffen@uni-bonn.de
6 **
7 ** Observe the License Information
8 **
9 ****************************************************************************/
10 
11 #ifndef __MULTIBOXCOMBO_H__
12 #define __MULTIBOXCOMBO_H__
13 
14 #include <iostream>
15 using namespace std;
16 
17 #include <QComboBox>
18 #include <QListWidget>
19 #include <QVBoxLayout>
20 #include <QStylePainter>
21 
22 class QMultiComboBox: public QComboBox
23 {
24  Q_OBJECT
25 public:
26 
28  QMultiComboBox(QWidget *widget = 0);
29 
30  virtual ~QMultiComboBox();
31 
33  void SetDisplayText(QString text);
34 
36  QString GetDisplayText() const;
37 
39  void addItem(const QString& text, const QVariant& userData = QVariant());
40 
42  virtual void paintEvent(QPaintEvent *e);
43 
45  void setPopupHeight(int h);
46 
48  void showPopup();
49  void hidePopup();
50 
52  int count();
53  void setCurrentIndex(int index);
54  QString currentText();
55  QString itemText(int row);
56  QVariant itemData(int row);
57  void setItemChecked(int row, bool checked);
58 
59 Q_SIGNALS:
61  void itemChanged();
62 
63 public Q_SLOTS:
64 
66  void scanItemSelect(QListWidgetItem* item);
67 
69  void initStyleOption(QStyleOptionComboBox *option) const;
70 
71  void clear();
72 
73 protected:
74 
77 
80 
82  QString m_DisplayText_;
83 
85  QFrame popframe_;
86 
88  QListWidget vlist_;
89 
90 };
91 
92 #endif
GLM_FUNC_DECL genType e()
GLM_FUNC_DECL genType::row_type row(genType const &m, length_t const &index)
int screenbound_
lower/upper screen bound
QFrame popframe_
popup frame
int popheight_
the height of the popup
QString m_DisplayText_
hold the main display text
QListWidget vlist_
multi selection list in the popup frame


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:41:32