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-02-01 08:07:54 +01:00
|
|
|
template class QVector< QMetaObject::Connection >;
|
|
|
|
|
2017-07-21 18:21:34 +02:00
|
|
|
class QSK_EXPORT QskFocusIndicator : public QskControl
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
using Inherited = QskControl;
|
|
|
|
|
|
|
|
public:
|
|
|
|
QSK_SUBCONTROLS( Panel )
|
|
|
|
|
|
|
|
QskFocusIndicator( QQuickItem* parent = nullptr );
|
|
|
|
virtual ~QskFocusIndicator();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual 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-04-19 09:39:46 +02:00
|
|
|
private:
|
2017-07-21 18:21:34 +02:00
|
|
|
void onFocusItemGeometryChanged();
|
2018-04-19 09:39:46 +02:00
|
|
|
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
|