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 
16 #include <QComboBox>
17 #include <QListWidget>
18 #include <QVBoxLayout>
19 #include <QStylePainter>
20 
21 class QMultiComboBox: public QComboBox
22 {
23  Q_OBJECT
24 public:
25 
27  QMultiComboBox(QWidget *widget = 0);
28 
29  virtual ~QMultiComboBox();
30 
32  void SetDisplayText(QString text);
33 
35  QString GetDisplayText() const;
36 
38  void addItem(const QString& text, const QVariant& userData = QVariant());
39 
41  virtual void paintEvent(QPaintEvent *e);
42 
44  void setPopupHeight(int h);
45 
47  void showPopup();
48  void hidePopup();
49 
51  int count();
52  void setCurrentIndex(int index);
53  QString currentText();
54  QString itemText(int row);
55  QVariant itemData(int row);
56  void setItemChecked(int row, bool checked);
57 
58 Q_SIGNALS:
60  void itemChanged();
61 
62 public Q_SLOTS:
63 
65  void scanItemSelect(QListWidgetItem* item);
66 
68  void initStyleOption(QStyleOptionComboBox *option) const;
69 
70  void clear();
71 
72 protected:
73 
75  int popheight_;
76 
78  int screenbound_;
79 
81  QString m_DisplayText_;
82 
84  QFrame popframe_;
85 
87  QListWidget vlist_;
88 
89 };
90 
91 #endif
QMultiComboBox::m_DisplayText_
QString m_DisplayText_
hold the main display text
Definition: QMultiComboBox.h:89
QMultiComboBox
Definition: QMultiComboBox.h:21
QMultiComboBox::popheight_
int popheight_
the height of the popup
Definition: QMultiComboBox.h:83
QMultiComboBox::screenbound_
int screenbound_
lower/upper screen bound
Definition: QMultiComboBox.h:86
QMultiComboBox::addItem
void addItem(const QString &text, const QVariant &userData=QVariant())
add a item to the list
Definition: QMultiComboBox.cpp:149
QMultiComboBox::hidePopup
void hidePopup()
Definition: QMultiComboBox.cpp:143
QMultiComboBox::QMultiComboBox
QMultiComboBox(QWidget *widget=0)
Constructor.
Definition: QMultiComboBox.cpp:19
QMultiComboBox::~QMultiComboBox
virtual ~QMultiComboBox()
Definition: QMultiComboBox.cpp:41
h
const double h
QMultiComboBox::itemData
QVariant itemData(int row)
Definition: QMultiComboBox.cpp:186
QMultiComboBox::currentText
QString currentText()
Definition: QMultiComboBox.cpp:174
QMultiComboBox::itemChanged
void itemChanged()
item changed
QMultiComboBox::paintEvent
virtual void paintEvent(QPaintEvent *e)
custom paint
Definition: QMultiComboBox.cpp:73
QMultiComboBox::setItemChecked
void setItemChecked(int row, bool checked)
Definition: QMultiComboBox.cpp:193
QMultiComboBox::GetDisplayText
QString GetDisplayText() const
get the main display text
Definition: QMultiComboBox.cpp:61
QMultiComboBox::itemText
QString itemText(int row)
Definition: QMultiComboBox.cpp:180
QMultiComboBox::vlist_
QListWidget vlist_
multi selection list in the popup frame
Definition: QMultiComboBox.h:95
QMultiComboBox::setPopupHeight
void setPopupHeight(int h)
set the height of the popup
Definition: QMultiComboBox.cpp:67
QMultiComboBox::showPopup
void showPopup()
replace standard QComboBox Popup
Definition: QMultiComboBox.cpp:88
glm::row
GLM_FUNC_DECL genType::row_type row(genType const &m, length_t const &index)
QMultiComboBox::count
int count()
replace neccessary data access
Definition: QMultiComboBox.cpp:162
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
QMultiComboBox::SetDisplayText
void SetDisplayText(QString text)
the main display text
Definition: QMultiComboBox.cpp:47
QMultiComboBox::popframe_
QFrame popframe_
popup frame
Definition: QMultiComboBox.h:92
QMultiComboBox::initStyleOption
void initStyleOption(QStyleOptionComboBox *option) const
the init style
Definition: QMultiComboBox.cpp:224
QMultiComboBox::clear
void clear()
Definition: QMultiComboBox.cpp:232
QMultiComboBox::scanItemSelect
void scanItemSelect(QListWidgetItem *item)
react on changes of the item checkbox
Definition: QMultiComboBox.cpp:205
QMultiComboBox::setCurrentIndex
void setCurrentIndex(int index)
Definition: QMultiComboBox.cpp:168
text
text


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:15