Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
70df9bf4
Commit
70df9bf4
authored
8 years ago
by
Tom Perkins
Browse files
Options
Downloads
Patches
Plain Diff
Add a splitter to separate extra widgets from browser
This enables you to give more space to the fit function re #18059
parent
c2990e20
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MuonFitPropertyBrowser.h
+2
-2
2 additions, 2 deletions
...idgets/inc/MantidQtMantidWidgets/MuonFitPropertyBrowser.h
MantidQt/MantidWidgets/src/MuonFitPropertyBrowser.cpp
+14
-6
14 additions, 6 deletions
MantidQt/MantidWidgets/src/MuonFitPropertyBrowser.cpp
with
16 additions
and
8 deletions
MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/MuonFitPropertyBrowser.h
+
2
−
2
View file @
70df9bf4
...
...
@@ -113,8 +113,8 @@ private:
/// workspaces
void
finishAfterSimultaneousFit
(
const
Mantid
::
API
::
IAlgorithm
*
fitAlg
,
const
int
nWorkspaces
)
const
;
/// Splitter for additional widgets
QSplitter
*
m_widgetSplitter
;
/// Splitter for additional widgets
and splitter between this and browser
QSplitter
*
m_widgetSplitter
,
*
m_mainSplitter
;
/// Names of workspaces to fit
std
::
vector
<
std
::
string
>
m_workspacesToFit
;
/// Label to use for simultaneous fits
...
...
This diff is collapsed.
Click to expand it.
MantidQt/MantidWidgets/src/MuonFitPropertyBrowser.cpp
+
14
−
6
View file @
70df9bf4
...
...
@@ -61,7 +61,8 @@ const std::string MuonFitPropertyBrowser::SIMULTANEOUS_PREFIX{"MuonSimulFit_"};
*/
MuonFitPropertyBrowser
::
MuonFitPropertyBrowser
(
QWidget
*
parent
,
QObject
*
mantidui
)
:
FitPropertyBrowser
(
parent
,
mantidui
),
m_widgetSplitter
(
nullptr
)
{}
:
FitPropertyBrowser
(
parent
,
mantidui
),
m_widgetSplitter
(
nullptr
),
m_mainSplitter
(
nullptr
)
{}
/**
* Initialise the muon fit property browser.
...
...
@@ -156,16 +157,23 @@ void MuonFitPropertyBrowser::init() {
initLayout
(
w
);
// Create an empty splitter that can hold extra widgets
// and add it after the buttons but before the browser
m_widgetSplitter
=
new
QSplitter
(
w
);
m_widgetSplitter
->
setOrientation
(
Qt
::
Vertical
);
m_widgetSplitter
=
new
QSplitter
(
Qt
::
Vertical
,
w
);
m_widgetSplitter
->
setSizePolicy
(
QSizePolicy
::
Policy
::
Expanding
,
QSizePolicy
::
Policy
::
Expanding
);
// This splitter separates the "extra widgets" region from the browser
m_mainSplitter
=
new
QSplitter
(
Qt
::
Vertical
,
w
);
m_mainSplitter
->
insertWidget
(
0
,
m_widgetSplitter
);
m_mainSplitter
->
insertWidget
(
1
,
m_browser
);
m_mainSplitter
->
setStretchFactor
(
0
,
1
);
m_mainSplitter
->
setStretchFactor
(
1
,
0
);
// Insert after the buttons
auto
parentLayout
=
qobject_cast
<
QVBoxLayout
*>
(
w
->
layout
());
if
(
parentLayout
)
{
const
int
index
=
parentLayout
->
count
()
-
2
;
const
int
index
=
parentLayout
->
count
()
-
1
;
constexpr
int
stretchFactor
=
10
;
// so these widgets get any extra space
parentLayout
->
insertWidget
(
index
,
m_
widget
Splitter
,
stretchFactor
);
parentLayout
->
insertWidget
(
index
,
m_
main
Splitter
,
stretchFactor
);
parentLayout
->
setSpacing
(
0
);
parentLayout
->
setMargin
(
0
);
parentLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
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