qskinny/src/controls/QskFocusIndicator.h

45 lines
1.1 KiB
C
Raw Normal View History

2017-07-21 18:21:34 +02:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
#ifndef QSK_FOCUS_INDICATOR_H
#define QSK_FOCUS_INDICATOR_H
#include "QskControl.h"
2018-07-15 09:46:21 +02:00
template <typename T> class QVector;
2018-02-01 08:07:54 +01:00
2017-07-21 18:21:34 +02:00
class QSK_EXPORT QskFocusIndicator : public QskControl
{
Q_OBJECT
using Inherited = QskControl;
2018-08-03 08:15:28 +02:00
public:
2017-07-21 18:21:34 +02:00
QSK_SUBCONTROLS( Panel )
QskFocusIndicator( QQuickItem* parent = nullptr );
2018-07-31 17:32:25 +02:00
~QskFocusIndicator() override;
2017-07-21 18:21:34 +02:00
2018-08-03 08:15:28 +02:00
protected:
2018-07-31 17:32:25 +02:00
void windowChangeEvent( QskWindowChangeEvent* ) override;
2018-02-01 08:07:54 +01:00
virtual QRectF focusRect() const;
2017-07-21 18:21:34 +02:00
2018-08-03 08:15:28 +02:00
private:
2017-07-21 18:21:34 +02:00
void onFocusItemGeometryChanged();
void onWindowSizeChanged( int );
2017-07-21 18:21:34 +02:00
2018-02-01 08:07:54 +01:00
void onFocusItemChanged();
void onFocusItemDestroyed();
void updateFocusFrame();
void connectWindow( const QQuickWindow*, bool on );
QVector< QMetaObject::Connection > connectItem( const QQuickItem* );
2017-07-21 18:21:34 +02:00
2018-02-01 08:07:54 +01:00
class PrivateData;
std::unique_ptr< PrivateData > m_data;
2017-07-21 18:21:34 +02:00
};
#endif