libqutim 0.2.80.1

actionbox.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** qutIM - instant messenger
00004 **
00005 ** Copyright © 2011 Aleksey Sidorov <gorthauer87@yandex.ru>
00006 **
00007 *****************************************************************************
00008 **
00009 ** $QUTIM_BEGIN_LICENSE$
00010 ** This program is free software: you can redistribute it and/or modify
00011 ** it under the terms of the GNU General Public License as published by
00012 ** the Free Software Foundation, either version 3 of the License, or
00013 ** (at your option) any later version.
00014 **
00015 ** This program is distributed in the hope that it will be useful,
00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 ** See the GNU General Public License for more details.
00019 **
00020 ** You should have received a copy of the GNU General Public License
00021 ** along with this program.  If not, see http://www.gnu.org/licenses/.
00022 ** $QUTIM_END_LICENSE$
00023 **
00024 ****************************************************************************/
00025 
00026 #ifndef ACTIONBOX_H
00027 #define ACTIONBOX_H
00028 
00029 #include <QWidget>
00030 #include "libqutim_global.h"
00031 
00032 namespace qutim_sdk_0_3
00033 {
00034 
00035 class ActionBoxPrivate;
00036 class LIBQUTIM_EXPORT ActionBox : public QWidget
00037 {
00038     Q_OBJECT
00039     Q_DECLARE_PRIVATE(ActionBox)
00040 public:
00041     explicit ActionBox(QWidget *parent);
00042     void addAction(QAction *action);
00043     void addActions(QList<QAction*> actions);
00044     void removeAction(QAction *action);
00045     void removeActions(QList<QAction*> actions);
00046     void clear();
00047     ~ActionBox();
00048 private:
00049     QScopedPointer<ActionBoxPrivate> d_ptr;
00050 };
00051 
00052 class LIBQUTIM_EXPORT ActionBoxModule : public QWidget
00053 {
00054     Q_OBJECT    
00055 public:
00056     virtual void addAction(QAction *) = 0;
00057     virtual void removeAction(QAction *) = 0;
00058 };
00059 
00060 class LIBQUTIM_EXPORT ActionBoxGenerator : public QObject
00061 {
00062     Q_OBJECT
00063     Q_CLASSINFO("Service","ActionBoxModule")
00064 public:
00065     virtual ActionBoxModule *generate() = 0;
00066     virtual ~ActionBoxGenerator() {};
00067 };
00068 
00069 }
00070 
00071 #endif // ACTIONBOX_H
00072