Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickFileDialogImplPrivate Class Reference

#include <qquickfiledialogimpl_p_p.h>

+ Inheritance diagram for QQuickFileDialogImplPrivate:
+ Collaboration diagram for QQuickFileDialogImplPrivate:

Public Member Functions

 QQuickFileDialogImplPrivate ()
 
QQuickFileDialogImplAttachedattachedOrWarn ()
 
void setNameFilters (const QStringList &filters)
 
void updateEnabled ()
 
void updateSelectedFile (const QString &oldFolderPath)
 
void updateFileNameTextEdit ()
 
void setFileDialogListViewCurrentIndex (int newCurrentIndex)
 
void tryUpdateFileDialogListViewCurrentIndex (int newCurrentIndex)
 
void fileDialogListViewCountChanged ()
 
void handleAccept () override
 
void handleClick (QQuickAbstractButton *button) override
 
void selectFile ()
 
- Public Member Functions inherited from QQuickDialogPrivate
virtual void handleReject ()
 
- Public Member Functions inherited from QQuickPopupPrivate
 QQuickPopupPrivate ()
 
QQmlListProperty< QObjectcontentData ()
 \qmlproperty list<QtObject> QtQuick.Controls::Popup::contentData \qmldefault
 
QQmlListProperty< QQuickItemcontentChildren ()
 \qmlproperty list<Item> QtQuick.Controls::Popup::contentChildren
 
void init ()
 
void closeOrReject ()
 
bool tryClose (const QPointF &pos, QQuickPopup::ClosePolicy flags)
 
bool contains (const QPointF &scenePos) const
 
virtual bool blockInput (QQuickItem *item, const QPointF &point) const
 
