new icons for YACReader

This commit is contained in:
Luis Ángel San Martín 2013-06-23 20:51:07 +02:00
parent a2ec088e6f
commit 66b6b4d52f
52 changed files with 138 additions and 27 deletions

View File

@ -102,6 +102,11 @@ include(../custom_widgets/custom_widgets.pri)
RESOURCES += images.qrc \
files.qrc
win32:RESOURCES += images_win.qrc
unix:!macx:RESOURCES += images_win.qrc
macx:RESOURCES += images_osx.qrc
RC_FILE = icon.rc
macx {

28
YACReader/images_osx.qrc Normal file
View File

@ -0,0 +1,28 @@
<RCC>
<qresource prefix="/" >
<file alias="images/viewer_toolbar/bookmark.png>../images/viewer_toolbar/bookmark_osx.png</file>
<file alias="images/viewer_toolbar/close.png>../images/viewer_toolbar/close_osx.png</file>
<file alias="images/viewer_toolbar/doublePage.png>../images/viewer_toolbar/doublePage_osx.png</file>
<file alias="images/viewer_toolbar/flow.png>../images/viewer_toolbar/flow_osx.png</file>
<file alias="images/viewer_toolbar/full.png>../images/viewer_toolbar/full_osx.png</file>
<file alias="images/viewer_toolbar/goto.png>../images/viewer_toolbar/goto_osx.png</file>
<file alias="images/viewer_toolbar/help.png>../images/viewer_toolbar/help_osx.png</file>
<file alias="images/viewer_toolbar/info.png>../images/viewer_toolbar/info_osx.png</file>
<file alias="images/viewer_toolbar/magnifyingGlass.png>../images/viewer_toolbar/magnifyingGlass_osx.png</file>
<file alias="images/viewer_toolbar/next.png>../images/viewer_toolbar/next_osx.png</file>
<file alias="images/viewer_toolbar/open.png>../images/viewer_toolbar/open_osx.png</file>
<file alias="images/viewer_toolbar/openFolder.png>../images/viewer_toolbar/openFolder_osx.png</file>
<file alias="images/viewer_toolbar/openNext.png>../images/viewer_toolbar/openNext_osx.png</file>
<file alias="images/viewer_toolbar/openPrevious.png>../images/viewer_toolbar/openPrevious_osx.png</file>
<file alias="images/viewer_toolbar/options.png>../images/viewer_toolbar/options_osx.png</file>
<file alias="images/viewer_toolbar/previous.png>../images/viewer_toolbar/previous_osx.png</file>
<file alias="images/viewer_toolbar/rotateL.png>../images/viewer_toolbar/rotateL_osx.png</file>
<file alias="images/viewer_toolbar/rotateR.png>../images/viewer_toolbar/rotateR_osx.png</file>
<file alias="images/viewer_toolbar/save.png>../images/viewer_toolbar/save_osx.png</file>
<file alias="images/viewer_toolbar/shortcuts.png>../images/viewer_toolbar/shortcuts_osx.png</file>
<file alias="images/viewer_toolbar/showBookmarks.png>../images/viewer_toolbar/showBookmarks_osx.png</file>
<file alias="images/viewer_toolbar/toHeight.png>../images/viewer_toolbar/toHeight_osx.png</file>
<file alias="images/viewer_toolbar/toWidth.png>../images/viewer_toolbar/toWidth_osx.png</file>
<file alias="images/viewer_toolbar/translator.png>../images/viewer_toolbar/translator_osx.png</file>
</qresource>
</RCC>

28
YACReader/images_win.qrc Normal file
View File

@ -0,0 +1,28 @@
<RCC>
<qresource prefix="/" >
<file>../images/viewer_toolbar/bookmark.png</file>
<file>../images/viewer_toolbar/close.png</file>
<file>../images/viewer_toolbar/doublePage.png</file>
<file>../images/viewer_toolbar/flow.png</file>
<file>../images/viewer_toolbar/full.png</file>
<file>../images/viewer_toolbar/goto.png</file>
<file>../images/viewer_toolbar/help.png</file>
<file>../images/viewer_toolbar/info.png</file>
<file>../images/viewer_toolbar/magnifyingGlass.png</file>
<file>../images/viewer_toolbar/next.png</file>
<file>../images/viewer_toolbar/open.png</file>
<file>../images/viewer_toolbar/openFolder.png</file>
<file>../images/viewer_toolbar/openNext.png</file>
<file>../images/viewer_toolbar/openPrevious.png</file>
<file>../images/viewer_toolbar/options.png</file>
<file>../images/viewer_toolbar/previous.png</file>
<file>../images/viewer_toolbar/rotateL.png</file>
<file>../images/viewer_toolbar/rotateR.png</file>
<file>../images/viewer_toolbar/save.png</file>
<file>../images/viewer_toolbar/shortcuts.png</file>
<file>../images/viewer_toolbar/showBookmarks.png</file>
<file>../images/viewer_toolbar/toHeight.png</file>
<file>../images/viewer_toolbar/toWidth.png</file>
<file>../images/viewer_toolbar/translator.png</file>
</qresource>
</RCC>

View File

@ -134,76 +134,84 @@ void MainWindowViewer::createActions()
{
openAction = new QAction(tr("&Open"),this);
openAction->setShortcut(tr("O"));
openAction->setIcon(QIcon(":/images/open.png"));
openAction->setIcon(QIcon(":/images/viewer_toolbar/open.png"));
openAction->setToolTip(tr("Open a comic"));
connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
openFolderAction = new QAction(tr("Open Folder"),this);
openFolderAction->setShortcut(tr("Ctrl+O"));
openFolderAction->setIcon(QIcon(":/images/openFolder.png"));
openFolderAction->setIcon(QIcon(":/images/viewer_toolbar/openFolder.png"));
openFolderAction->setToolTip(tr("Open image folder"));
connect(openFolderAction, SIGNAL(triggered()), this, SLOT(openFolder()));
saveImageAction = new QAction(tr("Save"),this);
saveImageAction->setIcon(QIcon(":/images/save.png"));
saveImageAction->setIcon(QIcon(":/images/viewer_toolbar/save.png"));
saveImageAction->setToolTip(tr("Save current page"));
saveImageAction->setDisabled(true);
connect(saveImageAction,SIGNAL(triggered()),this,SLOT(saveImage()));
openPreviousComicAction = new QAction(tr("Previous Comic"),this);
openPreviousComicAction->setIcon(QIcon(":/images/previousComic.png"));
openPreviousComicAction->setIcon(QIcon(":/images/viewer_toolbar/openPrevious.png"));
openPreviousComicAction->setShortcut(Qt::CTRL + Qt::Key_Left);
openPreviousComicAction->setToolTip(tr("Open previous comic"));
openPreviousComicAction->setDisabled(true);
connect(openPreviousComicAction,SIGNAL(triggered()),this,SLOT(openPreviousComic()));
openNextComicAction = new QAction(tr("Next Comic"),this);
openNextComicAction->setIcon(QIcon(":/images/nextComic.png"));
openNextComicAction->setIcon(QIcon(":/images/viewer_toolbar/openNext.png"));
openNextComicAction->setShortcut(Qt::CTRL + Qt::Key_Right);
openNextComicAction->setToolTip(tr("Open next comic"));
openNextComicAction->setDisabled(true);
connect(openNextComicAction,SIGNAL(triggered()),this,SLOT(openNextComic()));
prevAction = new QAction(tr("&Previous"),this);
prevAction->setIcon(QIcon(":/images/prev.png"));
prevAction->setIcon(QIcon(":/images/viewer_toolbar/previous.png"));
prevAction->setShortcut(Qt::Key_Left);
prevAction->setToolTip(tr("Go to previous page"));
prevAction->setDisabled(true);
connect(prevAction, SIGNAL(triggered()),viewer,SLOT(prev()));
nextAction = new QAction(tr("&Next"),this);
nextAction->setIcon(QIcon(":/images/next.png"));
nextAction->setIcon(QIcon(":/images/viewer_toolbar/next.png"));
nextAction->setShortcut(Qt::Key_Right);
nextAction->setToolTip(tr("Go to next page"));
nextAction->setDisabled(true);
connect(nextAction, SIGNAL(triggered()),viewer,SLOT(next()));
adjustHeight = new QAction(tr("Fit Width"),this);
adjustHeight->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png"));
//adjustWidth->setCheckable(true);
adjustHeight->setDisabled(true);
adjustHeight->setChecked(Configuration::getConfiguration().getAdjustToWidth());
adjustHeight->setToolTip(tr("Fit image to ..."));
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
connect(adjustHeight, SIGNAL(triggered()),this,SLOT(fitToHeight()));
adjustWidth = new QAction(tr("Fit Width"),this);
adjustWidth->setShortcut(tr("A"));
adjustWidth->setIcon(QIcon(":/images/fit.png"));
adjustWidth->setCheckable(true);
adjustWidth->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png"));
//adjustWidth->setCheckable(true);
adjustWidth->setDisabled(true);
adjustWidth->setChecked(Configuration::getConfiguration().getAdjustToWidth());
adjustWidth->setToolTip(tr("Fit image to ..."));
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
connect(adjustWidth, SIGNAL(triggered()),this,SLOT(changeFit()));
connect(adjustWidth, SIGNAL(triggered()),this,SLOT(fitToWidth()));
leftRotationAction = new QAction(tr("Rotate image to the left"),this);
leftRotationAction->setShortcut(tr("L"));
leftRotationAction->setIcon(QIcon(":/images/rotateL.png"));
leftRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateL.png"));
leftRotationAction->setDisabled(true);
connect(leftRotationAction, SIGNAL(triggered()),viewer,SLOT(rotateLeft()));
rightRotationAction = new QAction(tr("Rotate image to the right"),this);
rightRotationAction->setShortcut(tr("R"));
rightRotationAction->setIcon(QIcon(":/images/rotateR.png"));
rightRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateR.png"));
rightRotationAction->setDisabled(true);
connect(rightRotationAction, SIGNAL(triggered()),viewer,SLOT(rotateRight()));
doublePageAction = new QAction(tr("Double page mode"),this);
doublePageAction->setToolTip(tr("Switch to double page mode"));
doublePageAction->setShortcut(tr("D"));
doublePageAction->setIcon(QIcon(":/images/doublePage.png"));
doublePageAction->setIcon(QIcon(":/images/viewer_toolbar/doublePage.png"));
doublePageAction->setDisabled(true);
doublePageAction->setCheckable(true);
doublePageAction->setChecked(Configuration::getConfiguration().getDoublePage());
@ -211,7 +219,7 @@ void MainWindowViewer::createActions()
goToPage = new QAction(tr("Go To"),this);
goToPage->setShortcut(tr("G"));
goToPage->setIcon(QIcon(":/images/goto.png"));
goToPage->setIcon(QIcon(":/images/viewer_toolbar/goto.png"));
goToPage->setDisabled(true);
goToPage->setToolTip(tr("Go to page ..."));
connect(goToPage, SIGNAL(triggered()),viewer,SLOT(showGoToDialog()));
@ -219,20 +227,20 @@ void MainWindowViewer::createActions()
optionsAction = new QAction(tr("Options"),this);
optionsAction->setShortcut(tr("C"));
optionsAction->setToolTip(tr("YACReader options"));
optionsAction->setIcon(QIcon(":/images/options.png"));
optionsAction->setIcon(QIcon(":/images/viewer_toolbar/options.png"));
connect(optionsAction, SIGNAL(triggered()),optionsDialog,SLOT(show()));
helpAboutAction = new QAction(tr("Help"),this);
helpAboutAction->setToolTip(tr("Help, About YACReader"));
helpAboutAction->setShortcut(Qt::Key_F1);
helpAboutAction->setIcon(QIcon(":/images/help.png"));
helpAboutAction->setIcon(QIcon(":/images/viewer_toolbar/help.png"));
connect(helpAboutAction, SIGNAL(triggered()),had,SLOT(show()));
showMagnifyingGlass = new QAction(tr("Magnifying glass"),this);
showMagnifyingGlass->setToolTip(tr("Switch Magnifying glass"));
showMagnifyingGlass->setShortcut(tr("Z"));
showMagnifyingGlass->setIcon(QIcon(":/images/zoom.png"));
showMagnifyingGlass->setIcon(QIcon(":/images/viewer_toolbar/magnifyingGlass.png"));
showMagnifyingGlass->setDisabled(true);
showMagnifyingGlass->setCheckable(true);
connect(showMagnifyingGlass, SIGNAL(triggered()),viewer,SLOT(magnifyingGlassSwitch()));
@ -240,7 +248,7 @@ void MainWindowViewer::createActions()
setBookmark = new QAction(tr("Set bookmark"),this);
setBookmark->setToolTip(tr("Set a bookmark on the current page"));
setBookmark->setShortcut(Qt::CTRL+Qt::Key_M);
setBookmark->setIcon(QIcon(":/images/setBookmark.png"));
setBookmark->setIcon(QIcon(":/images/viewer_toolbar/bookmark.png"));
setBookmark->setDisabled(true);
setBookmark->setCheckable(true);
connect(setBookmark,SIGNAL(triggered (bool)),viewer,SLOT(setBookmark(bool)));
@ -250,28 +258,28 @@ void MainWindowViewer::createActions()
showBookmarks = new QAction(tr("Show bookmarks"),this);
showBookmarks->setToolTip(tr("Show the bookmarks of the current comic"));
showBookmarks->setShortcut(tr("M"));
showBookmarks->setIcon(QIcon(":/images/bookmark.png"));
showBookmarks->setIcon(QIcon(":/images/viewer_toolbar/showBookmarks.png"));
showBookmarks->setDisabled(true);
connect(showBookmarks, SIGNAL(triggered()),viewer->getBookmarksDialog(),SLOT(show()));
showShorcutsAction = new QAction(tr("Show keyboard shortcuts"), this );
showShorcutsAction->setIcon(QIcon(":/images/shortcuts.png"));
showShorcutsAction->setIcon(QIcon(":/images/viewer_toolbar/shortcuts.png"));
connect(showShorcutsAction, SIGNAL(triggered()),shortcutsDialog,SLOT(show()));
showInfo = new QAction(tr("Show Info"),this);
showInfo->setShortcut(tr("I"));
showInfo->setIcon(QIcon(":/images/properties.png"));
showInfo->setIcon(QIcon(":/images/viewer_toolbar/info.png"));
showInfo->setDisabled(true);
connect(showInfo, SIGNAL(triggered()),viewer,SLOT(informationSwitch()));
closeAction = new QAction(tr("Close"),this);
closeAction->setShortcut(Qt::Key_Escape);
closeAction->setIcon(QIcon(":/images/deleteLibrary.png"));
closeAction->setIcon(QIcon(":/images/viewer_toolbar/close.png"));
connect(closeAction,SIGNAL(triggered()),this,SLOT(close()));
showDictionaryAction = new QAction(tr("Show Dictionary"),this);
showDictionaryAction->setShortcut(Qt::Key_T);
showDictionaryAction->setIcon(QIcon(":/images/dictionary.png"));
showDictionaryAction->setIcon(QIcon(":/images/viewer_toolbar/translator.png"));
showDictionaryAction->setCheckable(true);
showDictionaryAction->setDisabled(true);
connect(showDictionaryAction,SIGNAL(triggered()),viewer,SLOT(translatorSwitch()));
@ -286,17 +294,27 @@ void MainWindowViewer::createActions()
adjustToFullSizeAction = new QAction(tr("Show full size"),this);
adjustToFullSizeAction->setShortcut(Qt::Key_W);
adjustToFullSizeAction->setIcon(QIcon(":/images/adjustToFullSize.png"));
adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png"));
adjustToFullSizeAction->setCheckable(true);
adjustToFullSizeAction->setDisabled(true);
adjustToFullSizeAction->setChecked(Configuration::getConfiguration().getAdjustToFullSize());
connect(adjustToFullSizeAction,SIGNAL(triggered()),this,SLOT(adjustToFullSizeSwitch()));
showFlowAction = new QAction(tr("Show go to flow"),this);
showFlowAction->setShortcut(Qt::Key_S);
showFlowAction->setIcon(QIcon(":/images/viewer_toolbar/flow.png"));
showFlowAction->setDisabled(true);
connect(showFlowAction,SIGNAL(triggered()),viewer,SLOT(goToFlowSwitch()));
}
void MainWindowViewer::createToolBars()
{
comicToolBar = addToolBar(tr("&File"));
comicToolBar->setStyleSheet("QToolBar{border:none;}");
comicToolBar->setIconSize(QSize(18,18));
QToolButton * tb = new QToolButton();
tb->addAction(openAction);
tb->addAction(openFolderAction);
@ -337,6 +355,9 @@ void MainWindowViewer::createToolBars()
//comicToolBar->addWidget(widget);
//comicToolBar->addAction(adjustWidth);
comicToolBar->addAction(adjustHeight);
QMenu * menu = new QMenu();
sliderAction = new YACReaderSliderAction(this);
menu->setAutoFillBackground(false);
@ -372,10 +393,11 @@ void MainWindowViewer::createToolBars()
comicToolBar->addWidget(new QToolBarStretch());
comicToolBar->addAction(showFlowAction);
comicToolBar->addAction(showShorcutsAction);
comicToolBar->addAction(optionsAction);
comicToolBar->addAction(helpAboutAction);
comicToolBar->addAction(closeAction);
//comicToolBar->addAction(closeAction);
comicToolBar->setMovable(false);
@ -495,6 +517,7 @@ void MainWindowViewer::enableActions()
saveImageAction->setDisabled(false);
prevAction->setDisabled(false);
nextAction->setDisabled(false);
adjustHeight->setDisabled(false);
adjustWidth->setDisabled(false);
goToPage->setDisabled(false);
alwaysOnTopAction->setDisabled(false);
@ -507,12 +530,14 @@ void MainWindowViewer::enableActions()
showBookmarks->setDisabled(false);
showInfo->setDisabled(false); //TODO enable goTo and showInfo (or update) when numPages emited
showDictionaryAction->setDisabled(false);
showFlowAction->setDisabled(false);
}
void MainWindowViewer::disableActions()
{
saveImageAction->setDisabled(true);
prevAction->setDisabled(true);
nextAction->setDisabled(true);
adjustHeight->setDisabled(true);
adjustWidth->setDisabled(true);
goToPage->setDisabled(true);
alwaysOnTopAction->setDisabled(true);
@ -527,6 +552,7 @@ void MainWindowViewer::disableActions()
openPreviousComicAction->setDisabled(true);
openNextComicAction->setDisabled(true);
showDictionaryAction->setDisabled(true);
showFlowAction->setDisabled(true);
}
void MainWindowViewer::keyPressEvent(QKeyEvent *event)
@ -545,6 +571,9 @@ void MainWindowViewer::keyPressEvent(QKeyEvent *event)
case Qt::Key_O:
open();
break;
case Qt::Key_A:
changeFit();
break;
default:
QWidget::keyPressEvent(event);
break;
@ -613,7 +642,24 @@ void MainWindowViewer::showToolBars()
this->comicToolBar->show();
toolbars = true;
}
void MainWindowViewer::fitToWidth()
{
Configuration & conf = Configuration::getConfiguration();
if(!conf.getAdjustToWidth())
{
conf.setAdjustToWidth(true);
viewer->updatePage();
}
}
void MainWindowViewer::fitToHeight()
{
Configuration & conf = Configuration::getConfiguration();
if(conf.getAdjustToWidth())
{
conf.setAdjustToWidth(false);
viewer->updatePage();
}
}
void MainWindowViewer::changeFit()
{
Configuration & conf = Configuration::getConfiguration();

View File

@ -43,6 +43,8 @@ class YACReaderSliderAction;
void alwaysOnTopSwitch();
void adjustToFullSizeSwitch();
void reloadOptions();
void fitToWidth();
void fitToHeight();
/*void viewComic();
void prev();
void next();
@ -92,6 +94,8 @@ class YACReaderSliderAction;
QAction *showDictionaryAction;
QAction *alwaysOnTopAction;
QAction *adjustToFullSizeAction;
QAction *showFlowAction;
YACReaderSliderAction * sliderAction;
HttpVersionChecker * versionChecker;

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB