libqutim  0.3.1.0
actionbox.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** qutIM - instant messenger
4 **
5 ** Copyright © 2011 Aleksey Sidorov <gorthauer87@yandex.ru>
6 **
7 *****************************************************************************
8 **
9 ** $QUTIM_BEGIN_LICENSE$
10 ** This program is free software: you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation, either version 3 of the License, or
13 ** (at your option) any later version.
14 **
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 ** See the GNU General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see http://www.gnu.org/licenses/.
22 ** $QUTIM_END_LICENSE$
23 **
24 ****************************************************************************/
25 
26 #ifndef ACTIONBOX_H
27 #define ACTIONBOX_H
28 
29 #include <QWidget>
30 #include "libqutim_global.h"
31 
32 namespace qutim_sdk_0_3
33 {
34 
35 class ActionBoxPrivate;
36 class LIBQUTIM_EXPORT ActionBox : public QWidget
37 {
38  Q_OBJECT
39  Q_DECLARE_PRIVATE(ActionBox)
40 public:
41  explicit ActionBox(QWidget *parent);
42  void addAction(QAction *action);
43  void addActions(QList<QAction*> actions);
44  void removeAction(QAction *action);
45  void removeActions(QList<QAction*> actions);
46  void clear();
47  ~ActionBox();
48 private:
49  QScopedPointer<ActionBoxPrivate> d_ptr;
50 };
51 
52 class LIBQUTIM_EXPORT ActionBoxModule : public QWidget
53 {
54  Q_OBJECT
55 public:
56  virtual void addAction(QAction *) = 0;
57  virtual void removeAction(QAction *) = 0;
58 };
59 
60 class LIBQUTIM_EXPORT ActionBoxGenerator : public QObject
61 {
62  Q_OBJECT
63  Q_CLASSINFO("Service","ActionBoxModule")
64 public:
65  virtual ActionBoxModule *generate() = 0;
66  virtual ~ActionBoxGenerator() {};
67 };
68 
69 }
70 
71 #endif // ACTIONBOX_H
72 

Generated by Doxygen