mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-13 10:20:01 +01:00
updated path for dialogs
This commit is contained in:
@@ -1043,7 +1043,7 @@ void AC_MainWindow::controls_Pause() {
|
||||
}
|
||||
|
||||
void AC_MainWindow::controls_SetImage() {
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Image"), "/home", tr("Image Files (*.png *.jpg)"));
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Image"), "", tr("Image Files (*.png *.jpg)"));
|
||||
if(fileName != "") {
|
||||
cv::Mat tblend_image = cv::imread(fileName.toStdString());
|
||||
if(!tblend_image.empty()) {
|
||||
@@ -1059,7 +1059,7 @@ void AC_MainWindow::controls_SetImage() {
|
||||
}
|
||||
|
||||
void AC_MainWindow::controls_SetKey() {
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Color Key Image"), "/home", tr("Image Files (*.png)"));
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Color Key Image"), "", tr("Image Files (*.png)"));
|
||||
if(fileName != "") {
|
||||
cv::Mat tblend_image = cv::imread(fileName.toStdString());
|
||||
if(!tblend_image.empty()) {
|
||||
|
||||
@@ -62,7 +62,7 @@ void CaptureCamera::btn_Select() {
|
||||
|
||||
QString def_path = "";
|
||||
#if defined(__linux__)
|
||||
def_path = "/home";
|
||||
def_path = "";
|
||||
#elif defined(__APPLE__)
|
||||
def_path = "/Users";
|
||||
#elif defined(_WIN32)
|
||||
@@ -131,31 +131,14 @@ void CaptureVideo::setParent(AC_MainWindow *p) {
|
||||
}
|
||||
|
||||
void CaptureVideo::btn_SetSourceFile() {
|
||||
|
||||
QString def_path = "";
|
||||
#if defined(__linux__)
|
||||
def_path = "/home";
|
||||
#elif defined(__APPLE__)
|
||||
def_path = "/Users";
|
||||
#elif defined(_WIN32)
|
||||
def_path = "C:\\";
|
||||
#endif
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open Video"), def_path, tr("Video Files (*.avi *.mov *.mp4 *.mkv)"));
|
||||
if(fileName != "")
|
||||
edit_src->setText(fileName);
|
||||
}
|
||||
|
||||
void CaptureVideo::btn_SetOutputDir() {
|
||||
|
||||
QString def_path = "";
|
||||
#if defined(__linux__)
|
||||
def_path = "/home";
|
||||
#elif defined(__APPLE__)
|
||||
def_path = "/Users";
|
||||
#elif defined(_WIN32)
|
||||
def_path = "C:\\";
|
||||
#endif
|
||||
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Set Output Directory"),def_path,QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
if(dir != "")
|
||||
edit_outdir->setText(dir);
|
||||
|
||||
@@ -72,7 +72,9 @@ void DefineWindow::clearFilterNames() {
|
||||
}
|
||||
|
||||
void DefineWindow::saveNames() {
|
||||
QString fileName = QFileDialog::getSaveFileName(this,tr("Save List"), "/home", tr("Acid Cam List (*.acl)"));
|
||||
QString fileName = QFileDialog::getSaveFileName(this,tr("Save List"), "", tr("Acid Cam List (*.acl)"));
|
||||
if(fileName.length() <= 0)
|
||||
return;
|
||||
std::fstream file;
|
||||
file.open(fileName.toStdString(), std::ios::out);
|
||||
if(!file.is_open()) {
|
||||
@@ -89,10 +91,13 @@ void DefineWindow::saveNames() {
|
||||
}
|
||||
|
||||
void DefineWindow::loadNames() {
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open List"), "/home", tr("Acid Cam List (*.acl)"));
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Open List"), "", tr("Acid Cam List (*.acl)"));
|
||||
if(fileName.length() <= 0)
|
||||
return;
|
||||
std::fstream file(fileName.toStdString(), std::ios::in);
|
||||
if(!file.is_open()) {
|
||||
QMessageBox::information(this, tr("Could not open file"), tr("File could not be opened"));
|
||||
return;
|
||||
}
|
||||
clearFilterNames();
|
||||
while(!file.eof()) {
|
||||
|
||||
Reference in New Issue
Block a user