File indexing completed on 2022-11-23 12:35:01

0001 /*
0002     SPDX-FileCopyrightText: 2020-2022 Laurent Montel <montel@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #pragma once
0009 
0010 #include "libkdebugsettings_private_export.h"
0011 #include <QMenu>
0012 class LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT LoadGroupMenu : public QMenu
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit LoadGroupMenu(QWidget *parent = nullptr);
0017     ~LoadGroupMenu() override;
0018 
0019     void refreshMenu();
0020 
0021     Q_REQUIRED_RESULT static QString defaultWritableGroupPath();
0022 
0023     Q_REQUIRED_RESULT QStringList groupNames() const;
0024     void setGroupNames(const QStringList &groupNames);
0025 
0026 Q_SIGNALS:
0027     void loadGroupRequested(const QString &filePath);
0028     void manageGroupRequested();
0029 
0030 private:
0031     void init();
0032     QStringList mGroupNames;
0033     Q_REQUIRED_RESULT QStringList defaultReadableGroupPath() const;
0034 };