isTabFence/isShortcutScope added
This commit is contained in:
parent
81acf6b610
commit
8175719679
@ -216,7 +216,7 @@ public:
|
||||
bool isInitiallyPainted : 1;
|
||||
|
||||
uint focusPolicy : 4;
|
||||
bool isWheelEnabled;
|
||||
bool isWheelEnabled : 1;
|
||||
};
|
||||
|
||||
QskControl::QskControl( QQuickItem* parent ):
|
||||
@ -471,6 +471,32 @@ bool QskControl::isTabFence() const
|
||||
return d_func()->isTabFence;
|
||||
}
|
||||
|
||||
bool QskControl::isTabFence( const QQuickItem* item )
|
||||
{
|
||||
if ( item == nullptr )
|
||||
return false;
|
||||
|
||||
return QQuickItemPrivate::get( item )->isTabFence;
|
||||
}
|
||||
|
||||
bool QskControl::isShortcutScope( const QQuickItem* item )
|
||||
{
|
||||
if ( item == nullptr )
|
||||
return false;
|
||||
|
||||
/*
|
||||
We might have something like CTRL+W to close a "window".
|
||||
But in Qt/Quick a window is not necessarily a QQuickWindow
|
||||
like we have f.e QskSubWindow.
|
||||
|
||||
Maybe it's worth to introduce a shortcutScope flag but for
|
||||
the moment we simply use the isFocusScope/isTabFence combination,
|
||||
that should usually be set for those "windows".
|
||||
*/
|
||||
|
||||
return item->isFocusScope() && QQuickItemPrivate::get( item )->isTabFence;
|
||||
}
|
||||
|
||||
QskControl::Flags QskControl::controlFlags() const
|
||||
{
|
||||
return QskControl::Flags( d_func()->controlFlags );
|
||||
|
@ -134,6 +134,9 @@ public:
|
||||
void setTabFence( bool );
|
||||
bool isTabFence() const;
|
||||
|
||||
static bool isTabFence( const QQuickItem* );
|
||||
static bool isShortcutScope( const QQuickItem* );
|
||||
|
||||
void setControlFlags( Flags );
|
||||
void resetControlFlags();
|
||||
Flags controlFlags() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user