Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QWindowsDialogHelperBase< BaseClass > Class Template Referenceabstract

Helper for native Windows dialogs. More...

#include <qwindowsdialoghelpers.h>

+ Inheritance diagram for QWindowsDialogHelperBase< BaseClass >:
+ Collaboration diagram for QWindowsDialogHelperBase< BaseClass >:

Public Types

using QWindowsNativeDialogBasePtr = QSharedPointer< QWindowsNativeDialogBase >
 

Public Member Functions

 ~QWindowsDialogHelperBase ()
 
void exec () override
 
bool show (Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override
 
void hide () override
 
virtual bool supportsNonModalDialog (const QWindow *=nullptr) const
 

Protected Member Functions

 QWindowsDialogHelperBase ()=default
 
QWindowsNativeDialogBasenativeDialog () const
 
bool hasNativeDialog () const
 
void timerEvent (QTimerEvent *) override
 

Private Member Functions

virtual QWindowsNativeDialogBasecreateNativeDialog ()=0
 

Detailed Description

template<class BaseClass>
class QWindowsDialogHelperBase< BaseClass >

Helper for native Windows dialogs.

Provides basic functionality and introduces new virtuals. The native dialog is created in setVisible_sys() since then modality and the state of DontUseNativeDialog is known.

Modal dialogs are then run by exec(). Non-modal dialogs are shown using a separate thread started in show() should they support it.

See also
QWindowsDialogThread, QWindowsNativeDialogBase

Definition at line 29 of file qwindowsdialoghelpers.h.

Member Typedef Documentation

◆ QWindowsNativeDialogBasePtr

template<class BaseClass >
using QWindowsDialogHelperBase< BaseClass >::QWindowsNativeDialogBasePtr = QSharedPointer<QWindowsNativeDialogBase>

Definition at line 33 of file qwindowsdialoghelpers.h.

Constructor & Destructor Documentation

◆ ~QWindowsDialogHelperBase()

template<class BaseClass >
QWindowsDialogHelperBase< BaseClass >::~QWindowsDialogHelperBase

Definition at line 167 of file qwindowsdialoghelpers.cpp.

References hide().

+ Here is the call graph for this function:

◆ QWindowsDialogHelperBase()

template<class BaseClass >
QWindowsDialogHelperBase< BaseClass >::QWindowsDialogHelperBase ( )
protecteddefault

Member Function Documentation

◆ createNativeDialog()

template<class BaseClass >
virtual QWindowsNativeDialogBase * QWindowsDialogHelperBase< BaseClass >::createNativeDialog ( )
privatepure virtual

◆ exec()

template<class BaseClass >
void QWindowsDialogHelperBase< BaseClass >::exec
override

Definition at line 309 of file qwindowsdialoghelpers.cpp.

References qCDebug.

◆ hasNativeDialog()

template<class BaseClass >
bool QWindowsDialogHelperBase< BaseClass >::hasNativeDialog ( ) const
inlineprotected

Definition at line 47 of file qwindowsdialoghelpers.h.

References QSharedPointer< T >::isNull().

+ Here is the call graph for this function:

◆ hide()

template<class BaseClass >
void QWindowsDialogHelperBase< BaseClass >::hide
override

Definition at line 299 of file qwindowsdialoghelpers.cpp.

◆ nativeDialog()

template<class BaseClass >
QWindowsNativeDialogBase * QWindowsDialogHelperBase< BaseClass >::nativeDialog
protected

Definition at line 191 of file qwindowsdialoghelpers.cpp.

References qWarning.

◆ show()

template<class BaseClass >
bool QWindowsDialogHelperBase< BaseClass >::show ( Qt::WindowFlags  windowFlags,
Qt::WindowModality  windowModality,
QWindow parent 
)
override

Definition at line 247 of file qwindowsdialoghelpers.cpp.

References QGuiApplication::focusWindow(), QWindowsBaseWindow::handleOf(), Qt::NonModal, parent, and qCDebug.

+ Here is the call graph for this function:

◆ supportsNonModalDialog()

template<class BaseClass >
virtual bool QWindowsDialogHelperBase< BaseClass >::supportsNonModalDialog ( const QWindow = nullptr) const
inlinevirtual

Reimplemented in QWindowsFileDialogHelper, and QWindowsXpFileDialogHelper.

Definition at line 42 of file qwindowsdialoghelpers.h.

◆ timerEvent()

template<class BaseClass >
void QWindowsDialogHelperBase< BaseClass >::timerEvent ( QTimerEvent )
overrideprotected

Definition at line 201 of file qwindowsdialoghelpers.cpp.


The documentation for this class was generated from the following files: