Mantid
Loading...
Searching...
No Matches
WidgetScrollbarDecorator.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9//----------------------------------
10// Includes
11//----------------------------------
12#include "MantidKernel/System.h"
13
14#include <QScrollArea>
15#include <QVBoxLayout>
16#include <QWidget>
17
18namespace MantidQt {
19namespace API {
20
78public:
79 explicit WidgetScrollbarDecorator(QWidget *target);
81
84
86 bool enabled() const;
87
89 void setEnabled(bool enable);
90
92 void setThresholdWidth(int width);
93
95 void setThresholdHeight(int height);
96
98 void setThresholdSize(int width, int height);
99
100private:
101 QVBoxLayout *m_layout;
102 QScrollArea *m_scrollarea;
103 QWidget *m_viewport;
104 QWidget *m_offscreen;
105
106 QWidget *m_target;
108};
109
110} // namespace API
111} // namespace MantidQt
double height
Definition: GetAllEi.cpp:155
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
WidgetScrollbarDecorator : Adds scrollbar functionality to a QWidget.
WidgetScrollbarDecorator & operator=(WidgetScrollbarDecorator)=delete
QWidget * m_target
The target widget that is given scrollbars.
QWidget * m_offscreen
Used to hold above widgets when disabled.
QVBoxLayout * m_layout
Main layout used when scrollable.
QWidget * m_viewport
Single widget inside QScrollArea.
WidgetScrollbarDecorator(const WidgetScrollbarDecorator &)=delete
bool m_enabled
Whether the target is currently scrollable.
QScrollArea * m_scrollarea
Used to provide scrolling functionality.
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...