File indexing completed on 2024-03-24 15:40:39

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2021 Felix Ernst <fe.a.ernst@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef KTOOLTIPHELPER_UNITTEST_H
0009 #define KTOOLTIPHELPER_UNITTEST_H
0010 
0011 #include <QObject>
0012 
0013 #include <QMainWindow>
0014 
0015 class QFrame;
0016 class QToolButton;
0017 class QWidget;
0018 
0019 class KToolTipHelper_UnitTest : public QObject
0020 {
0021     Q_OBJECT
0022 
0023 private:
0024     QString shownToolTip(QWidget *widget);
0025 
0026 private Q_SLOTS:
0027     void initTestCase();
0028     void testGeneralWidget();
0029     void testInvokingWhatsThis();
0030     void testQToolButton();
0031     void testQMenu();
0032     void cleanupTestCase();
0033 
0034 private:
0035     std::unique_ptr<QMainWindow> m_window;
0036     QWidget *m_centralWidget;
0037     QFrame *m_frame;
0038     QFrame *m_frameWithoutToolTip;
0039     QToolButton *m_toolButton;
0040 };
0041 
0042 #endif