mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
improved save current page
This commit is contained in:
parent
b8b68ef782
commit
c6095ad290
@ -564,10 +564,11 @@ void MainWindowViewer::openFolderFromPath(QString pathDir)
|
|||||||
void MainWindowViewer::saveImage()
|
void MainWindowViewer::saveImage()
|
||||||
{
|
{
|
||||||
QFileDialog saveDialog;
|
QFileDialog saveDialog;
|
||||||
QString pathFile = saveDialog.getSaveFileName(this,tr("Save current page"),currentDirectoryImgDest,tr("Image files (*.jpg)"));
|
QString pathFile = saveDialog.getSaveFileName(this,tr("Save current page"),currentDirectoryImgDest+"/"+tr("page_%1.jpg").arg(viewer->getIndex()),tr("Image files (*.jpg)"));
|
||||||
if (!pathFile.isEmpty())
|
if (!pathFile.isEmpty())
|
||||||
{
|
{
|
||||||
currentDirectoryImgDest = pathFile;
|
QFileInfo fi(pathFile);
|
||||||
|
currentDirectoryImgDest = fi.absolutePath();
|
||||||
const QPixmap * p = viewer->pixmap();
|
const QPixmap * p = viewer->pixmap();
|
||||||
if(p!=NULL)
|
if(p!=NULL)
|
||||||
p->save(pathFile);
|
p->save(pathFile);
|
||||||
|
@ -779,4 +779,9 @@ void Viewer::showIsLastMessage()
|
|||||||
{
|
{
|
||||||
notificationsLabel->setText(tr("Last page!"));
|
notificationsLabel->setText(tr("Last page!"));
|
||||||
notificationsLabel->flash();
|
notificationsLabel->flash();
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int Viewer::getIndex()
|
||||||
|
{
|
||||||
|
return render->getIndex()+1;
|
||||||
}
|
}
|
@ -136,6 +136,8 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
|
|||||||
const QPixmap * pixmap();
|
const QPixmap * pixmap();
|
||||||
//Comic * getComic(){return comic;}
|
//Comic * getComic(){return comic;}
|
||||||
const BookmarksDialog * getBookmarksDialog(){return bd;}
|
const BookmarksDialog * getBookmarksDialog(){return bd;}
|
||||||
|
//returns the current index starting in 1 [1,nPages]
|
||||||
|
unsigned int getIndex();
|
||||||
signals:
|
signals:
|
||||||
void backgroundChanges();
|
void backgroundChanges();
|
||||||
void pageAvailable(bool);
|
void pageAvailable(bool);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user