Computer Assisted Medical Intervention Tool Kit  version 5.2
 
Loading...
Searching...
No Matches
ScreenshotFormatInfo.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26#ifndef SCREENSHOTFORMATINFO_H
27#define SCREENSHOTFORMATINFO_H
28
29#include <QMap>
30
31namespace camitk {
32
36public:
52
55
57 QString extension;
58
60 QString description;
61
63 ScreenshotFormatInfo(ScreenshotFormat t, QString e, QString d) : type(t), extension(std::move(e)), description(std::move(d)) {}
64
66 ScreenshotFormatInfo() : extension(""), description("Not supported") {}
67
69 static const QString fileFilters();
70
71 // get the default format (PNG) information
72 static const ScreenshotFormatInfo* defaultFormat();
73
76 static const ScreenshotFormatInfo* get(unsigned int);
77
81
83 static const ScreenshotFormatInfo* get(QString);
84
86 static const QMap<ScreenshotFormat, ScreenshotFormatInfo*> getMap();
87
88private:
90 static QMap<ScreenshotFormat, ScreenshotFormatInfo*> initMap();
91};
92
93
94} // namespace
95
96#endif // SCREENSHOTFORMATINFO_H
class containing all information concerning exporting images (screenshot) and the different supported...
Definition ScreenshotFormatInfo.h:35
static const ScreenshotFormatInfo * get(unsigned int)
return the information concerning the supporting format using an index corresponding to the enum (che...
Definition ScreenshotFormatInfo.cpp:60
static const ScreenshotFormatInfo * defaultFormat()
Definition ScreenshotFormatInfo.cpp:112
ScreenshotFormat
list of supported screenshot export formats
Definition ScreenshotFormatInfo.h:38
@ JPG
JPEG.
Definition ScreenshotFormatInfo.h:40
@ PDF
Portable Document Format.
Definition ScreenshotFormatInfo.h:44
@ TEX
LaTeX (only the text is exported)
Definition ScreenshotFormatInfo.h:45
@ NOT_SUPPORTED
Definition ScreenshotFormatInfo.h:50
@ RIB
RenderMan/BMRT .RIB.
Definition ScreenshotFormatInfo.h:48
@ BMP
Bitmap.
Definition ScreenshotFormatInfo.h:41
@ VRML
VRML 2.0.
Definition ScreenshotFormatInfo.h:49
@ SVG
Scalable Vector Graphics.
Definition ScreenshotFormatInfo.h:46
@ PS
PostScript.
Definition ScreenshotFormatInfo.h:42
@ PNG
Portable Network Graphics.
Definition ScreenshotFormatInfo.h:39
@ OBJ
Alias Wavefront .OBJ.
Definition ScreenshotFormatInfo.h:47
@ EPS
Encapsulated PostScript.
Definition ScreenshotFormatInfo.h:43
ScreenshotFormatInfo(ScreenshotFormat t, QString e, QString d)
Constructor.
Definition ScreenshotFormatInfo.h:63
QString extension
file extension (suffix)
Definition ScreenshotFormatInfo.h:57
ScreenshotFormatInfo()
default constructor
Definition ScreenshotFormatInfo.h:66
ScreenshotFormat type
the corresponding type (key)
Definition ScreenshotFormatInfo.h:54
static const QString fileFilters()
return a list of supported format that can be used in a QFileDialog
Definition ScreenshotFormatInfo.cpp:93
static const QMap< ScreenshotFormat, ScreenshotFormatInfo * > getMap()
get the map
Definition ScreenshotFormatInfo.cpp:31
QString description
file format description
Definition ScreenshotFormatInfo.h:60
Definition Action.cpp:36
STL namespace.