#ifndef TOGGLETEXTBUTTONWIDGET_H
#define TOGGLETEXTBUTTONWIDGET_H

#include <QGraphicsWidget>
#include <QRect>
#include <QTimeLine>
#include "TextButtonWidget.h"

#define TOGGLE_TEXT_BUTTON_WIDGET_WIDTH 280
#define TOGGLE_TEXT_BUTTON_WIDGET_HEIGHT 25

class CToggleTextButtonWidget : public QGraphicsWidget
{
     Q_OBJECT
public:
    CToggleTextButtonWidget(QString ActivatedText,QString DeActivatedText,
                            QPixmap ActivatedButtonImage,QPixmap DeActivatedButtonImage,
                            int ButtonHeight = TOGGLE_TEXT_BUTTON_WIDGET_HEIGHT,int ButtonWidth = 0,int FontSize = 0, int ToggleTextButtonData = 0);
    virtual ~CToggleTextButtonWidget();

    void ForceDeactivation(bool Emit = false);
    void ForceActivation(bool Emit = false);
	bool GetActivationState(){return mButtonState;}

    public slots:
    void ChildTextButtonClicked(CTextButtonWidget *TextButtonPtr);
//    void TxtButtonPressed(CTextButtonWidget *TextButtonPtr);
//    void TxtButtonReleased(CTextButtonWidget *TextButtonPtr);

    signals:
    void ToggleBtnActivate(CToggleTextButtonWidget* ButtonInstancePtr);
    void ToggleBtnDeActivate(CToggleTextButtonWidget* ButtonInstancePtr);

private:
    CTextButtonWidget *mTextButton;
    QString mActivatedBtnText,mDeActivatedButtonText;
    QPixmap mActivatedBtnImage,mDeActivatedBtnImage;
    unsigned int mButtonHeight,mButtonWidth;
    int mButtonData;
    bool mButtonState;  //false = deactivated(up), true = activated (down)

};

#endif // TOGGLETEXTBUTTONWIDGET_H
