cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svlQtWidgetFileOpen.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Balazs P. Vagvolgyi
7  Created on: 2011-06-15
8 
9  (C) Copyright 2011 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 #ifndef _svlQtWidgetFileOpen_h
23 #define _svlQtWidgetFileOpen_h
24 
27 
28 #include <QObject>
29 #include <string>
30 
31 // Always include last!
33 
34 // Forward declarations
35 class QFileDialog;
36 
37 
38 class CISST_EXPORT svlQtWidgetFileOpen : public QObject, public cmnGenericObject
39 {
40  Q_OBJECT
42 
43 public:
47 
48  static svlQtWidgetFileOpen* New();
49  static svlQtWidgetFileOpen* New(const std::string & kind, const std::string & extensions, bool save = false);
50  void Delete();
51 
52  bool WaitForClose();
53 
54  bool Create(const std::string & kind, const std::string & extensions, bool save = false);
55  std::string GetFilePath();
56  bool Destroy();
57 
58 protected slots:
59  void QSlotCreate();
60  void QSlotDestroy();
61 
62 private:
63  QFileDialog* Dialog;
64 
65  std::string FilePath;
66 
67  std::string argKind;
68  std::string argExtensions;
69  bool argSave;
70  bool retSuccess;
71 
72  osaThreadSignal ClosedEvent;
73 };
74 
76 
77 #endif // _svlQtWidgetFileOpen_h
78 
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
#define CMN_DECLARE_SERVICES_INSTANTIATION_EXPORT(className)
Definition: cmnClassRegisterMacros.h:209
Base class for high level objects.
Definition: cmnGenericObject.h:51
Macros to export the symbols of cisstStereoVisionQt (in a Dll).
Declaration of osaThreadSignal.
Defines cmnGenericObject.
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Definition: osaThreadSignal.h:40
Definition: svlQtWidgetFileOpen.h:38
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76