DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
apps
SchemaEditor
SchemaNoteEditor.cpp
Go to the documentation of this file.
1
#include <QDialog>
2
#include <QWidget>
3
4
#include "
dbe/SchemaGraphicNote.hpp
"
5
#include "
dbe/SchemaNoteEditor.hpp
"
6
#include "ui_SchemaNoteEditor.h"
7
8
namespace
dbse
{
9
SchemaNoteEditor::SchemaNoteEditor
(
SchemaGraphicNote
* note, QWidget* parent)
10
: QDialog(parent)
11
,
m_note
(note)
12
,
m_ui
(new
Ui
::
SchemaNoteEditor
)
13
{
14
15
m_ui
->setupUi(
this
);
16
m_ui
->text->setPlainText(
m_note
->
text
());
17
m_ui
->text->setFocus();
18
connect(
m_ui
->buttons, SIGNAL(accepted()),
this
, SLOT(
update_text
()));
19
connect(
m_ui
->buttons, SIGNAL(rejected()),
this
, SLOT(
cancel_note
()));
20
}
21
22
SchemaNoteEditor::~SchemaNoteEditor
()
23
{
24
delete
m_ui
;
25
}
26
27
void
28
SchemaNoteEditor::cancel_note
()
29
{
30
emit
cancelled
(
m_note
);
31
}
32
33
void
34
SchemaNoteEditor::update_text
()
35
{
36
emit
note_accepted
(
m_note
);
37
m_note
->
update_note
(
m_ui
->text->toPlainText());
38
}
39
}
// namespace dbse
SchemaGraphicNote.hpp
SchemaNoteEditor.hpp
dbse::SchemaGraphicNote
Definition
SchemaGraphicNote.hpp:14
dbse::SchemaGraphicNote::text
QString text()
Definition
SchemaGraphicNote.hpp:24
dbse::SchemaGraphicNote::update_note
void update_note(QString text)
Definition
SchemaGraphicNote.cpp:66
dbse::SchemaNoteEditor::m_ui
Ui::SchemaNoteEditor * m_ui
Definition
SchemaNoteEditor.hpp:24
dbse::SchemaNoteEditor::note_accepted
void note_accepted(SchemaGraphicNote *note)
dbse::SchemaNoteEditor::cancelled
void cancelled(SchemaGraphicNote *note)
dbse::SchemaNoteEditor::~SchemaNoteEditor
~SchemaNoteEditor()
Definition
SchemaNoteEditor.cpp:22
dbse::SchemaNoteEditor::SchemaNoteEditor
SchemaNoteEditor(SchemaGraphicNote *note, QWidget *parent=0)
Definition
SchemaNoteEditor.cpp:9
dbse::SchemaNoteEditor::update_text
void update_text()
Definition
SchemaNoteEditor.cpp:34
dbse::SchemaNoteEditor::m_note
SchemaGraphicNote * m_note
Definition
SchemaNoteEditor.hpp:23
dbse::SchemaNoteEditor::cancel_note
void cancel_note()
Definition
SchemaNoteEditor.cpp:28
Ui
Definition
SchemaSettings.hpp:9
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:13
Generated on
for DUNE-DAQ by
1.18.0