Warning, file /plasma/oxygen/kdecoration/oxygensizegrip.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef oxygensizegrip_h 0002 #define oxygensizegrip_h 0003 /* 0004 SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #include "config-oxygen.h" 0009 #include "oxygendecoration.h" 0010 0011 #include <QMouseEvent> 0012 #include <QPaintEvent> 0013 #include <QPointer> 0014 #include <QWidget> 0015 0016 #if OXYGEN_HAVE_X11 0017 #include <xcb/xcb.h> 0018 #endif 0019 0020 namespace Oxygen 0021 { 0022 0023 //* implements size grip for all widgets 0024 class SizeGrip : public QWidget 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 //* constructor 0030 explicit SizeGrip(Decoration *); 0031 0032 protected: 0033 //*@name event handlers 0034 //@{ 0035 0036 //* paint 0037 void paintEvent(QPaintEvent *) override; 0038 0039 //* mouse press 0040 void mousePressEvent(QMouseEvent *) override; 0041 0042 //@} 0043 0044 private Q_SLOTS: 0045 0046 //* update background color 0047 void updateActiveState(void); 0048 0049 //* update position 0050 void updatePosition(void); 0051 0052 //* embed into parent widget 0053 void embed(void); 0054 0055 private: 0056 //* send resize event 0057 void sendMoveResizeEvent(QPoint); 0058 0059 //* grip size 0060 enum { Offset = 0, GripSize = 14 }; 0061 0062 //* decoration 0063 QPointer<Decoration> m_decoration; 0064 0065 //* move/resize atom 0066 #if OXYGEN_HAVE_X11 0067 xcb_atom_t m_moveResizeAtom = 0; 0068 #endif 0069 }; 0070 } 0071 0072 #endif