commit inicial en mercurial

This commit is contained in:
Luis Ángel San Martín
2012-05-20 16:12:22 +02:00
commit 95817d14ee
180 changed files with 14355 additions and 0 deletions

View File

@ -0,0 +1,54 @@
######################################################################
# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
INCLUDEPATH += ../common
CONFIG += release
CONFIG -= flat
QT += sql
# Input
HEADERS += comic_flow.h \
create_library_dialog.h \
library_creator.h \
library_window.h \
../common/pictureflow.h \
add_library_dialog.h \
../common/custom_widgets.h \
rename_library_dialog.h \
properties_dialog.h \
options_dialog.h \
export_library_dialog.h \
import_library_dialog.h \
package_manager.h \
../common/qnaturalsorting.h \
data_base_management.h \
bundle_creator.h
SOURCES += comic_flow.cpp \
create_library_dialog.cpp \
library_creator.cpp \
library_window.cpp \
main.cpp \
../common/pictureflow.cpp \
add_library_dialog.cpp \
../common/custom_widgets.cpp \
rename_library_dialog.cpp \
properties_dialog.cpp \
options_dialog.cpp \
export_library_dialog.cpp \
import_library_dialog.cpp \
package_manager.cpp \
../common/qnaturalsorting.cpp \
data_base_management.cpp \
bundle_creator.cpp
RESOURCES += images.qrc files.qrc
RC_FILE = icon.rc
TRANSLATIONS = yacreaderlibrary_es.ts
Release:DESTDIR = ../release
Debug:DESTDIR = ../debug

View File

@ -0,0 +1,95 @@
#include "add_library_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFileDialog>
AddLibraryDialog::AddLibraryDialog(QWidget * parent)
:QDialog(parent)
{
setupUI();
}
void AddLibraryDialog::setupUI()
{
textLabel = new QLabel(tr("Comics folder : "));
path = new QLineEdit;
textLabel->setBuddy(path);
nameLabel = new QLabel(tr("Library Name : "));
nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit);
accept = new QPushButton(tr("Add"));
accept->setDisabled(true);
connect(accept,SIGNAL(clicked()),this,SLOT(add()));
cancel = new QPushButton(tr("Cancel"));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
find = new QPushButton(QIcon(":/images/comicFolder.png"),"");
connect(find,SIGNAL(clicked()),this,SLOT(findPath()));
QHBoxLayout *nameLayout = new QHBoxLayout;
nameLayout->addWidget(nameLabel);
nameLayout->addWidget(nameEdit);
QHBoxLayout *libraryLayout = new QHBoxLayout;
libraryLayout->addWidget(textLabel);
libraryLayout->addWidget(path);
libraryLayout->addWidget(find);
libraryLayout->setStretchFactor(find,0); //TODO
QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch();
bottomLayout->addWidget(accept);
bottomLayout->addWidget(cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(nameLayout);
mainLayout->addLayout(libraryLayout);
mainLayout->addStretch();
mainLayout->addLayout(bottomLayout);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/openLibrary.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
setWindowTitle(tr("Add an existing library"));
}
void AddLibraryDialog::add()
{
//accept->setEnabled(false);
emit(addLibrary(QDir::cleanPath(path->text()),nameEdit->text()));
close();
}
void AddLibraryDialog::findPath()
{
QString s = QFileDialog::getExistingDirectory(0,"Comics directory",".");
if(!s.isEmpty())
{
path->setText(s);
accept->setEnabled(true);
}
}
void AddLibraryDialog::close()
{
path->clear();
nameEdit->clear();
accept->setEnabled(false);
QDialog::close();
}

View File

@ -0,0 +1,33 @@
#ifndef __ADD_LIBRARY_DIALOG_H
#define __ADD_LIBRARY_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QThread>
class AddLibraryDialog : public QDialog
{
Q_OBJECT
public:
AddLibraryDialog(QWidget * parent = 0);
private:
QLabel * nameLabel;
QLabel * textLabel;
QLineEdit * path;
QLineEdit * nameEdit;
QPushButton * find;
QPushButton * accept;
QPushButton * cancel;
void setupUI();
public slots:
void add();
void findPath();
void close();
signals:
void addLibrary(QString target, QString name);
};
#endif

View File

@ -0,0 +1,266 @@
#include "comic_flow.h"
#include "qnaturalsorting.h"
#include <QMutex>
#include <QImageReader>
#include <algorithm>
ComicFlow::ComicFlow(QWidget* parent,FlowType flowType)
:YACReaderFlow(parent,flowType)
{
updateTimer = new QTimer;
connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateImageData()));
worker = new ImageLoader;
connect(this, SIGNAL(centerIndexChanged(int)), this, SLOT(preload()));
setReflectionEffect(PlainReflection);
}
ComicFlow::~ComicFlow()
{
delete worker;
delete updateTimer;
}
QString ComicFlow::getImagePath() const
{
return imagePath;
}
QStringList ComicFlow::getImageFiles() const
{
return imageFiles;
}
// get list of all files in a directory (will be filtered later)
// this is usually very fast so no need to put it in a separate thread
static QStringList findFiles(const QString& path = QString())
{
//list<QString> files;
QStringList files;
QDir dir = QDir::current();
if(!path.isEmpty())
dir = QDir(path);
dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
dir.setNameFilters(QStringList() << "*.jpg");
//dir.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware);
QFileInfoList list = dir.entryInfoList();
qSort(list.begin(),list.end(),naturalSortLessThanCIFileInfo);
for (int i = 0; i < list.size(); ++i)
{
QFileInfo fileInfo = list.at(i);
files.append(dir.absoluteFilePath(fileInfo.fileName()));
}
//std::sort(files.begin(), files.end(), naturalSortLessThanCI);
return files;
}
// take only files which are readable (as images)
// also seems to be fast as it does a quick check only
static QStringList filterImages(const QStringList& files)
{
QStringList imageFiles;
QImageReader reader;
foreach(QString fname, files)
{
reader.setFileName(fname);
if(reader.canRead())
imageFiles += fname;
}
return imageFiles;
}
void ComicFlow::setImagePath(const QString& path)
{
clear();
imagePath = path;
imageFiles = findFiles(path);
imagesLoaded.clear();
imagesLoaded.fill(false,imageFiles.size());
numImagesLoaded = 0;
imagesSetted.clear();
imagesSetted.fill(false,imageFiles.size());
// populate with empty images
QImage img; //TODO remove
QString s;
for(int i = 0; i < (int)imageFiles.size(); i++)
{
addSlide(img);
s = imageFiles.at(i);
s.remove(s.size()-4,4);
if(QFileInfo(s+".r").exists())
markSlide(i);
}
setCenterIndex(0);
worker->reset();
preload();
}
void ComicFlow::preload()
{
if(numImagesLoaded < imagesLoaded.size())
updateTimer->start(70);
}
void ComicFlow::updateImageData()
{
// can't do anything, wait for the next possibility
if(worker->busy())
return;
// set image of last one
int idx = worker->index();
if( idx >= 0 && !worker->result().isNull())
{
if(!imagesSetted[idx])
{
setSlide(idx, worker->result());
imagesSetted[idx] = true;
numImagesLoaded++;
}
}
// try to load only few images on the left and right side
// i.e. all visible ones plus some extra
#define COUNT 8
int indexes[2*COUNT+1];
int center = centerIndex();
indexes[0] = center;
for(int j = 0; j < COUNT; j++)
{
indexes[j*2+1] = center+j+1;
indexes[j*2+2] = center-j-1;
}
for(int c = 0; c < 2*COUNT+1; c++)
{
int i = indexes[c];
if((i >= 0) && (i < slideCount()))
if(!imagesLoaded[i])//slide(i).isNull())
{
// schedule thumbnail generation
QString fname = imageFiles[i];
imagesLoaded[i]=true;
worker->generate(i, fname, slideSize());
return;
}
}
// no need to generate anything? stop polling...
updateTimer->stop();
}
void ComicFlow::keyPressEvent(QKeyEvent* event)
{
PictureFlow::keyPressEvent(event);
}
void ComicFlow::wheelEvent(QWheelEvent * event)
{
if(event->delta()<0)
showNext();
else
showPrevious();
event->accept();
}
//-----------------------------------------------------------------------------
//ImageLoader
//-----------------------------------------------------------------------------
static QImage loadImage(const QString& fileName)
{
QImage image;
bool result = image.load(fileName);
if(!result)
return QImage();
return image;
}
ImageLoader::ImageLoader():
QThread(), restart(false), working(false), idx(-1)
{
}
ImageLoader::~ImageLoader()
{
mutex.lock();
condition.wakeOne();
mutex.unlock();
wait();
}
bool ImageLoader::busy() const
{
return isRunning() ? working : false;
}
void ImageLoader::generate(int index, const QString& fileName, QSize size)
{
mutex.lock();
this->idx = index;
this->fileName = fileName;
this->size = size;
this->img = QImage();
mutex.unlock();
if (!isRunning())
start();
else
{
// already running, wake up whenever ready
restart = true;
condition.wakeOne();
}
}
void ImageLoader::run()
{
for(;;)
{
// copy necessary data
mutex.lock();
this->working = true;
QString fileName = this->fileName;
mutex.unlock();
QImage image = loadImage(fileName);
// let everyone knows it is ready
mutex.lock();
this->working = false;
this->img = image;
mutex.unlock();
// put to sleep
mutex.lock();
if (!this->restart)
condition.wait(&mutex);
restart = false;
mutex.unlock();
}
}
QImage ImageLoader::result()
{
return img;
}

