Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
833 B
Raw Blame
/*
 * This file is part of the KDE project
 * SPDX-FileCopyrightText: 2013 Arjen Hiemstra <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KISMOUSEINPUTEDITOR_H
#define KISMOUSEINPUTEDITOR_H

#include <QPushButton>

namespace Ui
{
class KisMouseInputEditor;
}

/**
 * \brief An editor widget for mouse buttons with modifiers.
 */
class KisMouseInputEditor : public QPushButton
{
    Q_OBJECT
public:
    KisMouseInputEditor(QWidget *parent = nullptr);
    ~KisMouseInputEditor() override;

    QList<Qt::Key> keys() const;
    void setKeys(const QList<Qt::Key> &newKeys);

    Qt::MouseButtons buttons() const;
    void setButtons(Qt::MouseButtons newButtons);

private Q_SLOTS:
    void updateLabel();

private:
    class Private;
    Private *const d {nullptr};
};

#endif // KISMOUSEINPUTEDITOR_H