Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsdialoghelpers.cpp File Reference

(abd78e6d005fafa1f54b78c9043717ce80923846)

#include <QtCore/qt_windows.h>
#include "qwindowsdialoghelpers.h"
#include "qwindowscontext.h"
#include "qwindowswindow.h"
#include "qwindowsintegration.h"
#include "qwindowstheme.h"
#include <QtGui/qguiapplication.h>
#include <QtGui/qcolor.h>
#include <QtCore/qdebug.h>
#include <QtCore/qtimer.h>
#include <QtCore/qdir.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qsharedpointer.h>
#include <QtCore/qobject.h>
#include <QtCore/qthread.h>
#include <QtCore/qsysinfo.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qmutex.h>
#include <QtCore/quuid.h>
#include <QtCore/qtemporaryfile.h>
#include <QtCore/private/qfunctions_win_p.h>
#include <QtCore/private/qsystemerror_p.h>
#include <QtCore/private/qcomobject_p.h>
#include <algorithm>
#include <vector>
#include "qwindowsdialoghelpers.moc"
Include dependency graph for qwindowsdialoghelpers.cpp:

Go to the source code of this file.

Classes

class  QWindowsNativeDialogBase
 Base class for Windows native dialogs. More...
class  QWindowsDialogThread
 Run a non-modal native dialog in a separate thread. More...
class  QWindowsFileDialogSharedData
 Explicitly shared file dialog parameters that are not in QFileDialogOptions. More...
class  QWindowsNativeFileDialogEventHandler
 Listens to IFileDialog events and forwards them to QWindowsNativeFileDialogBase. More...
class  QWindowsShellItem
 Wrapper for IShellItem. More...
class  QWindowsNativeFileDialogBase
 Windows native file dialog wrapper around IFileOpenDialog, IFileSaveDialog. More...
struct  FilterSpec
class  QWindowsNativeSaveFileDialog
 Windows native file save dialog wrapper around IFileSaveDialog. More...
class  QWindowsNativeOpenFileDialog
 Windows native file save dialog wrapper around IFileOpenDialog. More...
class  QWindowsFileDialogHelper
 Helper for native Windows file dialogs. More...
class  QWindowsXpNativeFileDialog
 Native Windows directory dialog for Windows XP using SHlib-functions. More...
class  QWindowsXpFileDialogHelper
 Dialog helper using QWindowsXpNativeFileDialog. More...

Namespaces

namespace  QWindowsDialogs

Macros

#define QT_NO_URL_CAST_FROM_STRING   1

Typedefs

using SharedPointerColor = QSharedPointer<QColor>

Functions