View File

@ -0,0 +1,76 @@
#ifndef __COMICFLOW_H
#define __COMICFLOW_H
#include "custom_widgets.h"
#include <QtCore>
#include <QObject>
#include <QThread>
#include <QImage>
#include <QMutex>
#include <QWaitCondition>
#include <QString>
#include <QWheelEvent>
class ImageLoader;
class ComicFlow : public YACReaderFlow
{
Q_OBJECT
public:
ComicFlow(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
virtual ~ComicFlow();
//void render();
QString getImagePath() const;
QStringList getImageFiles() const;
void setImagePath(const QString& path);
//bool eventFilter(QObject *target, QEvent *event);
void keyPressEvent(QKeyEvent* event);
private slots:
void preload();
void updateImageData();
private:
QString imagePath;
QStringList imageFiles;
QVector<bool> imagesLoaded;
QVector<bool> imagesSetted;
uint numImagesLoaded;
QTimer* updateTimer;
ImageLoader* worker;
virtual void wheelEvent(QWheelEvent * event);
};
//-----------------------------------------------------------------------------
// Source code of ImageLoader class was modified from http://code.google.com/p/photoflow/
//------------------------------------------------------------------------------
class ImageLoader : public QThread
{
public:
ImageLoader();
~ImageLoader();
// returns FALSE if worker is still busy and can't take the task
bool busy() const;
void generate(int index, const QString& fileName, QSize size);
void reset(){idx = -1;};
int index() const { return idx; };
QImage result();
protected:
void run();
private:
QMutex mutex;
QWaitCondition condition;
bool restart;
bool working;
int idx;
QString fileName;
QSize size;
QImage img;
};
#endif

View File

@ -0,0 +1,154 @@
#include "create_library_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFileDialog>
CreateLibraryDialog::CreateLibraryDialog(QWidget * parent)
:QDialog(parent)
{
setupUI();
}
void CreateLibraryDialog::setupUI()
{
textLabel = new QLabel(tr("Comics folder : "));
path = new QLineEdit;
textLabel->setBuddy(path);
nameLabel = new QLabel(tr("Library Name : "));
nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit);
accept = new QPushButton(tr("Create"));
accept->setDisabled(true);
connect(accept,SIGNAL(clicked()),this,SLOT(create()));
cancel = new QPushButton(tr("Cancel"));
connect(cancel,SIGNAL(clicked()),this,SIGNAL(cancelCreate()));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
find = new QPushButton(QIcon(":/images/comicFolder.png"),"");
connect(find,SIGNAL(clicked()),this,SLOT(findPath()));
QHBoxLayout *nameLayout = new QHBoxLayout;
nameLayout->addWidget(nameLabel);
nameLayout->addWidget(nameEdit);
QHBoxLayout *libraryLayout = new QHBoxLayout;
libraryLayout->addWidget(textLabel);
libraryLayout->addWidget(path);
libraryLayout->addWidget(find);
libraryLayout->setStretchFactor(find,0); //TODO
QHBoxLayout *middleLayout = new QHBoxLayout;
processLabel = new QLabel("Procesing : ");
currentFileLabel = new QLabel("");
middleLayout->addWidget(processLabel);
middleLayout->addWidget(currentFileLabel);
middleLayout->addStretch();
QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch();
bottomLayout->addWidget(accept);
bottomLayout->addWidget(cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(nameLayout);
mainLayout->addLayout(libraryLayout);
mainLayout->addLayout(middleLayout);
mainLayout->addStretch();
mainLayout->addLayout(bottomLayout);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/new.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
setWindowTitle(tr("Create new library"));
}
void CreateLibraryDialog::create()
{
accept->setEnabled(false);
emit(createLibrary(QDir::cleanPath(path->text()),QDir::cleanPath(path->text())+"/.yacreaderlibrary",nameEdit->text()));
}
void CreateLibraryDialog::findPath()
{
QString s = QFileDialog::getExistingDirectory(0,"Comics directory",".");
if(!s.isEmpty())
{
path->setText(s);
accept->setEnabled(true);
}
}
void CreateLibraryDialog::showCurrentFile(QString file)
{
currentFileLabel->setText(file);
currentFileLabel->update();
this->update();
}
void CreateLibraryDialog::close()
{
path->clear();
nameEdit->clear();
currentFileLabel->setText("");
accept->setEnabled(true);
QDialog::close();
}
//-----------------------------------------------------------------------------
// UpdateLibraryDialog
//-----------------------------------------------------------------------------
UpdateLibraryDialog::UpdateLibraryDialog(QWidget * parent)
:QDialog(parent)
{
QVBoxLayout * mainLayout = new QVBoxLayout;
mainLayout->addWidget(message = new QLabel(tr("Updating....")));
mainLayout->addWidget(currentFileLabel = new QLabel(""));
QHBoxLayout * bottom = new QHBoxLayout;
bottom->addStretch();
bottom->addWidget(cancel = new QPushButton(tr("Cancel")));
connect(cancel,SIGNAL(clicked()),this,SIGNAL(cancelUpdate()));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
mainLayout->addStretch();
mainLayout->addLayout(bottom);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/updateLibrary.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
}
void UpdateLibraryDialog::showCurrentFile(QString file)
{
currentFileLabel->setText(file);
currentFileLabel->update();
this->update();
}
void UpdateLibraryDialog::close()
{
currentFileLabel->setText("");
QDialog::close();
}

View File

@ -0,0 +1,52 @@
#ifndef __CREATE_LIBRARY_DIALOG_H
#define __CREATE_LIBRARY_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QThread>
class CreateLibraryDialog : public QDialog
{
Q_OBJECT
public:
CreateLibraryDialog(QWidget * parent = 0);
private:
QLabel * nameLabel;
QLabel * textLabel;
QLabel * processLabel;
QLabel * currentFileLabel;
QLineEdit * path;
QLineEdit * nameEdit;
QPushButton * find;
QPushButton * accept;
QPushButton * cancel;
void setupUI();
public slots:
void create();
void findPath();
void showCurrentFile(QString file);
void close();
signals:
void createLibrary(QString source, QString target, QString name);
void cancelCreate();
};
class UpdateLibraryDialog : public QDialog
{
Q_OBJECT
public:
UpdateLibraryDialog(QWidget * parent = 0);
private:
QLabel * message;
QLabel * currentFileLabel;
QPushButton * cancel;
public slots:
void showCurrentFile(QString file);
void close();
signals:
void cancelUpdate();
};
#endif

View File

@ -0,0 +1,22 @@
#include "data_base_management.h"
#include <QtCore>
DataBaseManagement::DataBaseManagement()
:QObject(),dataBasesList()
{
}
bool DataBaseManagement::createDataBase(QString name, QString path)
{
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(name + ".ydb");
if (!db.open())
qDebug() << db.lastError();
else {
qDebug() << db.tables();
db.close();
}
return true;
}

View File

@ -0,0 +1,18 @@
#ifndef __DATA_BASE_MANAGEMENT_H
#define __DATA_BASE_MANAGEMENT_H
#include <QtCore>
#include <QtSql>
class DataBaseManagement : public QObject
{
Q_OBJECT
private:
QList<QString> dataBasesList;
public:
DataBaseManagement();
bool createDataBase(QString name, QString path);
};
#endif

View File

@ -0,0 +1,100 @@
#include "export_library_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFileDialog>
#include <QDir>
ExportLibraryDialog::ExportLibraryDialog(QWidget * parent)
:QDialog(parent),progressCount(0)
{
textLabel = new QLabel(tr("Output folder : "));
path = new QLineEdit;
textLabel->setBuddy(path);
accept = new QPushButton(tr("Create"));
accept->setDisabled(true);
connect(accept,SIGNAL(clicked()),this,SLOT(exportLibrary()));
cancel = new QPushButton(tr("Cancel"));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
find = new QPushButton(QIcon(":/images/comicFolder.png"),"");
connect(find,SIGNAL(clicked()),this,SLOT(findPath()));
QHBoxLayout *libraryLayout = new QHBoxLayout;
libraryLayout->addWidget(textLabel);
libraryLayout->addWidget(path);
libraryLayout->addWidget(find);
libraryLayout->setStretchFactor(find,0); //TODO
QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch();
bottomLayout->addWidget(accept);
bottomLayout->addWidget(cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(libraryLayout);
mainLayout->addWidget(progress=new QLabel());
mainLayout->addStretch();
mainLayout->addLayout(bottomLayout);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/exportLibrary.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
setWindowTitle(tr("Create covers package"));
t.setInterval(500);
connect(&t,SIGNAL(timeout()),this,SLOT(updateProgress()));
}
void ExportLibraryDialog::exportLibrary()
{
accept->setEnabled(false);
emit exportPath(QDir::cleanPath(path->text()));
t.start();
}
void ExportLibraryDialog::findPath()
{
QString s = QFileDialog::getExistingDirectory(0,tr("Destination directory"),".");
if(!s.isEmpty())
{
path->setText(s);
accept->setEnabled(true);
}
}
void ExportLibraryDialog::close()
{
path->clear();
accept->setEnabled(false);
t.stop();
progressCount=0;
progress->setText("");
QDialog::close();
}
void ExportLibraryDialog::run()
{
}
void ExportLibraryDialog::updateProgress()
{
if(progressCount == 0)
progress->setText(tr("Creating package ."));
else
progress->setText(progress->text()+" .");
progressCount++;
if(progressCount == 15)
progressCount = 0;
}

View File

@ -0,0 +1,36 @@
#ifndef EXPORT_LIBRARY_DIALOG_H
#define EXPORT_LIBRARY_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QString>
#include <QThread>
#include <QTimer>
class ExportLibraryDialog : public QDialog
{
Q_OBJECT
public:
ExportLibraryDialog(QWidget * parent = 0);
public slots:
void exportLibrary();
void findPath();
void close();
void updateProgress();
private:
int progressCount;
QLabel * progress;
QLabel * textLabel;
QLineEdit * path;
QPushButton * find;
QPushButton * accept;
QPushButton * cancel;
void run();
QTimer t;
signals:
void exportPath(QString);
};
#endif

View File

@ -0,0 +1,13 @@
<RCC>
<qresource>
<file>../files/about.html</file>
<file>../files/helpYACReaderLibrary.html</file>
<file>./yacreaderlibrary_es.qm</file>
</qresource>
<qresource lang="es_ES">
<file alias="/files/about.html">../files/about_es_ES.html</file>
<file alias="/files/helpYACReaderLibrary.html">../files/helpYACReaderLibrary_es_ES.html</file>
</qresource>
</RCC>

BIN
YACReaderLibrary/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

2
YACReaderLibrary/icon.rc Normal file
View File

@ -0,0 +1,2 @@
IDI_ICON1 ICON DISCARDABLE "icon.ico"
IDI_ICON2 ICON DISCARDABLE "icon2.ico"

BIN
YACReaderLibrary/icon2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -0,0 +1,33 @@
<RCC>
<qresource prefix="/" >
<file>../images/deleteLibrary.png</file>
<file>../images/folder.png</file>
<file>../images/help.png</file>
<file>../images/icon.png</file>
<file>../images/new.png</file>
<file>../images/openLibrary.png</file>
<file>../images/removeLibrary.png</file>
<file>../images/updateLibrary.png</file>
<file>../images/setRoot.png</file>
<file>../images/expand.png</file>
<file>../images/colapse.png</file>
<file>../images/comicFolder.png</file>
<file>../images/notCover.png</file>
<file>../images/edit.png</file>
<file>../images/fit.png</file>
<file>../images/properties.png</file>
<file>../images/options.png</file>
<file>../images/flow1.png</file>
<file>../images/flow2.png</file>
<file>../images/flow3.png</file>
<file>../images/importLibrary.png</file>
<file>../images/exportLibrary.png</file>
<file>../images/open.png</file>
<file>../images/coversPackage.png</file>
<file>../images/setRead.png</file>
<file>../images/setAllRead.png</file>
<file>../images/setUnread.png</file>
<file>../images/setAllUnread.png</file>
<file>../images/showMarks.png</file>
</qresource>
</RCC>

View File

@ -0,0 +1,164 @@
#include "import_library_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFileDialog>
ImportLibraryDialog::ImportLibraryDialog(QWidget * parent)
:QDialog(parent),progressCount(0)
{
setupUI();
}
void ImportLibraryDialog::setupUI()
{
nameLabel = new QLabel(tr("Library Name : "));
nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit);
connect(nameEdit,SIGNAL(textChanged(QString)),this,SLOT(nameEntered()));
textLabel = new QLabel(tr("Package location : "));
path = new QLineEdit;
textLabel->setBuddy(path);
destLabel = new QLabel(tr("Destination folder : "));
destPath = new QLineEdit;
textLabel->setBuddy(destPath);
accept = new QPushButton(tr("Unpack"));
accept->setDisabled(true);
connect(accept,SIGNAL(clicked()),this,SLOT(add()));
cancel = new QPushButton(tr("Cancel"));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
//connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
find = new QPushButton(QIcon(":/images/coversPackage.png"),"");
connect(find,SIGNAL(clicked()),this,SLOT(findPath()));
findDest = new QPushButton(QIcon(":/images/open.png"),"");
connect(findDest,SIGNAL(clicked()),this,SLOT(findDestination()));
QHBoxLayout *nameLayout = new QHBoxLayout;
nameLayout->addWidget(nameLabel);
nameLayout->addWidget(nameEdit);
QHBoxLayout *libraryLayout = new QHBoxLayout;
libraryLayout->addWidget(textLabel);
libraryLayout->addWidget(path);
libraryLayout->addWidget(find);
libraryLayout->setStretchFactor(find,0); //TODO
QHBoxLayout *destLayout = new QHBoxLayout;
destLayout->addWidget(destLabel);
destLayout->addWidget(destPath);
destLayout->addWidget(findDest);
destLayout->setStretchFactor(findDest,0); //TODO
QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch();
bottomLayout->addWidget(accept);
bottomLayout->addWidget(cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(nameLayout);
mainLayout->addLayout(libraryLayout);
mainLayout->addLayout(destLayout);
mainLayout->addWidget(progress = new QLabel());
mainLayout->addStretch();
mainLayout->addLayout(bottomLayout);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/importLibrary.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
setWindowTitle(tr("Extract a catalog"));
t.setInterval(500);
t.stop();
connect(&t,SIGNAL(timeout()),this,SLOT(updateProgress()));
}
void ImportLibraryDialog::add()
{
accept->setEnabled(false);
t.start();
emit(unpackCLC(QDir::cleanPath(path->text()),QDir::cleanPath(destPath->text()),nameEdit->text()));
}
void ImportLibraryDialog::findPath()
{
QString s = QFileDialog::getOpenFileName(0,"Covers Package",".",tr("Compresed library covers (*.clc)"));
if(!s.isEmpty())
{
path->setText(s);
if(!destPath->text().isEmpty() && !nameEdit->text().isEmpty())
accept->setEnabled(true);
}
}
void ImportLibraryDialog::findDestination()
{
QString s = QFileDialog::getExistingDirectory(0,"Folder",".",QFileDialog::ShowDirsOnly);
if(!s.isEmpty())
{
destPath->setText(s);
if(!path->text().isEmpty() && !nameEdit->text().isEmpty())
accept->setEnabled(true);
}
}
void ImportLibraryDialog::nameEntered()
{
if(!nameEdit->text().isEmpty())
{
if(!path->text().isEmpty() && !destPath->text().isEmpty())
accept->setEnabled(true);
}
else
accept->setEnabled(false);
}
void ImportLibraryDialog::close()
{
path->clear();
destPath->clear();
nameEdit->clear();
accept->setEnabled(false);
if(t.isActive())
{
t.stop();
emit rejected();
}
progress->setText("");
QDialog::hide();
}
void ImportLibraryDialog::updateProgress()
{
if(progressCount == 0)
progress->setText(tr("Importing package ."));
else
progress->setText(progress->text()+" .");
progressCount++;
if(progressCount == 15)
progressCount = 0;
}
void ImportLibraryDialog::closeEvent ( QCloseEvent * e )
{
close();
}

View File

@ -0,0 +1,45 @@
#ifndef IMPORT_LIBRARY_DIALOG_H
#define IMPORT_LIBRARY_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QThread>
#include <QTimer>
class ImportLibraryDialog : public QDialog
{
Q_OBJECT
public:
ImportLibraryDialog(QWidget * parent = 0);
private:
QLabel * nameLabel;
QLabel * textLabel;
QLabel * destLabel;
QLineEdit * path;
QLineEdit * destPath;
QLineEdit * nameEdit;
QPushButton * find;
QPushButton * findDest;
QPushButton * accept;
QPushButton * cancel;
QLabel * progress;
void setupUI();
QTimer t;
int progressCount;
void closeEvent ( QCloseEvent * e );
public slots:
void add();
void findPath();
void findDestination();
void close();
void updateProgress();
void nameEntered();
signals:
void unpackCLC(QString clc,QString targetFolder, QString name);
};
#endif

View File

@ -0,0 +1,323 @@
#include "library_creator.h"
#include "custom_widgets.h"
#include <QMutex>
#include <QDebug>
//QMutex mutex;
/*int numThreads = 0;
QWaitCondition waitCondition;
QMutex mutex;
*/
LibraryCreator::LibraryCreator()
{
_nameFilter << "*.cbr" << "*.cbz" << "*.rar" << "*.zip" << "*.tar";
}
void LibraryCreator::createLibrary(const QString &source, const QString &target)
{
_source = source;
_target = target;
if(!QDir(target).exists())
_mode = CREATOR;
else
_mode = UPDATER;
}
void LibraryCreator::updateLibrary(const QString &source, const QString &target)
{
_source = source;
_target = target;
_mode = UPDATER;
}
void LibraryCreator::run()
{
stopRunning = false;
if(_mode == CREATOR)
create(QDir(_source));
else
update(QDir(_source),QDir(_target));
emit(finished());
}
void LibraryCreator::stop()
{
stopRunning = true;
}
void LibraryCreator::create(QDir dir)
{
dir.setNameFilters(_nameFilter);
dir.setFilter(QDir::AllDirs|QDir::Files|QDir::NoDotAndDotDot);
QFileInfoList list = dir.entryInfoList();
for (int i = 0; i < list.size(); ++i)
{
if(stopRunning)
return;
QFileInfo fileInfo = list.at(i);
if(fileInfo.isDir())
{
create(QDir(fileInfo.absoluteFilePath()));
}
else
{
dir.mkpath(_target+(QDir::cleanPath(fileInfo.absolutePath()).remove(_source)));
emit(coverExtracted(QDir::cleanPath(fileInfo.absoluteFilePath()).remove(_source)));
ThumbnailCreator tc(QDir::cleanPath(fileInfo.absoluteFilePath()),_target+(QDir::cleanPath(fileInfo.absoluteFilePath()).remove(_source))+".jpg");
tc.create();
}
}
}
void LibraryCreator::update(QDir dirS,QDir dirD)
{
dirS.setNameFilters(_nameFilter);
dirS.setFilter(QDir::AllDirs|QDir::Files|QDir::NoDotAndDotDot);
dirS.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware|QDir::DirsFirst);
QFileInfoList listS = dirS.entryInfoList();
dirD.setNameFilters(QStringList()<<"*.jpg");
dirD.setFilter(QDir::AllDirs|QDir::Files|QDir::NoDotAndDotDot);
dirD.setSorting(QDir::Name|QDir::IgnoreCase|QDir::LocaleAware|QDir::DirsFirst);
QFileInfoList listD = dirD.entryInfoList();
int lenghtS = listS.size();
int lenghtD = listD.size();
int maxLenght = qMax(lenghtS,lenghtD);
bool updated;
int i,j;
for (i=0,j=0; (i < lenghtS)||(j < lenghtD);)
{
if(stopRunning)
return;
updated = false;
if(i>=lenghtS) //finished source files/dirs
{
//delete listD //from j
for(;j<lenghtD;j++)
{
if(stopRunning)
return;
QFileInfo fileInfoD = listD.at(j);
if(fileInfoD.isDir())
{
delTree(QDir(fileInfoD.absoluteFilePath()));
dirD.rmdir(fileInfoD.absoluteFilePath());
}
else
dirD.remove(fileInfoD.absoluteFilePath());
}
updated = true;
}
if(j>=lenghtD) //finished library files/dirs
{
//create listS //from i
for(;i<lenghtS;i++)
{
if(stopRunning)
return;
QFileInfo fileInfoS = listS.at(i);
if(fileInfoS.isDir())
create(QDir(fileInfoS.absoluteFilePath()));
else
{
dirD.mkpath(_target+(QDir::cleanPath(fileInfoS.absolutePath()).remove(_source)));
emit(coverExtracted(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source)));
ThumbnailCreator tc(QDir::cleanPath(fileInfoS.absoluteFilePath()),_target+(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source))+".jpg");
tc.create();
}
}
updated = true;
}
if(!updated)
{
QFileInfo fileInfoS = listS.at(i);
QFileInfo fileInfoD = listD.at(j);
QString nameS = QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(QDir::cleanPath(fileInfoS.absolutePath())); //remove source
QString nameD = QDir::cleanPath(fileInfoD.absoluteFilePath()).remove(QDir::cleanPath(fileInfoD.absolutePath())); //remove target
int comparation = QString::localeAwareCompare(nameS,nameD);
if(fileInfoS.isDir()&&fileInfoD.isDir())
if(comparation == 0)//same folder, update
{
update(QDir(fileInfoS.absoluteFilePath()),QDir(fileInfoD.absoluteFilePath()));
i++;
j++;
}
else
if(comparation < 0) //nameS doesn't exist on Target folder...
{
if(nameS!="/.yacreaderlibrary")
create(QDir(fileInfoS.absoluteFilePath()));
i++;
}
else //nameD no longer avaliable on Source folder...
{
if(nameS!="/.yacreaderlibrary")
{
delTree(QDir(fileInfoD.absoluteFilePath()));
dirD.rmdir(fileInfoD.absoluteFilePath());
j++;
}
else
i++; //skip library directory
}
else // one of them(or both) is a file
if(fileInfoS.isDir()) //this folder doesn't exist on library
{
if(nameS!="/.yacreaderlibrary") //skip .yacreaderlibrary folder
create(QDir(fileInfoS.absoluteFilePath()));
i++;
}
else
if(fileInfoD.isDir()) //delete this folder from library
{
delTree(QDir(fileInfoD.absoluteFilePath()));
dirD.rmdir(fileInfoD.absoluteFilePath());
j++;
}
else //both are files //BUG on windows (no case sensitive)
{
nameD.remove(nameD.size()-4,4);
int comparation = QString::localeAwareCompare(nameS,nameD);
if(comparation < 0) //create new thumbnail
{
dirD.mkpath(_target+(QDir::cleanPath(fileInfoS.absolutePath()).remove(_source)));
emit(coverExtracted(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source)));
ThumbnailCreator tc(QDir::cleanPath(fileInfoS.absoluteFilePath()),_target+(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source))+".jpg");
tc.create();
i++;
}
else
{
if(comparation > 0) //delete thumbnail
{
dirD.remove(fileInfoD.absoluteFilePath());
QString tick = fileInfoD.absoluteFilePath();
dirD.remove(tick.remove(tick.size()-3,3));
dirD.remove(tick+"r");
j++;
}
else //same file
{
if(fileInfoS.isFile() && fileInfoD.isFile())
{
if(fileInfoS.lastModified()>fileInfoD.lastModified())
{
dirD.mkpath(_target+(QDir::cleanPath(fileInfoS.absolutePath()).remove(_source)));
emit(coverExtracted(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source)));
ThumbnailCreator tc(QDir::cleanPath(fileInfoS.absoluteFilePath()),_target+(QDir::cleanPath(fileInfoS.absoluteFilePath()).remove(_source))+".jpg");
tc.create();
}
}
i++;j++;
}
}
}
}
}
}
ThumbnailCreator::ThumbnailCreator(QString fileSource, QString target="")
:_fileSource(fileSource),_target(target),_numPages(0)
{
}
void ThumbnailCreator::create()
{
_7z = new QProcess();
QStringList attributes;
attributes << "l" << "-ssc-" << "-r" << _fileSource << "*.jpg" << "*.jpeg" << "*.png" << "*.gif" << "*.tiff" << "*.tif" << "*.bmp";
//connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(loadFirstImage(void)));
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SIGNAL(openingError(QProcess::ProcessError)));
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7z",attributes);
_7z->waitForFinished(60000);
QRegExp rx("[0-9]{4}-[0-9]{2}-[0-9]{2}[ ]+[0-9]{2}:[0-9]{2}:[0-9]{2}[ ]+.{5}[ ]+([0-9]+)[ ]+([0-9]+)[ ]+(.+)");
QString ba = QString::fromUtf8(_7z->readAllStandardOutput());
QList<QString> lines = ba.split('\n');
QString line;
_currentName = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"; //TODO
QString name;
foreach(line,lines)
{
if(rx.indexIn(line)!=-1)
{
name = rx.cap(3).trimmed();
if(0 > QString::localeAwareCompare(name,_currentName))
_currentName = name;
_numPages++;
}
}
delete _7z;
attributes.clear();
_currentName = QDir::fromNativeSeparators(_currentName).split('/').last(); //separator fixed.
#ifdef Q_WS_WIN
attributes << "e" << "-so" << "-r" << _fileSource << QString(_currentName.toLocal8Bit().constData()); //TODO platform dependency?? OEM 437
#else
attributes << "e" << "-so" << "-r" << _fileSource << _currentName; //TODO platform dependency?? OEM 437
#endif
_7z = new QProcess();
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SIGNAL(openingError(QProcess::ProcessError)));
//connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(writeThumbnail(void)));
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7z",attributes);
_7z->waitForFinished(60000);
QByteArray image = _7z->readAllStandardOutput();
QString error = _7z->readAllStandardError();
QImage p;
if(_target=="")
{
if(!_cover.loadFromData(image))
_cover.load(":/images/notCover.png");
}
else
{
if(p.loadFromData(image))
{
//TODO calculate aspect ratio
QImage scaled;
if(p.width()>p.height()) //landscape??
scaled = p.scaledToWidth(640,Qt::SmoothTransformation);
else
scaled = p.scaledToWidth(480,Qt::SmoothTransformation);
scaled.save(_target,0,75);
}
else
{
p.load(":/images/notCover.png");
p.save(_target);
//TODO save a default image.
}
}
delete _7z;
}
/*void ThumbnailCreator::openingError(QProcess::ProcessError error)
{
//TODO : move to the gui thread
switch(error)
{
case QProcess::FailedToStart:
QMessageBox::critical(NULL,tr("7z not found"),tr("7z wasn't found in your PATH."));
break;
case QProcess::Crashed:
QMessageBox::critical(NULL,tr("7z crashed"),tr("7z crashed."));
break;
case QProcess::ReadError:
QMessageBox::critical(NULL,tr("7z reading"),tr("problem reading from 7z"));
break;
case QProcess::UnknownError:
QMessageBox::critical(NULL,tr("7z problem"),tr("Unknown error 7z"));
break;
default:
//TODO
break;
}
}*/

