2017-07-21 16:21:34 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_DIALOG_BUTTON_H
|
|
|
|
#define QSK_DIALOG_BUTTON_H
|
|
|
|
|
|
|
|
#include "QskDialog.h"
|
2018-08-03 06:15:28 +00:00
|
|
|
#include "QskPushButton.h"
|
2017-07-21 16:21:34 +00:00
|
|
|
|
|
|
|
class QSK_EXPORT QskDialogButton : public QskPushButton
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2018-11-05 12:29:52 +00:00
|
|
|
Q_PROPERTY( QskDialog::Action action READ action()
|
|
|
|
WRITE setAction NOTIFY actionChanged() FINAL )
|
2017-07-21 16:21:34 +00:00
|
|
|
|
|
|
|
using Inherited = QskPushButton;
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-11-05 12:29:52 +00:00
|
|
|
QskDialogButton( QskDialog::Action, QQuickItem* parent = nullptr );
|
2017-07-21 16:21:34 +00:00
|
|
|
QskDialogButton( QQuickItem* parent = nullptr );
|
|
|
|
|
2018-07-31 15:32:25 +00:00
|
|
|
~QskDialogButton() override;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-11-05 12:29:52 +00:00
|
|
|
void setAction( QskDialog::Action );
|
|
|
|
QskDialog::Action action() const;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
Q_SIGNALS:
|
2018-11-05 12:29:52 +00:00
|
|
|
void actionChanged();
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
protected:
|
2018-07-31 15:32:25 +00:00
|
|
|
void changeEvent( QEvent* ) override;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
private:
|
2022-03-08 15:15:37 +00:00
|
|
|
void resetButton();
|
|
|
|
|
2018-11-05 12:29:52 +00:00
|
|
|
QskDialog::Action m_action;
|
2017-07-21 16:21:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|