OpenMW
components/contentselector/view/combobox.hpp
Go to the documentation of this file.
00001 #ifndef COMBOBOX_HPP
00002 #define COMBOBOX_HPP
00003 
00004 #include <QComboBox>
00005 #include <QStylePainter>
00006 
00007 class QString;
00008 class QRegExpValidator;
00009 
00010 namespace ContentSelectorView
00011 {
00012     class ComboBox : public QComboBox
00013     {
00014         Q_OBJECT
00015 
00016     public:
00017         explicit ComboBox (QWidget *parent = 0);
00018 
00019         void setPlaceholderText(const QString &text);
00020 
00021     private:
00022         QString mPlaceholderText;
00023 
00024     protected:
00025         void paintEvent(QPaintEvent *);
00026         QRegExpValidator *mValidator;
00027     };
00028 }
00029 
00030 #endif // COMBOBOX_HPP