View File

@ -0,0 +1,64 @@
#ifndef __LIBRARY_CREATOR_H
#define __LIBRARY_CREATOR_H
#include <QObject>
#include <QString>
#include <QDir>
#include <QFile>
#include <QByteArray>
#include <QRegExp>
#include <QProcess>
#include <QtCore>
#include <QtGui>
#include <QMutex>
#include <QThread>
class LibraryCreator : public QThread
{
Q_OBJECT
public:
LibraryCreator();
void createLibrary(const QString & source, const QString & target);
void updateLibrary(const QString & source, const QString & target);
void stop();
private:
enum Mode {CREATOR,UPDATER};
enum Mode _mode;
QString _source;
QString _target;
QStringList _nameFilter;
//recursive method
void create(QDir currentDirectory);
void update(QDir currentDirectory,QDir libraryCurrentDirectory);
void run();
bool stopRunning;
signals:
void finished();
void coverExtracted(QString);
void folderUpdated(QString);
};
class ThumbnailCreator : public QObject
{
Q_OBJECT
public:
ThumbnailCreator(QString fileSource, QString target);
private:
QProcess * _7z;
QString _fileSource;
QString _target;
QString _currentName;
int _numPages;
QPixmap _cover;
public slots:
void create();
int getNumPages(){return _numPages;};
QPixmap getCover(){return _cover;};
signals:
void openingError(QProcess::ProcessError error);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,164 @@
#ifndef __LIBRARYWINDOW_H
#define __LIBRARYWINDOW_H
#include <QMainWindow>
#include <QListView>
#include <QTreeView>
#include <QModelIndex>
#include <QDirModel>
#include <QAction>
#include <QToolBar>
#include <QComboBox>
#include <QThread>
#include <QFileInfoList>
#include <QFileSystemModel>
#include "create_library_dialog.h"
#include "add_library_dialog.h"
#include "library_creator.h"
#include "comic_flow.h"
#include "custom_widgets.h"
#include "rename_library_dialog.h"
#include "properties_dialog.h"
#include "options_dialog.h"
#include "export_library_dialog.h"
#include "import_library_dialog.h"
#include "package_manager.h"
class LibraryWindow : public QMainWindow
{
Q_OBJECT
private:
QWidget * left;
CreateLibraryDialog * createLibraryDialog;
UpdateLibraryDialog * updateLibraryDialog;
ExportLibraryDialog * exportLibraryDialog;
ImportLibraryDialog * importLibraryDialog;
AddLibraryDialog * addLibraryDialog;
LibraryCreator * libraryCreator;
HelpAboutDialog * had;
RenameLibraryDialog * renameLibraryDialog;
PropertiesDialog * propertiesDialog;
bool fullscreen;
bool importedCovers; //if true, the library is read only (not updates,open comic or properties)
YACReaderTreeSearch * proxyFilter;
YACReaderSortComics * proxySort;
PackageManager * packageManager;
ComicFlow * comicFlow;
QSize slideSizeW;
QSize slideSizeF;
//search filter
QLineEdit * foldersFilter;
QString previousFilter;
QPushButton * clearFoldersFilter;
QCheckBox * includeComicsCheckBox;
//-------------
QListView * comicView;
QTreeView * foldersView;
QComboBox * selectedLibrary;
QFileSystemModel * dm;
QFileSystemModel * dmCV;
QStringList paths;
QMap<QString,QString> libraries;
QLabel * fullScreenToolTip;
YACReaderIconProvider fip;
bool fetching;
int i;
unsigned int skip;
QAction * openComicAction;
QAction * showPropertiesAction;
QAction * createLibraryAction;
QAction * openLibraryAction;
QAction * exportLibraryAction;
QAction * importLibraryAction;
QAction * updateLibraryAction;
QAction * deleteLibraryAction;
QAction * removeLibraryAction;
QAction * helpAboutAction;
QAction * renameLibraryAction;
QAction * toggleFullScreenAction;
QAction * optionsAction;
QAction * setRootIndexAction;
QAction * expandAllNodesAction;
QAction * colapseAllNodesAction;
QAction * openContainingFolderAction;
QAction * openContainingFolderComicAction;
QAction * setAsReadAction;
QAction * setAsNonReadAction;
QAction * setAllAsReadAction;
QAction * setAllAsNonReadAction;
QAction * showHideMarksAction;
QToolBar * libraryToolBar;
QToolBar * treeActions;
QToolBar * comicsToolBar;
OptionsDialog * optionsDialog;
QString libraryPath;
QString comicsPath;
QString _lastAdded;
QModelIndex _rootIndex;
QModelIndex _rootIndexCV;
void setupUI();
void createActions();
void createToolBars();
void createMenus();
void createConnections();
public:
LibraryWindow();
public slots:
void loadLibrary(const QString & path);
void loadCovers(const QModelIndex & mi);
void centerComicFlow(const QModelIndex & mi);
void updateComicView(int i);
void openComic();
void createLibrary();
void create(QString source,QString dest, QString name);
void showAddLibrary();
void openLibrary(QString path, QString name);
void loadLibraries();
void saveLibraries();
void openLastCreated();
void updateLibrary();
void deleteLibrary();
void openContainingFolder();
void openContainingFolderComic();
void deleteCurrentLibrary();
void removeLibrary();
void renameLibrary();
void rename(QString newName);
void cancelCreating();
void stopLibraryCreator();
void setRootIndex();
void toggleFullScreen();
void toNormal();
void toFullScreen();
void setFoldersFilter(QString filter);
void showProperties();
void exportLibrary(QString destPath);
void importLibrary(QString clc,QString destPath,QString name);
void reloadOptions();
void updateFoldersView(QString);
void setCurrentComicReaded();
void setCurrentComicUnreaded();
void setComicsReaded();
void setComicsUnreaded();
void searchInFiles(int);
};
#endif

22
YACReaderLibrary/main.cpp Normal file
View File

@ -0,0 +1,22 @@
#include "library_window.h"
#include <QApplication>
#define PICTUREFLOW_QT4 1
int main( int argc, char ** argv )
{
QApplication app( argc, argv );
QTranslator translator;
QString sufix = QLocale::system().name();
translator.load(":/yacreaderlibrary_"+sufix);
app.installTranslator(&translator);
app.setApplicationName("YACReaderLibrary");
QMainWindow * mw = new LibraryWindow();
mw->resize(800,480);
mw->showMaximized();
return app.exec();
}

View File

@ -0,0 +1,148 @@
#include "options_dialog.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFileDialog>
#include <QGroupBox>
#include <QRadioButton>
#include <QTextStream>
#include <QCoreApplication>
#include <QFile>
#include <QMessageBox>
PictureFlow::FlowType flowType = PictureFlow::Strip;
OptionsDialog::OptionsDialog(QWidget * parent)
:QDialog()
{
QVBoxLayout * layout = new QVBoxLayout(this);
accept = new QPushButton(tr("Save"));
cancel = new QPushButton(tr("Cancel"));
connect(accept,SIGNAL(clicked()),this,SLOT(saveOptions()));
connect(cancel,SIGNAL(clicked()),this,SLOT(restoreOptions()));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
QGroupBox *groupBox = new QGroupBox(tr("How to show covers:"));
radio1 = new QRadioButton(tr("CoverFlow look"));
radio2 = new QRadioButton(tr("Stripe look"));
radio3 = new QRadioButton(tr("Overlapped Stripe look"));
QVBoxLayout *vbox = new QVBoxLayout;
QHBoxLayout * opt1 = new QHBoxLayout;
opt1->addWidget(radio1);
QLabel * lOpt1 = new QLabel();
lOpt1->setPixmap(QPixmap(":/images/flow1.png"));
opt1->addStretch();
opt1->addWidget(lOpt1);
vbox->addLayout(opt1);
QHBoxLayout * opt2 = new QHBoxLayout;
opt2->addWidget(radio2);
QLabel * lOpt2 = new QLabel();
lOpt2->setPixmap(QPixmap(":/images/flow2.png"));
opt2->addStretch();
opt2->addWidget(lOpt2);
vbox->addLayout(opt2);
QHBoxLayout * opt3 = new QHBoxLayout;
opt3->addWidget(radio3);
QLabel * lOpt3 = new QLabel();
lOpt3->setPixmap(QPixmap(":/images/flow3.png"));
opt3->addStretch();
opt3->addWidget(lOpt3);
vbox->addLayout(opt3);
//vbox->addStretch(1);
groupBox->setLayout(vbox);
QHBoxLayout * buttons = new QHBoxLayout();
buttons->addStretch();
buttons->addWidget(accept);
buttons->addWidget(cancel);
layout->addWidget(groupBox);
layout->addLayout(buttons);
setLayout(layout);
restoreOptions(); //load options
resize(200,0);
setModal (true);
setWindowTitle("Options");
}
void OptionsDialog::findFolder()
{
QString s = QFileDialog::getExistingDirectory(0,tr("Comics directory"),".");
if(!s.isEmpty())
{
pathEdit->setText(s);
}
}
void OptionsDialog::saveOptions()
{
QFile f(QCoreApplication::applicationDirPath()+"/YACReaderLibrary.conf");
if(!f.open(QIODevice::WriteOnly))
{
QMessageBox::critical(NULL,tr("Saving config file...."),tr("There was a problem saving YACReaderLibrary configuration. Please, check if you have enough permissions in the YACReader root folder."));
}
else
{
QTextStream txtS(&f);
if(radio1->isChecked())
{
txtS << "FLOW_TYPE" << "\n" << (int)PictureFlow::CoverFlowLike << "\n";
flowType = PictureFlow::CoverFlowLike;
}
if(radio2->isChecked())
{
txtS << "FLOW_TYPE" << "\n" << (int)PictureFlow::Strip << "\n";
flowType = PictureFlow::Strip;
}
if(radio3->isChecked())
{
txtS << "FLOW_TYPE" << "\n" << (int)PictureFlow::StripOverlapped << "\n";
flowType = PictureFlow::StripOverlapped;
}
f.close();
close();
emit(optionsChanged());
}
}
void OptionsDialog::restoreOptions()
{
QFile f(QCoreApplication::applicationDirPath()+"/YACReaderLibrary.conf");
if(f.exists())
{
f.open(QIODevice::ReadOnly);
QTextStream txtS(&f);
QString content = txtS.readAll();
QStringList lines = content.split('\n');
if(lines.count()>0){
QString name = lines.at(1);
switch(flowType=(PictureFlow::FlowType)name.toInt()){
case PictureFlow::CoverFlowLike:
radio1->setChecked(true);
break;
case PictureFlow::Strip:
radio2->setChecked(true);
break;
case PictureFlow::StripOverlapped:
radio3->setChecked(true);
break;
}
}
else
flowType=PictureFlow::Strip;
}
else
flowType=PictureFlow::Strip;
}

View File

@ -0,0 +1,50 @@
#ifndef __OPTIONS_DIALOG_H
#define __OPTIONS_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QSlider>
#include <QPushButton>
#include <QRadioButton>
#include "pictureflow.h"
extern PictureFlow::FlowType flowType;
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
OptionsDialog(QWidget * parent = 0);
private:
QLabel * pathLabel;
QLineEdit * pathEdit;
QPushButton * pathFindButton;
QLabel * magGlassSizeLabel;
QLabel * zoomLevel;
QLabel * slideSizeLabel;
QSlider * slideSize;
QPushButton * accept;
QPushButton * cancel;
QRadioButton *radio1;
QRadioButton *radio2;
QRadioButton *radio3;
public slots:
void saveOptions();
void restoreOptions();
void findFolder();
signals:
void optionsChanged();
};
#endif

