1 /*
2  * This file is part of Licq, an instant messaging client for UNIX.
3  * Copyright (C) 2012 Licq developers <licq-dev@googlegroups.com>
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 LICQGUI_OWNERCOMBOBOX_H
21 #define LICQGUI_OWNERCOMBOBOX_H
22 
23 #include <QComboBox>
24 
25 #include <licq/userid.h>
26 
27 namespace LicqQtGui
28 {
29 
30 /**
31  * Combo box to select an owner
32  */
33 class OwnerComboBox : public QComboBox
34 {
35   Q_OBJECT
36 
37 public:
38   /**
39    * Constructor
40    *
41    * @param filter Which owner to include
42    * @param extra Text of additional selection (will return invalid userid)
43    * @param parent Parent widget
44    */
45   OwnerComboBox(const QString& extra = QString(), QWidget* parent = 0);
46 
47   /// Get userid of selected owner
48   Licq::UserId currentOwnerId() const;
49 
50   /// Set selection
51   bool setCurrentOwnerId(const Licq::UserId& ownerId);
52 };
53 
54 } // namespace LicqQtGui
55 
56 #endif
57