VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStaticFileDialog.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
15 
16 #include <QtCore/QtGlobal>
17 #include <QtCore/QString>
18 
19 #include <map>
20 
21 class QWidget;
22 class QStringList;
23 
24 namespace makVrv
25 {
26  class DtDe;
27 
35  {
36  public:
37 
38  enum Option
39  {
40  ShowDirsOnly = 0x01,
41  DontResolveSymlinks = 0x02,
42  DontConfirmOverwrite = 0x04,
43  DontUseSheet = 0x08,
44  DontUseNativeDialog = 0x10
45  };
46  Q_DECLARE_FLAGS(Options, Option)
47 
48 
49  static QString fileFilter(
55  DtFileExtensionManager::FileExtensionGroup fileExtensions,
56  bool includeAllSupportedFileTypesFilter=true,
57  bool includeAllFileTypes=true);
58 
59  static QString getExistingDirectory ( DtDe& de, QWidget * parent = 0,
60  const QString & caption = QString(), const QString & dir = QString(),
61  Options options = ShowDirsOnly );
62 
63  static QString getOpenFileName ( DtDe& de, QWidget * parent = 0,
64  const QString & caption = QString(), const QString & dir = QString(),
65  const QString & filter = QString(), QString * selectedFilter = 0,
66  Options options = 0 );
67 
68  static QStringList getOpenFileNames ( DtDe& de, QWidget * parent = 0,
69  const QString & caption = QString(), const QString & dir = QString(),
70  const QString & filter = QString(), QString * selectedFilter = 0,
71  Options options = 0 );
72 
73  static QString getSaveFileName ( DtDe& de, QWidget * parent = 0,
74  const QString & caption = QString(), const QString & dir = QString(),
75  const QString & filter = QString(), QString * selectedFilter = 0,
76  Options options = 0 );
77 
90  static QString getSaveFileNameWithExtension( DtDe& de, QWidget * parent,
91  const QString & caption, const QString & dir, const QString & description,
92  const QString& extension, bool addAllFilesFilter = true);
93 
95  typedef std::map<QString, QString> ExtentionDescriptionMap;
96 
110  static QString getSaveFileNameWithMultipleExtensions(
111  DtDe& de, QWidget * parent, const QString & caption,
112  const QString & dir, const ExtentionDescriptionMap& extDescMap,
113  bool addAllFilesFilter = true);
114 
115  static QString AllFilesFilter;
116  };
117 }
Contains makVrv::DtFileExtensionManager class.
Option
Definition: DtStaticFileDialog.h:38
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
std::map< QString, QString > ExtentionDescriptionMap
Map from file extension to description of that extension.
Definition: DtStaticFileDialog.h:95
A singleton manager to provide allowable file extensions for use in file dialogs. ...
Definition: DtFileExtensionManager.h:28
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
A Wrapper around the File Dialog functions which allow for proper rendering to continue. The problem is that when the normal WIN32 File Dialog is active the application is no longer ticked. Using these functions start a low level timer which will tick the application while the dialog is visible.
Definition: DtStaticFileDialog.h:34

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)