View File

@ -0,0 +1,47 @@
#include "package_manager.h"
#include <QCoreApplication>
PackageManager::PackageManager()
:_7z(0)
{
}
void PackageManager::createPackage(const QString & libraryPath,const QString & dest)
{
QStringList attributes;
attributes << "a" << "-y" << "-ttar" << dest+".clc" << libraryPath ;
_7z = new QProcess();
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError)));
connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SIGNAL(exported()));
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7z",attributes);
}
void PackageManager::extractPackage(const QString & packagePath,const QString & destDir)
{
QStringList attributes;
QString output = "-o";
output += destDir;
attributes << "x" << "-y" << output << packagePath;
_7z = new QProcess();
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError)));
connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SIGNAL(imported()));
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7z",attributes);
}
void PackageManager::cancel()
{
if(_7z!=0)
{
_7z->disconnect();
_7z->kill();
if(creating)
{
//TODO remove dest+".clc"
}
else
{
//TODO fixed: is done by libraryWindow
}
}
}

View File

@ -0,0 +1,24 @@
#ifndef PACKAGE_MANAGER_H
#define PACKAGE_MANAGER_H
#include <QProcess>
class PackageManager : public QObject
{
Q_OBJECT
public:
PackageManager();
void createPackage(const QString & libraryPath,const QString & dest);
void extractPackage(const QString & packagePath,const QString & destDir);
public slots:
void cancel();
private:
bool creating;
QProcess * _7z;
signals:
void exported();
void imported();
};
#endif

