Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94110983
plotpanel.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 4, 00:18
Size
1 KB
Mime Type
text/x-c
Expires
Fri, Dec 6, 00:18 (2 d)
Engine
blob
Format
Raw Data
Handle
22737969
Attached To
rSYMKIT symkit
plotpanel.cpp
View Options
#include "plotpanel.h"
#include "skplot.h"
#include <QVBoxLayout>
#include <QSplitter>
#include "skerror.h"
using
namespace
symkit
;
PlotPanel
::
PlotPanel
(
SKPlot
*
plot
,
QWidget
*
parent
)
:
SKViewerPanel
(
parent
),
glwidget
(
plot
)
{
splitter
=
new
QSplitter
;
centering
=
new
QVBoxLayout
;
centering
->
addWidget
(
splitter
);
dedicated
=
new
QWidget
;
if
(
!
plot
)
throw
SKError
(
ERR_NULL_POINTER
,
"PlotPanel::PlotPanel"
,
"PlotPanel"
,
"Passing a null pointer as plot"
);
splitter
->
addWidget
(
plot
);
splitter
->
addWidget
(
dedicated
);
splitter
->
setStretchFactor
(
0
,
9
);
splitter
->
setStretchFactor
(
1
,
1
);
splitter
->
setCollapsible
(
1
,
true
);
setLayout
(
centering
);
}
PlotPanel
::~
PlotPanel
()
{
delete
centering
;
}
void
PlotPanel
::
setPlot
(
SKPlot
*
plot
)
{
if
(
plot
)
{
if
(
glwidget
)
{
glwidget
->
setParent
(
0
);
}
splitter
->
insertWidget
(
0
,
plot
);
glwidget
=
plot
;
}
}
SKPlot
*
PlotPanel
::
getPlot
()
{
return
glwidget
;
}
QString
PlotPanel
::
getLabel
()
const
{
return
glwidget
->
windowTitle
();
}
QWidget
*
PlotPanel
::
getDedicated
()
{
return
dedicated
;
}
Event Timeline
Log In to Comment