1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-23 02:32:10 +02:00
falkonOfficial/src/tools/buttonbox.cpp

19 lines
441 B
C++
Raw Normal View History

#include "buttonbox.h"
ButtonBox::ButtonBox(QWidget *parent) :
QDialogButtonBox(parent)
, m_clickedButton(QDialogButtonBox::RejectRole)
{
connect(this, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
}
void ButtonBox::buttonClicked(QAbstractButton *button)
{
m_clickedButton = buttonRole(button);
}
QDialogButtonBox::ButtonRole ButtonBox::clickedButtonRole()
{
return m_clickedButton;
}