View File

@ -0,0 +1,77 @@
#include "properties_dialog.h"
#include <QHBoxLayout>
#include <QApplication>
#include <QDesktopWidget>
PropertiesDialog::PropertiesDialog(QWidget * parent)
:QDialog(parent)
{
QVBoxLayout * l = new QVBoxLayout();
sa = new QScrollArea(this);
_cover = new QLabel(sa);
_cover->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
_cover->setScaledContents(true);
_cover->setAlignment(Qt::AlignTop|Qt::AlignHCenter);
sa->setWidget(_cover);
sa->setBackgroundRole(QPalette::Dark);
sa->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
sa->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
sa->setFrameStyle(QFrame::NoFrame);
sa->setAlignment(Qt::AlignCenter);
l->addWidget(sa);
QVBoxLayout * info = new QVBoxLayout();
info->addWidget(_name = new QLabel("name"));
info->addWidget(_pages = new QLabel("pages"));
info->addWidget(_size = new QLabel("size"));
info->setSizeConstraint(QLayout::SetMaximumSize);
l->addLayout(info);
this->setLayout(l);
this->setWindowTitle(tr("Comic properties"));
}
void PropertiesDialog::setCover(const QPixmap & cover)
{
_cover->setPixmap(cover);
float aspectRatio = (float)cover.width()/cover.height();
int heightDesktopResolution = QApplication::desktop()->screenGeometry().height();
int widthDesktopResolution = QApplication::desktop()->screenGeometry().width();
int sHeight,sWidth;
sHeight = static_cast<int>(heightDesktopResolution*0.84);
if(aspectRatio<1)
{
sWidth = static_cast<int>(sHeight*0.70);
this->resize(sWidth,sHeight);
this->move(QPoint((widthDesktopResolution-sWidth)/2,((heightDesktopResolution-sHeight)-40)/2));
_cover->resize(static_cast<int>((height()-90)*aspectRatio),
(height()-90));
}
else
{
sWidth = static_cast<int>(sHeight*1.10);
this->resize(sWidth,sHeight);
this->move(QPoint((widthDesktopResolution-sWidth)/2,((heightDesktopResolution-sHeight)-40)/2));
_cover->resize((width()-25),
static_cast<int>((width()-25)/aspectRatio));
}
}
void PropertiesDialog::setFilename(const QString & name)
{
_name->setText(tr("Name : ") + name);
}
void PropertiesDialog::setNumpages(int pages)
{
_pages->setText(tr("Number of pages : ") + QString::number(pages));
}
void PropertiesDialog::setSize(float size)
{
_size->setText(tr("Size : ") + QString::number(size,'f',2) + " MB");
}

