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++
1.1 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */
#ifndef SVGTEXTSHORTCUTS_H
#define SVGTEXTSHORTCUTS_H

#include <QAction>

class QString;
class KoSvgTextProperties;
/**
 * @brief The SvgTextShortCuts class
 *
 * Class to handle text property shortcuts generically.
 *
 * Many text property shortcuts are about toggling/enabling a single property.
 * Given there's a huge amount of them, it thus makes sense to generalize the
 * actions by adding a special QVariant to them and using that QVariant to
 * determine which property adjustment is at play.
 *
 */
class SvgTextShortCuts
{
public:
    static QStringList possibleActions();
    static bool configureAction(QAction *action, const QString &name);

    static bool actionEnabled(QAction *action, const QList<KoSvgTextProperties> currentProperties);

    static KoSvgTextProperties getModifiedProperties(const QAction *action, QList<KoSvgTextProperties> currentProperties);

private:
};

#endif // SVGTEXTSHORTCUTS_H