File indexing completed on 2024-05-12 15:56:53

0001 /* This file is part of the KDE project
0002  * SPDX-FileCopyrightText: 2006 Thomas Zander <zander@kde.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 #ifndef KOTOOLSELECTION_H
0007 #define KOTOOLSELECTION_H
0008 
0009 #include "kritaflake_export.h"
0010 #include <QObject>
0011 
0012 /**
0013  * Each tool can have a selection which is private to that tool and the specified shape
0014  * that it comes with.
0015  * This object is provided for applications to operate on that selection.  Copy paste
0016  * come to mind, but also marking the selected text bold.
0017  */
0018 class KRITAFLAKE_EXPORT KoToolSelection : public QObject
0019 {
0020     Q_OBJECT
0021 public:
0022     /**
0023      * Constructor.
0024      * @param parent a parent for memory management purposes.
0025      */
0026     explicit KoToolSelection(QObject *parent = 0);
0027     ~KoToolSelection() override;
0028 
0029     /// return true if the tool currently has something selected that can be copied or deleted.
0030     virtual bool hasSelection() {
0031         return false;
0032     }
0033 };
0034 
0035 #endif