View File

@ -0,0 +1,29 @@
#ifndef __PROPERTIES_DIALOG_H
#define __PROPERTIES_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QScrollArea>
class PropertiesDialog : public QDialog
{
Q_OBJECT
private:
QLabel * _cover;
QLabel * _name;
QLabel * _pages;
QLabel * _size;
QScrollArea * sa;
public:
PropertiesDialog(QWidget * parent = 0);
public slots:
void setCover(const QPixmap & cover);
void setFilename(const QString & name);
void setNumpages(int pages);
void setSize(float size);
};
#endif

View File

@ -0,0 +1,68 @@
#include "rename_library_dialog.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QFileDialog>
RenameLibraryDialog::RenameLibraryDialog(QWidget * parent)
:QDialog(parent)
{
setupUI();
}
void RenameLibraryDialog::setupUI()
{
newNameLabel = new QLabel(tr("New Library Name : "));
newNameEdit = new QLineEdit;
newNameLabel->setBuddy(newNameEdit);
accept = new QPushButton(tr("Rename"));
//accept->setDisabled(true);
connect(accept,SIGNAL(clicked()),this,SLOT(rename()));
cancel = new QPushButton(tr("Cancel"));
connect(cancel,SIGNAL(clicked()),this,SLOT(close()));
QHBoxLayout *nameLayout = new QHBoxLayout;
nameLayout->addWidget(newNameLabel);
nameLayout->addWidget(newNameEdit);
QHBoxLayout *bottomLayout = new QHBoxLayout;
bottomLayout->addStretch();
bottomLayout->addWidget(accept);
bottomLayout->addWidget(cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(nameLayout);
mainLayout->addStretch();
mainLayout->addLayout(bottomLayout);
QHBoxLayout * imgMainLayout = new QHBoxLayout;
QLabel * imgLabel = new QLabel(this);
QPixmap p(":/images/edit.png");
imgLabel->setPixmap(p);
imgMainLayout->addWidget(imgLabel);
imgMainLayout->addLayout(mainLayout);
setLayout(imgMainLayout);
setModal(true);
setWindowTitle(tr("Rename current library"));
}
void RenameLibraryDialog::rename()
{
//accept->setEnabled(false);
emit(renameLibrary(newNameEdit->text()));
close();
}
void RenameLibraryDialog::close()
{
newNameEdit->clear();
//accept->setEnabled(false);
QDialog::close();
}

View File

@ -0,0 +1,30 @@
#ifndef __RENAME_LIBRARY_DIALOG_H
#define __RENAME_LIBRARY_DIALOG_H
#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
class RenameLibraryDialog : public QDialog
{
Q_OBJECT
public:
RenameLibraryDialog(QWidget * parent = 0);
private:
QLabel * newNameLabel;
QLineEdit * newNameEdit;
QPushButton * accept;
QPushButton * cancel;
void setupUI();
public slots:
void rename();
void close();
signals:
void renameLibrary(QString newName);
};
#endif

Binary file not shown.

View File

@ -0,0 +1,522 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="es_ES">
<context>
<name>AddLibraryDialog</name>
<message>
<location filename="add_library_dialog.cpp" line="17"/>
<source>Comics folder : </source>
<translation>Carpeta de cómics:</translation>
</message>
<message>
<location filename="add_library_dialog.cpp" line="21"/>
<source>Library Name : </source>
<translation>Nombre de la librería:</translation>
</message>
<message>
<location filename="add_library_dialog.cpp" line="25"/>
<source>Add</source>
<translation>Añadir</translation>
</message>
<message>
<location filename="add_library_dialog.cpp" line="29"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="add_library_dialog.cpp" line="69"/>
<source>Add an existing library</source>
<translation>Añadir la librería existente</translation>
</message>
</context>
<context>
<name>CreateLibraryDialog</name>
<message>
<location filename="create_library_dialog.cpp" line="17"/>
<source>Comics folder : </source>
<translation>Carpeta de cómics:</translation>
</message>
<message>
<location filename="create_library_dialog.cpp" line="21"/>
<source>Library Name : </source>
<translation>Nombre de la libreria:</translation>
</message>
<message>
<location filename="create_library_dialog.cpp" line="25"/>
<source>Create</source>
<translation>Crear</translation>
</message>
<message>
<location filename="create_library_dialog.cpp" line="29"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="create_library_dialog.cpp" line="78"/>
<source>Create new library</source>
<translation>Crear la nueva librería</translation>
</message>
</context>
<context>
<name>ExportLibraryDialog</name>
<message>
<location filename="export_library_dialog.cpp" line="10"/>
<source>Output folder : </source>
<translation>Carpeta de destino:</translation>
</message>
<message>
<location filename="export_library_dialog.cpp" line="14"/>
<source>Create</source>
<translation>Crear</translation>
</message>
<message>
<location filename="export_library_dialog.cpp" line="18"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="export_library_dialog.cpp" line="53"/>
<source>Create covers package</source>
<translation>Crear paquete de portadas</translation>
</message>
<message>
<location filename="export_library_dialog.cpp" line="67"/>
<source>Destination directory</source>
<translation>Carpeta de destino</translation>
</message>
<message>
<location filename="export_library_dialog.cpp" line="93"/>
<source>Creating package .</source>
<translation>Creando paquete .</translation>
</message>
</context>
<context>
<name>HelpAboutDialog</name>
<message>
<location filename="../common/custom_widgets.cpp" line="31"/>
<source>About</source>
<translation>Acerca de</translation>
</message>
<message>
<location filename="../common/custom_widgets.cpp" line="34"/>
<source>Help</source>
<translation>Ayuda</translation>
</message>
</context>
<context>
<name>ImportLibraryDialog</name>
<message>
<source>Comics folder : </source>
<translation type="obsolete">Carpeta de cómics:</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="17"/>
<source>Library Name : </source>
<translation>Nombre de la biblioteca :</translation>
</message>
<message>
<source>Add</source>
<translation type="obsolete">Añadir</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="22"/>
<source>Package location : </source>
<translation>Ubicación del paquete:</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="26"/>
<source>Destination folder : </source>
<translation>Directorio de destino:</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="30"/>
<source>Unpack</source>
<translation>Desempaquetar</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="34"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="87"/>
<source>Extract a catalog</source>
<translation>Extraer un catálogo</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="103"/>
<source>Compresed library covers (*.clc)</source>
<translation>Compresed library covers (*.clc)</translation>
</message>
<message>
<location filename="import_library_dialog.cpp" line="153"/>
<source>Importing package .</source>
<translation>Importando paquete.</translation>
</message>
</context>
<context>
<name>LibraryWindow</name>
<message>
<location filename="library_window.cpp" line="80"/>
<source>Select a library:</source>
<translation>Seleciona una biblioteca:</translation>
</message>
<message>
<location filename="library_window.cpp" line="92"/>
<source>Clear</source>
<translation>Borrar</translation>
</message>
<message>
<location filename="library_window.cpp" line="94"/>
<source>Search folders/comics</source>
<translation>Buscar directorios/cómics</translation>
</message>
<message>
<location filename="library_window.cpp" line="97"/>
<source>Include files (slower)</source>
<translation>Incluir archivos (lento)</translation>
</message>
<message>
<location filename="library_window.cpp" line="161"/>
<source>&lt;font color=&apos;white&apos;&gt; press &apos;F&apos; to close fullscreen mode &lt;/font&gt;</source>
<translation>&lt;font color=&apos;white&apos;&gt; presiona &apos;F&apos; para salir de pantalla completa &lt;/font&gt;</translation>
</message>
<message>
<location filename="library_window.cpp" line="177"/>
<source>YACReader Library</source>
<translation>YACReader Library</translation>
</message>
<message>
<location filename="library_window.cpp" line="183"/>
<source>Create a new library</source>
<translation>Crear una nueva biblioteca</translation>
</message>
<message>
<location filename="library_window.cpp" line="188"/>
<source>Open an existing library</source>
<translation>Abrir una biblioteca existente</translation>
</message>
<message>
<location filename="library_window.cpp" line="193"/>
<source>Pack the covers of the selected library</source>
<translation>Empaquetar las portadas de la biblioteca seleccionada</translation>
</message>
<message>
<location filename="library_window.cpp" line="197"/>
<source>Unpack a catalog</source>
<translation>Desempaquetar un catálogo</translation>
</message>
<message>
<location filename="library_window.cpp" line="201"/>
<source>Update current library</source>
<translation>Actualizar la librería seleccionada</translation>
</message>
<message>
<location filename="library_window.cpp" line="206"/>
<source>Rename current library</source>
<translation>Renombrar la libreria seleccionada</translation>
</message>
<message>
<location filename="library_window.cpp" line="211"/>
<source>Delete current library from disk</source>
<translation>Borrar la libería seleccionada del disco</translation>
</message>
<message>
<location filename="library_window.cpp" line="215"/>
<source>Remove current library from your collection</source>
<translation>Eliminar librería de la colección</translation>
</message>
<message>
<location filename="library_window.cpp" line="219"/>
<source>Open current comic on YACReader</source>
<translation>Abrir el cómic actual en YACReader</translation>
</message>
<message>
<location filename="library_window.cpp" line="223"/>
<source>Set as read</source>
<translation>Marcar como leído</translation>
</message>
<message>
<location filename="library_window.cpp" line="224"/>
<source>Set comic as read</source>
<translation>Marcar cómic como leído</translation>
</message>
<message>
<location filename="library_window.cpp" line="227"/>
<source>Set as unread</source>
<translation>Marcar como no leído</translation>
</message>
<message>
<location filename="library_window.cpp" line="228"/>
<source>Set comic as unread</source>
<translation>Marcar cómic como no leído</translation>
</message>
<message>
<location filename="library_window.cpp" line="231"/>
<source>Set all as read</source>
<translation>Marcar todos como leídos</translation>
</message>
<message>
<location filename="library_window.cpp" line="232"/>
<source>Set all comics as read</source>
<translation>Marcar todos los cómics como leídos</translation>
</message>
<message>
<location filename="library_window.cpp" line="235"/>
<source>Set all as unread</source>
<translation>Marcar todos como no leídos</translation>
</message>
<message>
<location filename="library_window.cpp" line="236"/>
<source>Set all comics as unread</source>
<translation>Marcar todos los cómics como no leídos</translation>
</message>
<message>
<location filename="library_window.cpp" line="239"/>
<source>Show/Hide marks</source>
<translation>Mostrar/Ocultar marcas</translation>
</message>
<message>
<location filename="library_window.cpp" line="240"/>
<source>Show or hide readed marks</source>
<translation>Mostrar u ocultar marcas</translation>
</message>
<message>
<location filename="library_window.cpp" line="248"/>
<source>Show properties of current comic</source>
<translation>Mostrar las propiedades del cómic actual</translation>
</message>
<message>
<location filename="library_window.cpp" line="253"/>
<source>Fullscreen mode on/off (F)</source>
<translation>Activar/desactivar modo a pantalla completa (F)</translation>
</message>
<message>
<location filename="library_window.cpp" line="258"/>
<source>Help, About YACReader</source>
<translation>Ayuda, A cerca de... YACReader</translation>
</message>
<message>
<location filename="library_window.cpp" line="263"/>
<source>Select root node</source>
<translation>Seleccionar el nodo raíz</translation>
</message>
<message>
<location filename="library_window.cpp" line="267"/>
<source>Expand all nodes</source>
<translation>Expandir todos los nodos</translation>
</message>
<message>
<location filename="library_window.cpp" line="271"/>
<source>Colapse all nodes</source>
<translation>Contraer todos los nodos</translation>
</message>
<message>
<location filename="library_window.cpp" line="275"/>
<source>Show options dialog</source>
<translation>Mostrar opciones</translation>
</message>
<message>
<location filename="library_window.cpp" line="291"/>
<source>Open folder...</source>
<translation>Abrir carpeta...</translation>
</message>
<message>
<location filename="library_window.cpp" line="295"/>
<source>Open containing folder...</source>
<translation>Abrir carpeta contenedora...</translation>
</message>
<message>
<location filename="library_window.cpp" line="301"/>
<source>Library</source>
<translation>Librería</translation>
</message>
<message>
<location filename="library_window.cpp" line="807"/>
<source>Saving libraries file....</source>
<translation>Guardando bibliotecas...</translation>
</message>
<message>
<location filename="library_window.cpp" line="807"/>
<source>There was a problem saving YACReaderLibrary libraries file. Please, check if you have enough permissions in the YACReader root folder.</source>
<translation>Hubo un problema al guardar las bibliotecas de YACReaderLibrary. Por favor, comprueba si tienes suficientes permisos en el directorio raíz de YACReader.</translation>
</message>
<message>
<location filename="library_window.cpp" line="840"/>
<location filename="library_window.cpp" line="868"/>
<source>Are you sure?</source>
<translation>¿Estás seguro?</translation>
</message>
<message>
<location filename="library_window.cpp" line="840"/>
<source>Do you want delete </source>
<translation>¿Deseas borrar </translation>
</message>
<message>
<location filename="library_window.cpp" line="868"/>
<source>Do you want remove </source>
<translation>¿Deseas eliminar </translation>
</message>
<message>
<location filename="library_window.cpp" line="868"/>
<source> library?
Files won&apos;t be erased from disk.</source>
<translation>? Los archivos no serán borrados del disco.</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="options_dialog.cpp" line="19"/>
<source>Save</source>
<translation>Guardar</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="20"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="25"/>
<source>How to show covers:</source>
<translation>Cómo mostrar las portadas:</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="27"/>
<source>CoverFlow look</source>
<translation></translation>
</message>
<message>
<location filename="options_dialog.cpp" line="28"/>
<source>Stripe look</source>
<translation></translation>
</message>
<message>
<location filename="options_dialog.cpp" line="29"/>
<source>Overlapped Stripe look</source>
<oldsource>Overlaped Stripe look</oldsource>
<translation></translation>
</message>
<message>
<source>Restart is needed</source>
<translation type="obsolete">Es necesario reiniciar</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="79"/>
<source>Comics directory</source>
<translation>Directorio de cómics</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="91"/>
<source>Saving config file....</source>
<translatorcomment>Hubo un problema al guardar la configuración de YACReaderLibrary. Por favor, comprueba si tienes suficientes permisos en el directorio raíz de YACReader.</translatorcomment>
<translation>Guardando archivo de configuración...</translation>
</message>
<message>
<location filename="options_dialog.cpp" line="91"/>
<source>There was a problem saving YACReaderLibrary configuration. Please, check if you have enough permissions in the YACReader root folder.</source>
<translation></translation>
</message>
</context>
<context>
<name>PropertiesDialog</name>
<message>
<location filename="properties_dialog.cpp" line="36"/>
<source>Comic properties</source>
<translation>Propiedades del cómic</translation>
</message>
<message>
<location filename="properties_dialog.cpp" line="67"/>
<source>Name : </source>
<translation>Nombre : </translation>
</message>
<message>
<location filename="properties_dialog.cpp" line="71"/>
<source>Number of pages : </source>
<translation>Número de páginas : </translation>
</message>
<message>
<location filename="properties_dialog.cpp" line="76"/>
<source>Size : </source>
<translation>Tamaño : </translation>
</message>
</context>
<context>
<name>QPushButton</name>
<message>
<source>Hello world!</source>
<translation type="obsolete">Hola mundo!</translation>
</message>
</context>
<context>
<name>RenameLibraryDialog</name>
<message>
<location filename="rename_library_dialog.cpp" line="17"/>
<source>New Library Name : </source>
<translation>Nombre de la nueva librería :</translation>
</message>
<message>
<location filename="rename_library_dialog.cpp" line="21"/>
<source>Rename</source>
<translation>Renombrar</translation>
</message>
<message>
<location filename="rename_library_dialog.cpp" line="25"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="rename_library_dialog.cpp" line="53"/>
<source>Rename current library</source>
<translation>Renombrar la libreria seleccionada</translation>
</message>
</context>
<context>
<name>ThumbnailCreator</name>
<message>
<source>7z not found</source>
<translation type="obsolete">7z no encontrado</translation>
</message>
<message>
<source>7z wasn&apos;t found in your PATH.</source>
<translation type="obsolete">7z no ha sido encontrado en tu PATH.</translation>
</message>
<message>
<source>7z crashed</source>
<translation type="obsolete">fallo en 7z</translation>
</message>
<message>
<source>7z crashed.</source>
<translation type="obsolete">fallo en 7z.</translation>
</message>
<message>
<source>7z reading</source>
<translation type="obsolete">Leyendo de 7z</translation>
</message>
<message>
<source>problem reading from 7z</source>
<translation type="obsolete">Problema lenyendo de 7z</translation>
</message>
<message>
<source>7z problem</source>
<translation type="obsolete">Problema en 7z</translation>
</message>
<message>
<source>Unknown error 7z</source>
<translation type="obsolete">Error desconocido en 7z</translation>
</message>
</context>
<context>
<name>UpdateLibraryDialog</name>
<message>
<location filename="create_library_dialog.cpp" line="118"/>
<source>Updating....</source>
<translation>Actualizado...</translation>
</message>
<message>
<location filename="create_library_dialog.cpp" line="123"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
</context>
</TS>