File indexing completed on 2024-05-26 11:38:59

0001 /*
0002     This file is part of the KDE libraries
0003 
0004     SPDX-FileCopyrightText: 2007 Andreas Hartmetz <ahartmetz@gmail.com>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef KGLOBALSHORTCUTTEST_H
0010 #define KGLOBALSHORTCUTTEST_H
0011 
0012 #include <QObject>
0013 
0014 class QAction;
0015 
0016 class KGlobalShortcutTest : public QObject
0017 {
0018     Q_OBJECT
0019 private Q_SLOTS:
0020     void initTestCase();
0021     void testSetShortcut();
0022     void testActivateShortcut();
0023     void testFindActionByKey();
0024     void testChangeShortcut();
0025     void testStealShortcut();
0026     void testSaveRestore();
0027     void testListActions();
0028     void testComponentAssignment();
0029     void testConfigurationActions();
0030     void testNotification();
0031 
0032     void testGetGlobalShortcut();
0033     void testMangle();
0034     void testCrop();
0035     void testReverse();
0036     void testMatch();
0037 
0038     // This has to be the last before forgetGlobalShortcut
0039     void testOverrideMainComponentData();
0040 
0041     void testForgetGlobalShortcut(); // clean global config altered by setupTest
0042 
0043 public:
0044     KGlobalShortcutTest()
0045         : m_actionA(nullptr)
0046         , m_actionB(nullptr)
0047     {
0048     }
0049 
0050 private:
0051     void setupTest(const QString &id);
0052 
0053     QAction *m_actionA;
0054     QAction *m_actionB;
0055     bool m_daemonInstalled;
0056 };
0057 
0058 #endif