#include <utility>
#include "AbstractTextButton.h"
#include <QPainter>

Abstract_Text_Button::Abstract_Text_Button(QWidget *parent) : QWidget(parent) {
}

void Abstract_Text_Button::paintEvent(QPaintEvent *event) {
    QPainter painter(this);
    painter.fillRect(rect(), Qt::red);
    painter.end();
}

void Abstract_Text_Button::mousePressEvent(QMouseEvent *event) {
    if(click) click();
    event->accept();
}