mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Verificaci?n de ruta de destino a?adida a los di?logos de creaci?n y expotaci?n
(info y covers) Al cerrar properties dialog ahora se hace un reset del focus
This commit is contained in:
parent
221cba826e
commit
3009a3970e
@ -4,6 +4,7 @@
|
|||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "data_base_management.h"
|
#include "data_base_management.h"
|
||||||
|
|
||||||
@ -73,8 +74,15 @@ void ExportComicsInfoDialog::findPath()
|
|||||||
|
|
||||||
void ExportComicsInfoDialog::exportComicsInfo()
|
void ExportComicsInfoDialog::exportComicsInfo()
|
||||||
{
|
{
|
||||||
DataBaseManagement::exportComicsInfo(source,path->text());
|
QFileInfo f(path->text());
|
||||||
close();
|
QFileInfo fPath(f.absoluteDir().path());
|
||||||
|
if(fPath.exists() && fPath.isDir() && fPath.isWritable())
|
||||||
|
{
|
||||||
|
DataBaseManagement::exportComicsInfo(source,path->text());
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
QMessageBox::critical(NULL,tr("Problem found while writing"),tr("The selected path for the output file does not exist or is not a valid path. Be sure that you have write access to this folder"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportComicsInfoDialog::close()
|
void ExportComicsInfoDialog::close()
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
ExportLibraryDialog::ExportLibraryDialog(QWidget * parent)
|
ExportLibraryDialog::ExportLibraryDialog(QWidget * parent)
|
||||||
@ -63,10 +64,17 @@ ExportLibraryDialog::ExportLibraryDialog(QWidget * parent)
|
|||||||
|
|
||||||
void ExportLibraryDialog::exportLibrary()
|
void ExportLibraryDialog::exportLibrary()
|
||||||
{
|
{
|
||||||
progressBar->show();
|
QFileInfo f(path->text());
|
||||||
accept->setEnabled(false);
|
if(f.exists() && f.isDir() && f.isWritable())
|
||||||
emit exportPath(QDir::cleanPath(path->text()));
|
{
|
||||||
t.start();
|
progressBar->show();
|
||||||
|
accept->setEnabled(false);
|
||||||
|
emit exportPath(QDir::cleanPath(path->text()));
|
||||||
|
t.start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
QMessageBox::critical(NULL,tr("Problem found while writing"),tr("The selected path for the output file does not exist or is not a valid path. Be sure that you have write access to this folder"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportLibraryDialog::findPath()
|
void ExportLibraryDialog::findPath()
|
||||||
|
@ -438,8 +438,9 @@ void LibraryWindow::createToolBars()
|
|||||||
|
|
||||||
libraryToolBar->addSeparator();
|
libraryToolBar->addSeparator();
|
||||||
|
|
||||||
libraryToolBar->addAction(importLibraryAction);
|
|
||||||
libraryToolBar->addAction(exportLibraryAction);
|
libraryToolBar->addAction(exportLibraryAction);
|
||||||
|
libraryToolBar->addAction(importLibraryAction);
|
||||||
|
|
||||||
|
|
||||||
libraryToolBar->addSeparator();
|
libraryToolBar->addSeparator();
|
||||||
libraryToolBar->addAction(updateLibraryAction);
|
libraryToolBar->addAction(updateLibraryAction);
|
||||||
|
@ -687,5 +687,7 @@ void PropertiesDialog::closeEvent ( QCloseEvent * e )
|
|||||||
|
|
||||||
tabBar->setCurrentIndex(0);
|
tabBar->setCurrentIndex(0);
|
||||||
|
|
||||||
|
coverPageEdit->setFocus();
|
||||||
|
|
||||||
QDialog::closeEvent(e);
|
QDialog::closeEvent(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user