qskinny/src/dialogs/QskDialogButton.h

46 lines
1.1 KiB
C
Raw Normal View History

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
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
QSK_SUBCONTROLS( Panel, Text, Graphic )
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
void setAction( QskDialog::Action );
QskDialog::Action action() const;
2017-07-21 16:21:34 +00:00
2018-07-31 15:32:25 +00:00
QskAspect::Subcontrol effectiveSubcontrol(
2017-07-21 16:21:34 +00:00
QskAspect::Subcontrol ) const override;
2018-08-03 06:15:28 +00:00
Q_SIGNALS:
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:
QskDialog::Action m_action;
2017-07-21 16:21:34 +00:00
};
#endif