File indexing completed on 2025-01-05 05:14:39

0001 /*
0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com>
0003 
0004 SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QPushButton>
0010 
0011 class PushButton : public QPushButton
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     explicit PushButton(QWidget *parent = nullptr);
0017     Q_REQUIRED_RESULT QAction *action() const;
0018     void setAction(QAction *newAction);
0019 
0020 private:
0021     void updateButtonStatusFromAction();
0022     QAction *mAction{nullptr};
0023 };