| 1 | /* |
|---|
| 2 | * This file is part of Licq, an instant messaging client for UNIX. |
|---|
| 3 | * Copyright (C) 2007 Licq developers |
|---|
| 4 | * |
|---|
| 5 | * Licq is free software; you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * Licq is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | * GNU General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public License |
|---|
| 16 | * along with Licq; if not, write to the Free Software |
|---|
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef SKINNABLECOMBOBOX_H |
|---|
| 21 | #define SKINNABLECOMBOBOX_H |
|---|
| 22 | |
|---|
| 23 | #include <QComboBox> |
|---|
| 24 | |
|---|
| 25 | namespace LicqQtGui |
|---|
| 26 | { |
|---|
| 27 | |
|---|
| 28 | namespace Config |
|---|
| 29 | { |
|---|
| 30 | class ComboSkin; |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | /** |
|---|
| 34 | * Extended QComboBox which can be skinned |
|---|
| 35 | */ |
|---|
| 36 | class SkinnableComboBox : public QComboBox |
|---|
| 37 | { |
|---|
| 38 | Q_OBJECT |
|---|
| 39 | |
|---|
| 40 | public: |
|---|
| 41 | /** |
|---|
| 42 | * Constructor, create a skinnable combobox and apply a skin |
|---|
| 43 | * |
|---|
| 44 | * @param skin Combobox skin to apply |
|---|
| 45 | * @param parent Parent widget |
|---|
| 46 | */ |
|---|
| 47 | SkinnableComboBox(const Config::ComboSkin& skin, QWidget* parent = NULL); |
|---|
| 48 | |
|---|
| 49 | /** |
|---|
| 50 | * Constructor, create a default skinnable combobox |
|---|
| 51 | * |
|---|
| 52 | * @param parent Parent widget |
|---|
| 53 | */ |
|---|
| 54 | SkinnableComboBox(QWidget* parent = 0); |
|---|
| 55 | |
|---|
| 56 | /** |
|---|
| 57 | * Apply a skin |
|---|
| 58 | * |
|---|
| 59 | * @param skin New skin to use |
|---|
| 60 | */ |
|---|
| 61 | void applySkin(const Config::ComboSkin& skin); |
|---|
| 62 | }; |
|---|
| 63 | |
|---|
| 64 | } // namespace LicqQtGui |
|---|
| 65 | |
|---|
| 66 | #endif |
|---|