mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
merge
This commit is contained in:
commit
24391fe05c
@ -8,10 +8,13 @@
|
|||||||
<file>../images/new.png</file>
|
<file>../images/new.png</file>
|
||||||
<file>../images/openLibrary.png</file>
|
<file>../images/openLibrary.png</file>
|
||||||
<file>../images/removeLibrary.png</file>
|
<file>../images/removeLibrary.png</file>
|
||||||
|
<file>../images/removeLibraryIcon.png</file>
|
||||||
<file>../images/updateLibrary.png</file>
|
<file>../images/updateLibrary.png</file>
|
||||||
|
<file>../images/updateLibraryIcon.png</file>
|
||||||
<file>../images/comicFolder.png</file>
|
<file>../images/comicFolder.png</file>
|
||||||
<file>../images/notCover.png</file>
|
<file>../images/notCover.png</file>
|
||||||
<file>../images/edit.png</file>
|
<file>../images/edit.png</file>
|
||||||
|
<file>../images/editIcon.png</file>
|
||||||
<file>../images/fit.png</file>
|
<file>../images/fit.png</file>
|
||||||
<file>../images/properties.png</file>
|
<file>../images/properties.png</file>
|
||||||
<file>../images/options.png</file>
|
<file>../images/options.png</file>
|
||||||
@ -21,7 +24,9 @@
|
|||||||
<file>../images/flow4.png</file>
|
<file>../images/flow4.png</file>
|
||||||
<file>../images/flow5.png</file>
|
<file>../images/flow5.png</file>
|
||||||
<file>../images/importLibrary.png</file>
|
<file>../images/importLibrary.png</file>
|
||||||
|
<file>../images/importLibraryIcon.png</file>
|
||||||
<file>../images/exportLibrary.png</file>
|
<file>../images/exportLibrary.png</file>
|
||||||
|
<file>../images/exportLibraryIcon.png</file>
|
||||||
<file>../images/open.png</file>
|
<file>../images/open.png</file>
|
||||||
<file>../images/coversPackage.png</file>
|
<file>../images/coversPackage.png</file>
|
||||||
<file>../images/setRead.png</file>
|
<file>../images/setRead.png</file>
|
||||||
@ -35,6 +40,8 @@
|
|||||||
<file>../images/hideComicFlow.png</file>
|
<file>../images/hideComicFlow.png</file>
|
||||||
<file>../images/exportComicsInfo.png</file>
|
<file>../images/exportComicsInfo.png</file>
|
||||||
<file>../images/importComicsInfo.png</file>
|
<file>../images/importComicsInfo.png</file>
|
||||||
|
<file>../images/exportComicsInfoIcon.png</file>
|
||||||
|
<file>../images/importComicsInfoIcon.png</file>
|
||||||
<file>../images/db.png</file>
|
<file>../images/db.png</file>
|
||||||
<file>../images/asignNumber.png</file>
|
<file>../images/asignNumber.png</file>
|
||||||
<file>../images/defaultCover.png</file>
|
<file>../images/defaultCover.png</file>
|
||||||
@ -90,7 +97,6 @@
|
|||||||
<file>../images/collapsed_branch_osx.png</file>
|
<file>../images/collapsed_branch_osx.png</file>
|
||||||
<file>../images/expanded_branch_osx.png</file>
|
<file>../images/expanded_branch_osx.png</file>
|
||||||
<file>../images/folder_macosx.png</file>
|
<file>../images/folder_macosx.png</file>
|
||||||
|
|
||||||
<file>../images/libraryIconSelected.png</file>
|
<file>../images/libraryIconSelected.png</file>
|
||||||
<file>../images/libraryOptions.png</file>
|
<file>../images/libraryOptions.png</file>
|
||||||
<file>../images/branch-open.png</file>
|
<file>../images/branch-open.png</file>
|
||||||
|
@ -330,33 +330,33 @@ void LibraryWindow::createActions()
|
|||||||
|
|
||||||
exportComicsInfo = new QAction(tr("Export comics info"),this);
|
exportComicsInfo = new QAction(tr("Export comics info"),this);
|
||||||
exportComicsInfo->setToolTip(tr("Export comics info"));
|
exportComicsInfo->setToolTip(tr("Export comics info"));
|
||||||
exportComicsInfo->setIcon(QIcon(":/images/exportComicsInfo.png"));
|
exportComicsInfo->setIcon(QIcon(":/images/exportComicsInfoIcon.png"));
|
||||||
|
|
||||||
importComicsInfo = new QAction(tr("Import comics info"),this);
|
importComicsInfo = new QAction(tr("Import comics info"),this);
|
||||||
importComicsInfo->setToolTip(tr("Import comics info"));
|
importComicsInfo->setToolTip(tr("Import comics info"));
|
||||||
importComicsInfo->setIcon(QIcon(":/images/importComicsInfo.png"));
|
importComicsInfo->setIcon(QIcon(":/images/importComicsInfoIcon.png"));
|
||||||
|
|
||||||
exportLibraryAction = new QAction(tr("Pack covers"),this);
|
exportLibraryAction = new QAction(tr("Pack covers"),this);
|
||||||
exportLibraryAction->setToolTip(tr("Pack the covers of the selected library"));
|
exportLibraryAction->setToolTip(tr("Pack the covers of the selected library"));
|
||||||
exportLibraryAction->setIcon(QIcon(":/images/exportLibrary.png"));
|
exportLibraryAction->setIcon(QIcon(":/images/exportLibraryIcon.png"));
|
||||||
|
|
||||||
importLibraryAction = new QAction(tr("Unpack covers"),this);
|
importLibraryAction = new QAction(tr("Unpack covers"),this);
|
||||||
importLibraryAction->setToolTip(tr("Unpack a catalog"));
|
importLibraryAction->setToolTip(tr("Unpack a catalog"));
|
||||||
importLibraryAction->setIcon(QIcon(":/images/importLibrary.png"));
|
importLibraryAction->setIcon(QIcon(":/images/importLibraryIcon.png"));
|
||||||
|
|
||||||
updateLibraryAction = new QAction(tr("Update library"),this);
|
updateLibraryAction = new QAction(tr("Update library"),this);
|
||||||
updateLibraryAction->setToolTip(tr("Update current library"));
|
updateLibraryAction->setToolTip(tr("Update current library"));
|
||||||
updateLibraryAction->setShortcut(Qt::Key_U);
|
updateLibraryAction->setShortcut(Qt::Key_U);
|
||||||
updateLibraryAction->setIcon(QIcon(":/images/updateLibrary.png"));
|
updateLibraryAction->setIcon(QIcon(":/images/updateLibraryIcon.png"));
|
||||||
|
|
||||||
renameLibraryAction = new QAction(tr("Rename library"),this);
|
renameLibraryAction = new QAction(tr("Rename library"),this);
|
||||||
renameLibraryAction->setToolTip(tr("Rename current library"));
|
renameLibraryAction->setToolTip(tr("Rename current library"));
|
||||||
renameLibraryAction->setShortcut(Qt::Key_R);
|
renameLibraryAction->setShortcut(Qt::Key_R);
|
||||||
renameLibraryAction->setIcon(QIcon(":/images/edit.png"));
|
renameLibraryAction->setIcon(QIcon(":/images/editIcon.png"));
|
||||||
|
|
||||||
removeLibraryAction = new QAction(tr("Remove library"),this);
|
removeLibraryAction = new QAction(tr("Remove library"),this);
|
||||||
removeLibraryAction->setToolTip(tr("Remove current library from your collection"));
|
removeLibraryAction->setToolTip(tr("Remove current library from your collection"));
|
||||||
removeLibraryAction->setIcon(QIcon(":/images/removeLibrary.png"));
|
removeLibraryAction->setIcon(QIcon(":/images/removeLibraryIcon.png"));
|
||||||
|
|
||||||
openComicAction = new QAction(tr("Open current comic"),this);
|
openComicAction = new QAction(tr("Open current comic"),this);
|
||||||
openComicAction->setToolTip(tr("Open current comic on YACReader"));
|
openComicAction->setToolTip(tr("Open current comic on YACReader"));
|
||||||
@ -1148,6 +1148,8 @@ void LibraryWindow::loadLibraries()
|
|||||||
{
|
{
|
||||||
disableAllActions();
|
disableAllActions();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
selectedLibrary->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::saveLibraries()
|
void LibraryWindow::saveLibraries()
|
||||||
|
@ -4,9 +4,10 @@
|
|||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include "qnaturalsorting.h"
|
||||||
|
|
||||||
YACReaderLibraryListWidget::YACReaderLibraryListWidget(QWidget *parent) :
|
YACReaderLibraryListWidget::YACReaderLibraryListWidget(QWidget *parent) :
|
||||||
QWidget(parent),currentLibraryIndex(0)
|
QWidget(parent),currentLibraryIndex(-1)
|
||||||
{
|
{
|
||||||
QVBoxLayout * mainLayout = new QVBoxLayout;
|
QVBoxLayout * mainLayout = new QVBoxLayout;
|
||||||
mainLayout->setSpacing(0);
|
mainLayout->setSpacing(0);
|
||||||
@ -21,19 +22,17 @@ void YACReaderLibraryListWidget::addItem(QString name, QString path)
|
|||||||
|
|
||||||
YACReaderLibraryItemWidget * library = new YACReaderLibraryItemWidget(name,path,this);
|
YACReaderLibraryItemWidget * library = new YACReaderLibraryItemWidget(name,path,this);
|
||||||
connect(library,SIGNAL(showOptions()),this,SLOT(showContextMenu()));
|
connect(library,SIGNAL(showOptions()),this,SLOT(showContextMenu()));
|
||||||
librariesList.append(library);
|
QList<YACReaderLibraryItemWidget *>::iterator itr;
|
||||||
|
int i = 0;
|
||||||
|
for(itr = librariesList.begin(); itr!=librariesList.end() && !naturalSortLessThanCI(name,(*itr)->name);itr++)
|
||||||
|
i++;
|
||||||
|
|
||||||
connect(library,SIGNAL(selected(QString,QString)),this,SIGNAL(librarySelected(QString,QString)));
|
librariesList.insert(itr,library);
|
||||||
|
|
||||||
|
//connect(library,SIGNAL(selected(QString,QString)),this,SIGNAL(librarySelected(QString,QString)));
|
||||||
connect(library,SIGNAL(selected(QString,QString)),this,SLOT(updateLibraries(QString,QString)));
|
connect(library,SIGNAL(selected(QString,QString)),this,SLOT(updateLibraries(QString,QString)));
|
||||||
|
|
||||||
mainLayout->addWidget(library);
|
mainLayout->insertWidget(i,library);
|
||||||
|
|
||||||
//first item added
|
|
||||||
if(librariesList.count()==1)
|
|
||||||
{
|
|
||||||
library->select();
|
|
||||||
emit currentIndexChanged(name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString YACReaderLibraryListWidget::currentText()
|
QString YACReaderLibraryListWidget::currentText()
|
||||||
@ -55,6 +54,7 @@ void YACReaderLibraryListWidget::setCurrentIndex(int index)
|
|||||||
librariesList.at(index)->select();
|
librariesList.at(index)->select();
|
||||||
currentLibraryIndex = index;
|
currentLibraryIndex = index;
|
||||||
deselectAllBut(index);
|
deselectAllBut(index);
|
||||||
|
emit currentIndexChanged(librariesList.at(currentLibraryIndex)->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,6 @@ void YACReaderLibraryListWidget::removeItem(int index)
|
|||||||
if(librariesList.count()>0)
|
if(librariesList.count()>0)
|
||||||
{
|
{
|
||||||
setCurrentIndex(0);
|
setCurrentIndex(0);
|
||||||
emit currentIndexChanged(librariesList.at(0)->name);
|
|
||||||
}
|
}
|
||||||
delete itemWidget;
|
delete itemWidget;
|
||||||
}
|
}
|
||||||
@ -81,9 +80,10 @@ void YACReaderLibraryListWidget::mousePressEvent ( QMouseEvent * event )
|
|||||||
{
|
{
|
||||||
int h = librariesList.at(0)->height();
|
int h = librariesList.at(0)->height();
|
||||||
int item = event->pos().y() / h;
|
int item = event->pos().y() / h;
|
||||||
//deselectAllBut(item);
|
if(item!=currentLibraryIndex)
|
||||||
setCurrentIndex(item);
|
{
|
||||||
emit currentIndexChanged(librariesList.at(item)->name);
|
setCurrentIndex(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user