qskinny/src/dialogs/QskDialogButton.h

46 lines
1.2 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::StandardButton standardButton READ standardButton()
WRITE setStandardButton NOTIFY standardButtonChanged() FINAL )
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::StandardButton, QQuickItem* parent = nullptr );
QskDialogButton( QQuickItem* parent = nullptr );
2018-07-31 15:32:25 +00:00
~QskDialogButton() override;
2017-07-21 16:21:34 +00:00
void setStandardButton( QskDialog::StandardButton );
QskDialog::StandardButton standardButton() const;
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:
2017-07-21 16:21:34 +00:00
void standardButtonChanged();
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:
2017-07-21 16:21:34 +00:00
QskDialog::StandardButton m_buttonType;
};
#endif