File indexing completed on 2024-06-02 05:43:56
0001 #pragma once 0002 0003 /* 0004 * SPDX-FileCopyrightText: 2003-2007 Craig Drummond <craig@kde.org> 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #include "FcEngine.h" 0009 #include <QFrame> 0010 0011 class QLabel; 0012 class QTimer; 0013 class QResizeEvent; 0014 class QEvent; 0015 0016 namespace KFI 0017 { 0018 class CFontPreview; 0019 0020 class CCharTip : public QFrame 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 CCharTip(CFontPreview *parent); 0026 ~CCharTip() override; 0027 0028 void setItem(const CFcEngine::TChar &ch); 0029 0030 private Q_SLOTS: 0031 0032 void showTip(); 0033 void hideTip(); 0034 0035 private: 0036 void reposition(); 0037 void resizeEvent(QResizeEvent *event) override; 0038 bool eventFilter(QObject *, QEvent *e) override; 0039 0040 private: 0041 CFontPreview *m_parent; 0042 QLabel *m_label, *m_pixmapLabel; 0043 QTimer *m_timer; 0044 CFcEngine::TChar m_item; 0045 }; 0046 0047 }