Persist size and treeview header state in preview dialog

- renamed variable m_headerState
 - renamed PreviewSelect class to PreviewSelectDialog
 - renamed previewselect files to previewselectdialog
This commit is contained in:
silver 2017-09-11 20:32:11 +02:00
commit 3b4fd35dde
No known key found for this signature in database
GPG key ID: 7AF60D549724DEEF
9 changed files with 84 additions and 40 deletions

View file

@ -39,7 +39,7 @@
#include <QApplication>
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "previewselect.h"
#include "previewselectdialog.h"
#ifdef Q_OS_WIN
#include <QProxyStyle>
@ -58,11 +58,11 @@ class PreviewListDelegate: public QItemDelegate {
QStyleOptionViewItem opt = QItemDelegate::setOptions(index, option);
switch(index.column()) {
case PreviewSelect::SIZE:
case PreviewSelectDialog::SIZE:
QItemDelegate::drawBackground(painter, opt, index);
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
break;
case PreviewSelect::PROGRESS:{
case PreviewSelectDialog::PROGRESS:{
QStyleOptionProgressBar newopt;
qreal progress = index.data().toDouble()*100.;
newopt.rect = opt.rect;