File indexing completed on 2024-09-01 04:44:56
0001 /* 0002 SPDX-FileCopyrightText: 2021 RafaĆ Lalik <rafallalik@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef FACTORWIDGET_H 0008 #define FACTORWIDGET_H 0009 0010 #ifndef QTONLY 0011 #include "krdccore_export.h" 0012 #else 0013 #define KRDCCORE_EXPORT 0014 #endif 0015 0016 #include <QWidgetAction> 0017 0018 class MainWindow; 0019 0020 /** 0021 * Widget Action to display slider in the action toolbar. Each time action is 0022 * add, the new QSlider widget is created via @ref createWidget() method. 0023 */ 0024 class KRDCCORE_EXPORT FactorWidget : public QWidgetAction 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 FactorWidget(QWidget *parent = nullptr); 0030 FactorWidget(const QString &text, MainWindow *receiver, QObject *parent = nullptr); 0031 ~FactorWidget() override; 0032 0033 protected: 0034 virtual QWidget *createWidget(QWidget *parent) override; 0035 virtual void deleteWidget(QWidget *widget) override; 0036 0037 MainWindow *m_receiver; 0038 }; 0039 0040 #endif