-
Notifications
You must be signed in to change notification settings - Fork 10
/
filenamegenerator.h
38 lines (33 loc) · 1.24 KB
/
filenamegenerator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef FILENAMEGENERATOR_H
#define FILENAMEGENERATOR_H
#include <QString>
#include <QDateTime>
#include <QDir>
#include <QDebug>
class fileNameGenerator
{
public:
fileNameGenerator();
void setFlightFormat(bool useFlightFormat, QString flightNamePrefix);
void setMainDirectory(QString basedir);
void setFilenameExtension(QString extension);
void generate(); // call this for new time stamp
QString getNewFullFilename(QString basedir, QString extension); // auto new filename
QString getNewFullFilename(QString basedir, QString prefix, QString postfix, QString extension); // auto new filename
QString getNewFullFilename(); // auto new filename
QString getFullFilename(); // use existing timestamp
QString getFullFilename(QString extension); // use existing timestamp
QString getFullFilename(QString prefix, QString postfix, QString extension);
QString getShortFilename(); // use existing timestamp
QString getFilenameExtension();
bool createDirectory(QString directory);
bool createDirectory();
private:
QString getTimeDatestring();
QString shortFilename;
QString directory;
QString extension;
bool flightFormat = true;
QString namePrefix = "AV3";
};
#endif // FILENAMEGENERATOR_H