File indexing completed on 2024-05-19 05:08:35
0001 /* 0002 SPDX-FileCopyrightText: 2009-2010 Cristian Oneț <onet.cristian@gmail.com> 0003 SPDX-FileCopyrightText: 2009-2010 Alvaro Soliverez <asoliverez@gmail.com> 0004 SPDX-FileCopyrightText: 2011-2020 Thomas Baumgart <tbaumgart@kde.org> 0005 SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KTAGLABEL_H 0010 #define KTAGLABEL_H 0011 0012 // ---------------------------------------------------------------------------- 0013 // QT Includes 0014 0015 #include <QFrame> 0016 0017 // ---------------------------------------------------------------------------- 0018 // KDE Includes 0019 0020 // ---------------------------------------------------------------------------- 0021 // Project Includes 0022 0023 /** 0024 * This class implements a tag label. It create a QFrame and inside it a QToolButton 0025 * with a 'X' Icon and a QLabel with the name of the Tag 0026 * 0027 * @author Alessandro Russo 0028 */ 0029 class KTagLabel : public QFrame 0030 { 0031 Q_OBJECT 0032 Q_DISABLE_COPY(KTagLabel) 0033 0034 public: 0035 explicit KTagLabel(const QString& id, const QString& name, QWidget* parent = nullptr); 0036 0037 inline const QString& id() { 0038 return m_id; 0039 } 0040 0041 Q_SIGNALS: 0042 void clicked(bool); 0043 0044 private: 0045 QString m_id; 0046 }; 0047 0048 #endif