QtHPConnect/hp_mditexteditor.cpp
2019-02-10 15:43:00 +02:00

33 lines
656 B
C++

#include "hp_mditexteditor.h"
#include "hptreeitem.h"
hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent,hpTreeItem * treeItem)
:QMdiSubWindow(parent)
{
setMinimumSize(200,200);
setMaximumSize(1000,1000);
setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
setup();
hptreeitem=treeItem;
setWindowTitle(treeItem->getName());
}
void hp_mdiTextEdit::setup() {
textEdit = new textEditor(this);
setWidget(textEdit);
}
void hp_mdiTextEdit::show() {
if (textEdit)
textEdit->show();
QMdiSubWindow::show();
}
hp_mdiTextEdit::~hp_mdiTextEdit() {
if (textEdit)
delete textEdit;
}