mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Libraries and Folders titles added
This commit is contained in:
parent
b1e03d015d
commit
1134273e96
@ -1,3 +1,9 @@
|
||||
6.3
|
||||
Mejorada la gestión de errores relacionada con las bibliotecas
|
||||
Añadido botón que permite ocultar las portadas en la pantalla de importación
|
||||
Añadidos títulos "Bibliotecas" y "Carpetas" a la barra de navegación
|
||||
Nuevos iconos para seleccionar la carpeta raíz, expandir y contraer todos.
|
||||
|
||||
6.2
|
||||
Nueva ventana de "bienvenida"
|
||||
Nueva ventana de importar/actualizar
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "yacreader_tool_bar_stretch.h"
|
||||
|
||||
#include "yacreader_dark_menu.h"
|
||||
#include "yacreader_titled_toolbar.h"
|
||||
//
|
||||
|
||||
LibraryWindow::LibraryWindow()
|
||||
@ -76,10 +77,10 @@ void LibraryWindow::setupUI()
|
||||
settings = new QSettings(QCoreApplication::applicationDirPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creación del fichero de config con el servidor
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
createActions();
|
||||
doModels();
|
||||
doLayout();
|
||||
doDialogs();
|
||||
createActions();
|
||||
createToolBars();
|
||||
createMenus();
|
||||
createConnections();
|
||||
@ -192,12 +193,20 @@ void LibraryWindow::doLayout()
|
||||
left = new QWidget;
|
||||
QVBoxLayout * l = new QVBoxLayout;
|
||||
selectedLibrary = new QComboBox;
|
||||
l->setContentsMargins(2,2,0,0);
|
||||
l->addWidget(new QLabel(tr("Select a library:")));
|
||||
l->setContentsMargins(2,0,0,0);
|
||||
|
||||
YACReaderTitledToolBar * librariesTitle = new YACReaderTitledToolBar(tr("Libraries"));
|
||||
|
||||
l->addWidget(librariesTitle);
|
||||
l->addWidget(selectedLibrary);
|
||||
treeActions = new QToolBar(left);
|
||||
treeActions->setIconSize(QSize(16,16));
|
||||
l->addWidget(treeActions);
|
||||
|
||||
YACReaderTitledToolBar * foldersTitle = new YACReaderTitledToolBar(tr("Folders"));
|
||||
|
||||
foldersTitle->addAction(setRootIndexAction);
|
||||
foldersTitle->addAction(expandAllNodesAction);
|
||||
foldersTitle->addAction(colapseAllNodesAction);
|
||||
|
||||
l->addWidget(foldersTitle);
|
||||
l->addWidget(foldersView);
|
||||
|
||||
QVBoxLayout * searchLayout = new QVBoxLayout;
|
||||
@ -257,6 +266,11 @@ void LibraryWindow::doLayout()
|
||||
|
||||
connect(noLibrariesWidget,SIGNAL(createNewLibrary()),this,SLOT(createLibrary()));
|
||||
connect(noLibrariesWidget,SIGNAL(addExistingLibrary()),this,SLOT(showAddLibrary()));
|
||||
|
||||
comicFlow->addAction(toggleFullScreenAction);
|
||||
comicFlow->addAction(openComicAction);
|
||||
|
||||
comicFlow->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
}
|
||||
|
||||
void LibraryWindow::doDialogs()
|
||||
@ -459,12 +473,6 @@ void LibraryWindow::createActions()
|
||||
hideComicViewAction->setCheckable(true);
|
||||
hideComicViewAction->setChecked(false);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
comicFlow->addAction(toggleFullScreenAction);
|
||||
comicFlow->addAction(openComicAction);
|
||||
|
||||
comicFlow->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
}
|
||||
|
||||
//TODO unificar con disableActions
|
||||
@ -572,10 +580,6 @@ void LibraryWindow::createToolBars()
|
||||
|
||||
libraryToolBar->setMovable(false);
|
||||
|
||||
treeActions->addAction(setRootIndexAction);
|
||||
treeActions->addAction(expandAllNodesAction);
|
||||
treeActions->addAction(colapseAllNodesAction);
|
||||
|
||||
comicFlow->addAction(toggleFullScreenAction);
|
||||
comicFlow->addAction(openComicAction);
|
||||
|
||||
|
@ -11,7 +11,8 @@ HEADERS += $$PWD/help_about_dialog.h \
|
||||
$$PWD/yacreader_search_line_edit.h \
|
||||
$$PWD/yacreader_spin_slider_widget.h \
|
||||
$$PWD/yacreader_tool_bar_stretch.h \
|
||||
$$PWD/yacreader_dark_menu.h
|
||||
$$PWD/yacreader_dark_menu.h \
|
||||
$$PWD/yacreader_titled_toolbar.h
|
||||
|
||||
SOURCES += $$PWD/help_about_dialog.cpp \
|
||||
$$PWD/yacreader_field_edit.cpp \
|
||||
@ -23,4 +24,5 @@ SOURCES += $$PWD/help_about_dialog.cpp \
|
||||
$$PWD/yacreader_search_line_edit.cpp \
|
||||
$$PWD/yacreader_spin_slider_widget.cpp \
|
||||
$$PWD/yacreader_tool_bar_stretch.cpp \
|
||||
$$PWD/yacreader_dark_menu.cpp
|
||||
$$PWD/yacreader_dark_menu.cpp \
|
||||
$$PWD/yacreader_titled_toolbar.cpp
|
46
custom_widgets/yacreader_titled_toolbar.cpp
Normal file
46
custom_widgets/yacreader_titled_toolbar.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "yacreader_titled_toolbar.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QToolButton>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
|
||||
YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QHBoxLayout * mainLayout = new QHBoxLayout;
|
||||
mainLayout->setMargin(0);
|
||||
mainLayout->setSpacing(0);
|
||||
|
||||
QString styleSheet = "QWidget {border:0px;}";
|
||||
setStyleSheet(styleSheet);
|
||||
|
||||
QLabel * nameLabel = new QLabel(title,this);
|
||||
|
||||
QString nameLabelStyleSheet = "QLabel {color:#454545; padding:0 0 0 0px; margin:0px; font-size:14px; font-weight:bold;}";
|
||||
nameLabel->setStyleSheet(nameLabelStyleSheet);
|
||||
|
||||
mainLayout->addWidget(nameLabel,Qt::AlignLeft);
|
||||
mainLayout->addStretch();
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum);
|
||||
|
||||
setMinimumHeight(25);
|
||||
}
|
||||
|
||||
|
||||
void YACReaderTitledToolBar::addAction(QAction * action)
|
||||
{
|
||||
QHBoxLayout * mainLayout = dynamic_cast<QHBoxLayout *>(layout());
|
||||
|
||||
QToolButton * tb = new QToolButton(this);
|
||||
tb->setDefaultAction(action);
|
||||
tb->setIconSize(QSize(16,16));
|
||||
tb->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||
tb->setStyleSheet("QToolButton:hover {background-color:#A5A5A5;}");
|
||||
|
||||
mainLayout->addWidget(tb);
|
||||
}
|
20
custom_widgets/yacreader_titled_toolbar.h
Normal file
20
custom_widgets/yacreader_titled_toolbar.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef YACREADER_TITLED_TOOLBAR_H
|
||||
#define YACREADER_TITLED_TOOLBAR_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QIcon;
|
||||
|
||||
class YACReaderTitledToolBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderTitledToolBar(const QString & title, QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void addAction(QAction * action);
|
||||
};
|
||||
|
||||
#endif // YACREADER_TITLED_TOOLBAR_H
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 117 B |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 138 B |
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 146 B |
Loading…
x
Reference in New Issue
Block a user