-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripteditor.cpp
More file actions
31 lines (27 loc) · 854 Bytes
/
Copy pathscripteditor.cpp
File metadata and controls
31 lines (27 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "consolewindow.h"
#include "scripteditor.h"
ScriptEditor::ScriptEditor(QDeclarativeItem *parent)
: QDeclarativeItem(parent),
window_(new ConsoleWindow)
{
connect(this, SIGNAL(titleChanged(const QString &)), window_, SLOT(setWindowTitle(const QString &)));
connect(window_, SIGNAL(submitted(const QString &)), this, SIGNAL(submitted(const QString &)));
connect(this, SIGNAL(logList(const QStringList &)), window_, SLOT(log(const QStringList &)));
connect(this, SIGNAL(clear()), window_, SLOT(clear()));
window_->setAttribute(Qt::WA_DeleteOnClose);
window_->show();
}
ScriptEditor::~ScriptEditor()
{
if (window_)
window_->close();
}
QString ScriptEditor::title() const
{
return title_;
}
void ScriptEditor::setTitle(const QString &title)
{
title_ = title;
emit titleChanged(title_);
}

