2014-07-05 14:33:11 -04:00
|
|
|
#ifndef SUBSCRIBETOOLBUTTON_H
|
|
|
|
#define SUBSCRIBETOOLBUTTON_H
|
|
|
|
|
|
|
|
#include <QToolButton>
|
|
|
|
|
|
|
|
class SubscribeToolButton : public QToolButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit SubscribeToolButton(QWidget *parent = 0);
|
|
|
|
|
|
|
|
void setSubscribed(bool subscribed);
|
|
|
|
void addSubscribedAction(QAction *action);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void subscribe(bool subscribe);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void subscribePrivate();
|
|
|
|
void unsubscribePrivate();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateUi();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool mSubscribed;
|
|
|
|
QList<QAction*> mSubscribedActions;
|
2016-04-22 17:55:15 -04:00
|
|
|
QMenu *mMenu ;
|
2014-07-05 14:33:11 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SUBSCRIBETOOLBUTTON_H
|