static wchar_t * qStringToWCharArray (const QString &s, size_t reserveSize=0)
void QWindowsDialogs::eatMouseMove ()
 After closing a windows dialog with a double click (i.e.
HWND QWindowsDialogs::getHWND (IFileDialog *fileDialog)
static IShellLibrary * sHLoadLibraryFromItem (IShellItem *libraryItem, DWORD mode)
QDebug operator<< (QDebug d, const QWindowsShellItem &i)
QDebug operator<< (QDebug d, IShellItem *i)
static QList< FilterSpecfilterSpecs (const QStringList &filters, bool hideFilterDetails, int *totalStringLength)
static IFileDialog2 * getFileDialog2 (IFileDialog *fileDialog)
static bool isHexRange (const QString &s, int start, int end)
static bool isClsid (const QString &s)
static int indexOfNameFilter (const QStringList &filters, const QString &needle)
static QString suffixFromFilter (const QString &filter)
static void cleanupTemporaryItemCopies ()
static bool validFileNameCharacter (QChar c)
QString tempFilePattern (QString name)
static QString createTemporaryItemCopy (QWindowsShellItem &qItem, QString *errorMessage)
static QUrl itemToDialogUrl (QWindowsShellItem &qItem, QString *errorMessage)
static int QT_WIN_CALLBACK xpFileDialogGetExistingDirCallbackProc (HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
bool QWindowsDialogs::useHelper (QPlatformTheme::DialogType type)
QPlatformDialogHelperQWindowsDialogs::createHelper (QPlatformTheme::DialogType type)

Macro Definition Documentation

◆ QT_NO_URL_CAST_FROM_STRING

#define QT_NO_URL_CAST_FROM_STRING   1

Definition at line 5 of file qwindowsdialoghelpers.cpp.

Typedef Documentation

◆ SharedPointerColor

Function Documentation

◆ cleanupTemporaryItemCopies()

void cleanupTemporaryItemCopies ( )
static

Definition at line 1338 of file qwindowsdialoghelpers.cpp.

Referenced by createTemporaryItemCopy().

Here is the caller graph for this function:

◆ createTemporaryItemCopy()

QString createTemporaryItemCopy ( QWindowsShellItem & qItem,
QString * errorMessage )
static

Definition at line 1373 of file qwindowsdialoghelpers.cpp.

References QWindowsShellItem::canStream(), and cleanupTemporaryItemCopies().

Here is the call graph for this function:

◆ filterSpecs()

QList< FilterSpec > filterSpecs ( const QStringList & filters,
bool hideFilterDetails,
int * totalStringLength )
static

Definition at line 961 of file qwindowsdialoghelpers.cpp.

◆ getFileDialog2()

IFileDialog2 * getFileDialog2 ( IFileDialog * fileDialog)
inlinestatic

Definition at line 1061 of file qwindowsdialoghelpers.cpp.

◆ indexOfNameFilter()

int indexOfNameFilter ( const QStringList & filters,
const QString & needle )
static

Definition at line 1130 of file qwindowsdialoghelpers.cpp.

◆ isClsid()

bool isClsid ( const QString & s)
inlinestatic

Definition at line 1103 of file qwindowsdialoghelpers.cpp.

◆ isHexRange()

bool isHexRange ( const QString & s,
int start,
int end )
static

Definition at line 1091 of file qwindowsdialoghelpers.cpp.

◆ itemToDialogUrl()

QUrl itemToDialogUrl ( QWindowsShellItem & qItem,
QString * errorMessage )
static

Definition at line 1396 of file qwindowsdialoghelpers.cpp.

References QWindowsShellItem::canStream(), and QWindowsShellItem::isDir().

Here is the call graph for this function:

◆ operator<<() [1/2]

QDebug operator<< ( QDebug d,
const QWindowsShellItem & i )

Definition at line 690 of file qwindowsdialoghelpers.cpp.

References QWindowsShellItem::format().

Here is the call graph for this function:

◆ operator<<() [2/2]

QDebug operator<< ( QDebug d,
IShellItem * i )

Definition at line 701 of file qwindowsdialoghelpers.cpp.

References QWindowsShellItem::format().

Here is the call graph for this function:

◆ qStringToWCharArray()

wchar_t * qStringToWCharArray ( const QString & s,
size_t reserveSize = 0 )
static

Definition at line 50 of file qwindowsdialoghelpers.cpp.

◆ sHLoadLibraryFromItem()

IShellLibrary * sHLoadLibraryFromItem ( IShellItem * libraryItem,
DWORD mode )
static

Definition at line 638 of file qwindowsdialoghelpers.cpp.

◆ suffixFromFilter()

QString suffixFromFilter ( const QString & filter)
inlinestatic

Definition at line 1255 of file qwindowsdialoghelpers.cpp.

◆ tempFilePattern()

QString tempFilePattern ( QString name)

Definition at line 1352 of file qwindowsdialoghelpers.cpp.

◆ validFileNameCharacter()

bool validFileNameCharacter ( QChar c)
static

Definition at line 1347 of file qwindowsdialoghelpers.cpp.

◆ xpFileDialogGetExistingDirCallbackProc()

int QT_WIN_CALLBACK xpFileDialogGetExistingDirCallbackProc ( HWND hwnd,
UINT uMsg,
LPARAM lParam,
LPARAM lpData )
static

Definition at line 1690 of file qwindowsdialoghelpers.cpp.