File: factorwidget.h

package info (click to toggle)
krdc 4%3A22.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,240 kB
  • sloc: cpp: 6,392; xml: 135; makefile: 8; sh: 5
file content (40 lines) | stat: -rw-r--r-- 885 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
    SPDX-FileCopyrightText: 2021 RafaƂ Lalik <rafallalik@gmail.com>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef FACTORWIDGET_H
#define FACTORWIDGET_H

#ifndef QTONLY
    #include "krdccore_export.h"
#else
    #define KRDCCORE_EXPORT
#endif

#include <QWidgetAction>

class MainWindow;

/**
 * Widget Action to display slider in the action toolbar. Each time action is
 * add, the new QSlider widget is created via @ref createWidget() method.
 */
class KRDCCORE_EXPORT FactorWidget : public QWidgetAction
{
    Q_OBJECT

public:
    FactorWidget(QWidget *parent = nullptr);
    FactorWidget(const QString &text, MainWindow * receiver, QObject *parent = nullptr);
    ~FactorWidget() override;

protected:
    virtual QWidget * createWidget(QWidget * parent) override;
    virtual void deleteWidget(QWidget * widget) override;

    MainWindow * m_receiver;
};

#endif