Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95027508
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
Thu, Dec 12, 06:48
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Dec 14, 06:48 (21 h, 49 m)
Engine
blob
Format
Raw Data
Handle
22915693
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