You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
628 B
37 lines
628 B
14 years ago
|
#include "UBLibWebView.h"
|
||
|
|
||
|
UBLibWebView::UBLibWebView(QWidget* parent, const char* name):QWidget(parent)
|
||
|
, mpView(NULL)
|
||
|
, mpLayout(NULL)
|
||
|
{
|
||
|
setObjectName(name);
|
||
|
|
||
|
mpLayout = new QVBoxLayout();
|
||
|
setLayout(mpLayout);
|
||
|
|
||
|
mpView = new QWebView(this);
|
||
|
mpLayout->addWidget(mpView);
|
||
|
}
|
||
|
|
||
|
UBLibWebView::~UBLibWebView()
|
||
|
{
|
||
|
if(NULL != mpView)
|
||
|
{
|
||
|
delete mpView;
|
||
|
mpView = NULL;
|
||
|
}
|
||
|
if(NULL != mpLayout)
|
||
|
{
|
||
|
delete mpLayout;
|
||
|
mpLayout = NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void UBLibWebView::setElement(UBLibElement *elem)
|
||
|
{
|
||
|
if(NULL != elem)
|
||
|
{
|
||
|
mpView->load(elem->path());
|
||
|
}
|
||
|
}
|