File indexing completed on 2024-05-12 16:44:05
0001 /* 0002 SPDX-FileCopyrightText: 2021 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef POPUPPOSITIONER_H 0007 #define POPUPPOSITIONER_H 0008 0009 #include "kmm_widgets_export.h" 0010 0011 // ---------------------------------------------------------------------------- 0012 // QT Includes 0013 0014 class QWidget; 0015 0016 // ---------------------------------------------------------------------------- 0017 // KDE Includes 0018 0019 // ---------------------------------------------------------------------------- 0020 // Project Includes 0021 0022 /** 0023 * This class represents a helper to position a @a popupWidget 0024 * relative to a @a baseWidget while making sure that the 0025 * popupWidget does not cross screen boundaries on a virtual 0026 * desktop. 0027 * 0028 * The @ 0029 * 0030 * @author Thomas Baumgart 0031 */ 0032 class KMM_WIDGETS_EXPORT PopupPositioner 0033 { 0034 public: 0035 typedef enum { TopLeft, TopRight, BottemLeft, BottomRight } Anchor; 0036 0037 explicit PopupPositioner(QWidget* baseWidget, QWidget* popupWidget, Anchor anchor); 0038 }; 0039 0040 #endif