anatomist 6.0.4
3D neuroimaging data viewer
filedialogextension.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34
35#ifndef ANATOMIST_APPLICATION_AIMSFILEDIALOGEXTENSION_H
36#define ANATOMIST_APPLICATION_AIMSFILEDIALOGEXTENSION_H
37
38
40#include <QFileDialog>
41#include <cartobase/object/object.h>
42
43
44class AimsFileDialog : public QFileDialog
45{
46 Q_OBJECT
47
48public:
49 typedef std::map<std::pair<std::string, std::string>, std::vector<std::string> > TypesMap;
50
51 AimsFileDialog( QWidget* parent, Qt::WindowFlags flags );
52 virtual ~AimsFileDialog();
53
55 bool optionsValid() const;
56 std::string selectedTypeId() const;
57 std::pair<std::string, std::string> selectedType() const;
58 std::string selectedUrlOptions() const;
60 bool isExtensionVisible() const;
61 void setExtensionVisible( bool );
62
63protected:
65
66protected slots:
68
69private:
70 struct Private;
71 Private *d;
72};
73
74
75class AimsFileDialogExtension : public QWidget
76{
77 Q_OBJECT
78
79public:
80 AimsFileDialogExtension( QWidget* parent = 0 );
82
84 bool optionsValid() const;
85 std::string selectedTypeId() const;
86 std::pair<std::string, std::string> selectedType() const;
87 std::string selectedUrlOptions() const;
89
90protected:
91 void setupCustom( QWidget* filedialog );
92 std::string typeId( const std::string & ot, const std::string & dt ) const;
93 std::vector<std::string> typeIds( const std::string & ot,
94 const std::string & dt ) const;
95
96protected slots:
97 void currentFileChanged( const QString & );
99
100private:
101 friend class AimsFileDialog;
102 struct Private;
103 Private *d;
104};
105
106
107#endif
#define slots
void currentFileChanged(const QString &)
std::string selectedUrlOptions() const
std::string selectedTypeId() const
void setupCustom(QWidget *filedialog)
std::string typeId(const std::string &ot, const std::string &dt) const
void setPossibleTypesMap(const AimsFileDialog::TypesMap &)
std::vector< std::string > typeIds(const std::string &ot, const std::string &dt) const
AimsFileDialogExtension(QWidget *parent=0)
std::pair< std::string, std::string > selectedType() const
bool optionsValid() const
virtual ~AimsFileDialogExtension()
carto::Object selectedOptions() const
std::map< std::pair< std::string, std::string >, std::vector< std::string > > TypesMap
carto::Object selectedOptions() const
void setExtensionVisible(bool)
std::string selectedTypeId() const
void setupCustom()
void setPossibleTypesMap(const TypesMap &)
virtual ~AimsFileDialog()
void showHideOptions()
bool isExtensionVisible() const
std::string selectedUrlOptions() const
std::pair< std::string, std::string > selectedType() const
bool optionsValid() const
AimsFileDialog(QWidget *parent, Qt::WindowFlags flags)