Warning, file /pim/mailcommon/src/snippets/snippettreeview.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002   snippet feature from kdevelop/plugins/snippet/
0003 
0004   SPDX-FileCopyrightText: 2007 Robert Gruber <rgruber@users.sourceforge.net>
0005   SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org>
0006 
0007   SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #include "mailcommon_export.h"
0013 #include <QTreeView>
0014 
0015 class KActionCollection;
0016 
0017 class QContextMenuEvent;
0018 
0019 namespace MailCommon
0020 {
0021 class SnippetsManager;
0022 struct SnippetInfo;
0023 /**
0024  * @author Robert Gruber
0025  */
0026 class MAILCOMMON_EXPORT SnippetTreeView : public QTreeView
0027 {
0028     Q_OBJECT
0029 public:
0030     explicit SnippetTreeView(KActionCollection *actionCollection, QWidget *parent = nullptr);
0031     ~SnippetTreeView() override;
0032 
0033     MailCommon::SnippetsManager *snippetsManager() const;
0034 
0035 protected:
0036     void contextMenuEvent(QContextMenuEvent *) override;
0037     void dropEvent(QDropEvent *) override;
0038 
0039 Q_SIGNALS:
0040     void insertSnippetInfo(const SnippetInfo &info);
0041 
0042 private:
0043     MailCommon::SnippetsManager *mSnippetsManager = nullptr;
0044 };
0045 }