QMultiComboBox.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2010 Richard Steffen and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: rsteffen@messbild.de, rsteffen@uni-bonn.de
00006 **
00007 ** Observe the License Information
00008 **
00009 ****************************************************************************/
00010 
00011 #ifndef __MULTIBOXCOMBO_H__
00012 #define __MULTIBOXCOMBO_H__
00013 
00014 #include <iostream>
00015 using namespace std;
00016 
00017 #include <QComboBox>
00018 #include <QListWidget>
00019 #include <QVBoxLayout>
00020 #include <QStylePainter>
00021 
00022 class QMultiComboBox: public QComboBox
00023 {
00024     Q_OBJECT
00025 public:
00026 
00028     QMultiComboBox(QWidget *widget = 0);
00029 
00030     virtual ~QMultiComboBox();
00031 
00033     void SetDisplayText(QString text);
00034 
00036     QString GetDisplayText() const;
00037 
00039     void addItem(const QString& text, const QVariant& userData = QVariant());
00040 
00042     virtual void paintEvent(QPaintEvent *e);
00043 
00045     void setPopupHeight(int h);
00046 
00048     void showPopup();
00049     void hidePopup();
00050 
00052     int count();
00053     void setCurrentIndex(int index);
00054     QString currentText();
00055     QString itemText(int row);
00056     QVariant itemData(int row);
00057     void setItemChecked(int row, bool checked);
00058 
00059 Q_SIGNALS:
00061     void itemChanged();
00062 
00063 public Q_SLOTS:
00064 
00066     void scanItemSelect(QListWidgetItem* item);
00067 
00069     void initStyleOption(QStyleOptionComboBox *option) const;
00070 
00071     void clear();
00072 
00073 protected:
00074 
00076     int popheight_;
00077 
00079     int screenbound_;
00080 
00082     QString m_DisplayText_;
00083 
00085     QFrame popframe_;
00086 
00088     QListWidget vlist_;
00089 
00090 };
00091 
00092 #endif


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:21