File indexing completed on 2024-09-01 03:44:04
0001 /* 0002 * SPDX-FileCopyrightText: 2023 Kai Uwe Broulik <kde@broulik.de> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef KOPENACTION_H 0008 #define KOPENACTION_H 0009 0010 #include <KToolBarPopupAction> 0011 #include <kconfigwidgets_export.h> 0012 0013 #include <memory> 0014 0015 class KOpenActionPrivate; 0016 0017 // TODO export only for for unittests? 0018 class KCONFIGWIDGETS_EXPORT KOpenAction : public KToolBarPopupAction 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit KOpenAction(QObject *parent = nullptr); 0024 KOpenAction(const QIcon &icon, const QString &text, QObject *parent); 0025 ~KOpenAction() override; 0026 0027 protected: 0028 QWidget *createWidget(QWidget *parent) override; 0029 0030 private: 0031 std::unique_ptr<KOpenActionPrivate> const d; 0032 }; 0033 0034 #endif // KOPENACTION_H