mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
classic comics view splitter remembers now its state between sessions
This commit is contained in:
parent
090be54bc1
commit
bf87eacaf8
@ -72,6 +72,9 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
|
|||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
sVertical->setCollapsible(1,false);
|
sVertical->setCollapsible(1,false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(settings->contains(COMICS_VIEW_FLOW_SPLITTER_STATUS))
|
||||||
|
sVertical->restoreState(settings->value(COMICS_VIEW_FLOW_SPLITTER_STATUS).toByteArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClassicComicsView::setToolBar(QToolBar *toolBar)
|
void ClassicComicsView::setToolBar(QToolBar *toolBar)
|
||||||
@ -217,6 +220,11 @@ void ClassicComicsView::saveTableHeadersStatus()
|
|||||||
settings->setValue(COMICS_VIEW_HEADERS,tableView->horizontalHeader()->saveState());
|
settings->setValue(COMICS_VIEW_HEADERS,tableView->horizontalHeader()->saveState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClassicComicsView::saveSplitterStatus()
|
||||||
|
{
|
||||||
|
settings->setValue(COMICS_VIEW_FLOW_SPLITTER_STATUS, sVertical->saveState());
|
||||||
|
}
|
||||||
|
|
||||||
void ClassicComicsView::applyModelChanges(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
|
void ClassicComicsView::applyModelChanges(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
|
||||||
{
|
{
|
||||||
Q_UNUSED(topLeft);
|
Q_UNUSED(topLeft);
|
||||||
@ -238,6 +246,7 @@ void ClassicComicsView::removeItemsFromFlow(const QModelIndex &parent, int from,
|
|||||||
void ClassicComicsView::closeEvent(QCloseEvent *event)
|
void ClassicComicsView::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
saveTableHeadersStatus();
|
saveTableHeadersStatus();
|
||||||
|
saveSplitterStatus();
|
||||||
ComicsView::closeEvent(event);
|
ComicsView::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ public slots:
|
|||||||
void centerComicFlow(const QModelIndex & mi);
|
void centerComicFlow(const QModelIndex & mi);
|
||||||
void updateTableView(int i);
|
void updateTableView(int i);
|
||||||
void saveTableHeadersStatus();
|
void saveTableHeadersStatus();
|
||||||
|
void saveSplitterStatus();
|
||||||
void applyModelChanges(const QModelIndex & topLeft,const QModelIndex & bottomRight,const QVector<int> & roles);
|
void applyModelChanges(const QModelIndex & topLeft,const QModelIndex & bottomRight,const QVector<int> & roles);
|
||||||
void removeItemsFromFlow(const QModelIndex & parent, int from, int to);
|
void removeItemsFromFlow(const QModelIndex & parent, int from, int to);
|
||||||
//ComicsView
|
//ComicsView
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
#define COMICS_VIEW_HEADERS "COMICS_VIEW_HEADERS"
|
#define COMICS_VIEW_HEADERS "COMICS_VIEW_HEADERS"
|
||||||
#define COMICS_VIEW_HEADERS_GEOMETRY "COMICS_VIEW_HEADERS_GEOMETRY"
|
#define COMICS_VIEW_HEADERS_GEOMETRY "COMICS_VIEW_HEADERS_GEOMETRY"
|
||||||
#define COMICS_VIEW_STATUS "COMICS_VIEW_STATUS"
|
#define COMICS_VIEW_STATUS "COMICS_VIEW_STATUS"
|
||||||
|
#define COMICS_VIEW_FLOW_SPLITTER_STATUS "COMICS_VIEW_FLOW_SPLITTER_STATUS"
|
||||||
|
|
||||||
#define NUM_DAYS_BETWEEN_VERSION_CHECKS "NUM_DAYS_BETWEEN_VERSION_CHECKS"
|
#define NUM_DAYS_BETWEEN_VERSION_CHECKS "NUM_DAYS_BETWEEN_VERSION_CHECKS"
|
||||||
#define LAST_VERSION_CHECK "LAST_VERSION_CHECK"
|
#define LAST_VERSION_CHECK "LAST_VERSION_CHECK"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user