DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::ObjectCreator Class Reference

#include <ObjectCreator.hpp>

Inheritance diagram for dbe::ObjectCreator:
[legend]
Collaboration diagram for dbe::ObjectCreator:
[legend]

Signals

void stateChanged ()

Public Member Functions

 ~ObjectCreator ()
 ObjectCreator (dunedaq::conffwk::class_t const &classinfo, QWidget *parent=0)
 ObjectCreator (tref const &clonefrom, dunedaq::conffwk::relationship_t const &relation, QWidget *parent=0)
 ObjectCreator (tref const &clonefrom, QWidget *parent=0)
bool CanClose ()

Private Slots

void AddInclude ()
void UpdateActions ()
void UpdateActions (QString)
void CreateObject (bool openEditor=false)
void CreateOpenObject ()
void SetObjectChanged ()
void ActiveFileChanged (QString const &)
void MustPressReturn (QString const &)
void SetUID ()

Private Member Functions

void setup_editor ()
void setup_copy_editor ()
void SetComboClass ()
void SetController ()
void BuildFileModel ()
void SetStatusBar ()
QString GetMessage ()
bool GetState (int Flags)
void BuildContextMenu ()
void FillUidComboBox ()
void closeEvent (QCloseEvent *event)

Private Attributes

std::unique_ptr< dbe::Ui::ObjectCreator > ui
dunedaq::conffwk::class_t this_object_class
std::unique_ptr< tref > this_src_object
std::unique_ptr< tref > this_target_object
dunedaq::conffwk::relationship_t this_relation
QSortFilterProxyModel this_sort
FileModel * this_files
QStatusBar * this_status_bar
int this_state
bool UidSet
QString this_newuid
QString this_file_for_new_object
ObjectEditor * this_associated_editor
QMenu * ContextMenu
bool this_is_temporary
bool this_object_changed
bool this_create_copy
QUuid const uuid

Detailed Description

Definition at line 27 of file ObjectCreator.hpp.

Constructor & Destructor Documentation

◆ ~ObjectCreator()

dbe::ObjectCreator::~ObjectCreator ( )
default

◆ ObjectCreator() [1/3]

dbe::ObjectCreator::ObjectCreator ( dunedaq::conffwk::class_t const & classinfo,
QWidget * parent = 0 )

Create a new object of class

Parameters
classinfodescribes the class for which an object is to be created
parentof this widget

Definition at line 45 of file ObjectCreator.cpp.

46 : QWidget(parent)
47 , ui(new Ui::ObjectCreator)
48 , this_object_class(cinfo)
49 , this_target_object(nullptr)
50 , this_relation(dunedaq::conffwk::relationship_t())
51 , this_files(nullptr)
52 , this_status_bar(nullptr)
53 , this_state(0)
54 , UidSet(false)
55 , this_associated_editor(nullptr)
56 , ContextMenu(nullptr)
57 , this_is_temporary(false)
58 , this_object_changed(false)
59 , this_create_copy(false)
60 , uuid(QUuid::createUuid())
61{
62 ui->setupUi(this);
63 this_status_bar = new QStatusBar(ui->StatusFrame);
64
65 QString cname = QString::fromStdString(this_object_class.p_name);
66 setWindowTitle(QString("Create New Object of Class %1").arg(cname));
67
69 ui->LineEditUID->setToolTip(QString("Type Object unique ID and press ENTER"));
70
71 ui->ComboBoxForbiddenUid->hide();
72 ui->SetFileButton->hide();
73
78
79 int index = ui->ComboBoxClass->findText(cname);
80 ui->ComboBoxClass->setCurrentIndex(1); // If index is 0 somehow this doesnt work
81 ui->ComboBoxClass->setCurrentIndex(index); // Now set it to the right value posssibly 0
83 ui->ComboBoxClass->setEditText(cname);
84
85 ui->SetUidButton->setVisible(false);
87
88 QSize SplitterSize = ui->splitter->size();
89 int Width = SplitterSize.width() / 2;
90
91 QList<int> List;
92 List.push_back(Width);
93 List.push_back(Width);
94
95 ui->splitter->setSizes(List);
96}
ObjectEditor * this_associated_editor
dunedaq::conffwk::relationship_t this_relation
std::unique_ptr< dbe::Ui::ObjectCreator > ui
dunedaq::conffwk::class_t this_object_class
std::unique_ptr< tref > this_target_object
QStatusBar * this_status_bar