virtual bool handlePress (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleMove (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleRelease (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual void handleUngrab ()
 
bool handleMouseEvent (QQuickItem *item, QMouseEvent *event)
 
bool handleHoverEvent (QQuickItem *item, QHoverEvent *event)
 
void reposition ()
 
void createOverlay ()
 
void destroyDimmer ()
 
void toggleOverlay ()
 
void updateContentPalettes (const QPalette &parentPalette)
 
virtual void showDimmer ()
 
virtual void hideDimmer ()
 
virtual void resizeDimmer ()
 
virtual bool prepareEnterTransition ()
 
virtual bool prepareExitTransition ()
 
virtual void finalizeEnterTransition ()
 
virtual void finalizeExitTransition ()
 
virtual void opened ()
 
QMarginsF getMargins () const
 
void setTopMargin (qreal value, bool reset=false)
 
void setLeftMargin (qreal value, bool reset=false)
 
void setRightMargin (qreal value, bool reset=false)
 
void setBottomMargin (qreal value, bool reset=false)
 
QQuickPopupAnchorsgetAnchors ()
 
virtual QQuickPopupPositionergetPositioner ()
 
void setWindow (QQuickWindow *window)
 
void itemDestroyed (QQuickItem *item) override
 
QPalette defaultPalette () const override
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QQuickItemChangeListener
virtual ~QQuickItemChangeListener ()
 
virtual void itemGeometryChanged (QQuickItem *, QQuickGeometryChange, const QRectF &)
 
virtual void itemSiblingOrderChanged (QQuickItem *)
 
virtual void itemVisibilityChanged (QQuickItem *)
 
virtual void itemEnabledChanged (QQuickItem *)
 
virtual void itemOpacityChanged (QQuickItem *)
 
virtual void itemChildAdded (QQuickItem *, QQuickItem *)
 
virtual void itemChildRemoved (QQuickItem *, QQuickItem *)
 
virtual void itemParentChanged (QQuickItem *, QQuickItem *)
 
virtual void itemRotationChanged (QQuickItem *)
 
virtual void itemImplicitWidthChanged (QQuickItem *)
 
virtual void itemImplicitHeightChanged (QQuickItem *)
 
virtual void itemFocusChanged (QQuickItem *, Qt::FocusReason)
 
virtual QQuickAnchorsPrivateanchorPrivate ()
 
- Public Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
virtual ~QQuickPaletteProviderPrivateBase ()=default
 
virtual QQuickPalettepalette () const
 
virtual void setPalette (QQuickPalette *p)
 
virtual void resetPalette ()
 
virtual bool providesPalette () const
 
QPalette parentPalette (const QPalette &fallbackPalette) const override
 
void inheritPalette (const QPalette &parentPalette)
 
virtual void updateChildrenPalettes (const QPalette &parentPalette)
 
- Public Member Functions inherited from QQuickAbstractPaletteProvider
virtual ~QQuickAbstractPaletteProvider ()=default
 

Static Public Member Functions

static QQuickFileDialogImplPrivateget (QQuickFileDialogImpl *dialog)
 
static QDir::SortFlags fileListSortFlags ()
 
static QFileInfoList fileList (const QDir &dir)
 
- Static Public Member Functions inherited from QQuickDialogPrivate
static QQuickDialogPrivateget (QQuickDialog *dialog)
 
static QPlatformDialogHelper::ButtonRole buttonRole (QQuickAbstractButton *button)
 Popup dialog with standard buttons and a title, used for short-term interaction with the user.
 
- Static Public Member Functions inherited from QQuickPopupPrivate
static QQuickPopupPrivateget (QQuickPopup *popup)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

QSharedPointer< QFileDialogOptionsoptions
 
QUrl currentFolder
 
QUrl selectedFile
 
QQuickAbstractButtonlastButtonClicked = nullptr
 
QStringList nameFilters
 
QQuickFileNameFilterselectedNameFilter = nullptr
 
QString acceptLabel
 
QString rejectLabel
 
bool setCurrentIndexToInitiallySelectedFile = false
 
QFileInfoList cachedFileList
 
int pendingCurrentIndexToSet = -1
 
- Public Attributes inherited from QQuickDialogPrivate
int result = 0
 
QString title
 
QQuickDialogButtonBoxbuttonBox = nullptr
 
QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton
 
- Public Attributes inherited from QQuickPopupPrivate
bool focus = false
 
bool modal = false
 
bool dim = false
 
bool hasDim = false
 
bool visible = false
 
bool complete = true
 
bool positioning = false
 
bool hasWidth = false
 
bool hasHeight = false
 
bool hasTopMargin = false
 
bool hasLeftMargin = false
 
bool hasRightMargin = false
 
bool hasBottomMargin = false
 
bool hasZ = false
 
bool allowVerticalFlip = false
 
bool allowHorizontalFlip = false
 
bool allowVerticalMove = true
 
bool allowHorizontalMove = true
 
bool allowVerticalResize = true
 
bool allowHorizontalResize = true
 
bool hadActiveFocusBeforeExitTransition = false
 
bool interactive = true
 
bool hasClosePolicy = false
 
bool outsidePressed = false
 
bool outsideParentPressed = false
 
bool inDestructor = false
 
bool relaxEdgeConstraint = false
 
int touchId = -1
 
qreal x = 0
 
qreal y = 0
 
qreal effectiveX = 0
 
qreal effectiveY = 0
 
qreal margins = -1
 
qreal topMargin = 0
 
qreal leftMargin = 0
 
qreal rightMargin = 0
 
qreal bottomMargin = 0
 
QPointF pressPoint
 
TransitionState transitionState = NoTransition
 
QQuickPopup::ClosePolicy closePolicy = DefaultClosePolicy
 
QQuickItemparentItem = nullptr
 
QQuickItemdimmer = nullptr
 
QPointer< QQuickWindowwindow
 
QQuickTransitionenter = nullptr
 
QQuickTransitionexit = nullptr
 
QQuickPopupItempopupItem = nullptr
 
QQuickPopupPositionerpositioner = nullptr
 
QList< QQuickStateActionenterActions
 
QList< QQuickStateActionexitActions
 
QQuickPopupTransitionManager transitionManager
 
QQuickPopupAnchorsanchors = nullptr
 
qreal explicitDimmerOpacity = 0
 
qreal prevOpacity = 0
 
qreal prevScale = 0
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QQuickPopupPrivate
enum  TransitionState { NoTransition , EnterTransition , ExitTransition }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 
- Static Public Attributes inherited from QQuickPopupPrivate
static const QQuickPopup::ClosePolicy DefaultClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside
 Base type of popup-like user interface controls.
 
- Protected Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
void setCurrentColorGroup ()
 

Detailed Description

Definition at line 32 of file qquickfiledialogimpl_p_p.h.

Constructor & Destructor Documentation

◆ QQuickFileDialogImplPrivate()

QT_BEGIN_NAMESPACE QQuickFileDialogImplPrivate::QQuickFileDialogImplPrivate ( )

Definition at line 31 of file qquickfiledialogimpl.cpp.

Member Function Documentation

◆ attachedOrWarn()

QQuickFileDialogImplAttached * QQuickFileDialogImplPrivate::attachedOrWarn ( )

Definition at line 567 of file qquickfiledialogimpl.cpp.

References qmlWarning().

Referenced by fileDialogListViewCountChanged(), handleClick(), setFileDialogListViewCurrentIndex(), tryUpdateFileDialogListViewCurrentIndex(), updateEnabled(), updateFileNameTextEdit(), and updateSelectedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileDialogListViewCountChanged()

void QQuickFileDialogImplPrivate::fileDialogListViewCountChanged ( )

Definition at line 215 of file qquickfiledialogimpl.cpp.

References attachedOrWarn(), cachedFileList, QQuickItemView::count, QQuickItemView::countChanged(), QObjectPrivate::disconnect(), QQuickFileDialogImplAttached::fileDialogListView, fileDialogListViewCountChanged(), pendingCurrentIndexToSet, qCDebug, setFileDialogListViewCurrentIndex(), and QList< T >::size().

Referenced by fileDialogListViewCountChanged(), and tryUpdateFileDialogListViewCurrentIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileList()

QFileInfoList QQuickFileDialogImplPrivate::fileList ( const QDir & dir)
static

Definition at line 166 of file qquickfiledialogimpl.cpp.

References dir, QDir::Dirs, fileListSortFlags(), QDir::Files, and QDir::NoDotAndDotDot.

Referenced by updateSelectedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fileListSortFlags()

QDir::SortFlags QQuickFileDialogImplPrivate::fileListSortFlags ( )
static

Definition at line 158 of file qquickfiledialogimpl.cpp.

References QDir::DirsFirst, QQuickPlatformTheme::getThemeHint(), QDir::IgnoreCase, QPlatformTheme::ShowDirectoriesFirst, and toBool().

Referenced by fileList().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

static QQuickFileDialogImplPrivate * QQuickFileDialogImplPrivate::get ( QQuickFileDialogImpl * dialog)
inlinestatic

Definition at line 39 of file qquickfiledialogimpl_p_p.h.

References dialog.

Referenced by QQuickFileDialogDelegatePrivate::chooseFile(), QQuickFileDialogImplAttached::setOverwriteConfirmationDialog(), and QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility().

+ Here is the caller graph for this function:

◆ handleAccept()

void QQuickFileDialogImplPrivate::handleAccept ( )
overridevirtual

Reimplemented from QQuickDialogPrivate.

Definition at line 236 of file qquickfiledialogimpl.cpp.

◆ handleClick()

void QQuickFileDialogImplPrivate::handleClick ( QQuickAbstractButton * button)
overridevirtual

◆ selectFile()

void QQuickFileDialogImplPrivate::selectFile ( )

Definition at line 272 of file qquickfiledialogimpl.cpp.

References emit, QQuickDialogPrivate::handleClick(), lastButtonClicked, Q_ASSERT, and selectedFile.

Referenced by handleClick(), and QQuickFileDialogImplAttached::setOverwriteConfirmationDialog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFileDialogListViewCurrentIndex()

void QQuickFileDialogImplPrivate::setFileDialogListViewCurrentIndex ( int newCurrentIndex)

Definition at line 171 of file qquickfiledialogimpl.cpp.

References attachedOrWarn(), QQuickItem::Center, QQuickItemView::currentItem, QQuickFileDialogImplAttached::fileDialogListView, QQuickItemView::positionViewAtIndex(), qCDebug, and QQuickItemView::setCurrentIndex().

Referenced by fileDialogListViewCountChanged(), and tryUpdateFileDialogListViewCurrentIndex().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNameFilters()

void QQuickFileDialogImplPrivate::setNameFilters ( const QStringList & filters)

Definition at line 35 of file qquickfiledialogimpl.cpp.

References emit, filters, and nameFilters.

◆ tryUpdateFileDialogListViewCurrentIndex()

void QQuickFileDialogImplPrivate::tryUpdateFileDialogListViewCurrentIndex ( int newCurrentIndex)

Tries to set the currentIndex of fileDialogListView to newCurrentIndex and gives focus to the current item.

Definition at line 192 of file qquickfiledialogimpl.cpp.

References attachedOrWarn(), QObjectPrivate::connect(), QQuickItemView::count, QQuickItemView::countChanged(), Qt::DirectConnection, QQuickFileDialogImplAttached::fileDialogListView, fileDialogListViewCountChanged(), pendingCurrentIndexToSet, Q_ASSERT, qCDebug, setFileDialogListViewCurrentIndex(), and Qt::UniqueConnection.

Referenced by updateSelectedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateEnabled()

void QQuickFileDialogImplPrivate::updateEnabled ( )

Definition at line 45 of file qquickfiledialogimpl.cpp.

References attachedOrWarn(), QQuickFileDialogImplAttached::breadcrumbBar, QQuickFileDialogImplAttached::buttonBox, QUrl::isEmpty(), QQuickItem::isVisible(), QPlatformDialogHelper::Open, qmlWarning(), selectedFile, QQuickDialogButtonBox::standardButton(), and QQuickFolderBreadcrumbBar::textField.

+ Here is the call graph for this function:

◆ updateFileNameTextEdit()

void QQuickFileDialogImplPrivate::updateFileNameTextEdit ( )

Definition at line 147 of file qquickfiledialogimpl.cpp.

References attachedOrWarn(), QFileInfo::fileName(), QQuickFileDialogImplAttached::fileNameTextField, QFileInfo::isFile(), Q_UNLIKELY, selectedFile, QQuickTextInput::setText(), and QUrl::toLocalFile().

Referenced by updateSelectedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSelectedFile()

void QQuickFileDialogImplPrivate::updateSelectedFile ( const QString & oldFolderPath)

Ensures that a file is always selected after a change in folder.

oldFolderPath is the previous value of folder.

Definition at line 69 of file qquickfiledialogimpl.cpp.

References QFileInfo::absoluteFilePath(), attachedOrWarn(), cachedFileList, currentFolder, QQuickFileDialogImplAttached::fileDialogListView, fileList(), QList< T >::first(), QUrl::fromLocalFile(), QList< T >::isEmpty(), QGuiApplicationPrivate::platformTheme(), QPlatformTheme::PreselectFirstFileInDirectory, qCDebug, qEnvironmentVariable(), qmlWarning(), Qt::SkipEmptyParts, tryUpdateFileDialogListViewCurrentIndex(), updateFileNameTextEdit(), and QQmlFile::urlToLocalFileOrQrc().

+ Here is the call graph for this function:

Member Data Documentation

◆ acceptLabel

QString QQuickFileDialogImplPrivate::acceptLabel

Definition at line 67 of file qquickfiledialogimpl_p_p.h.

◆ cachedFileList

QFileInfoList QQuickFileDialogImplPrivate::cachedFileList

◆ currentFolder

QUrl QQuickFileDialogImplPrivate::currentFolder

Definition at line 62 of file qquickfiledialogimpl_p_p.h.

Referenced by updateSelectedFile().

◆ lastButtonClicked

QQuickAbstractButton* QQuickFileDialogImplPrivate::lastButtonClicked = nullptr

Definition at line 64 of file qquickfiledialogimpl_p_p.h.

Referenced by handleClick(), and selectFile().

◆ nameFilters

QStringList QQuickFileDialogImplPrivate::nameFilters

Definition at line 65 of file qquickfiledialogimpl_p_p.h.

Referenced by setNameFilters().

◆ options

QSharedPointer<QFileDialogOptions> QQuickFileDialogImplPrivate::options

Definition at line 61 of file qquickfiledialogimpl_p_p.h.

◆ pendingCurrentIndexToSet

int QQuickFileDialogImplPrivate::pendingCurrentIndexToSet = -1

◆ rejectLabel

QString QQuickFileDialogImplPrivate::rejectLabel

Definition at line 68 of file qquickfiledialogimpl_p_p.h.

◆ selectedFile

QUrl QQuickFileDialogImplPrivate::selectedFile

◆ selectedNameFilter

QQuickFileNameFilter* QQuickFileDialogImplPrivate::selectedNameFilter = nullptr
mutable

Definition at line 66 of file qquickfiledialogimpl_p_p.h.

◆ setCurrentIndexToInitiallySelectedFile

bool QQuickFileDialogImplPrivate::setCurrentIndexToInitiallySelectedFile = false

Definition at line 69 of file qquickfiledialogimpl_p_p.h.


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