-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.cpp
More file actions
22 lines (20 loc) · 806 Bytes
/
utils.cpp
File metadata and controls
22 lines (20 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "utils.h"
#include <QFileDialog>
const QString Utils::GetFileName(const QString& path)
{
return QFileDialog::getOpenFileName(
nullptr,
QFileDialog::tr("Open File"),
path.isEmpty() ? QDir::currentPath() : path,
QFileDialog::tr("Subtitles (*.srt *.ass)")
);
}
const QString Utils::GetSaveFileName(const QString& path)
{
return QFileDialog::getSaveFileName(
nullptr,
QFileDialog::tr("Save File"),
path.isEmpty() ? QDir::currentPath() : path,
QFileDialog::tr("Doc (*.doc)")
);
}