void DolphinView::setViewProperties(const ViewProperties& props) { setMode(props.viewMode()); setSorting(props.sorting()); setSortOrder(props.sortOrder()); setShowHiddenFilesEnabled(props.isShowHiddenFilesEnabled()); }
ApplyViewPropsJob::ApplyViewPropsJob(const QUrl& dir, const ViewProperties& viewProps) : KIO::Job(), m_viewProps(0), m_progress(0), m_dir(dir) { m_viewProps = new ViewProperties(dir); m_viewProps->setViewMode(viewProps.viewMode()); m_viewProps->setPreviewsShown(viewProps.previewsShown()); m_viewProps->setHiddenFilesShown(viewProps.hiddenFilesShown()); m_viewProps->setSortRole(viewProps.sortRole()); m_viewProps->setSortOrder(viewProps.sortOrder()); KIO::ListJob* listJob = KIO::listRecursive(dir, KIO::HideProgressInfo); connect(listJob, &KIO::ListJob::entries, this, &ApplyViewPropsJob::slotEntries); addSubjob(listJob); }
ContinuousPageView::ContinuousPageView(QWidget *parent, int physicalPages, const ViewProperties& props) : PageViewBase(parent, physicalPages, props) , m_firstVisible(-1) , m_firstVisibleOffset(0) , m_y1pos(NULL) , m_y2pos(NULL) , m_requestedPage(-1) { _DEBUG; recreatePageWidgets(); recalculatePageSizes(); setBackground(props.background()); setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); // track scrollbar range changes to restore its relative position connect(verticalScrollBar(), SIGNAL(rangeChanged(int, int)), this, SLOT(scrollbarRangeChanged(int, int))); }
SimplePageView::SimplePageView(QWidget *parent, int physicalPages, const ViewProperties& props) : PageViewBase(parent, physicalPages, props) , wheelupcnt(0), wheeldowncnt(0) , m_currentPage(0) //?? , imgLabel(NULL) { //setFocusPolicy(QWidget::StrongFocus); QWidget *w = new QWidget(this); w->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); m_layout = new QVBoxLayout(w); m_layout->setContentsMargins(0, 0, 0, 0); m_layout->setSpacing(0); m_layout->setAlignment(Qt::AlignCenter); setWidget(w); recreatePageWidget(); setWidgetResizable(true); setBackground(props.background()); setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); }