◆ ObjectCreator() [2/3]

dbe::ObjectCreator::ObjectCreator ( tref const & clonefrom,
dunedaq::conffwk::relationship_t const & relation,
QWidget * parent = 0 )

Clone an object of a given relation type

Parameters
anobjectis a reference to another object
relationis a relation to set
parentof this widget

Definition at line 104 of file ObjectCreator.cpp.

107 : ObjectCreator(config::api::info::onclass::definition(clonefrom.class_name(), false), parent)
108{
109 this_target_object.reset(new tref(clonefrom));
110 this_relation = the_relation;
111}
ObjectCreator(dunedaq::conffwk::class_t const &classinfo, QWidget *parent=0)
static dunedaq::conffwk::class_t definition(std::string const &cn, bool direct_only)
friend class dbe::inner::configobject::tref

◆ ObjectCreator() [3/3]

dbe::ObjectCreator::ObjectCreator ( tref const & clonefrom,
QWidget * parent = 0 )

Clone from a given object

Parameters
copyfromis the object to copy from
parent

Setting the same file as the object being copied

Definition at line 116 of file ObjectCreator.cpp.

117 : QWidget(parent)
118 , ui(new Ui::ObjectCreator)
119 , this_object_class(config::api::info::onclass::definition(clonefrom.class_name(), false))
120 , this_src_object(new tref(clonefrom))
121 , this_files(nullptr)
122 , this_status_bar(nullptr)
123 , UidSet(false)
124 , this_associated_editor(nullptr)
125 , ContextMenu(nullptr)
126 , this_is_temporary(false)
127 , this_object_changed(false)
128 , this_create_copy(true)
129 , uuid(QUuid::createUuid())
130{
131 ui->setupUi(this);
132 this_status_bar = new QStatusBar(ui->StatusFrame);
133
134 setWindowTitle(QString("Create New Object of Class %1").arg(QString::fromStdString(this_object_class.p_name)));
135
137 ui->LineEditUID->setToolTip(QString("Type Object unique ID and press ENTER"));
138
139 ui->ComboBoxForbiddenUid->hide();
140 ui->SetFileButton->hide();
141
144 SetStatusBar();
146
147 int index = ui->ComboBoxClass->findText(QString::fromStdString(clonefrom.class_name()));
148
149 ui->ComboBoxClass->setCurrentIndex(index);
151
153 QString const& fn = QString::fromStdString(this_src_object->contained_in());
154 QFileInfo fileinfo(fn);
155 QModelIndexList ListOfMatch = this_files->match(this_files->index(0, 0),
156 Qt::DisplayRole,
157 fileinfo.fileName(),
158 1000,
159 Qt::MatchContains | Qt::MatchWrap | Qt::MatchRecursive);
160
161 ui->FileView->selectRow(ListOfMatch.at(0).row());
162
164
165 // Set uid to the that of the object being copied
166 ui->LineEditUID->setText(QString::fromStdString(clonefrom.UID()));
167 ui->ComboBoxClass->setEditText(QString::fromStdString(clonefrom.class_name()));
168
169 ui->SetUidButton->setVisible(false);
171
172 QSize spliter_size = ui->splitter->size();
173 int w = spliter_size.width() / 2;
174 ui->splitter->setSizes(QList<int>{ w, w });
175}
void ActiveFileChanged(QString const &)
std::unique_ptr< tref > this_src_object

Member Function Documentation

◆ ActiveFileChanged

void dbe::ObjectCreator::ActiveFileChanged ( QString const & fname)
privateslot

Definition at line 432 of file ObjectCreator.cpp.

433{
434 if (fname.isEmpty() or not confaccessor::check_file_rw(fname)) {
435 this_file_for_new_object = QString();
436 emit stateChanged();
437 return;
438 }
439
441 ui->FileView->setToolTip(QString("Activate file which will store the new object: ").append(this_file_for_new_object));
442 QString setFilesWithPath = QString("Selected File: %1").arg(this_file_for_new_object);
443 QString setOnlyFiles = QString("Selected File: %1").arg(QFileInfo(this_file_for_new_object).fileName());
444 ui->FileLabel->setText(setOnlyFiles);
445 ui->FileLabel->setToolTip(setFilesWithPath);
446 ui->FileView->setStyleSheet("selection-background-color : rgb(190,238,158)");
447 emit stateChanged();
448}
static bool check_file_rw(const QString &FileName)

◆ AddInclude

void dbe::ObjectCreator::AddInclude ( )
privateslot

Definition at line 355 of file ObjectCreator.cpp.

356{
357}

◆ BuildContextMenu()

void dbe::ObjectCreator::BuildContextMenu ( )
private

Definition at line 348 of file ObjectCreator.cpp.

349{
350 ContextMenu = new QMenu(this);
351 ContextMenu->addAction(tr("&Edit Include Files"), this, SLOT(AddInclude()), QKeySequence(tr("Ctrl+Z")));
352}

◆ BuildFileModel()

void dbe::ObjectCreator::BuildFileModel ( )
private

Definition at line 226 of file ObjectCreator.cpp.

227{
228 if (not confaccessor::db_implementation_name().contains("roksconflibs")) {
229 if (this_files != nullptr) {
230 delete this_files;
231 this_files = nullptr;
232 }
233
234 this_files = new FileModel(confaccessor::ref().GetIncludedFileCache());
235
236 this_sort.setSourceModel(this_files);
237 ui->FileView->setModel(&this_sort);
238 ui->FileView->sortByColumn(2, Qt::DescendingOrder);
239
240 // ui->FileView->HideReadOnlyFilesSlot(true);
241 ui->FileView->setColumnHidden(2, true);
242 ui->FileView->setColumnHidden(3, true);
243 ui->FileView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
244 }
245}
FileModel(QObject *parent=nullptr)
Including QT Headers.
Definition FileModel.cpp:18
QSortFilterProxyModel this_sort
static confaccessor & ref()
static QString db_implementation_name()

◆ CanClose()

bool dbe::ObjectCreator::CanClose ( )

Definition at line 582 of file ObjectCreator.cpp.

583{
584
585 if ((this_object_changed and ui->CreateObjectButton->isEnabled()) or
587 int ret = QMessageBox::question(0,
588 tr("DBE - ObjectCreate"),
589 QString("There are pending actions for this dialogue"),
590 QMessageBox::Discard | QMessageBox::Cancel,
591 QMessageBox::Cancel);
592
593 if (ret == QMessageBox::Discard) {
594 this_object_changed = false;
596
597 try {
599 uuid);
600 } catch (daq::dbe::config_object_retrieval_result_is_null const& e) {
601 // nothing specific handle needed in this , it is possible that there is no resul
602 }
603
604 return true;
605 } else if (ret == QMessageBox::Cancel) {
606 return false;
607 }
608
609 return true;
610 } else {
611 return true;
612 }
613}
bool WasObjectChanged() const
static configobject::tref get(dbe::cokey const &desc)
bool delobj(inner::configobject::tref obj, QUuid const &src)

◆ closeEvent()

void dbe::ObjectCreator::closeEvent ( QCloseEvent * event)
private

Definition at line 616 of file ObjectCreator.cpp.

617{
618 if (CanClose()) {
620 this_associated_editor->close();
621 this_associated_editor = nullptr;
622 }
623
624 event->accept();
625 } else {
626 event->ignore();
627 }
628}

◆ CreateObject

void dbe::ObjectCreator::CreateObject ( bool openEditor = false)
privateslot

Called from ui when the create button has been pressed

Definition at line 391 of file ObjectCreator.cpp.

392{
393 setCursor(Qt::WaitCursor);
394
395 BOOST_SCOPE_EXIT(this_)
396 {
397 this_->unsetCursor();
398 }
399 BOOST_SCOPE_EXIT_END
400
401 if (this_file_for_new_object.isEmpty()) {
402 ERROR("Object creation not feasible", "Object file must be selected")
403 } else if (this_newuid.isEmpty()) {
404 ERROR("Object creation not feasible", "Object name (uid) cannot be an empty string");
405 } else if (this_associated_editor) {
407
408 bool done =
412 this_object_changed = false;
413
414 if (done) {
415 close();
416
417 if (openEditor == true) {
419 ->show();
420 }
421 }
422 }
423}
void SetUsedForCopy(bool Used)
bool ParseToCreate(std::string const &name, std::string const &filename)
ObjectEditor(QWidget *parent=nullptr)
#define ERROR(...)
Definition messenger.hpp:90

◆ CreateOpenObject

void dbe::ObjectCreator::CreateOpenObject ( )
privateslot

Definition at line 385 of file ObjectCreator.cpp.

386{
387 CreateObject(true);
388}
void CreateObject(bool openEditor=false)

◆ FillUidComboBox()

void dbe::ObjectCreator::FillUidComboBox ( )
private

Definition at line 360 of file ObjectCreator.cpp.

361{
362 ui->ComboBoxForbiddenUid->clear();
363
364 QStringList listOfUID;
365 QString nameOfClass = QString(this_object_class.p_name.c_str());
366
367 std::vector<tref> const& vec = dbe::config::api::info::onclass::objects(nameOfClass.toStdString(), false);
368
369 for (size_t i = 0; i < vec.size(); ++i) {
370 ui->ComboBoxForbiddenUid->addItem(QString(vec.at(i).UID().c_str()));
371 listOfUID << QString(vec.at(i).UID().c_str());
372 }
373
374 if (!listOfUID.isEmpty()) {
375 ui->ComboBoxForbiddenUid->setToolTip(QString("Already used object unique ID of class %1 ").arg(nameOfClass));
376 ui->ComboBoxForbiddenUid->show();
377 }
378
379 QVariant varFromList(listOfUID);
380 ValidatorAcceptNoMatch* myval = new ValidatorAcceptNoMatch(varFromList, this);
381 ui->LineEditUID->SetValidator(myval);
382}
ValidatorAcceptNoMatch(QVariant &Storage, QObject *parent=0)
Definition Validator.cpp:29
static std::vector< dbe::inner::configobject::tref > objects(std::string const &cname, bool const keep_inherited=true)

◆ GetMessage()

QString dbe::ObjectCreator::GetMessage ( )
private

Definition at line 320 of file ObjectCreator.cpp.

321{
322 if (this_state == editorOk)
323 return QString("Now you can create object '%1' of class '%2'.")
324 .arg(this_newuid)
325 .arg(QString((this_object_class.p_name).c_str()));
327 return QString("Select class, set unique ID, select file where to create object and set obligatory attributes and "
328 "relationships!");
329 else if (GetState(classNotSelected)) {
330 return QString("First select class!");
331 } else if (GetState(fileNotSet))
332 return QString("Set active file where to create new object");
333 else if (GetState(uidNotSet)) {
334 return QString("Set the object UID");
335 } else if (GetState(nullNotFilled))
336 return QString("All NOT NULL attributes or relationships must be set!");
337
338 return QString("Problem to process Object Create operation!");
339}
@ editorOk
@ nullNotFilled
@ classNotSelected
@ uidNotSet
@ fileNotSet
bool GetState(int Flags)

◆ GetState()

bool dbe::ObjectCreator::GetState ( int Flags)
private

Definition at line 342 of file ObjectCreator.cpp.

343{
344 return ((this_state & Flags) == Flags);
345}

◆ MustPressReturn

void dbe::ObjectCreator::MustPressReturn ( QString const & )
privateslot

Definition at line 572 of file ObjectCreator.cpp.

573{
574 QPalette yellow;
575 yellow.setColor(QPalette::Active, QPalette::Window, QColor("yellow"));
576
577 this_status_bar->setPalette(yellow);
578 this_status_bar->showMessage(QString("Press ENTER to set new UID!"));
579}

◆ SetComboClass()

void dbe::ObjectCreator::SetComboClass ( )
private

Definition at line 181 of file ObjectCreator.cpp.

182{
184 ui->ComboBoxClass->addItems(ListOfClasses);
185
186 QCompleter* completer = new QCompleter(ui->ComboBoxClass->model(), ui->ComboBoxClass);
187 completer->setCaseSensitivity(Qt::CaseInsensitive);
188 completer->setFilterMode(Qt::MatchContains);
189 ui->ComboBoxClass->setCompleter(completer);
190 ui->ComboBoxClass->setEditable(true);
191
192 QVariant VarFromList(ListOfClasses);
193 ValidatorAcceptMatch* Validator = new ValidatorAcceptMatch(VarFromList, this);
194 ui->ComboBoxClass->setValidator(Validator);
195}
ValidatorAcceptMatch(QVariant &Storage, QObject *parent=0)
Including DBE.
Definition Validator.cpp:9

◆ SetController()

void dbe::ObjectCreator::SetController ( )
private

Definition at line 198 of file ObjectCreator.cpp.

199{
200 connect(ui->FileView,
201 SIGNAL(stateChanged(const QString&)),
202 this,
203 SLOT(ActiveFileChanged(const QString&)),
204 Qt::UniqueConnection);
205
206 connect(ui->CreateObjectButton, SIGNAL(clicked()), this, SLOT(CreateObject()), Qt::UniqueConnection);
207
208 connect(ui->CreateOpenObjectButton, SIGNAL(clicked()), this, SLOT(CreateOpenObject()), Qt::UniqueConnection);
209
210 connect(ui->ExitButton, SIGNAL(clicked()), this, SLOT(close()), Qt::UniqueConnection);
211
212 connect(ui->LineEditUID, SIGNAL(textChanged(QString)), this, SLOT(UpdateActions(QString)), Qt::UniqueConnection);
213
214 connect(ui->LineEditUID,
215 SIGNAL(textEdited(const QString&)),
216 this,
217 SLOT(MustPressReturn(const QString&)),
218 Qt::UniqueConnection);
219
220 connect(this, SIGNAL(stateChanged()), this, SLOT(UpdateActions()), Qt::UniqueConnection);
221
222 connect(this, SIGNAL(stateChanged()), this, SLOT(SetObjectChanged()), Qt::UniqueConnection);
223}
void MustPressReturn(QString const &)

◆ SetObjectChanged

void dbe::ObjectCreator::SetObjectChanged ( )
privateslot

Definition at line 426 of file ObjectCreator.cpp.

427{
428 this_object_changed = true;
429}

◆ SetStatusBar()

void dbe::ObjectCreator::SetStatusBar ( )
private

Definition at line 248 of file ObjectCreator.cpp.

249{
250 this_status_bar->setSizeGripEnabled(false);
251 this_status_bar->setAutoFillBackground(true);
252 this_status_bar->showMessage(QString("Select class, set new object UID, select file where to create object!"));
253 ui->StatusFrame->setFrameStyle(QFrame::NoFrame);
254 ui->StatusLayout->addWidget(this_status_bar);
255}

◆ SetUID

void dbe::ObjectCreator::SetUID ( )
privateslot

Definition at line 545 of file ObjectCreator.cpp.

546{
547 if (this_file_for_new_object.isEmpty()) {
548 ERROR("Object creation is not feasible", "Database file not selected");
549 return;
550 }
551
552 if (ui->LineEditUID->IsValid()) {
553 this_newuid = ui->LineEditUID->text();
554
555 QString textForUser = QString("New Object ID: %1").arg(this_newuid);
556 ui->UidLabel->setText(textForUser);
557 } else {
558 WARN("Object creation is not feasible", "Invalid UID provided");
559 return;
560 }
561
562 if (!this_file_for_new_object.isEmpty()) {
563 UidSet = true;
564 this_associated_editor->setDisabled(false);
565 emit stateChanged();
566 } else {
567 TLOG_DEBUG(0) << "active file empty!! check!!";
568 }
569}
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:116
#define WARN(...)
Definition messenger.hpp:82

◆ setup_copy_editor()

void dbe::ObjectCreator::setup_copy_editor ( )
private

Definition at line 511 of file ObjectCreator.cpp.

512{
513 if (ui->ComboBoxClass->IsValid()) {
514 QString cname = QString::fromStdString(this_object_class.p_name);
515
516 ui->ClassLabel->setText(QString("Selected Class: %1").arg(cname));
517 setWindowTitle(QString("Create New Object of Class %1").arg(cname));
518
520 this_associated_editor->setWindowModality(Qt::NonModal);
523 this_associated_editor->setDisabled(true);
524
525 ui->EditorLayout->addWidget(this_associated_editor);
526 connect(this_associated_editor, SIGNAL(WidgetUpdated()), this, SLOT(UpdateActions()), Qt::UniqueConnection);
527
529 ui->ComboBoxForbiddenUid->hide();
530
531 QString tmpSt = ui->LineEditUID->text();
532
533 if (!tmpSt.isEmpty()) {
534 ui->LineEditUID->clear();
535 ui->LineEditUID->setText(tmpSt);
536 SetUID();
537 }
538
539 emit stateChanged();
540 this_object_changed = false;
541 }
542}
void HideDetailWidget(bool Hide)

◆ setup_editor()

void dbe::ObjectCreator::setup_editor ( )
private

To anyone wondering this is a list of all the uids that cannot be used(at some point i thought this could be useful to show to the user) // – that was a very stupid idea!

Definition at line 451 of file ObjectCreator.cpp.

452{
453 if (ui->ComboBoxClass->IsValid()) {
454
455 this_newuid = QString();
456 QString cname = QString::fromStdString(this_object_class.p_name);
457
458 // Create the editor for the new object to be able to modify attributes before creation
459 this_associated_editor = new ObjectEditor(cname.toStdString(), this);
460 this_associated_editor->setWindowModality(Qt::NonModal);
462 this_associated_editor->setDisabled(true);
463 ui->EditorLayout->addWidget(this_associated_editor);
464
465 {
466 // Set appropriately the stretch factor such that contents are resized
467 // favoring the object editor side
468 QSizePolicy pol = ui->splitter->widget(1)->sizePolicy();
469 pol.setHorizontalStretch(2);
470 // pol.setHorizontalPolicy(QSizePolicy::Maximum);
471 ui->splitter->widget(1)->setSizePolicy(pol);
472 }
473
474 {
475 // Set horizontal size of the editor pane to the first widget size
477 QList<QTableWidget*> const& editor_widgets{ this_associated_editor->findChildren<QTableWidget*>() };
478
479 this_associated_editor->setMinimumWidth(editor_widgets[0]->width() / 2);
480
481 QRect this_widget_geometry = this->geometry();
482 this_widget_geometry.setWidth(editor_widgets[0]->width() + ui->ObjectCreatorWidget->width());
483 this->setGeometry(this_widget_geometry);
484 }
485
486 // Set the labels to the class name
487 ui->ClassLabel->setText(QString("Selected Class: %1").arg(cname));
488 setWindowTitle(QString("Create New Object of class %1").arg(cname));
489
490 connect(this_associated_editor, SIGNAL(WidgetUpdated()), this, SLOT(UpdateActions()), Qt::UniqueConnection);
491
493 ui->ComboBoxForbiddenUid
494 ->hide();
496
497 QString const& linetext = ui->LineEditUID->text();
498
499 if (!linetext.isEmpty()) {
500 ui->LineEditUID->clear();
501 ui->LineEditUID->setText(linetext);
502 SetUID();
503 }
504
505 emit stateChanged();
506 this_object_changed = false;
507 }
508}

◆ stateChanged

void dbe::ObjectCreator::stateChanged ( )
signal

◆ UpdateActions [1/2]

void dbe::ObjectCreator::UpdateActions ( )
privateslot

Definition at line 258 of file ObjectCreator.cpp.

259{
260 bool ReleaseEditor = true;
262
263 if (!ui->LineEditUID->IsValid() || ui->LineEditUID->text().isEmpty()) {
265 ReleaseEditor = false;
266 this_newuid = QString();
267 } else {
268 this_state &= ~uidNotSet;
269 this_newuid = ui->LineEditUID->text();
270 }
271
272 if (this_file_for_new_object.isEmpty()) {
274 ReleaseEditor = false;
275 } else {
276 this_state &= ~fileNotSet;
277 }
278
279 if (ReleaseEditor) {
280 this_associated_editor->setEnabled(true);
281 }
282
283 if (this_associated_editor != nullptr) {
286 } else {
287 this_state &= ~nullNotFilled;
288 }
289 }
290
291 if (this_state == editorOk) {
292 ui->CreateObjectButton->setEnabled(true);
293 ui->CreateObjectButton->setPalette(StyleUtility::PaleGreenPalleteButton);
294
295 ui->CreateOpenObjectButton->setEnabled(true);
296 ui->CreateOpenObjectButton->setPalette(StyleUtility::PaleGreenPalleteButton);
297
298 this_status_bar->setPalette(QApplication::palette(this));
299 this_status_bar->showMessage(GetMessage());
300 } else {
301 ui->CreateObjectButton->setEnabled(false);
302 ui->CreateOpenObjectButton->setEnabled(false);
303 QPalette buttonAlert;
304 buttonAlert.setColor(QPalette::Disabled, QPalette::Button, QColor("grey"));
305 ui->CreateObjectButton->setPalette(buttonAlert);
306 ui->CreateOpenObjectButton->setPalette(buttonAlert);
308 this_status_bar->showMessage(GetMessage());
309 }
310}
bool IsEditorValid() const
static QPalette PaleGreenPalleteButton
static QPalette WarningStatusBarPalleteWindow

◆ UpdateActions [2/2]

void dbe::ObjectCreator::UpdateActions ( QString Dummy)
privateslot

Definition at line 313 of file ObjectCreator.cpp.

314{
315 Q_UNUSED(Dummy)
317}

Member Data Documentation

◆ ContextMenu

QMenu* dbe::ObjectCreator::ContextMenu
private

Definition at line 112 of file ObjectCreator.hpp.

◆ this_associated_editor

ObjectEditor* dbe::ObjectCreator::this_associated_editor
private

Definition at line 111 of file ObjectCreator.hpp.

◆ this_create_copy

bool dbe::ObjectCreator::this_create_copy
private

Definition at line 116 of file ObjectCreator.hpp.

◆ this_file_for_new_object

QString dbe::ObjectCreator::this_file_for_new_object
private

Definition at line 110 of file ObjectCreator.hpp.

◆ this_files

FileModel* dbe::ObjectCreator::this_files
private

Definition at line 102 of file ObjectCreator.hpp.

◆ this_is_temporary

bool dbe::ObjectCreator::this_is_temporary
private

Definition at line 114 of file ObjectCreator.hpp.

◆ this_newuid

QString dbe::ObjectCreator::this_newuid
private

Definition at line 109 of file ObjectCreator.hpp.

◆ this_object_changed

bool dbe::ObjectCreator::this_object_changed
private

Definition at line 115 of file ObjectCreator.hpp.

◆ this_object_class

dunedaq::conffwk::class_t dbe::ObjectCreator::this_object_class
private

Definition at line 95 of file ObjectCreator.hpp.

◆ this_relation

dunedaq::conffwk::relationship_t dbe::ObjectCreator::this_relation
private

Definition at line 99 of file ObjectCreator.hpp.

◆ this_sort

QSortFilterProxyModel dbe::ObjectCreator::this_sort
private

Definition at line 101 of file ObjectCreator.hpp.

◆ this_src_object

std::unique_ptr<tref> dbe::ObjectCreator::this_src_object
private

Definition at line 97 of file ObjectCreator.hpp.

◆ this_state

int dbe::ObjectCreator::this_state
private

Definition at line 106 of file ObjectCreator.hpp.

◆ this_status_bar

QStatusBar* dbe::ObjectCreator::this_status_bar
private

Definition at line 104 of file ObjectCreator.hpp.

◆ this_target_object

std::unique_ptr<tref> dbe::ObjectCreator::this_target_object
private

Definition at line 98 of file ObjectCreator.hpp.

◆ ui

std::unique_ptr<dbe::Ui::ObjectCreator> dbe::ObjectCreator::ui
private

Definition at line 93 of file ObjectCreator.hpp.

◆ UidSet

bool dbe::ObjectCreator::UidSet
private

Definition at line 108 of file ObjectCreator.hpp.

◆ uuid

QUuid const dbe::ObjectCreator::uuid
private

Definition at line 118 of file ObjectCreator.hpp.


The documentation for this class was generated from the following files: