1 /*
2  Kopete Oscar Protocol
3  infocombobox.h - ComboBox for user info
4 
5  Copyright (c) 2007 Roman Jarosz <kedgedev@centrum.cz>
6 
7  Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  *                                                                       *
11  * This library is free software; you can redistribute it and/or         *
12  * modify it under the terms of the GNU Lesser General Public            *
13  * License as published by the Free Software Foundation; either          *
14  * version 2 of the License, or (at your option) any later version.      *
15  *                                                                       *
16  *************************************************************************
17 */
18 
19 #ifndef INFOCOMBOBOX_H
20 #define INFOCOMBOBOX_H
21 
22 #include <QComboBox>
23 
24 class InfoComboBox : public QComboBox
25 {
26 	Q_OBJECT
27 
28 public:
29 	InfoComboBox( QWidget *parent = nullptr );
30 
31 	/**
32 	 * Set read only mode for the combo box
33 	 *
34 	 * @note In read only mode the combo box shows QLineEdit and
35 	 *       the list of items can't be shown.
36 	 */
37 	void setReadOnly( bool readOnly );
38 	bool isReadOnly() const;
39 
40 	void showPopup() Q_DECL_OVERRIDE;
41 
42 private:
43 	bool mReadOnly;
44 };
45 
46 #endif
47