Rename SRC Folder
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -1,127 +1,127 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
/*
|
||||
开始处理当前文件
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_Start(QString FileName,int FrameNum)
|
||||
{
|
||||
ui->groupBox_CurrentFile->setTitle(tr("Current File:")+" "+FileName);
|
||||
//=================================
|
||||
ui->progressBar_CurrentFile->setRange(0,FrameNum);
|
||||
ui->progressBar_CurrentFile->setValue(0);
|
||||
//=================================
|
||||
ui->label_FrameProgress_CurrentFile->setText("0/"+QString::number(FrameNum,10));
|
||||
ui->label_TimeRemain_CurrentFile->setText(tr("Time remaining:NULL"));
|
||||
ui->label_TimeCost_CurrentFile->setText(tr("Time taken:NULL"));
|
||||
ui->label_ETA_CurrentFile->setText(tr("ETA:NULL"));
|
||||
//=================================
|
||||
TimeCost_CurrentFile = 0;
|
||||
TaskNumTotal_CurrentFile=FrameNum;
|
||||
TaskNumFinished_CurrentFile=0;
|
||||
NewTaskFinished_CurrentFile=false;
|
||||
ETA_CurrentFile=0;
|
||||
//=================================
|
||||
ui->groupBox_CurrentFile->setVisible(1);
|
||||
//=================================
|
||||
isStart_CurrentFile = true;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
停止处理当前文件
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_Stop()
|
||||
{
|
||||
ui->groupBox_CurrentFile->setVisible(0);
|
||||
isStart_CurrentFile = false;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
进度条 进度+1
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_Add()
|
||||
{
|
||||
TaskNumFinished_CurrentFile++;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+片段時長
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_Add_SegmentDuration(int SegmentDuration)
|
||||
{
|
||||
TaskNumFinished_CurrentFile+=SegmentDuration;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+片段時長
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_SetFinishedValue(int FinishedValue)
|
||||
{
|
||||
TaskNumFinished_CurrentFile=FinishedValue;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
监视文件夹内文件数量
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_WatchFolderFileNum(QString FolderPath)
|
||||
{
|
||||
QStringList FilesNameList;
|
||||
do
|
||||
{
|
||||
if(FileProgressWatch_isEnabled==false)return;
|
||||
Delay_msec_sleep(2300);
|
||||
if(file_isDirExist(FolderPath)==false)return;
|
||||
FilesNameList = file_getFileNames_in_Folder_nofilter(FolderPath);
|
||||
emit Send_CurrentFileProgress_progressbar_SetFinishedValue(FilesNameList.size());
|
||||
}
|
||||
while(true);
|
||||
}
|
||||
/*
|
||||
监视文件夹内文件数量
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_WatchFolderFileNum_Textbrower(QString SourceFile_fullPath,QString FolderPath,int TotalFileNum)
|
||||
{
|
||||
QStringList FilesNameList;
|
||||
int OLD_num=0;
|
||||
int New_num=0;
|
||||
do
|
||||
{
|
||||
if(FileProgressWatch_isEnabled==false)return;
|
||||
Delay_msec_sleep(2300);
|
||||
//==========
|
||||
if(file_isDirExist(FolderPath)==false)return;
|
||||
//=========
|
||||
New_num = file_getFileNames_in_Folder_nofilter(FolderPath).size();
|
||||
if(New_num!=OLD_num)
|
||||
{
|
||||
OLD_num=New_num;
|
||||
emit Send_TextBrowser_NewMessage(tr("File name:[")+SourceFile_fullPath+tr("] Scale progress:[")+QString::number(New_num,10)+"/"+QString::number(TotalFileNum,10)+tr("] Frames"));
|
||||
}
|
||||
}
|
||||
while(true);
|
||||
}
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
/*
|
||||
开始处理当前文件
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_Start(QString FileName,int FrameNum)
|
||||
{
|
||||
ui->groupBox_CurrentFile->setTitle(tr("Current File:")+" "+FileName);
|
||||
//=================================
|
||||
ui->progressBar_CurrentFile->setRange(0,FrameNum);
|
||||
ui->progressBar_CurrentFile->setValue(0);
|
||||
//=================================
|
||||
ui->label_FrameProgress_CurrentFile->setText("0/"+QString::number(FrameNum,10));
|
||||
ui->label_TimeRemain_CurrentFile->setText(tr("Time remaining:NULL"));
|
||||
ui->label_TimeCost_CurrentFile->setText(tr("Time taken:NULL"));
|
||||
ui->label_ETA_CurrentFile->setText(tr("ETA:NULL"));
|
||||
//=================================
|
||||
TimeCost_CurrentFile = 0;
|
||||
TaskNumTotal_CurrentFile=FrameNum;
|
||||
TaskNumFinished_CurrentFile=0;
|
||||
NewTaskFinished_CurrentFile=false;
|
||||
ETA_CurrentFile=0;
|
||||
//=================================
|
||||
ui->groupBox_CurrentFile->setVisible(1);
|
||||
//=================================
|
||||
isStart_CurrentFile = true;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
停止处理当前文件
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_Stop()
|
||||
{
|
||||
ui->groupBox_CurrentFile->setVisible(0);
|
||||
isStart_CurrentFile = false;
|
||||
return;
|
||||
}
|
||||
/*
|
||||
进度条 进度+1
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_Add()
|
||||
{
|
||||
TaskNumFinished_CurrentFile++;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+片段時長
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_Add_SegmentDuration(int SegmentDuration)
|
||||
{
|
||||
TaskNumFinished_CurrentFile+=SegmentDuration;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+片段時長
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_progressbar_SetFinishedValue(int FinishedValue)
|
||||
{
|
||||
TaskNumFinished_CurrentFile=FinishedValue;
|
||||
NewTaskFinished_CurrentFile=true;
|
||||
ui->progressBar_CurrentFile->setValue(TaskNumFinished_CurrentFile);
|
||||
ui->label_FrameProgress_CurrentFile->setText(QString::number(TaskNumFinished_CurrentFile,10)+"/"+QString::number(TaskNumTotal_CurrentFile,10));
|
||||
}
|
||||
/*
|
||||
监视文件夹内文件数量
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_WatchFolderFileNum(QString FolderPath)
|
||||
{
|
||||
QStringList FilesNameList;
|
||||
do
|
||||
{
|
||||
if(FileProgressWatch_isEnabled==false)return;
|
||||
Delay_msec_sleep(2300);
|
||||
if(file_isDirExist(FolderPath)==false)return;
|
||||
FilesNameList = file_getFileNames_in_Folder_nofilter(FolderPath);
|
||||
emit Send_CurrentFileProgress_progressbar_SetFinishedValue(FilesNameList.size());
|
||||
}
|
||||
while(true);
|
||||
}
|
||||
/*
|
||||
监视文件夹内文件数量
|
||||
*/
|
||||
void MainWindow::CurrentFileProgress_WatchFolderFileNum_Textbrower(QString SourceFile_fullPath,QString FolderPath,int TotalFileNum)
|
||||
{
|
||||
QStringList FilesNameList;
|
||||
int OLD_num=0;
|
||||
int New_num=0;
|
||||
do
|
||||
{
|
||||
if(FileProgressWatch_isEnabled==false)return;
|
||||
Delay_msec_sleep(2300);
|
||||
//==========
|
||||
if(file_isDirExist(FolderPath)==false)return;
|
||||
//=========
|
||||
New_num = file_getFileNames_in_Folder_nofilter(FolderPath).size();
|
||||
if(New_num!=OLD_num)
|
||||
{
|
||||
OLD_num=New_num;
|
||||
emit Send_TextBrowser_NewMessage(tr("File name:[")+SourceFile_fullPath+tr("] Scale progress:[")+QString::number(New_num,10)+"/"+QString::number(TotalFileNum,10)+tr("] Frames"));
|
||||
}
|
||||
}
|
||||
while(true);
|
||||
}
|
@ -1,448 +1,448 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
Apply自定义分辨率
|
||||
*/
|
||||
int MainWindow::CustRes_SetCustRes()
|
||||
{
|
||||
int CustRes_height_spinBoxIntValue = ui->spinBox_CustRes_height->value();
|
||||
int CustRes_width_spinBoxIntValue = ui->spinBox_CustRes_width->value();
|
||||
QString CustRes_height_qStr = QString::number(CustRes_height_spinBoxIntValue,10);
|
||||
QString CustRes_width_qStr = QString::number(CustRes_width_spinBoxIntValue,10);
|
||||
//========
|
||||
if(ui->checkBox_custres_isAll->isChecked()&&EnableApply2All_CustRes)
|
||||
{
|
||||
int row_count_image = Table_image_get_rowNum();
|
||||
int row_count_gif = Table_gif_get_rowNum();
|
||||
int row_count_video = Table_video_get_rowNum();
|
||||
//====
|
||||
if((row_count_image+row_count_gif+row_count_video)==0)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are in the list."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
//====
|
||||
for(int i=0; i<row_count_image; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_image->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_image_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
//=====
|
||||
for(int i=0; i<row_count_gif; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_gif->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_gif_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
//========
|
||||
if(row_count_video==0)//如果列表里没视频,直接return
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
//读取自定义分辨率设定
|
||||
int CustRes_width_video=CustRes_width_spinBoxIntValue;
|
||||
int CustRes_height_video=CustRes_height_spinBoxIntValue;
|
||||
//判断自定义分辨率是否包含奇数
|
||||
if(CustRes_height_spinBoxIntValue%2!=0||CustRes_width_spinBoxIntValue%2!=0)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Warning"));
|
||||
MSG->setText(tr("When setting a custom resolution for a video, neither the height value nor the width value can be odd.\n\nTherefore, the custom resolution for video has been automatically corrected by this software."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(false);
|
||||
MSG->show();
|
||||
//自动校正分辨率
|
||||
if(CustRes_height_video%2!=0)CustRes_height_video++;
|
||||
if(CustRes_width_video%2!=0)CustRes_width_video++;
|
||||
}
|
||||
QString CustRes_height_video_qStr = QString::number(CustRes_height_video,10);
|
||||
QString CustRes_width_video_qStr = QString::number(CustRes_width_video,10);
|
||||
//开始apply自定义分辨率设定
|
||||
for(int i=0; i<row_count_video; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_video->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_video_qStr;
|
||||
res_map["width"] = CustRes_width_video_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_video_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//如果没有选中任何row,则直接return
|
||||
if(curRow_image==-1&&curRow_video==-1&&curRow_gif==-1)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are currently selected."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
if(curRow_image >= 0)//如果已选中图片
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_image->item(curRow_image,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_image_CustRes_rowNumInt_HeightQString_WidthQString(curRow_image,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
if(curRow_gif >= 0)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_gif->item(curRow_gif,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_gif_CustRes_rowNumInt_HeightQString_WidthQString(curRow_gif,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
if(curRow_video >= 0)
|
||||
{
|
||||
//读取自定义分辨率设定
|
||||
int CustRes_width_video=CustRes_width_spinBoxIntValue;
|
||||
int CustRes_height_video=CustRes_height_spinBoxIntValue;
|
||||
//判断自定义分辨率是否包含奇数
|
||||
if(CustRes_height_spinBoxIntValue%2!=0||CustRes_width_spinBoxIntValue%2!=0)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Warning"));
|
||||
MSG->setText(tr("When setting a custom resolution for a video, neither the height value nor the width value can be odd.\n\nTherefore, the custom resolution for video has been automatically corrected by this software."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(false);
|
||||
MSG->show();
|
||||
//自动校正分辨率
|
||||
if(CustRes_height_video%2!=0)CustRes_height_video++;
|
||||
if(CustRes_width_video%2!=0)CustRes_width_video++;
|
||||
}
|
||||
//====
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_video->item(curRow_video,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = QString::number(CustRes_height_video,10);
|
||||
res_map["width"] = QString::number(CustRes_width_video,10);
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_video_CustRes_rowNumInt_HeightQString_WidthQString(curRow_video,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
取消 自定义分辨率设定
|
||||
*/
|
||||
int MainWindow::CustRes_CancelCustRes()
|
||||
{
|
||||
if(ui->checkBox_custres_isAll->isChecked()&&EnableApply2All_CustRes)
|
||||
{
|
||||
int row_count_image = Table_image_get_rowNum();
|
||||
int row_count_gif = Table_gif_get_rowNum();
|
||||
int row_count_video = Table_video_get_rowNum();
|
||||
if((row_count_image+row_count_gif+row_count_video)==0)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are in the list."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
//====
|
||||
for(int i=0; i<row_count_image; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_image->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_image_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
for(int i=0; i<row_count_gif; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_gif->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_gif_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
for(int i=0; i<row_count_video; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_video->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_video_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//如果没有任何选中的,则弹窗后return
|
||||
if(curRow_image==-1&&curRow_video==-1&&curRow_gif==-1)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Error"));
|
||||
MSG->setText(tr("No items are currently selected."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(true);
|
||||
MSG->show();
|
||||
return 0;
|
||||
}
|
||||
if(curRow_image >= 0)//如果已选中图片
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_image->item(curRow_image,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_image_CustRes_Cancel_rowNumInt(curRow_image);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
if(curRow_gif >= 0)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(curRow_gif,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_gif_CustRes_Cancel_rowNumInt(curRow_gif);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
if(curRow_video >= 0)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_video->item(curRow_video,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_video_CustRes_Cancel_rowNumInt(curRow_video);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MainWindow::CustRes_remove(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
Custom_resolution_list.removeAll(map_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::CustRes_isContained(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QMap<QString, QString> MainWindow::CustRes_getResMap(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
return map_res;
|
||||
}
|
||||
}
|
||||
QMap<QString, QString> empty;
|
||||
empty.clear();
|
||||
return empty;
|
||||
}
|
||||
|
||||
int MainWindow::CustRes_CalNewScaleRatio(QString fullpath,int Height_new,int width_new)
|
||||
{
|
||||
QImage qimage_original;
|
||||
qimage_original.load(fullpath);
|
||||
int original_height = 0;
|
||||
int original_width = 0;
|
||||
//===================== 判断文件类型,获取分辨率 =============================
|
||||
//判断是否为图片或gif
|
||||
QFileInfo fileinfo(fullpath);
|
||||
QString file_ext_lower = fileinfo.suffix();
|
||||
QString Ext_image_str = ui->Ext_image->text();
|
||||
QStringList nameFilters_image = Ext_image_str.split(":");
|
||||
if (nameFilters_image.contains(file_ext_lower) || file_ext_lower=="gif" || file_ext_lower=="apng")
|
||||
{
|
||||
//是图片或动态图
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
else//不是图片&动态图就是视频了
|
||||
{
|
||||
QMap<QString,int> res_map = video_get_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
//获取失败
|
||||
if(original_height<=0||original_width<=0)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+fullpath+tr("] [Unable to get resolution.]"));
|
||||
return 0;
|
||||
}
|
||||
//=====================分别计算高和宽的放大倍数=======================
|
||||
//==== 高 ======
|
||||
int ScaleRatio_height;
|
||||
double ScaleRatio_height_double = (double)Height_new/(double)original_height;
|
||||
if((ScaleRatio_height_double-(int)ScaleRatio_height_double)>0)
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double);
|
||||
}
|
||||
//==== 宽 ======
|
||||
int ScaleRatio_width;
|
||||
double ScaleRatio_width_double = (double)width_new/(double)original_width;
|
||||
if((ScaleRatio_width_double-(int)ScaleRatio_width_double)>0)
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double);
|
||||
}
|
||||
//========================比较决定取哪个放大倍数值返回=====================
|
||||
if((ScaleRatio_height<=1)&&(ScaleRatio_width<=1))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if(ScaleRatio_height>=ScaleRatio_width)
|
||||
{
|
||||
return ScaleRatio_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ScaleRatio_width;
|
||||
}
|
||||
}
|
||||
|
||||
QMap<QString, QString> MainWindow::DoubleScaleRatio_Cal_NewScaleRatio_NewHW(QString fullpath,double ScaleRatio_double)
|
||||
{
|
||||
QMap<QString, QString> Res_map;
|
||||
//===========
|
||||
QImage qimage_original;
|
||||
qimage_original.load(fullpath);
|
||||
int original_height = 0;
|
||||
int original_width = 0;
|
||||
//===================== 判断文件类型,获取分辨率 =============================
|
||||
bool isVideo=false;
|
||||
//判断是否为图片或gif
|
||||
QFileInfo fileinfo(fullpath);
|
||||
QString file_ext_lower = fileinfo.suffix();
|
||||
QString Ext_image_str = ui->Ext_image->text();
|
||||
QStringList nameFilters_image = Ext_image_str.split(":");
|
||||
if (nameFilters_image.contains(file_ext_lower) || file_ext_lower=="gif" || file_ext_lower=="apng")
|
||||
{
|
||||
//是图片或动态图
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
else//不是图片&动态图就是视频了
|
||||
{
|
||||
isVideo=true;
|
||||
QMap<QString,int> res_map = video_get_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
//获取失败
|
||||
if(original_height<=0||original_width<=0)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+fullpath+tr("] [Unable to get resolution.]"));
|
||||
Res_map.clear();
|
||||
return Res_map;
|
||||
}
|
||||
//========= 计算新的高度宽度 ==================
|
||||
int Height_new = ScaleRatio_double * original_height;
|
||||
int width_new = ScaleRatio_double * original_width;
|
||||
if(isVideo == true)
|
||||
{
|
||||
if(Height_new%2!=0)Height_new++;
|
||||
if(width_new%2!=0)width_new++;
|
||||
}
|
||||
Res_map["Height_new"] = QString::number(Height_new,10);
|
||||
Res_map["width_new"] = QString::number(width_new,10);
|
||||
//=====================分别计算高和宽的放大倍数=======================
|
||||
//==== 高 ======
|
||||
int ScaleRatio_height;
|
||||
double ScaleRatio_height_double = (double)Height_new/(double)original_height;
|
||||
if((ScaleRatio_height_double-(int)ScaleRatio_height_double)>0)
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double);
|
||||
}
|
||||
//==== 宽 ======
|
||||
int ScaleRatio_width;
|
||||
double ScaleRatio_width_double = (double)width_new/(double)original_width;
|
||||
if((ScaleRatio_width_double-(int)ScaleRatio_width_double)>0)
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double);
|
||||
}
|
||||
//========================比较决定取哪个放大倍数值返回=====================
|
||||
if((ScaleRatio_height<=1)&&(ScaleRatio_width<=1))
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(1,10);
|
||||
return Res_map;
|
||||
}
|
||||
if(ScaleRatio_height>=ScaleRatio_width)
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(ScaleRatio_height,10);
|
||||
return Res_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(ScaleRatio_width,10);
|
||||
return Res_map;
|
||||
}
|
||||
}
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
Apply自定义分辨率
|
||||
*/
|
||||
int MainWindow::CustRes_SetCustRes()
|
||||
{
|
||||
int CustRes_height_spinBoxIntValue = ui->spinBox_CustRes_height->value();
|
||||
int CustRes_width_spinBoxIntValue = ui->spinBox_CustRes_width->value();
|
||||
QString CustRes_height_qStr = QString::number(CustRes_height_spinBoxIntValue,10);
|
||||
QString CustRes_width_qStr = QString::number(CustRes_width_spinBoxIntValue,10);
|
||||
//========
|
||||
if(ui->checkBox_custres_isAll->isChecked()&&EnableApply2All_CustRes)
|
||||
{
|
||||
int row_count_image = Table_image_get_rowNum();
|
||||
int row_count_gif = Table_gif_get_rowNum();
|
||||
int row_count_video = Table_video_get_rowNum();
|
||||
//====
|
||||
if((row_count_image+row_count_gif+row_count_video)==0)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are in the list."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
//====
|
||||
for(int i=0; i<row_count_image; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_image->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_image_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
//=====
|
||||
for(int i=0; i<row_count_gif; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_gif->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_gif_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
//========
|
||||
if(row_count_video==0)//如果列表里没视频,直接return
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
//读取自定义分辨率设定
|
||||
int CustRes_width_video=CustRes_width_spinBoxIntValue;
|
||||
int CustRes_height_video=CustRes_height_spinBoxIntValue;
|
||||
//判断自定义分辨率是否包含奇数
|
||||
if(CustRes_height_spinBoxIntValue%2!=0||CustRes_width_spinBoxIntValue%2!=0)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Warning"));
|
||||
MSG->setText(tr("When setting a custom resolution for a video, neither the height value nor the width value can be odd.\n\nTherefore, the custom resolution for video has been automatically corrected by this software."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(false);
|
||||
MSG->show();
|
||||
//自动校正分辨率
|
||||
if(CustRes_height_video%2!=0)CustRes_height_video++;
|
||||
if(CustRes_width_video%2!=0)CustRes_width_video++;
|
||||
}
|
||||
QString CustRes_height_video_qStr = QString::number(CustRes_height_video,10);
|
||||
QString CustRes_width_video_qStr = QString::number(CustRes_width_video,10);
|
||||
//开始apply自定义分辨率设定
|
||||
for(int i=0; i<row_count_video; i++)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_video->item(i,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_video_qStr;
|
||||
res_map["width"] = CustRes_width_video_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_video_CustRes_rowNumInt_HeightQString_WidthQString(i,res_map["height"],res_map["width"]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//如果没有选中任何row,则直接return
|
||||
if(curRow_image==-1&&curRow_video==-1&&curRow_gif==-1)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are currently selected."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
if(curRow_image >= 0)//如果已选中图片
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_image->item(curRow_image,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_image_CustRes_rowNumInt_HeightQString_WidthQString(curRow_image,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
if(curRow_gif >= 0)
|
||||
{
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_gif->item(curRow_gif,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = CustRes_height_qStr;
|
||||
res_map["width"] = CustRes_width_qStr;
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_gif_CustRes_rowNumInt_HeightQString_WidthQString(curRow_gif,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
if(curRow_video >= 0)
|
||||
{
|
||||
//读取自定义分辨率设定
|
||||
int CustRes_width_video=CustRes_width_spinBoxIntValue;
|
||||
int CustRes_height_video=CustRes_height_spinBoxIntValue;
|
||||
//判断自定义分辨率是否包含奇数
|
||||
if(CustRes_height_spinBoxIntValue%2!=0||CustRes_width_spinBoxIntValue%2!=0)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Warning"));
|
||||
MSG->setText(tr("When setting a custom resolution for a video, neither the height value nor the width value can be odd.\n\nTherefore, the custom resolution for video has been automatically corrected by this software."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(false);
|
||||
MSG->show();
|
||||
//自动校正分辨率
|
||||
if(CustRes_height_video%2!=0)CustRes_height_video++;
|
||||
if(CustRes_width_video%2!=0)CustRes_width_video++;
|
||||
}
|
||||
//====
|
||||
QMap<QString,QString> res_map;
|
||||
//读取文件信息
|
||||
QString SourceFile_fullPath = Table_model_video->item(curRow_video,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//移除原来的设定,防止重复
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = QString::number(CustRes_height_video,10);
|
||||
res_map["width"] = QString::number(CustRes_width_video,10);
|
||||
Custom_resolution_list.append(res_map);
|
||||
Table_video_CustRes_rowNumInt_HeightQString_WidthQString(curRow_video,res_map["height"],res_map["width"]);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
取消 自定义分辨率设定
|
||||
*/
|
||||
int MainWindow::CustRes_CancelCustRes()
|
||||
{
|
||||
if(ui->checkBox_custres_isAll->isChecked()&&EnableApply2All_CustRes)
|
||||
{
|
||||
int row_count_image = Table_image_get_rowNum();
|
||||
int row_count_gif = Table_gif_get_rowNum();
|
||||
int row_count_video = Table_video_get_rowNum();
|
||||
if((row_count_image+row_count_gif+row_count_video)==0)
|
||||
{
|
||||
QMessageBox *CustRes_NoItem = new QMessageBox();
|
||||
CustRes_NoItem->setWindowTitle(tr("Error"));
|
||||
CustRes_NoItem->setText(tr("No items are in the list."));
|
||||
CustRes_NoItem->setIcon(QMessageBox::Warning);
|
||||
CustRes_NoItem->setModal(true);
|
||||
CustRes_NoItem->show();
|
||||
return 0;
|
||||
}
|
||||
//====
|
||||
for(int i=0; i<row_count_image; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_image->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_image_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
for(int i=0; i<row_count_gif; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_gif->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_gif_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
for(int i=0; i<row_count_video; i++)
|
||||
{
|
||||
CustRes_remove(Table_model_video->item(i,2)->text());//从自定义分辨率列表移除
|
||||
Table_video_CustRes_Cancel_rowNumInt(i);//清空指定row的自定义分辨率
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//如果没有任何选中的,则弹窗后return
|
||||
if(curRow_image==-1&&curRow_video==-1&&curRow_gif==-1)
|
||||
{
|
||||
QMessageBox *MSG = new QMessageBox();
|
||||
MSG->setWindowTitle(tr("Error"));
|
||||
MSG->setText(tr("No items are currently selected."));
|
||||
MSG->setIcon(QMessageBox::Warning);
|
||||
MSG->setModal(true);
|
||||
MSG->show();
|
||||
return 0;
|
||||
}
|
||||
if(curRow_image >= 0)//如果已选中图片
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_image->item(curRow_image,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_image_CustRes_Cancel_rowNumInt(curRow_image);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
if(curRow_gif >= 0)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(curRow_gif,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_gif_CustRes_Cancel_rowNumInt(curRow_gif);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
if(curRow_video >= 0)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_video->item(curRow_video,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);//从自定义分辨率列表移除
|
||||
Table_video_CustRes_Cancel_rowNumInt(curRow_video);//清空指定row的自定义分辨率
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MainWindow::CustRes_remove(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
Custom_resolution_list.removeAll(map_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::CustRes_isContained(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QMap<QString, QString> MainWindow::CustRes_getResMap(QString fullpath)
|
||||
{
|
||||
for(int i=0; i<Custom_resolution_list.size(); i++)
|
||||
{
|
||||
QMap<QString, QString> map_res = Custom_resolution_list.at(i);
|
||||
if(map_res["fullpath"]==fullpath)
|
||||
{
|
||||
return map_res;
|
||||
}
|
||||
}
|
||||
QMap<QString, QString> empty;
|
||||
empty.clear();
|
||||
return empty;
|
||||
}
|
||||
|
||||
int MainWindow::CustRes_CalNewScaleRatio(QString fullpath,int Height_new,int width_new)
|
||||
{
|
||||
QImage qimage_original;
|
||||
qimage_original.load(fullpath);
|
||||
int original_height = 0;
|
||||
int original_width = 0;
|
||||
//===================== 判断文件类型,获取分辨率 =============================
|
||||
//判断是否为图片或gif
|
||||
QFileInfo fileinfo(fullpath);
|
||||
QString file_ext_lower = fileinfo.suffix();
|
||||
QString Ext_image_str = ui->Ext_image->text();
|
||||
QStringList nameFilters_image = Ext_image_str.split(":");
|
||||
if (nameFilters_image.contains(file_ext_lower) || file_ext_lower=="gif" || file_ext_lower=="apng")
|
||||
{
|
||||
//是图片或动态图
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
else//不是图片&动态图就是视频了
|
||||
{
|
||||
QMap<QString,int> res_map = video_get_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
//获取失败
|
||||
if(original_height<=0||original_width<=0)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+fullpath+tr("] [Unable to get resolution.]"));
|
||||
return 0;
|
||||
}
|
||||
//=====================分别计算高和宽的放大倍数=======================
|
||||
//==== 高 ======
|
||||
int ScaleRatio_height;
|
||||
double ScaleRatio_height_double = (double)Height_new/(double)original_height;
|
||||
if((ScaleRatio_height_double-(int)ScaleRatio_height_double)>0)
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double);
|
||||
}
|
||||
//==== 宽 ======
|
||||
int ScaleRatio_width;
|
||||
double ScaleRatio_width_double = (double)width_new/(double)original_width;
|
||||
if((ScaleRatio_width_double-(int)ScaleRatio_width_double)>0)
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double);
|
||||
}
|
||||
//========================比较决定取哪个放大倍数值返回=====================
|
||||
if((ScaleRatio_height<=1)&&(ScaleRatio_width<=1))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if(ScaleRatio_height>=ScaleRatio_width)
|
||||
{
|
||||
return ScaleRatio_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ScaleRatio_width;
|
||||
}
|
||||
}
|
||||
|
||||
QMap<QString, QString> MainWindow::DoubleScaleRatio_Cal_NewScaleRatio_NewHW(QString fullpath,double ScaleRatio_double)
|
||||
{
|
||||
QMap<QString, QString> Res_map;
|
||||
//===========
|
||||
QImage qimage_original;
|
||||
qimage_original.load(fullpath);
|
||||
int original_height = 0;
|
||||
int original_width = 0;
|
||||
//===================== 判断文件类型,获取分辨率 =============================
|
||||
bool isVideo=false;
|
||||
//判断是否为图片或gif
|
||||
QFileInfo fileinfo(fullpath);
|
||||
QString file_ext_lower = fileinfo.suffix();
|
||||
QString Ext_image_str = ui->Ext_image->text();
|
||||
QStringList nameFilters_image = Ext_image_str.split(":");
|
||||
if (nameFilters_image.contains(file_ext_lower) || file_ext_lower=="gif" || file_ext_lower=="apng")
|
||||
{
|
||||
//是图片或动态图
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
else//不是图片&动态图就是视频了
|
||||
{
|
||||
isVideo=true;
|
||||
QMap<QString,int> res_map = video_get_Resolution(fullpath);
|
||||
original_height = res_map["height"];
|
||||
original_width = res_map["width"];
|
||||
}
|
||||
//获取失败
|
||||
if(original_height<=0||original_width<=0)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+fullpath+tr("] [Unable to get resolution.]"));
|
||||
Res_map.clear();
|
||||
return Res_map;
|
||||
}
|
||||
//========= 计算新的高度宽度 ==================
|
||||
int Height_new = ScaleRatio_double * original_height;
|
||||
int width_new = ScaleRatio_double * original_width;
|
||||
if(isVideo == true)
|
||||
{
|
||||
if(Height_new%2!=0)Height_new++;
|
||||
if(width_new%2!=0)width_new++;
|
||||
}
|
||||
Res_map["Height_new"] = QString::number(Height_new,10);
|
||||
Res_map["width_new"] = QString::number(width_new,10);
|
||||
//=====================分别计算高和宽的放大倍数=======================
|
||||
//==== 高 ======
|
||||
int ScaleRatio_height;
|
||||
double ScaleRatio_height_double = (double)Height_new/(double)original_height;
|
||||
if((ScaleRatio_height_double-(int)ScaleRatio_height_double)>0)
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_height = (int)(ScaleRatio_height_double);
|
||||
}
|
||||
//==== 宽 ======
|
||||
int ScaleRatio_width;
|
||||
double ScaleRatio_width_double = (double)width_new/(double)original_width;
|
||||
if((ScaleRatio_width_double-(int)ScaleRatio_width_double)>0)
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double)+1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaleRatio_width = (int)(ScaleRatio_width_double);
|
||||
}
|
||||
//========================比较决定取哪个放大倍数值返回=====================
|
||||
if((ScaleRatio_height<=1)&&(ScaleRatio_width<=1))
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(1,10);
|
||||
return Res_map;
|
||||
}
|
||||
if(ScaleRatio_height>=ScaleRatio_width)
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(ScaleRatio_height,10);
|
||||
return Res_map;
|
||||
}
|
||||
else
|
||||
{
|
||||
Res_map["ScaleRatio"] = QString::number(ScaleRatio_width,10);
|
||||
return Res_map;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>OtherPic/AspectRatioStrategy.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>OtherPic/AspectRatioStrategy.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@ -1,93 +1,93 @@
|
||||
# Copyright (C) 2021 Aaron Feng
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# My Github homepage: https://github.com/AaronFeng753
|
||||
|
||||
QT += core gui
|
||||
QT += concurrent
|
||||
QT += multimedia
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
AnimatedPNG.cpp \
|
||||
Anime4K.cpp \
|
||||
CompatibilityTest.cpp \
|
||||
Current_File_Progress.cpp \
|
||||
CustomResolution.cpp \
|
||||
Donate.cpp \
|
||||
Finish_Action.cpp \
|
||||
Frame_Interpolation.cpp \
|
||||
Right-click_Menu.cpp \
|
||||
SystemTrayIcon.cpp \
|
||||
Web_Activities.cpp \
|
||||
checkupdate.cpp \
|
||||
files.cpp \
|
||||
gif.cpp \
|
||||
image.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
progressBar.cpp \
|
||||
realsr_ncnn_vulkan.cpp \
|
||||
settings.cpp \
|
||||
srmd-cuda.cpp \
|
||||
srmd_ncnn_vulkan.cpp \
|
||||
table.cpp \
|
||||
textBrowser.cpp \
|
||||
topsupporterslist.cpp \
|
||||
video.cpp \
|
||||
waifu2x.cpp \
|
||||
waifu2x_caffe.cpp \
|
||||
waifu2x_converter.cpp \
|
||||
waifu2x_ncnn_vulkan.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
topsupporterslist.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
topsupporterslist.ui
|
||||
|
||||
TRANSLATIONS += language_English.ts \
|
||||
language_Chinese.ts \
|
||||
language_TraditionalChinese.ts
|
||||
|
||||
TARGET = Waifu2x-Extension-GUI
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
OtherPic.qrc \
|
||||
donate.qrc \
|
||||
icon.qrc
|
||||
|
||||
RC_ICONS =icon/icon.ico
|
||||
# Copyright (C) 2021 Aaron Feng
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# My Github homepage: https://github.com/AaronFeng753
|
||||
|
||||
QT += core gui
|
||||
QT += concurrent
|
||||
QT += multimedia
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
AnimatedPNG.cpp \
|
||||
Anime4K.cpp \
|
||||
CompatibilityTest.cpp \
|
||||
Current_File_Progress.cpp \
|
||||
CustomResolution.cpp \
|
||||
Donate.cpp \
|
||||
Finish_Action.cpp \
|
||||
Frame_Interpolation.cpp \
|
||||
Right-click_Menu.cpp \
|
||||
SystemTrayIcon.cpp \
|
||||
Web_Activities.cpp \
|
||||
checkupdate.cpp \
|
||||
files.cpp \
|
||||
gif.cpp \
|
||||
image.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
progressBar.cpp \
|
||||
realsr_ncnn_vulkan.cpp \
|
||||
settings.cpp \
|
||||
srmd-cuda.cpp \
|
||||
srmd_ncnn_vulkan.cpp \
|
||||
table.cpp \
|
||||
textBrowser.cpp \
|
||||
topsupporterslist.cpp \
|
||||
video.cpp \
|
||||
waifu2x.cpp \
|
||||
waifu2x_caffe.cpp \
|
||||
waifu2x_converter.cpp \
|
||||
waifu2x_ncnn_vulkan.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
topsupporterslist.h
|
||||
|
||||
FORMS += \
|
||||
mainwindow.ui \
|
||||
topsupporterslist.ui
|
||||
|
||||
TRANSLATIONS += language_English.ts \
|
||||
language_Chinese.ts \
|
||||
language_TraditionalChinese.ts
|
||||
|
||||
TARGET = Waifu2x-Extension-GUI
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
OtherPic.qrc \
|
||||
donate.qrc \
|
||||
icon.qrc
|
||||
|
||||
RC_ICONS =icon/icon.ico
|
@ -1,346 +1,346 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.12.4, 2021-04-28T09:36:13. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{8ba12143-2f96-4a62-9cc5-70a8911b1041}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
|
||||
<value type="QString">-fno-delayed-template-parsing</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">false</value>
|
||||
<value type="QString" key="ClangCodeModel.WarningConfigId">{a5ca5d65-944d-44d0-9f07-5c2f9679e35a}</value>
|
||||
<value type="bool" key="ClangFormat.OverrideFile">false</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig"></value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">0</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.0 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.0 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5150.win64_mingw81_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="int" key="QtQuickCompiler">2</value>
|
||||
<value type="int" key="SeparateDebugInfo">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">2</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
|
||||
<value type="QString">cpu-cycles</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
|
||||
<value type="int" key="Analyzer.Perf.Frequency">250</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
|
||||
<value type="QString">-e</value>
|
||||
<value type="QString">cpu-cycles</value>
|
||||
<value type="QString">--call-graph</value>
|
||||
<value type="QString">dwarf,4096</value>
|
||||
<value type="QString">-F</value>
|
||||
<value type="QString">250</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/workspace/Waifu2x-Extension-QT/Waifu2x-Extension-QT/Waifu2x-Extension-QT.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/workspace/Waifu2x-Extension-QT/Waifu2x-Extension-QT/Waifu2x-Extension-QT.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.12.4, 2021-04-28T09:36:13. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{8ba12143-2f96-4a62-9cc5-70a8911b1041}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
|
||||
<value type="QString">-fno-delayed-template-parsing</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">false</value>
|
||||
<value type="QString" key="ClangCodeModel.WarningConfigId">{a5ca5d65-944d-44d0-9f07-5c2f9679e35a}</value>
|
||||
<value type="bool" key="ClangFormat.OverrideFile">false</value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig"></value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">0</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.0 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.0 MinGW 64-bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5150.win64_mingw81_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="int" key="QtQuickCompiler">2</value>
|
||||
<value type="int" key="SeparateDebugInfo">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">2</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="bool">true</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\workspace\Waifu2x-Extension-QT\build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
|
||||
<value type="QString">cpu-cycles</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
|
||||
<value type="int" key="Analyzer.Perf.Frequency">250</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
|
||||
<value type="QString">-e</value>
|
||||
<value type="QString">cpu-cycles</value>
|
||||
<value type="QString">--call-graph</value>
|
||||
<value type="QString">dwarf,4096</value>
|
||||
<value type="QString">-F</value>
|
||||
<value type="QString">250</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/workspace/Waifu2x-Extension-QT/Waifu2x-Extension-QT/Waifu2x-Extension-QT.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/workspace/Waifu2x-Extension-QT/Waifu2x-Extension-QT/Waifu2x-Extension-QT.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/workspace/Waifu2x-Extension-QT/build-Waifu2x-Extension-QT-Desktop_Qt_5_15_0_MinGW_64_bit-Release</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>background/luke-chesser.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>background/luke-chesser.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,189 +1,189 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
/*
|
||||
手动检查更新:直接打开release页面
|
||||
*/
|
||||
void MainWindow::on_pushButton_CheckUpdate_clicked()
|
||||
{
|
||||
if(ui->comboBox_language->currentIndex()==1)
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/releases"));
|
||||
}
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases"));
|
||||
}
|
||||
/*
|
||||
自动检查更新:
|
||||
启动软件时以单独线程运行,检测更新,如有则弹窗
|
||||
*/
|
||||
int MainWindow::CheckUpadte_Auto()
|
||||
{
|
||||
bool isGiteeBanned = ui->checkBox_BanGitee->isChecked();
|
||||
//============
|
||||
QString Latest_Ver="";
|
||||
QString Current_Ver="";
|
||||
QString Github_UpdateInfo_online = "";
|
||||
QString Gitee_UpdateInfo_online = "";
|
||||
QString UpdateType=ui->comboBox_UpdateChannel->currentText();
|
||||
switch(ui->comboBox_UpdateChannel->currentIndex())
|
||||
{
|
||||
case 0:
|
||||
Current_Ver=LastStableVer;
|
||||
Github_UpdateInfo_online = "https://raw.githubusercontent.com/AaronFeng753/Waifu2x-Extension-GUI/master/.github/Update_Info.ini";
|
||||
Gitee_UpdateInfo_online = "https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/raw/master/.github/Update_Info.ini";
|
||||
break;
|
||||
case 1:
|
||||
Current_Ver=LastBetaVer;
|
||||
Github_UpdateInfo_online = "https://raw.githubusercontent.com/AaronFeng753/Waifu2x-Extension-GUI/master/.github/Update_Info_Beta.ini";
|
||||
Gitee_UpdateInfo_online = "https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/raw/master/.github/Update_Info_Beta.ini";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//============================
|
||||
QString Github_UpdateInfo_local = Current_Path+"/Update_Info_Github.ini";
|
||||
QString Gitee_UpdateInfo_local = Current_Path+"/Update_Info_Gitee.ini";
|
||||
//============= 从Github下载更新信息 ==============
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to download update information(for auto-check update) from Github."));
|
||||
DownloadTo(Github_UpdateInfo_online,Github_UpdateInfo_local);
|
||||
//========= 检查github的文件是否下载成功 =================
|
||||
if(QFile::exists(Github_UpdateInfo_local))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Successfully downloaded update information from Github."));
|
||||
//==
|
||||
QSettings *configIniRead = new QSettings(Github_UpdateInfo_local, QSettings::IniFormat);
|
||||
configIniRead->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
//=====
|
||||
if(configIniRead->value("/Latest_Version/Ver") == QVariant() || configIniRead->value("/Change_log/log") == QVariant())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
//=====
|
||||
Latest_Ver = configIniRead->value("/Latest_Version/Ver").toString();
|
||||
QString Change_log = configIniRead->value("/Change_log/log").toString();
|
||||
Latest_Ver = Latest_Ver.trimmed();
|
||||
if(Latest_Ver!=Current_Ver&&Latest_Ver!="")
|
||||
{
|
||||
emit Send_CheckUpadte_NewUpdate(Latest_Ver,Change_log);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("No update found, you are using the latest ")+UpdateType+tr(" version."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to download update information from Github."));
|
||||
}
|
||||
//============= 从码云下载更新信息 ==============
|
||||
if(isGiteeBanned==false)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to download update information(for auto-check update) from Gitee."));
|
||||
DownloadTo(Gitee_UpdateInfo_online,Gitee_UpdateInfo_local);
|
||||
//========= 检查gitee的文件是否下载成功 =================
|
||||
if(QFile::exists(Gitee_UpdateInfo_local))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Successfully downloaded update information from Gitee."));
|
||||
//==
|
||||
QSettings *configIniRead = new QSettings(Gitee_UpdateInfo_local, QSettings::IniFormat);
|
||||
configIniRead->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
//=====
|
||||
if(configIniRead->value("/Latest_Version/Ver") == QVariant() || configIniRead->value("/Change_log/log") == QVariant())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
//=====
|
||||
Latest_Ver = configIniRead->value("/Latest_Version/Ver").toString();
|
||||
QString Change_log = configIniRead->value("/Change_log/log").toString();
|
||||
Latest_Ver = Latest_Ver.trimmed();
|
||||
if(Latest_Ver!=Current_Ver&&Latest_Ver!="")
|
||||
{
|
||||
emit Send_CheckUpadte_NewUpdate(Latest_Ver,Change_log);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("No update found, you are using the latest ")+UpdateType+tr(" version."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to download update information from Gitee."));
|
||||
}
|
||||
}
|
||||
if(Latest_Ver=="")
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
自动更新弹窗
|
||||
*/
|
||||
int MainWindow::CheckUpadte_NewUpdate(QString update_str,QString Change_log)
|
||||
{
|
||||
QString UpdateType=ui->comboBox_UpdateChannel->currentText();
|
||||
//======
|
||||
if(ui->checkBox_UpdatePopup->isChecked())
|
||||
{
|
||||
QMessageBox Msg(QMessageBox::Question, QString(tr("New ")+UpdateType+tr(" update available!")), QString(tr("New version: %1\n\nBrief change log:\n%2\n\nDo you wanna update now???")).arg(update_str).arg(Change_log));
|
||||
Msg.setIcon(QMessageBox::Information);
|
||||
if(ui->comboBox_language->currentIndex()==1)
|
||||
{
|
||||
QAbstractButton *pYesBtn_Github = Msg.addButton(QString("前往Github下载"), QMessageBox::YesRole);
|
||||
QAbstractButton *pYesBtn_Gitee = Msg.addButton(QString("前往码云下载"), QMessageBox::YesRole);
|
||||
Msg.addButton(QString(tr("NO")), QMessageBox::NoRole);
|
||||
Msg.exec();
|
||||
if (Msg.clickedButton() == pYesBtn_Github)QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
if (Msg.clickedButton() == pYesBtn_Gitee)QDesktopServices::openUrl(QUrl("https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
QAbstractButton *pYesBtn = Msg.addButton(QString(tr("YES")), QMessageBox::YesRole);
|
||||
Msg.addButton(QString(tr("NO")), QMessageBox::NoRole);
|
||||
Msg.exec();
|
||||
if (Msg.clickedButton() == pYesBtn)QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString update_msg_str = QString(tr("New ")+UpdateType+tr(" update: %1 is available! Click [Check update] button to download the latest version!")).arg(update_str);
|
||||
emit Send_SystemTray_NewMessage(update_msg_str);
|
||||
emit Send_TextBrowser_NewMessage(update_msg_str);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
/*
|
||||
手动检查更新:直接打开release页面
|
||||
*/
|
||||
void MainWindow::on_pushButton_CheckUpdate_clicked()
|
||||
{
|
||||
if(ui->comboBox_language->currentIndex()==1)
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/releases"));
|
||||
}
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases"));
|
||||
}
|
||||
/*
|
||||
自动检查更新:
|
||||
启动软件时以单独线程运行,检测更新,如有则弹窗
|
||||
*/
|
||||
int MainWindow::CheckUpadte_Auto()
|
||||
{
|
||||
bool isGiteeBanned = ui->checkBox_BanGitee->isChecked();
|
||||
//============
|
||||
QString Latest_Ver="";
|
||||
QString Current_Ver="";
|
||||
QString Github_UpdateInfo_online = "";
|
||||
QString Gitee_UpdateInfo_online = "";
|
||||
QString UpdateType=ui->comboBox_UpdateChannel->currentText();
|
||||
switch(ui->comboBox_UpdateChannel->currentIndex())
|
||||
{
|
||||
case 0:
|
||||
Current_Ver=LastStableVer;
|
||||
Github_UpdateInfo_online = "https://raw.githubusercontent.com/AaronFeng753/Waifu2x-Extension-GUI/master/.github/Update_Info.ini";
|
||||
Gitee_UpdateInfo_online = "https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/raw/master/.github/Update_Info.ini";
|
||||
break;
|
||||
case 1:
|
||||
Current_Ver=LastBetaVer;
|
||||
Github_UpdateInfo_online = "https://raw.githubusercontent.com/AaronFeng753/Waifu2x-Extension-GUI/master/.github/Update_Info_Beta.ini";
|
||||
Gitee_UpdateInfo_online = "https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/raw/master/.github/Update_Info_Beta.ini";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//============================
|
||||
QString Github_UpdateInfo_local = Current_Path+"/Update_Info_Github.ini";
|
||||
QString Gitee_UpdateInfo_local = Current_Path+"/Update_Info_Gitee.ini";
|
||||
//============= 从Github下载更新信息 ==============
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to download update information(for auto-check update) from Github."));
|
||||
DownloadTo(Github_UpdateInfo_online,Github_UpdateInfo_local);
|
||||
//========= 检查github的文件是否下载成功 =================
|
||||
if(QFile::exists(Github_UpdateInfo_local))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Successfully downloaded update information from Github."));
|
||||
//==
|
||||
QSettings *configIniRead = new QSettings(Github_UpdateInfo_local, QSettings::IniFormat);
|
||||
configIniRead->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
//=====
|
||||
if(configIniRead->value("/Latest_Version/Ver") == QVariant() || configIniRead->value("/Change_log/log") == QVariant())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
//=====
|
||||
Latest_Ver = configIniRead->value("/Latest_Version/Ver").toString();
|
||||
QString Change_log = configIniRead->value("/Change_log/log").toString();
|
||||
Latest_Ver = Latest_Ver.trimmed();
|
||||
if(Latest_Ver!=Current_Ver&&Latest_Ver!="")
|
||||
{
|
||||
emit Send_CheckUpadte_NewUpdate(Latest_Ver,Change_log);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("No update found, you are using the latest ")+UpdateType+tr(" version."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to download update information from Github."));
|
||||
}
|
||||
//============= 从码云下载更新信息 ==============
|
||||
if(isGiteeBanned==false)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to download update information(for auto-check update) from Gitee."));
|
||||
DownloadTo(Gitee_UpdateInfo_online,Gitee_UpdateInfo_local);
|
||||
//========= 检查gitee的文件是否下载成功 =================
|
||||
if(QFile::exists(Gitee_UpdateInfo_local))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Successfully downloaded update information from Gitee."));
|
||||
//==
|
||||
QSettings *configIniRead = new QSettings(Gitee_UpdateInfo_local, QSettings::IniFormat);
|
||||
configIniRead->setIniCodec(QTextCodec::codecForName("UTF-8"));
|
||||
//=====
|
||||
if(configIniRead->value("/Latest_Version/Ver") == QVariant() || configIniRead->value("/Change_log/log") == QVariant())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
//=====
|
||||
Latest_Ver = configIniRead->value("/Latest_Version/Ver").toString();
|
||||
QString Change_log = configIniRead->value("/Change_log/log").toString();
|
||||
Latest_Ver = Latest_Ver.trimmed();
|
||||
if(Latest_Ver!=Current_Ver&&Latest_Ver!="")
|
||||
{
|
||||
emit Send_CheckUpadte_NewUpdate(Latest_Ver,Change_log);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("No update found, you are using the latest ")+UpdateType+tr(" version."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to download update information from Gitee."));
|
||||
}
|
||||
}
|
||||
if(Latest_Ver=="")
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Unable to check for updates! Please check your network or check for updates manually."));
|
||||
}
|
||||
QFile::remove(Github_UpdateInfo_local);
|
||||
QFile::remove(Gitee_UpdateInfo_local);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
自动更新弹窗
|
||||
*/
|
||||
int MainWindow::CheckUpadte_NewUpdate(QString update_str,QString Change_log)
|
||||
{
|
||||
QString UpdateType=ui->comboBox_UpdateChannel->currentText();
|
||||
//======
|
||||
if(ui->checkBox_UpdatePopup->isChecked())
|
||||
{
|
||||
QMessageBox Msg(QMessageBox::Question, QString(tr("New ")+UpdateType+tr(" update available!")), QString(tr("New version: %1\n\nBrief change log:\n%2\n\nDo you wanna update now???")).arg(update_str).arg(Change_log));
|
||||
Msg.setIcon(QMessageBox::Information);
|
||||
if(ui->comboBox_language->currentIndex()==1)
|
||||
{
|
||||
QAbstractButton *pYesBtn_Github = Msg.addButton(QString("前往Github下载"), QMessageBox::YesRole);
|
||||
QAbstractButton *pYesBtn_Gitee = Msg.addButton(QString("前往码云下载"), QMessageBox::YesRole);
|
||||
Msg.addButton(QString(tr("NO")), QMessageBox::NoRole);
|
||||
Msg.exec();
|
||||
if (Msg.clickedButton() == pYesBtn_Github)QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
if (Msg.clickedButton() == pYesBtn_Gitee)QDesktopServices::openUrl(QUrl("https://gitee.com/aaronfeng0711/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
QAbstractButton *pYesBtn = Msg.addButton(QString(tr("YES")), QMessageBox::YesRole);
|
||||
Msg.addButton(QString(tr("NO")), QMessageBox::NoRole);
|
||||
Msg.exec();
|
||||
if (Msg.clickedButton() == pYesBtn)QDesktopServices::openUrl(QUrl("https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/"+update_str.trimmed()));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString update_msg_str = QString(tr("New ")+UpdateType+tr(" update: %1 is available! Click [Check update] button to download the latest version!")).arg(update_str);
|
||||
emit Send_SystemTray_NewMessage(update_msg_str);
|
||||
emit Send_TextBrowser_NewMessage(update_msg_str);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>donate/Donate_QRCode.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>donate/Donate_QRCode.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
Before Width: | Height: | Size: 752 KiB After Width: | Height: | Size: 752 KiB |
@ -1,310 +1,310 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
根据行数从自定义分辨率列表移除gif文件
|
||||
*/
|
||||
void MainWindow::Gif_RemoveFromCustResList(int RowNumber)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(RowNumber,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);
|
||||
}
|
||||
|
||||
/*
|
||||
当gif没有自定义分辨率且此时放大倍率为double,则计算一个添加到自定义列表里
|
||||
*/
|
||||
bool MainWindow::Gif_DoubleScaleRatioPrep(int RowNumber)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(RowNumber,2)->text();
|
||||
if(CustRes_isContained(SourceFile_fullPath) == true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//===================== 获取分辨率 =============================
|
||||
QMap<QString,int> Map_OrgRes = Image_Gif_Read_Resolution(SourceFile_fullPath);
|
||||
//========= 计算新的高度宽度 ==================
|
||||
double ScaleRatio_double = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
int Height_new = qRound(ScaleRatio_double * Map_OrgRes["height"]);
|
||||
int width_new = qRound(ScaleRatio_double * Map_OrgRes["width"]);
|
||||
if(Height_new<1 || width_new<1)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage("Warning! Unable to read the resolution of ["+SourceFile_fullPath+"]. This file will only be scaled to "+QString::number((int)ScaleRatio_double,10)+"X.");
|
||||
return false;
|
||||
}
|
||||
//======== 存入自定义分辨率列表中 ============
|
||||
QMap<QString,QString> res_map;
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = QString::number(Height_new,10);
|
||||
res_map["width"] = QString::number(width_new,10);
|
||||
Custom_resolution_list.append(res_map);
|
||||
//=========
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
获取gif帧间隔时间
|
||||
*/
|
||||
int MainWindow::Gif_getDuration(QString gifPath)
|
||||
{
|
||||
//========================= 调用ffprobe读取GIF信息 ======================
|
||||
QProcess *Get_GifAvgFPS_process = new QProcess();
|
||||
QString cmd = "\""+Current_Path+"/ffprobe_waifu2xEX.exe\" -i \""+gifPath+"\" -select_streams v -show_streams -v quiet -print_format ini -show_format";
|
||||
Get_GifAvgFPS_process->start(cmd);
|
||||
while(!Get_GifAvgFPS_process->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!Get_GifAvgFPS_process->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//============= 保存ffprobe输出的ini格式文本 =============
|
||||
QString ffprobe_output_str = Get_GifAvgFPS_process->readAllStandardOutput();
|
||||
//================ 将ini写入文件保存 ================
|
||||
QFileInfo videoFileInfo(gifPath);
|
||||
QString Path_gif_info_ini = "";
|
||||
QString video_dir = file_getFolderPath(gifPath);
|
||||
int FileNo = 0;
|
||||
do
|
||||
{
|
||||
FileNo++;
|
||||
Path_gif_info_ini = video_dir+"/"+file_getBaseName(gifPath)+"_GifInfo_"+QString::number(FileNo,10)+"_W2xEX.ini";
|
||||
}
|
||||
while(QFile::exists(Path_gif_info_ini));
|
||||
//=========
|
||||
QFile gif_info_ini(Path_gif_info_ini);
|
||||
gif_info_ini.remove();
|
||||
if (gif_info_ini.open(QIODevice::ReadWrite | QIODevice::Text)) //QIODevice::ReadWrite支持读写
|
||||
{
|
||||
QTextStream stream(&gif_info_ini);
|
||||
stream << ffprobe_output_str;
|
||||
}
|
||||
gif_info_ini.close();
|
||||
//================== 读取ini获得参数 =====================
|
||||
QString FPS_Division = "";
|
||||
QSettings *configIniRead_videoInfo = new QSettings(Path_gif_info_ini, QSettings::IniFormat);
|
||||
if(configIniRead_videoInfo->value("/streams.stream.0/avg_frame_rate") != QVariant())
|
||||
{
|
||||
FPS_Division = configIniRead_videoInfo->value("/streams.stream.0/avg_frame_rate").toString().trimmed();
|
||||
}
|
||||
gif_info_ini.remove();
|
||||
//=======================
|
||||
int Duration = 0;
|
||||
if(FPS_Division!="")
|
||||
{
|
||||
QStringList FPS_Nums = FPS_Division.split("/");
|
||||
if(FPS_Nums.size()==2)
|
||||
{
|
||||
double FPS_Num_0 = FPS_Nums.at(0).toDouble();
|
||||
double FPS_Num_1 = FPS_Nums.at(1).toDouble();
|
||||
if(FPS_Num_0>0&&FPS_Num_1>0)
|
||||
{
|
||||
double Duration_double = 100/(FPS_Num_0/FPS_Num_1);
|
||||
Duration = qRound(Duration_double);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Duration<=0)
|
||||
{
|
||||
QMovie movie(gifPath);
|
||||
movie.setSpeed(1);
|
||||
movie.start();
|
||||
movie.stop();
|
||||
Duration = ((movie.nextFrameDelay()/100)+1)/10;
|
||||
}
|
||||
return Duration;
|
||||
}
|
||||
/*
|
||||
获取gif帧数量的位数
|
||||
*/
|
||||
int MainWindow::Gif_getFrameDigits(QString gifPath)
|
||||
{
|
||||
QMovie movie(gifPath);
|
||||
int FrameCount=1+(int)log10(movie.frameCount());//获取frame位数
|
||||
return FrameCount;
|
||||
}
|
||||
/*
|
||||
拆分gif
|
||||
*/
|
||||
void MainWindow::Gif_splitGif(QString gifPath,QString SplitFramesFolderPath)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Start splitting GIF:[")+gifPath+"]");
|
||||
int FrameDigits = Gif_getFrameDigits(gifPath);
|
||||
//删除并新建帧文件夹
|
||||
file_DelDir(SplitFramesFolderPath);
|
||||
file_mkDir(SplitFramesFolderPath);
|
||||
//开始用convert处理
|
||||
QString program = Current_Path+"/convert_waifu2xEX.exe";
|
||||
QString cmd = "\"" + program + "\"" + " -coalesce " + "\"" + gifPath + "\"" + " " + "\"" + SplitFramesFolderPath + "/%0"+QString::number(FrameDigits,10)+"d.png\"";
|
||||
QProcess *SplitGIF=new QProcess();
|
||||
SplitGIF->start(cmd);
|
||||
while(!SplitGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!SplitGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
if(file_isDirEmpty(SplitFramesFolderPath))//如果拆分失败,尝试win7兼容指令
|
||||
{
|
||||
QString cmd = "\"" + program + "\"" + " -coalesce " + "\"" + gifPath + "\"" + " " + "\"" + SplitFramesFolderPath + "/%%0"+QString::number(FrameDigits,10)+"d.png\"";
|
||||
QProcess *SplitGIF=new QProcess();
|
||||
SplitGIF->start(cmd);
|
||||
while(!SplitGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!SplitGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
}
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish splitting GIF:[")+gifPath+"]");
|
||||
}
|
||||
/*
|
||||
组装gif
|
||||
*/
|
||||
void MainWindow::Gif_assembleGif(QString ResGifPath,QString ScaledFramesPath,int Duration,bool CustRes_isEnabled,int CustRes_height,int CustRes_width,bool isOverScaled,QString SourceGifFullPath)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Start to assemble GIF:[")+ResGifPath+"]");
|
||||
//===============================
|
||||
QString resize_cmd ="";
|
||||
QString program = Current_Path+"/convert_waifu2xEX.exe";
|
||||
if(ui->checkBox_DisableResize_gif->isChecked()==false)
|
||||
{
|
||||
if(CustRes_isEnabled || isOverScaled)
|
||||
{
|
||||
if(isOverScaled==true && CustRes_isEnabled==false)
|
||||
{
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(SourceGifFullPath);
|
||||
int OriginalScaleRatio = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
resize_cmd =" -resize "+QString::number(res_map["width"]*OriginalScaleRatio,10)+"x"+QString::number(res_map["height"]*OriginalScaleRatio,10)+"! ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::IgnoreAspectRatio && CustRes_isEnabled==true)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+"x"+QString::number(CustRes_height,10)+"! ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::KeepAspectRatio && CustRes_isEnabled==true)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+"x"+QString::number(CustRes_height,10)+" ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::KeepAspectRatioByExpanding && CustRes_isEnabled==true)
|
||||
{
|
||||
if(CustRes_width>CustRes_height)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+" ";
|
||||
}
|
||||
else
|
||||
{
|
||||
resize_cmd =" -resize x"+QString::number(CustRes_height,10)+" ";
|
||||
}
|
||||
}
|
||||
}
|
||||
QString cmd = "\"" + program + "\" "+resize_cmd+" -delay " + QString::number(Duration, 10) + " -loop 0 \"" + ScaledFramesPath + "/*png\" \""+ResGifPath+"\"";
|
||||
QProcess *AssembleGIF=new QProcess();
|
||||
AssembleGIF->start(cmd);
|
||||
while(!AssembleGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!AssembleGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======= 纠正文件名称错误(当 结果gif文件路径内有 % 符号时) ======
|
||||
if(QFile::exists(ResGifPath)==false)
|
||||
{
|
||||
QFileInfo fileinfo(ResGifPath);
|
||||
QString file_name = file_getBaseName(ResGifPath);
|
||||
QString file_ext = fileinfo.suffix();
|
||||
QString file_path = file_getFolderPath(fileinfo);
|
||||
QString ActualResGifPath = file_path + "/" + file_name + "-0." + file_ext;
|
||||
if(QFile::exists(ActualResGifPath)==true)
|
||||
{
|
||||
QFile::rename(ActualResGifPath,ResGifPath);
|
||||
}
|
||||
}
|
||||
if(QFile::exists(ResGifPath))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish assembling GIF:[")+ResGifPath+"]");
|
||||
return;
|
||||
}
|
||||
AssembleGIF->kill();
|
||||
}
|
||||
//自行调整图片大小再组装
|
||||
if(CustRes_isEnabled || isOverScaled)
|
||||
{
|
||||
int New_width=0;
|
||||
int New_height=0;
|
||||
if(isOverScaled==true && CustRes_isEnabled==false)
|
||||
{
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(SourceGifFullPath);
|
||||
int OriginalScaleRatio = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
New_width = res_map["width"]*OriginalScaleRatio;
|
||||
New_height = res_map["height"]*OriginalScaleRatio;
|
||||
}
|
||||
if(CustRes_isEnabled==true)
|
||||
{
|
||||
New_width = CustRes_width;
|
||||
New_height = CustRes_height;
|
||||
}
|
||||
ImagesResize_Folder_MultiThread(New_width,New_height,ScaledFramesPath);
|
||||
}
|
||||
QString cmd = "\"" + program + "\" \"" + ScaledFramesPath + "/*png\" -delay " + QString::number(Duration, 10) + " -loop 0 \""+ResGifPath+"\"";
|
||||
QProcess *AssembleGIF_1=new QProcess();
|
||||
AssembleGIF_1->start(cmd);
|
||||
while(!AssembleGIF_1->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!AssembleGIF_1->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======= 纠正文件名称错误(当 结果gif文件路径内有 % 符号时) ======
|
||||
if(QFile::exists(ResGifPath)==false)
|
||||
{
|
||||
QFileInfo fileinfo(ResGifPath);
|
||||
QString file_name = file_getBaseName(ResGifPath);
|
||||
QString file_ext = fileinfo.suffix();
|
||||
QString file_path = file_getFolderPath(fileinfo);
|
||||
QString ActualResGifPath = file_path + "/" + file_name + "-0." + file_ext;
|
||||
if(QFile::exists(ActualResGifPath)==true)
|
||||
{
|
||||
QFile::rename(ActualResGifPath,ResGifPath);
|
||||
}
|
||||
}
|
||||
//=====================
|
||||
if(QFile::exists(ResGifPath))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish assembling GIF:[")+ResGifPath+"]");
|
||||
if(ui->checkBox_DisableResize_gif->isChecked()==false)emit Send_Set_checkBox_DisableResize_gif_Checked();
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*
|
||||
压缩gif
|
||||
*/
|
||||
QString MainWindow::Gif_compressGif(QString gifPath,QString gifPath_compressd)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to optimize GIF:[")+gifPath+"]");
|
||||
//=====
|
||||
QString program = Current_Path+"/gifsicle_waifu2xEX.exe";
|
||||
QString cmd = "\"" + program + "\"" + " -O3 -i \""+gifPath+"\" -o \""+gifPath_compressd+"\"";
|
||||
QProcess *CompressGIF=new QProcess();
|
||||
CompressGIF->start(cmd);
|
||||
while(!CompressGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!CompressGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======
|
||||
//判断是否生成压缩后的gif
|
||||
if(QFile::exists(gifPath_compressd) == false)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+gifPath+tr("]. Error: [Can't optimize gif.]"));
|
||||
return gifPath;//返回源文件路径
|
||||
}
|
||||
//======
|
||||
//比较文件大小,判断压缩是否有效
|
||||
QFileInfo *gifPath_QFileInfo = new QFileInfo(gifPath);
|
||||
QFileInfo *gifPath_compressd_QFileInfo = new QFileInfo(gifPath_compressd);
|
||||
if(gifPath_compressd_QFileInfo->size() >= gifPath_QFileInfo->size())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Failed to optimize gif [")+gifPath+tr("] to reduce storage usage, the optimized gif file will be deleted."));
|
||||
QFile::remove(gifPath_compressd);
|
||||
return gifPath;//返回源文件路径
|
||||
}
|
||||
//======
|
||||
QFile::remove(gifPath);
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish optimizing GIF:[")+gifPath+"]");
|
||||
return gifPath_compressd;//返回处理完成的文件路径
|
||||
}
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
根据行数从自定义分辨率列表移除gif文件
|
||||
*/
|
||||
void MainWindow::Gif_RemoveFromCustResList(int RowNumber)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(RowNumber,2)->text();
|
||||
CustRes_remove(SourceFile_fullPath);
|
||||
}
|
||||
|
||||
/*
|
||||
当gif没有自定义分辨率且此时放大倍率为double,则计算一个添加到自定义列表里
|
||||
*/
|
||||
bool MainWindow::Gif_DoubleScaleRatioPrep(int RowNumber)
|
||||
{
|
||||
QString SourceFile_fullPath = Table_model_gif->item(RowNumber,2)->text();
|
||||
if(CustRes_isContained(SourceFile_fullPath) == true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//===================== 获取分辨率 =============================
|
||||
QMap<QString,int> Map_OrgRes = Image_Gif_Read_Resolution(SourceFile_fullPath);
|
||||
//========= 计算新的高度宽度 ==================
|
||||
double ScaleRatio_double = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
int Height_new = qRound(ScaleRatio_double * Map_OrgRes["height"]);
|
||||
int width_new = qRound(ScaleRatio_double * Map_OrgRes["width"]);
|
||||
if(Height_new<1 || width_new<1)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage("Warning! Unable to read the resolution of ["+SourceFile_fullPath+"]. This file will only be scaled to "+QString::number((int)ScaleRatio_double,10)+"X.");
|
||||
return false;
|
||||
}
|
||||
//======== 存入自定义分辨率列表中 ============
|
||||
QMap<QString,QString> res_map;
|
||||
res_map["fullpath"] = SourceFile_fullPath;
|
||||
res_map["height"] = QString::number(Height_new,10);
|
||||
res_map["width"] = QString::number(width_new,10);
|
||||
Custom_resolution_list.append(res_map);
|
||||
//=========
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
获取gif帧间隔时间
|
||||
*/
|
||||
int MainWindow::Gif_getDuration(QString gifPath)
|
||||
{
|
||||
//========================= 调用ffprobe读取GIF信息 ======================
|
||||
QProcess *Get_GifAvgFPS_process = new QProcess();
|
||||
QString cmd = "\""+Current_Path+"/ffprobe_waifu2xEX.exe\" -i \""+gifPath+"\" -select_streams v -show_streams -v quiet -print_format ini -show_format";
|
||||
Get_GifAvgFPS_process->start(cmd);
|
||||
while(!Get_GifAvgFPS_process->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!Get_GifAvgFPS_process->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//============= 保存ffprobe输出的ini格式文本 =============
|
||||
QString ffprobe_output_str = Get_GifAvgFPS_process->readAllStandardOutput();
|
||||
//================ 将ini写入文件保存 ================
|
||||
QFileInfo videoFileInfo(gifPath);
|
||||
QString Path_gif_info_ini = "";
|
||||
QString video_dir = file_getFolderPath(gifPath);
|
||||
int FileNo = 0;
|
||||
do
|
||||
{
|
||||
FileNo++;
|
||||
Path_gif_info_ini = video_dir+"/"+file_getBaseName(gifPath)+"_GifInfo_"+QString::number(FileNo,10)+"_W2xEX.ini";
|
||||
}
|
||||
while(QFile::exists(Path_gif_info_ini));
|
||||
//=========
|
||||
QFile gif_info_ini(Path_gif_info_ini);
|
||||
gif_info_ini.remove();
|
||||
if (gif_info_ini.open(QIODevice::ReadWrite | QIODevice::Text)) //QIODevice::ReadWrite支持读写
|
||||
{
|
||||
QTextStream stream(&gif_info_ini);
|
||||
stream << ffprobe_output_str;
|
||||
}
|
||||
gif_info_ini.close();
|
||||
//================== 读取ini获得参数 =====================
|
||||
QString FPS_Division = "";
|
||||
QSettings *configIniRead_videoInfo = new QSettings(Path_gif_info_ini, QSettings::IniFormat);
|
||||
if(configIniRead_videoInfo->value("/streams.stream.0/avg_frame_rate") != QVariant())
|
||||
{
|
||||
FPS_Division = configIniRead_videoInfo->value("/streams.stream.0/avg_frame_rate").toString().trimmed();
|
||||
}
|
||||
gif_info_ini.remove();
|
||||
//=======================
|
||||
int Duration = 0;
|
||||
if(FPS_Division!="")
|
||||
{
|
||||
QStringList FPS_Nums = FPS_Division.split("/");
|
||||
if(FPS_Nums.size()==2)
|
||||
{
|
||||
double FPS_Num_0 = FPS_Nums.at(0).toDouble();
|
||||
double FPS_Num_1 = FPS_Nums.at(1).toDouble();
|
||||
if(FPS_Num_0>0&&FPS_Num_1>0)
|
||||
{
|
||||
double Duration_double = 100/(FPS_Num_0/FPS_Num_1);
|
||||
Duration = qRound(Duration_double);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Duration<=0)
|
||||
{
|
||||
QMovie movie(gifPath);
|
||||
movie.setSpeed(1);
|
||||
movie.start();
|
||||
movie.stop();
|
||||
Duration = ((movie.nextFrameDelay()/100)+1)/10;
|
||||
}
|
||||
return Duration;
|
||||
}
|
||||
/*
|
||||
获取gif帧数量的位数
|
||||
*/
|
||||
int MainWindow::Gif_getFrameDigits(QString gifPath)
|
||||
{
|
||||
QMovie movie(gifPath);
|
||||
int FrameCount=1+(int)log10(movie.frameCount());//获取frame位数
|
||||
return FrameCount;
|
||||
}
|
||||
/*
|
||||
拆分gif
|
||||
*/
|
||||
void MainWindow::Gif_splitGif(QString gifPath,QString SplitFramesFolderPath)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Start splitting GIF:[")+gifPath+"]");
|
||||
int FrameDigits = Gif_getFrameDigits(gifPath);
|
||||
//删除并新建帧文件夹
|
||||
file_DelDir(SplitFramesFolderPath);
|
||||
file_mkDir(SplitFramesFolderPath);
|
||||
//开始用convert处理
|
||||
QString program = Current_Path+"/convert_waifu2xEX.exe";
|
||||
QString cmd = "\"" + program + "\"" + " -coalesce " + "\"" + gifPath + "\"" + " " + "\"" + SplitFramesFolderPath + "/%0"+QString::number(FrameDigits,10)+"d.png\"";
|
||||
QProcess *SplitGIF=new QProcess();
|
||||
SplitGIF->start(cmd);
|
||||
while(!SplitGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!SplitGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
if(file_isDirEmpty(SplitFramesFolderPath))//如果拆分失败,尝试win7兼容指令
|
||||
{
|
||||
QString cmd = "\"" + program + "\"" + " -coalesce " + "\"" + gifPath + "\"" + " " + "\"" + SplitFramesFolderPath + "/%%0"+QString::number(FrameDigits,10)+"d.png\"";
|
||||
QProcess *SplitGIF=new QProcess();
|
||||
SplitGIF->start(cmd);
|
||||
while(!SplitGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!SplitGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
}
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish splitting GIF:[")+gifPath+"]");
|
||||
}
|
||||
/*
|
||||
组装gif
|
||||
*/
|
||||
void MainWindow::Gif_assembleGif(QString ResGifPath,QString ScaledFramesPath,int Duration,bool CustRes_isEnabled,int CustRes_height,int CustRes_width,bool isOverScaled,QString SourceGifFullPath)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Start to assemble GIF:[")+ResGifPath+"]");
|
||||
//===============================
|
||||
QString resize_cmd ="";
|
||||
QString program = Current_Path+"/convert_waifu2xEX.exe";
|
||||
if(ui->checkBox_DisableResize_gif->isChecked()==false)
|
||||
{
|
||||
if(CustRes_isEnabled || isOverScaled)
|
||||
{
|
||||
if(isOverScaled==true && CustRes_isEnabled==false)
|
||||
{
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(SourceGifFullPath);
|
||||
int OriginalScaleRatio = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
resize_cmd =" -resize "+QString::number(res_map["width"]*OriginalScaleRatio,10)+"x"+QString::number(res_map["height"]*OriginalScaleRatio,10)+"! ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::IgnoreAspectRatio && CustRes_isEnabled==true)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+"x"+QString::number(CustRes_height,10)+"! ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::KeepAspectRatio && CustRes_isEnabled==true)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+"x"+QString::number(CustRes_height,10)+" ";
|
||||
}
|
||||
if(CustRes_AspectRatioMode==Qt::KeepAspectRatioByExpanding && CustRes_isEnabled==true)
|
||||
{
|
||||
if(CustRes_width>CustRes_height)
|
||||
{
|
||||
resize_cmd =" -resize "+QString::number(CustRes_width,10)+" ";
|
||||
}
|
||||
else
|
||||
{
|
||||
resize_cmd =" -resize x"+QString::number(CustRes_height,10)+" ";
|
||||
}
|
||||
}
|
||||
}
|
||||
QString cmd = "\"" + program + "\" "+resize_cmd+" -delay " + QString::number(Duration, 10) + " -loop 0 \"" + ScaledFramesPath + "/*png\" \""+ResGifPath+"\"";
|
||||
QProcess *AssembleGIF=new QProcess();
|
||||
AssembleGIF->start(cmd);
|
||||
while(!AssembleGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!AssembleGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======= 纠正文件名称错误(当 结果gif文件路径内有 % 符号时) ======
|
||||
if(QFile::exists(ResGifPath)==false)
|
||||
{
|
||||
QFileInfo fileinfo(ResGifPath);
|
||||
QString file_name = file_getBaseName(ResGifPath);
|
||||
QString file_ext = fileinfo.suffix();
|
||||
QString file_path = file_getFolderPath(fileinfo);
|
||||
QString ActualResGifPath = file_path + "/" + file_name + "-0." + file_ext;
|
||||
if(QFile::exists(ActualResGifPath)==true)
|
||||
{
|
||||
QFile::rename(ActualResGifPath,ResGifPath);
|
||||
}
|
||||
}
|
||||
if(QFile::exists(ResGifPath))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish assembling GIF:[")+ResGifPath+"]");
|
||||
return;
|
||||
}
|
||||
AssembleGIF->kill();
|
||||
}
|
||||
//自行调整图片大小再组装
|
||||
if(CustRes_isEnabled || isOverScaled)
|
||||
{
|
||||
int New_width=0;
|
||||
int New_height=0;
|
||||
if(isOverScaled==true && CustRes_isEnabled==false)
|
||||
{
|
||||
QMap<QString,int> res_map = Image_Gif_Read_Resolution(SourceGifFullPath);
|
||||
int OriginalScaleRatio = ui->doubleSpinBox_ScaleRatio_gif->value();
|
||||
New_width = res_map["width"]*OriginalScaleRatio;
|
||||
New_height = res_map["height"]*OriginalScaleRatio;
|
||||
}
|
||||
if(CustRes_isEnabled==true)
|
||||
{
|
||||
New_width = CustRes_width;
|
||||
New_height = CustRes_height;
|
||||
}
|
||||
ImagesResize_Folder_MultiThread(New_width,New_height,ScaledFramesPath);
|
||||
}
|
||||
QString cmd = "\"" + program + "\" \"" + ScaledFramesPath + "/*png\" -delay " + QString::number(Duration, 10) + " -loop 0 \""+ResGifPath+"\"";
|
||||
QProcess *AssembleGIF_1=new QProcess();
|
||||
AssembleGIF_1->start(cmd);
|
||||
while(!AssembleGIF_1->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!AssembleGIF_1->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======= 纠正文件名称错误(当 结果gif文件路径内有 % 符号时) ======
|
||||
if(QFile::exists(ResGifPath)==false)
|
||||
{
|
||||
QFileInfo fileinfo(ResGifPath);
|
||||
QString file_name = file_getBaseName(ResGifPath);
|
||||
QString file_ext = fileinfo.suffix();
|
||||
QString file_path = file_getFolderPath(fileinfo);
|
||||
QString ActualResGifPath = file_path + "/" + file_name + "-0." + file_ext;
|
||||
if(QFile::exists(ActualResGifPath)==true)
|
||||
{
|
||||
QFile::rename(ActualResGifPath,ResGifPath);
|
||||
}
|
||||
}
|
||||
//=====================
|
||||
if(QFile::exists(ResGifPath))
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish assembling GIF:[")+ResGifPath+"]");
|
||||
if(ui->checkBox_DisableResize_gif->isChecked()==false)emit Send_Set_checkBox_DisableResize_gif_Checked();
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*
|
||||
压缩gif
|
||||
*/
|
||||
QString MainWindow::Gif_compressGif(QString gifPath,QString gifPath_compressd)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Starting to optimize GIF:[")+gifPath+"]");
|
||||
//=====
|
||||
QString program = Current_Path+"/gifsicle_waifu2xEX.exe";
|
||||
QString cmd = "\"" + program + "\"" + " -O3 -i \""+gifPath+"\" -o \""+gifPath_compressd+"\"";
|
||||
QProcess *CompressGIF=new QProcess();
|
||||
CompressGIF->start(cmd);
|
||||
while(!CompressGIF->waitForStarted(100)&&!QProcess_stop) {}
|
||||
while(!CompressGIF->waitForFinished(100)&&!QProcess_stop) {}
|
||||
//======
|
||||
//判断是否生成压缩后的gif
|
||||
if(QFile::exists(gifPath_compressd) == false)
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Error occured when processing [")+gifPath+tr("]. Error: [Can't optimize gif.]"));
|
||||
return gifPath;//返回源文件路径
|
||||
}
|
||||
//======
|
||||
//比较文件大小,判断压缩是否有效
|
||||
QFileInfo *gifPath_QFileInfo = new QFileInfo(gifPath);
|
||||
QFileInfo *gifPath_compressd_QFileInfo = new QFileInfo(gifPath_compressd);
|
||||
if(gifPath_compressd_QFileInfo->size() >= gifPath_QFileInfo->size())
|
||||
{
|
||||
emit Send_TextBrowser_NewMessage(tr("Failed to optimize gif [")+gifPath+tr("] to reduce storage usage, the optimized gif file will be deleted."));
|
||||
QFile::remove(gifPath_compressd);
|
||||
return gifPath;//返回源文件路径
|
||||
}
|
||||
//======
|
||||
QFile::remove(gifPath);
|
||||
emit Send_TextBrowser_NewMessage(tr("Finish optimizing GIF:[")+gifPath+"]");
|
||||
return gifPath_compressd;//返回处理完成的文件路径
|
||||
}
|
@ -1,54 +1,54 @@
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>icon/icon_main.png</file>
|
||||
<file>icon/Home.png</file>
|
||||
<file>icon/AddSetting.png</file>
|
||||
<file>icon/EngineSettings.png</file>
|
||||
<file>icon/VideoSettings.png</file>
|
||||
<file>icon/CompatibilityTest.png</file>
|
||||
<file>icon/pause-button.png</file>
|
||||
<file>icon/refresh.png</file>
|
||||
<file>icon/donateTabIcon_1.png</file>
|
||||
<file>icon/paypal.png</file>
|
||||
<file>icon/gif_Rmenu.png</file>
|
||||
<file>icon/picture_Rmenu.png</file>
|
||||
<file>icon/video_Rmenu.png</file>
|
||||
<file>icon/view_file.png</file>
|
||||
<file>icon/cancel.png</file>
|
||||
<file>icon/Apply.png</file>
|
||||
<file>icon/RemoveFile.png</file>
|
||||
<file>icon/opne_folder.png</file>
|
||||
<file>icon/Read_FileList.png</file>
|
||||
<file>icon/Save_FileList.png</file>
|
||||
<file>icon/Read_FileList_hover.png</file>
|
||||
<file>icon/Save_FileList_hover.png</file>
|
||||
<file>icon/RemoveItem.png</file>
|
||||
<file>icon/RemoveItem_hover.png</file>
|
||||
<file>icon/ClearList.png</file>
|
||||
<file>icon/ClearList_hover.png</file>
|
||||
<file>icon/AddNewFile.png</file>
|
||||
<file>icon/AddNewFile_hover.png</file>
|
||||
<file>icon/AddNewFile_disabled.png</file>
|
||||
<file>icon/RemoveItem_disabled.png</file>
|
||||
<file>icon/ClearList_disabled.png</file>
|
||||
<file>icon/Read_FileList_disabled.png</file>
|
||||
<file>icon/Save_FileList_disabled.png</file>
|
||||
<file>icon/ResizeFilesListSplitter.png</file>
|
||||
<file>icon/ResizeFilesListSplitter_disabled.png</file>
|
||||
<file>icon/ResizeFilesListSplitter_hover.png</file>
|
||||
<file>icon/TurnOffScreen.png</file>
|
||||
<file>icon/TurnOffScreen_disabled.png</file>
|
||||
<file>icon/TurnOffScreen_hover.png</file>
|
||||
<file>icon/Exit.png</file>
|
||||
<file>icon/SendFeedback.png</file>
|
||||
<file>icon/ShowWindow.png</file>
|
||||
<file>icon/Minimize.png</file>
|
||||
<file>icon/BackgroudMode.png</file>
|
||||
<file>icon/About.png</file>
|
||||
<file>icon/Pause_SysTray.png</file>
|
||||
<file>icon/Start_SysTray.png</file>
|
||||
<file>icon/patreon.png</file>
|
||||
<file>icon/patreon_sysTray.png</file>
|
||||
<file>icon/donateTabIcon.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="/new/prefix1">
|
||||
<file>icon/icon_main.png</file>
|
||||
<file>icon/Home.png</file>
|
||||
<file>icon/AddSetting.png</file>
|
||||
<file>icon/EngineSettings.png</file>
|
||||
<file>icon/VideoSettings.png</file>
|
||||
<file>icon/CompatibilityTest.png</file>
|
||||
<file>icon/pause-button.png</file>
|
||||
<file>icon/refresh.png</file>
|
||||
<file>icon/donateTabIcon_1.png</file>
|
||||
<file>icon/paypal.png</file>
|
||||
<file>icon/gif_Rmenu.png</file>
|
||||
<file>icon/picture_Rmenu.png</file>
|
||||
<file>icon/video_Rmenu.png</file>
|
||||
<file>icon/view_file.png</file>
|
||||
<file>icon/cancel.png</file>
|
||||
<file>icon/Apply.png</file>
|
||||
<file>icon/RemoveFile.png</file>
|
||||
<file>icon/opne_folder.png</file>
|
||||
<file>icon/Read_FileList.png</file>
|
||||
<file>icon/Save_FileList.png</file>
|
||||
<file>icon/Read_FileList_hover.png</file>
|
||||
<file>icon/Save_FileList_hover.png</file>
|
||||
<file>icon/RemoveItem.png</file>
|
||||
<file>icon/RemoveItem_hover.png</file>
|
||||
<file>icon/ClearList.png</file>
|
||||
<file>icon/ClearList_hover.png</file>
|
||||
<file>icon/AddNewFile.png</file>
|
||||
<file>icon/AddNewFile_hover.png</file>
|
||||
<file>icon/AddNewFile_disabled.png</file>
|
||||
<file>icon/RemoveItem_disabled.png</file>
|
||||
<file>icon/ClearList_disabled.png</file>
|
||||
<file>icon/Read_FileList_disabled.png</file>
|
||||
<file>icon/Save_FileList_disabled.png</file>
|
||||
<file>icon/ResizeFilesListSplitter.png</file>
|
||||
<file>icon/ResizeFilesListSplitter_disabled.png</file>
|
||||
<file>icon/ResizeFilesListSplitter_hover.png</file>
|
||||
<file>icon/TurnOffScreen.png</file>
|
||||
<file>icon/TurnOffScreen_disabled.png</file>
|
||||
<file>icon/TurnOffScreen_hover.png</file>
|
||||
<file>icon/Exit.png</file>
|
||||
<file>icon/SendFeedback.png</file>
|
||||
<file>icon/ShowWindow.png</file>
|
||||
<file>icon/Minimize.png</file>
|
||||
<file>icon/BackgroudMode.png</file>
|
||||
<file>icon/About.png</file>
|
||||
<file>icon/Pause_SysTray.png</file>
|
||||
<file>icon/Start_SysTray.png</file>
|
||||
<file>icon/patreon.png</file>
|
||||
<file>icon/patreon_sysTray.png</file>
|
||||
<file>icon/donateTabIcon.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
@ -1,85 +1,85 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);//高分辨率屏幕支持
|
||||
QApplication a(argc,argv);
|
||||
a.setQuitOnLastWindowClosed(false);//隐藏无窗口时保持运行
|
||||
MainWindow *w = new MainWindow;
|
||||
w->show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
/*
|
||||
Change log:
|
||||
|
||||
****************** 补全中文翻译 ***********************
|
||||
|
||||
v3.41.02-beta:
|
||||
- Fix bug: Unable to assemble APNG when there are "%" in the path.
|
||||
|
||||
v3.41.01-beta:
|
||||
- New Feature: APNG(Animated PNG) support.
|
||||
- Improve GUI.
|
||||
- Some other improvements.
|
||||
|
||||
v3.31.21-beta:
|
||||
- Performance optimization.
|
||||
- Update FFmpeg, ImageMagick.
|
||||
- Some other improvements.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
To do:
|
||||
- APNG插件兼容性测试
|
||||
- 找一个性能更好的apng组装插件(试试ffmpeg)
|
||||
- 添加对"图片文件夹"的支持,一次处理一个文件夹.
|
||||
- 改进自动调整引擎设定
|
||||
- 插帧时避免黑帧混乱,避免转场混乱 (插帧后的帧编号 = N*2-1)
|
||||
- 自动将GIF转换为mp4
|
||||
- 在SRMD和REALSR正式加入cpu支持后, 在GPU ID tooltip上添加[★ "-1" is CPU,others are GPUs ★]
|
||||
- CRF参数调整支持
|
||||
- 自动监控文件夹
|
||||
---------------------------------------------------------------------------
|
||||
Integrated component:
|
||||
- gifsicle version 1.92
|
||||
- SoX 14.4.2-win32
|
||||
- waifu2x-caffe 1.2.0.4
|
||||
- Waifu2x-converter 9e0284ae23d43c990efb6320253ff0f1e3776854
|
||||
- Waifu2x-NCNN-Vulkan 20210210
|
||||
- SRMD-NCNN-Vulkan 20210210
|
||||
- RealSR-NCNN-Vulkan 20210210
|
||||
- ImageMagick 7.0.11-8-portable-Q16-x64
|
||||
- Anime4KCPP v2.5.0
|
||||
- FFmpeg 2021-04-20-git-718e03e5f2-full_build
|
||||
- NirCmd v2.86
|
||||
- Ghostscript 9.53.3
|
||||
- GNU Wget 1.20.3
|
||||
- rife-ncnn-vulkan 20210227
|
||||
- cain-ncnn-vulkan 20210210
|
||||
---------------------------------------------------------------------------
|
||||
Icons made by :
|
||||
Freepik (https://www.flaticon.com/authors/freepik) From Flaticon : https://www.flaticon.com/
|
||||
Roundicons (https://www.flaticon.com/authors/roundicons) From Flaticon : https://www.flaticon.com/
|
||||
Icongeek26 (https://www.flaticon.com/authors/Icongeek26) From Flaticon : https://www.flaticon.com/
|
||||
*/
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);//高分辨率屏幕支持
|
||||
QApplication a(argc,argv);
|
||||
a.setQuitOnLastWindowClosed(false);//隐藏无窗口时保持运行
|
||||
MainWindow *w = new MainWindow;
|
||||
w->show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
/*
|
||||
Change log:
|
||||
|
||||
****************** 补全中文翻译 ***********************
|
||||
|
||||
v3.41.02-beta:
|
||||
- Fix bug: Unable to assemble APNG when there are "%" in the path.
|
||||
|
||||
v3.41.01-beta:
|
||||
- New Feature: APNG(Animated PNG) support.
|
||||
- Improve GUI.
|
||||
- Some other improvements.
|
||||
|
||||
v3.31.21-beta:
|
||||
- Performance optimization.
|
||||
- Update FFmpeg, ImageMagick.
|
||||
- Some other improvements.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
To do:
|
||||
- APNG插件兼容性测试
|
||||
- 找一个性能更好的apng组装插件(试试ffmpeg)
|
||||
- 添加对"图片文件夹"的支持,一次处理一个文件夹.
|
||||
- 改进自动调整引擎设定
|
||||
- 插帧时避免黑帧混乱,避免转场混乱 (插帧后的帧编号 = N*2-1)
|
||||
- 自动将GIF转换为mp4
|
||||
- 在SRMD和REALSR正式加入cpu支持后, 在GPU ID tooltip上添加[★ "-1" is CPU,others are GPUs ★]
|
||||
- CRF参数调整支持
|
||||
- 自动监控文件夹
|
||||
---------------------------------------------------------------------------
|
||||
Integrated component:
|
||||
- gifsicle version 1.92
|
||||
- SoX 14.4.2-win32
|
||||
- waifu2x-caffe 1.2.0.4
|
||||
- Waifu2x-converter 9e0284ae23d43c990efb6320253ff0f1e3776854
|
||||
- Waifu2x-NCNN-Vulkan 20210210
|
||||
- SRMD-NCNN-Vulkan 20210210
|
||||
- RealSR-NCNN-Vulkan 20210210
|
||||
- ImageMagick 7.0.11-8-portable-Q16-x64
|
||||
- Anime4KCPP v2.5.0
|
||||
- FFmpeg 2021-04-20-git-718e03e5f2-full_build
|
||||
- NirCmd v2.86
|
||||
- Ghostscript 9.53.3
|
||||
- GNU Wget 1.20.3
|
||||
- rife-ncnn-vulkan 20210227
|
||||
- cain-ncnn-vulkan 20210210
|
||||
---------------------------------------------------------------------------
|
||||
Icons made by :
|
||||
Freepik (https://www.flaticon.com/authors/freepik) From Flaticon : https://www.flaticon.com/
|
||||
Roundicons (https://www.flaticon.com/authors/roundicons) From Flaticon : https://www.flaticon.com/
|
||||
Icongeek26 (https://www.flaticon.com/authors/Icongeek26) From Flaticon : https://www.flaticon.com/
|
||||
*/
|
@ -1,59 +1,59 @@
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
设定进度条最小值与最大值
|
||||
*/
|
||||
void MainWindow::progressbar_setRange_min_max(int min, int max)
|
||||
{
|
||||
ui->progressBar->setRange(min, max);
|
||||
TaskNumTotal=max;
|
||||
ui->label_progressBar_filenum->setText("0/"+QString::number(max,10));
|
||||
}
|
||||
/*
|
||||
将进度条直接充满
|
||||
*/
|
||||
void MainWindow::progressbar_SetToMax(int maxval)
|
||||
{
|
||||
ui->progressBar->setValue(maxval);
|
||||
ui->label_progressBar_filenum->setText(QString::number(maxval,10)+"/"+QString::number(maxval,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+1
|
||||
*/
|
||||
void MainWindow::progressbar_Add()
|
||||
{
|
||||
Progressbar_CurrentVal++;
|
||||
TaskNumFinished++;
|
||||
NewTaskFinished=true;
|
||||
ui->progressBar->setValue(Progressbar_CurrentVal);
|
||||
ui->label_progressBar_filenum->setText(QString::number(Progressbar_CurrentVal,10)+"/"+QString::number(Progressbar_MaxVal,10));
|
||||
}
|
||||
/*
|
||||
清空进度条
|
||||
*/
|
||||
void MainWindow::progressbar_clear()
|
||||
{
|
||||
ui->progressBar->setRange(0, 1);
|
||||
ui->progressBar->setValue(0);
|
||||
ui->label_progressBar_filenum->setText("0/0");
|
||||
}
|
||||
|
||||
/*
|
||||
Copyright (C) 2021 Aaron Feng
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
My Github homepage: https://github.com/AaronFeng753
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
/*
|
||||
设定进度条最小值与最大值
|
||||
*/
|
||||
void MainWindow::progressbar_setRange_min_max(int min, int max)
|
||||
{
|
||||
ui->progressBar->setRange(min, max);
|
||||
TaskNumTotal=max;
|
||||
ui->label_progressBar_filenum->setText("0/"+QString::number(max,10));
|
||||
}
|
||||
/*
|
||||
将进度条直接充满
|
||||
*/
|
||||
void MainWindow::progressbar_SetToMax(int maxval)
|
||||
{
|
||||
ui->progressBar->setValue(maxval);
|
||||
ui->label_progressBar_filenum->setText(QString::number(maxval,10)+"/"+QString::number(maxval,10));
|
||||
}
|
||||
/*
|
||||
进度条 进度+1
|
||||
*/
|
||||
void MainWindow::progressbar_Add()
|
||||
{
|
||||
Progressbar_CurrentVal++;
|
||||
TaskNumFinished++;
|
||||
NewTaskFinished=true;
|
||||
ui->progressBar->setValue(Progressbar_CurrentVal);
|
||||
ui->label_progressBar_filenum->setText(QString::number(Progressbar_CurrentVal,10)+"/"+QString::number(Progressbar_MaxVal,10));
|
||||
}
|
||||
/*
|
||||
清空进度条
|
||||
*/
|
||||
void MainWindow::progressbar_clear()
|
||||
{
|
||||
ui->progressBar->setRange(0, 1);
|
||||
ui->progressBar->setValue(0);
|
||||
ui->label_progressBar_filenum->setText("0/0");
|
||||
}
|
||||
|