Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
ec241fe6
Commit
ec241fe6
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm unused source
parent
6f156f8e
No related branches found
No related tags found
1 merge request
!427
Reduce include dependences in GUI; break cyclic dependence between View and Model
Pipeline
#48753
failed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Widget/Common/AdjustingScrollArea.cpp
+0
-49
0 additions, 49 deletions
GUI/Widget/Common/AdjustingScrollArea.cpp
GUI/Widget/Common/AdjustingScrollArea.h
+0
-36
0 additions, 36 deletions
GUI/Widget/Common/AdjustingScrollArea.h
with
0 additions
and
85 deletions
GUI/Widget/Common/AdjustingScrollArea.cpp
deleted
100644 → 0
+
0
−
49
View file @
6f156f8e
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/Widget/Common/AdjustingScrollArea.cpp
//! @brief Implements class AdjustingScrollArea
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#include
"GUI/Widget/Common/AdjustingScrollArea.h"
#include
<QEvent>
#include
<QScrollBar>
AdjustingScrollArea
::
AdjustingScrollArea
(
QWidget
*
parent
)
:
QScrollArea
(
parent
)
{
setObjectName
(
"MyScrollArea"
);
setContentsMargins
(
0
,
0
,
0
,
0
);
setWidgetResizable
(
true
);
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
setStyleSheet
(
"QScrollArea#MyScrollArea {border: 0px; background-color:transparent;}"
);
}
void
AdjustingScrollArea
::
setWidget
(
QWidget
*
w
)
{
QScrollArea
::
setWidget
(
w
);
w
->
installEventFilter
(
this
);
}
QSize
AdjustingScrollArea
::
sizeHint
()
const
{
QScrollBar
*
horizontal
=
horizontalScrollBar
();
QSize
result
(
viewport
()
->
width
(),
widget
()
->
height
()
+
horizontal
->
height
()
*
2
);
return
result
;
}
bool
AdjustingScrollArea
::
eventFilter
(
QObject
*
obj
,
QEvent
*
ev
)
{
if
(
obj
==
widget
()
&&
ev
->
type
()
!=
QEvent
::
Resize
)
{
widget
()
->
setMaximumWidth
(
viewport
()
->
width
());
setMaximumHeight
(
height
()
-
viewport
()
->
height
()
+
widget
()
->
height
());
}
return
QScrollArea
::
eventFilter
(
obj
,
ev
);
}
This diff is collapsed.
Click to expand it.
GUI/Widget/Common/AdjustingScrollArea.h
deleted
100644 → 0
+
0
−
36
View file @
6f156f8e
// ************************************************************************************************
//
// BornAgain: simulate and fit reflection and scattering
//
//! @file GUI/Widget/Common/AdjustingScrollArea.h
//! @brief Defines class AdjustingScrollArea
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************************************
#ifndef BORNAGAIN_GUI_WIDGET_COMMON_ADJUSTINGSCROLLAREA_H
#define BORNAGAIN_GUI_WIDGET_COMMON_ADJUSTINGSCROLLAREA_H
#include
<QScrollArea>
//! Modification of standard scroll area, which makes widget with dynamic layout ocuupy whole
//! available space.
class
AdjustingScrollArea
:
public
QScrollArea
{
Q_OBJECT
public:
AdjustingScrollArea
(
QWidget
*
parent
=
0
);
void
setWidget
(
QWidget
*
w
);
QSize
sizeHint
()
const
;
private:
bool
eventFilter
(
QObject
*
obj
,
QEvent
*
ev
);
};
#endif // BORNAGAIN_GUI_WIDGET_COMMON_ADJUSTINGSCROLLAREA_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment