Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • core_lib
  • src
  • util
fileformat.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17#ifndef FILEFORMAT_H
18#define FILEFORMAT_H
19
20#include <QCoreApplication>
21#include <QString>
22
23//Pencil2D File Format
24//PFF - acronym for "Pencil2D File Format"
25
26#define PFF_OPEN_PROJECT_EXT_FILTER \
27 QCoreApplication::translate("FileFormat", "Pencil2D formats") + " (*.pclx *.pcl);;" + QCoreApplication::translate("FileFormat", "Pencil2D Project") + " (*.pclx);;" + QCoreApplication::translate("FileFormat", "Legacy Pencil2D Project") + " (*.pcl)"
28
29#define PFF_SAVE_PROJECT_EXT_FILTER \
30 QCoreApplication::translate("FileFormat", "Pencil2D Project") + " (*.pclx);;" + QCoreApplication::translate("FileFormat", "Legacy Pencil2D Project") + " (*.pcl)"
31
32#define PFF_MOVIE_EXT \
33 QCoreApplication::translate("FileFormat", "Movie formats") + "(*.avi *.mpg *.mpeg *.mov *.mp4 *.mkv *.ogv *.swf *.flv *.webm *.wmv);;" \
34 "AVI(*.avi);;MPEG(*.mpg *.mpeg);;MOV(*.mov);;MP4(*.mp4);;MKV(*.mkv);;OGV(*.ogv)" \
35 ";;SWF(*.swf);;FLV(*.flv);;WEBM(*.webm);;WMV(*.wmv)"
36
37#define PFF_IMAGE_FILTER \
38 QCoreApplication::translate("FileFormat", "Image formats") + " (*.png *.jpg *.jpeg *.bmp *.tif *.tiff *.webp);;PNG (*.png);;JPG(*.jpg *.jpeg);;BMP(*.bmp);;TIFF(*.tif *.tiff);;WEBP(*.webp)"
39
40#define PFF_IMAGE_SEQ_FILTER \
41 QCoreApplication::translate("FileFormat", "Image formats") + " (*.png *.jpg *.jpeg *.bmp *.tif *.tiff *.webp);;PNG (*.png);;JPG(*.jpg *.jpeg);;BMP(*.bmp);;TIFF(*.tif *.tiff);;WEBP(*.webp)"
42
43#define PFF_PALETTE_EXT_FILTER \
44 QCoreApplication::translate("FileFormat", "Palette formats") + " (*.xml *.gpl);;" + QCoreApplication::translate("FileFormat", "Pencil2D Palette") + " (*.xml);;" + QCoreApplication::translate("FileFormat", "GIMP Palette") + " (*.gpl)"
45
46#define PFF_GIF_EXT_FILTER \
47 QCoreApplication::translate("FileFormat", "Animated GIF") + " (*.gif)"
48
49#define PFF_ANIMATED_IMAGE_EXT_FILTER \
50 QCoreApplication::translate("FileFormat", "Animated image formats") + " (*.gif *.webp);;GIF(*.gif);;WEBP(*.webp)"
51
52#define PFF_SOUND_EXT_FILTER \
53 QCoreApplication::translate("FileFormat", "Sound formats") + " (*.wav *.mp3 *.wma *.ogg *.flac *.opus *.aiff *.aac *.caf);;WAV (*.wav);;MP3 (*.mp3);;WMA (*.wma);;OGG (*.ogg);;FLAC (*.flac);;Opus (*.opus);;AIFF (*.aiff);;AAC (*.aac);;CAF (*.caf)"
54
55
56#define PFF_DEFAULT_PROJECT_EXT \
57 QString(".pclx")
58
59#define PFF_DEFAULT_IMAGE_EXT \
60 QString(".png")
61
62#define PFF_DEFAULT_IMAGE_SEQ_EXT \
63 QString(".png")
64
65#define PFF_DEFAULT_ANIMATED_EXT \
66 QString(".gif")
67
68#define PFF_DEFAULT_MOVIE_EXT \
69 QString(".mp4")
70
71#define PFF_DEFAULT_PALETTE_EXT \
72 QString(".xml")
73
74#define PFF_DEFAULT_SOUND_EXT \
75 QString(".wav")
76
77#define PFF_OLD_EXTENSION "pcl"
78#define PFF_EXTENSION "pclx"
79#define PFF_BACKUP_IDENTIFIER "backup"
80#define PFF_OLD_DATA_DIR "data"
81#define PFF_DATA_DIR "data"
82#define PFF_XML_FILE_NAME "main.xml"
83#define PFF_TMP_DECOMPRESS_EXT "Y2xD"
84#define PFF_PALETTE_FILE "palette.xml"
85
86bool removePFFTmpDirectory(const QString& dirName);
87QString retrieveProjectNameFromTempPath(const QString& path);
88
89QString detectFormatByFileNameExtension(const QString& fileName);
90bool isMovieFormat(const QString& format);
91
92#endif // FILEFORMAT_H
QString
Generated on Mon Oct 26 2026 11:04:59 for Pencil2D by doxygen 1.9.6 based on revision 408563a37068daf7f1b4c6a9291daef039be8cb5