28#include <QApplication>
30#include <QDesktopServices>
32#include <QItemDelegate>
34#include <QProgressDialog>
44#include <boost/scope_exit.hpp>
48class DummyEditorDelegate :
public QItemDelegate
51 void setModelData(QWidget* ,
53 const QModelIndex& )
const override
82 QCoreApplication::setOrganizationName(
"dunedaq");
83 QCoreApplication::setApplicationName(
"dbe_main");
90 OpenDB->setEnabled(
false);
93 CreateDatabase->setEnabled(
false);
94 Commit->setEnabled(
false);
96 QMessageBox::information(
this,
98 QString(
"The configuration is opened in archival/detached mode.")
99 .append(
"\nYou can browse or modify objects, but changes cannot be saved or commited."));
108 tableholder->addTab(
new TableTab(tableholder),
"Table View");
109 tableholder->removeTab(0);
111 QPushButton* addtab_button =
new QPushButton(
"+");
112 tableholder->setCornerWidget(addtab_button, Qt::TopLeftCorner);
113 connect(addtab_button, SIGNAL(clicked()),
this, SLOT(
slot_add_tab()));
115 tableholder->setTabsClosable(
true);
116 connect(tableholder, SIGNAL(tabCloseRequested(
int)),
this, SLOT(
slot_remove_tab(
int)));
122 tableholder->addTab(
new TableTab(tableholder),
"Table View");
123 tableholder->setCurrentIndex(tableholder->count() - 1);
130 if (i == -1 || ((tableholder->count() == 1) && i == 0)) {
134 QWidget* Widget = tableholder->widget(i);
136 tableholder->removeTab(i);
147 setWindowTitle(
"DUNE DAQ Configuration Database Editor (DBE)");
150 SearchLineTable->hide();
151 SearchLineTable->setClearButtonEnabled(
true);
152 SearchTreeLine->setClearButtonEnabled(
true);
153 CaseSensitiveCheckBoxTable->hide();
154 tableholder->removeTab(1);
157 HelpMenu->setEnabled(
false);
160 Commit->setEnabled(
false);
161 UndoAction->setEnabled(
true);
162 RedoAction->setEnabled(
true);
165 SearchBox->setFocusPolicy(Qt::ClickFocus);
168 TreeView->setWhatsThis(
"This view shows the classes and objects of the database");
169 FileView->setWhatsThis(
"This view shows the file structure of the database");
170 UndoView->setWhatsThis(
"This view shows the commands in the Undo Command stack");
172 CommittedTable->setHorizontalHeaderLabels(QStringList() <<
"File" <<
"Comment" <<
"Date");
173 CommittedTable->setAlternatingRowColors(
true);
174 CommittedTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
175 CommittedTable->horizontalHeader()->setDefaultSectionSize(250);
176 CommittedTable->setWordWrap(
true);
177 CommittedTable->setTextElideMode(Qt::ElideRight);
178 CommittedTable->setItemDelegate(
new DummyEditorDelegate());
181 InfoWidget->setCurrentIndex(0);
189 connect(Exit, SIGNAL(triggered()),
this, SLOT(close()));
191 connect(UndoAction, SIGNAL(triggered()), UndoView->stack(), SLOT(undo()));
192 connect(RedoAction, SIGNAL(triggered()), UndoView->stack(), SLOT(redo()));
197 connect(DisplayClassView, SIGNAL(triggered(
bool)), TreeDockWidget, SLOT(setVisible(
bool)));
198 connect(DisplayTableView, SIGNAL(triggered(
bool)), TableGroupBox, SLOT(setVisible(
bool)));
199 connect(DisplayMessages, SIGNAL(triggered(
bool)), InfoDockWidget, SLOT(setVisible(
bool)));
200 connect(DisplayToolbar, SIGNAL(triggered(
bool)), MainToolBar, SLOT(setVisible(
bool)));
202 connect(TreeDockWidget, SIGNAL(visibilityChanged(
bool)), DisplayTableView, SLOT(setChecked(
bool)));
203 connect(InfoDockWidget, SIGNAL(visibilityChanged(
bool)), DisplayMessages, SLOT(setChecked(
bool)));
204 connect(MainToolBar, SIGNAL(visibilityChanged(
bool)), DisplayToolbar, SLOT(setChecked(
bool)));
210 connect(WhatThisAction, SIGNAL(triggered()),
this, SLOT(
slot_whatisthis()));
217 SIGNAL(db_committed(
const std::list<std::string>&,
const std::string&)),
222 SIGNAL(FetchMoreData(
const treenode*)),
231 SIGNAL(db_committed(
const std::list<std::string>&,
const std::string&)),
247 connect(SearchBox, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
slot_filter_query()));
248 connect(SearchTreeLine, SIGNAL(textChanged(
const QString&)),
this, SLOT(
slot_filter_textchange(
const QString&)));
249 connect(SearchTreeLine, SIGNAL(textEdited(
const QString&)),
this, SLOT(
slot_filter_query()));
250 connect(SearchTreeLine, SIGNAL(returnPressed()),
this, SLOT(
slot_filter_query()));
262 SIGNAL(signal_debug(QString
const, QString
const)),
265 Qt::QueuedConnection);
268 SIGNAL(signal_info(QString
const, QString
const)),
271 Qt::QueuedConnection);
274 SIGNAL(signal_note(QString
const, QString
const)),
277 Qt::QueuedConnection);
280 SIGNAL(signal_warn(QString
const, QString
const)),
283 Qt::QueuedConnection);
286 SIGNAL(signal_error(QString
const, QString
const)),
289 Qt::QueuedConnection);
292 SIGNAL(signal_fail(QString
const, QString
const)),
295 Qt::QueuedConnection);
304 QStringList Headers{
"Class Name",
"# Objects" };
322 TreeView->setSortingEnabled(
true);
323 TreeView->resizeColumnToContents(0);
324 TreeView->resizeColumnToContents(1);
326 connect(HideCheckBox, SIGNAL(toggled(
bool)),
this_treefilter, SLOT(ToggleEmptyClasses(
bool)));
328 connect(ShowDerivedObjects, SIGNAL(toggled(
bool)),
this_classes, SLOT(ToggleAbstractClassesSelectable(
bool)));
337 SearchLineTable->clear();
338 SearchLineTable->show();
339 SearchLineTable->setProperty(
"placeholderText", QVariant(QString(
"Table Filter")));
340 CaseSensitiveCheckBoxTable->show();
359 QString
const cname = tree_node->
GetData(0).toString();
362 if (not cinfo.
p_abstract or ShowDerivedObjects->isChecked()) {
363 if (
TableTab* CurrentTab =
dynamic_cast<TableTab*
>(tableholder->currentWidget())) {
364 CurrentTab->CreateModels();
371 connect(CurrentDelegate,
372 SIGNAL(CreateObjectEditorSignal(
tref)),
375 Qt::UniqueConnection);
377 if (
dynamic_cast<ClassNode*
>(tree_node)) {
378 BOOST_SCOPE_EXIT(CurrentTabModel)
380 emit CurrentTabModel->layoutChanged();
384 emit CurrentTabModel->layoutAboutToBeChanged();
388 tableholder->setTabText(tableholder->currentIndex(), cname);
389 CurrentTab->ResetTableView();
392 CurrentTab->ResizeHeaders();
413 FileView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
414 FileView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
415 FileView->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
416 FileView->horizontalHeader()->setSectionResizeMode(3, QHeaderView::ResizeToContents);
434 int DialogResult = SaveDialog->exec();
440 if (!message.isEmpty()) {
441 QMessageBox::warning(0,
"Save database", message);
455 if (not modified.empty()) {
458 for (std::string
const& f : modified) {
462 INFO(
"List of modified files committed to the database ",
"Program execution success", msg);
464 WARN(
"Changes where committed successfully but list of modified files could not be retrieved",
465 "Unexpected program execution");
468 }
catch (dunedaq::conffwk::Exception
const& e) {
475 catch (daq::dbe::CouldNotCommitChanges
const& exc) {
476 std::string reason{ exc.what() };
477 auto cause = exc.cause();
478 while (cause !=
nullptr) {
479 reason = cause->what();
480 cause = cause->cause();
482 WARN(
"The changes could not be committed",
485 "\n\nTry fixing includes from File Info window")
505 }
catch (dunedaq::conffwk::Exception
const& e) {
518 }
catch (dunedaq::conffwk::Exception
const& e) {
527 bool WidgetFound =
false;
528 QString ObjectEditorName = QString(
"%1@%2").arg(Object.
UID().c_str()).arg(Object.
class_name().c_str());
530 for (QWidget* Editor : QApplication::allWidgets()) {
533 if (Widget !=
nullptr) {
534 if ((Widget->objectName()).compare(ObjectEditorName) == 0) {
536 Widget->setVisible(
true);
552 Batch->setWindowModality(Qt::WindowModal);
555 ERROR(
"Database must have been loaded",
"No database loaded");
563 ERROR(
"Database must have been loaded",
"No database loaded");
568 TableTab* CurrentTab =
dynamic_cast<TableTab*
>(tableholder->currentWidget());
573 std::vector<dref> TableObject;
575 if (!CurrentTab || !CurrentTableModel) {
576 ERROR(
"Table cannot be processed",
"Table is empty");
581 ERROR(
"Table cannot be processed",
"Table is empty");
585 QString Filter = SearchLineTable->text();
588 if (Filter.isEmpty()) {
589 TableObject.push_back(Object);
591 QString ObjectString = QString::fromStdString(Object.UID());
593 if (ObjectString.contains(Filter, Qt::CaseInsensitive)) {
594 TableObject.push_back(Object);
600 Batch->setWindowModality(Qt::WindowModal);
614 QSettings defaults(
":theme/DBE_Default_User_Settings.conf", QSettings::NativeFormat);
627 for (
const QString& j : incs) {
642 CreateDatabaseW->show();
643 connect(CreateDatabaseW,
644 SIGNAL(CanLoadDatabase(
const QString&)),
652 if (!DatabaseName.isEmpty()) {
653 QFileInfo DatabaseFile = QFileInfo(DatabaseName);
655 if (DatabaseFile.exists()) {
656 QString Path = QString(DatabaseFile.absoluteFilePath());
670 WARN(
"File not found during database load",
671 "File does not exist",
673 DatabaseFile.fileName().toStdString());
676 ERROR(
"Database load error",
"File was not selected");
684 QMessageBox MessageBox;
685 MessageBox.setText(
"Do you really wish to abandon the current database and load a new one ?");
686 MessageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
687 MessageBox.setDefaultButton(QMessageBox::Cancel);
688 int UserOption = MessageBox.exec();
690 switch (UserOption) {
692 case QMessageBox::Yes:
695 case QMessageBox::Cancel:
716 connect(
this, SIGNAL(
signal_db_loaded()), &loop, SLOT(quit()), Qt::QueuedConnection);
721 std::unique_ptr<QProgressDialog> progress_bar;
722 if (!alreadyLoaded) {
723 progress_bar.reset(
new QProgressDialog(
"Loading Configuration...", QString(), 0, 0,
this));
724 progress_bar->setWindowModality(Qt::WindowModal);
725 progress_bar->show();
728 BOOST_SCOPE_EXIT(
void)
730 QApplication::restoreOverrideCursor();
734 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
737 for (QWidget* widget : QApplication::allWidgets()) {
746 std::future<bool> waiter = std::async(alreadyLoaded ? std::launch::deferred : std::launch::async, [
this] {
753 if (!alreadyLoaded) {
754 loop.exec(QEventLoop::ExcludeUserInputEvents);
770 for (
int i = 0; i < tableholder->count(); i++) {
777 FileView->setModel(NULL);
783 settings.beginGroup(
"MainWindow-layout");
784 if (settings.contains(
"size")) {
785 resize(settings.value(
"size").toSize());
787 if (settings.contains(
"pos")) {
788 move(settings.value(
"pos").toPoint());
790 if (settings.contains(
"TableView")) {
791 DisplayTableView->setChecked(settings.value(
"TableView").toBool());
793 if (settings.contains(
"ClassView")) {
794 DisplayClassView->setChecked(settings.value(
"ClassView").toBool());
796 if (settings.contains(
"Messages")) {
797 DisplayMessages->setChecked(settings.value(
"Messages").toBool());
799 if (settings.contains(
"geometry")) {
800 restoreGeometry(settings.value(
"geometry").toByteArray());
802 if (settings.contains(
"state")) {
803 restoreState(settings.value(
"state").toByteArray());
807 settings.beginGroup(
"MainWindow-checkboxes");
808 if (settings.contains(
"tree-case-sensitive")) {
809 CaseSensitiveCheckBoxTree->setChecked(settings.value(
"tree-case-sensitive").toBool());
811 if (settings.contains(
"table-case-sensitive")) {
812 CaseSensitiveCheckBoxTable->setChecked(settings.value(
"table-case-sensitive").toBool());
822 QSettings Settings(
"dunedaq",
"dbe_main");
823 Settings.beginGroup(
"MainWindow-layout");
824 Settings.setValue(
"size", size());
825 Settings.setValue(
"pos", pos());
826 Settings.setValue(
"TableView", DisplayTableView->isChecked());
827 Settings.setValue(
"ClassView", DisplayClassView->isChecked());
829 Settings.setValue(
"Messages", DisplayMessages->isChecked());
830 Settings.setValue(
"geometry", saveGeometry());
831 Settings.setValue(
"state", saveState());
834 Settings.beginGroup(
"MainWindow-checkboxes");
835 Settings.setValue(
"tree-case-sensitive", CaseSensitiveCheckBoxTree->isChecked());
836 Settings.setValue(
"table-case-sensitive", CaseSensitiveCheckBoxTable->isChecked());
843 if (!opts.isEmpty()) {
847 QString FileName = opts.value(
"f");
848 QString RdbFileName = opts.value(
"r");
849 QString RoksFileName = opts.value(
"o");
850 QString HashVersion = opts.value(
"v");
852 if (!FileName.isEmpty()) {
853 FileToLoad = FileName;
856 if (!HashVersion.isEmpty()) {
857 ::setenv(
"TDAQ_DB_VERSION", QString(
"hash:").append(HashVersion).toStdString().c_str(), 1);
858 ::setenv(
"OKS_GIT_PROTOCOL",
"http", 1);
861 }
else if (!RdbFileName.isEmpty()) {
862 FileToLoad = RdbFileName;
864 }
else if (!RoksFileName.isEmpty()) {
865 FileToLoad = RoksFileName;
869 if (not FileToLoad.isEmpty()) {
870 dbopen(FileToLoad, LoadConfig);
1048 QWhatsThis::enterWhatsThisMode();
1054 static QString
const title(
"About DBE");
1055 static QString
const msg = QString()
1056 .append(
"DBE is an editor to work with OKS and RDB backends that manages most of the "
1057 "hard work for you in editing the configuration database\n")
1058 .append(
"\n\nMaintained :\t\tC&C Working group \n\t\t\t(atlas-tdaq-cc-wg@cern.ch)")
1059 .append(
"\nProgram version:\t\t")
1061 .append(
"\nLibraries version:\t")
1062 .append(
"\n\t\t\tdbecore(")
1064 .append(
"),\n\t\t\tdbe_config_api(")
1066 .append(
"),\n\t\t\tdbe_structure(")
1068 .append(
"),\n\t\t\tdbe_internal(")
1071 .append(
"\nRepo commit hash:\t")
1074 QMessageBox::about(
this, title, msg);
1080 QDesktopServices::openUrl(QUrl(
"https://atlasdaq.cern.ch/dbe/"));
1086 InfoWidget->setCurrentIndex(InfoWidget->indexOf(CommitedTab));
1092 UndoView->stack()->setIndex(0);
1098 if (CaseSensitiveCheckBoxTree->isChecked())
1114 for (
int i = 0; i < tableholder->count(); i++) {
1121 FileView->setModel(NULL);
1133 if (SearchBox->currentIndex() == 2) {
1152 QString Tmp = SearchTreeLine->text();
1153 if (SearchBox->currentIndex() == 1) {
1169 TableTab* CurrentTab =
dynamic_cast<TableTab*
>(tableholder->currentWidget());
1174 if (TableFilter ==
nullptr) {
1180 if (CaseSensitiveCheckBoxTable->isChecked())
1181 TableFilter->setFilterCaseSensitivity(Qt::CaseSensitive);
1183 TableFilter->setFilterCaseSensitivity(Qt::CaseInsensitive);
1186 TableFilter->setFilterRegExp(FilterText);
1194 int IndexOfCurrentTab = tableholder->currentIndex();
1197 std::vector<QModelIndex> idxs;
1199 for (
int i = 0; i < tableholder->count(); ++i) {
1204 if (!TableClassName.isEmpty()) {
1206 if (NodeClass !=
nullptr) {
1215 while (tableholder->count() != 0) {
1216 tableholder->widget(0)->deleteLater();
1217 tableholder->removeTab(0);
1224 for (
const auto& idx : idxs) {
1230 tableholder->setCurrentIndex(IndexOfCurrentTab);
1240 total += data.toInt();
1242 TotalObjectsLabel->setText(QString(
"Total Objects: %1").arg(total));
1251 foreach (QWidget* widget, QApplication::allWidgets())
1260std::vector<dbe::tref>
1263 if (not Tmp.isEmpty()) {
1264 QString
const Query = QString(
"(this (object-id \".*%1.*\" ~=))").arg(Tmp);
1267 std::vector<dbe::tref> result;
1272 result.insert(result.end(), class_matching_objects.begin(), class_matching_objects.end());
1276 }
catch (dunedaq::conffwk::Exception
const& ex) {
1288 if (Target == SearchBox->lineEdit() && Event->type() == QEvent::MouseButtonRelease) {
1289 if (!SearchBox->lineEdit()->hasSelectedText()) {
1290 SearchBox->lineEdit()->selectAll();
1303 foreach (QWidget* widget, QApplication::allWidgets()) {
1307 if (ObjectEditorInstance) {
1315 if (ObjectCreatorInstance) {
1316 OK = ObjectCreatorInstance->
CanClose();
1327 if (undo_stack->isClean()) {
1328 if (undo_stack->count() == 0) {
1336 QMessageBox::question(0,
1338 QString(
"There are unsaved changes.\n\nDo you want to save and commit them to the DB?\n"),
1339 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
1342 if (ret == QMessageBox::Discard) {
1345 }
else if (ret == QMessageBox::Save) {
1347 }
else if (ret == QMessageBox::Cancel) {
1373 BOOST_SCOPE_EXIT(
void)
1375 QApplication::restoreOverrideCursor();
1377 BOOST_SCOPE_EXIT_END
1379 QApplication::setOverrideCursor(Qt::WaitCursor);
1396 QFileDialog FileDialog(
this, tr(
"Open File"),
".", tr(
"XML files (*.xml)"));
1397 FileDialog.setAcceptMode(QFileDialog::AcceptOpen);
1398 FileDialog.setFileMode(QFileDialog::ExistingFile);
1399 FileDialog.setViewMode(QFileDialog::Detail);
1401 if (FileDialog.exec()) {
1402 QStringList FilesSelected = FileDialog.selectedFiles();
1404 if (FilesSelected.size()) {
1405 QString DatabasePath = FilesSelected.value(0);
1424 auto user_confirmation = [](QString
const& msg) {
1425 QMessageBox ExternalMessageBox;
1426 ExternalMessageBox.setText(msg);
1427 ExternalMessageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
1428 ExternalMessageBox.setDefaultButton(QMessageBox::Yes);
1429 return ExternalMessageBox.exec() == QMessageBox::Yes;
1434 auto rewind_stack = [&undo_stack]() {
1435 std::vector<bool> commands_original_undo_state;
1441 for (
int i = 0; i < undo_stack->count(); ++i) {
1443 commands_original_undo_state.push_back(Command->undoable());
1444 Command->setundoable(
false);
1450 undo_stack->setIndex(0);
1454 auto cmdstate = commands_original_undo_state.begin();
1456 for (
int i = 0; i != undo_stack->count(); ++i) {
1459 Command->setundoable(*cmdstate++);
1466 for (QWidget* widget : QApplication::allWidgets()) {
1472 if (undo_stack->count() != 0) {
1474 QString(
"External changes to the database have been applied. Do you want to replay your changes on top? ") +
1475 QString(
" Otherwise any local change will be lost.\n");
1476 if (user_confirmation(msg)) {
1483 while (not internal_changes->empty()) {
1484 internal_changes_reverse_copy.push(internal_changes->top());
1485 internal_changes->pop();
1489 for (
int i = 0; i < undo_stack->count(); ++i) {
1491 internal_changes_reverse_copy.pop();
1492 internal_changes->push(Change);
1525 }
catch (dunedaq::conffwk::Exception
const& e) {
1526 WARN(
"Object reference could not be changed",
1528 "for object with UID:",
1533 WARN(
"Unknown exception during object modification",
1535 "\n\nFor object with UID:",
1545 INFO(
"Database reloaded due external changes",
"Database consistency enforcement");
1564 QWidgetList allwidgets = QApplication::topLevelWidgets();
1566 QWidgetList::iterator it = allwidgets.begin();
1567 MainWindow* main_win = qobject_cast<MainWindow*>(*it);
1569 for (; it != allwidgets.end() and main_win ==
nullptr; ++it) {
1570 main_win = qobject_cast<MainWindow*>(*it);
1587const int MAX_MESSAGE_LENGTH = 500;
1593 QMessageBox mb(
this);
1595 mb.setWindowTitle(title);
1596 mb.setStandardButtons(QMessageBox::Ok);
1597 if (msg.length() > MAX_MESSAGE_LENGTH) {
1598 QString&& truncated_msg = msg.left(MAX_MESSAGE_LENGTH);
1599 truncated_msg.append(
"...");
1601 "<b>The message has been truncated because it is too long, look at the details for the full message</b>");
1602 mb.setInformativeText(truncated_msg);
1603 mb.setDetailedText(msg);
1667 std::vector<dbe::dref> objects;
1668 for (
const auto& o : objs) {
1681 for (
int i = 0; i < tableholder->count(); i++) {
1686 m->objectsUpdated(objects);
1702 if (uncommittedFiles.empty() ==
true) {
1703 Commit->setEnabled(
false);
1704 Commit->setToolTip(
"There is nothing to commit");
1706 Commit->setEnabled(
true);
1709 for (
const std::string& f : uncommittedFiles) {
1710 l +=
" " + f +
"\n";
1713 Commit->setToolTip(QString::fromStdString(
"Commit changes.\nHere are the uncommitted files:\n" + l));
1719 Commit->setEnabled(
false);
1726 for (
const std::string& f : files) {
1727 CommittedTable->insertRow(0);
1728 CommittedTable->setItem(0, 0,
new QTableWidgetItem(QString::fromStdString(f)));
1729 CommittedTable->setItem(0, 1,
new QTableWidgetItem(QString::fromStdString(msg)));
1730 CommittedTable->setItem(
1731 0, 2,
new QTableWidgetItem(QDate::currentDate().toString() +
" " + QTime::currentTime().toString()));
1734 CommittedTable->resizeColumnsToContents();
char const *const dbe_lib_core_version
Including DBE.
CommitDialog(QWidget *parent=0)
QString GetCommitMessage() const
static void parse_all_objects()
static QString check_file_includes(const QString &file)
static void show_file_info(const QString &filename)
FileModel(QObject *parent=nullptr)
Including QT Headers.
void slot_fetch_data(treenode const *)
void slot_information_message(QString const, QString const)
void edit_object_at(const QModelIndex &Index)
bool dbopen(QString const &, dbinfo const &)
void slot_show_userchanges()
void slot_update_committed_files(const std::list< std::string > &, const std::string &)
void slot_warning_message(QString const, QString const)
std::atomic< bool > isArchivedConf
void slot_batch_change_start()
void slot_loaded_db_file(QString)
void slot_batch_change_stop(const QList< QPair< QString, QString > > &)
void slot_remove_tab(int i)
dbe::models::tree * this_classes
void slot_launch_object_editor(tref)
void slot_abort_changes()
void slot_process_externalchanges()
void slot_toggle_casesensitive_for_treeview(bool)
void load_default_settings()
void display_message_box(const QString &title, const QString &msg, const QMessageBox::Icon &icon)
void slot_launch_batchchange_on_table()
void build_class_tree_model()
void slot_toggle_commit_button()
void closeEvent(QCloseEvent *event)
void slot_load_db_from_create_widget(const QString &)
bool slot_commit_database(bool Exit=false)
void argsparse(QMap< QString, QString > const &)
void slot_launch_batchchange()
void apply_settings(QSettings &setting)
cptr< dbe::CustomTreeView > get_view() const
models::treeselection * this_treefilter
void slot_error_message(QString const, QString const)
bool eventFilter(QObject *Target, QEvent *Event)
void slot_open_database_from_file()
void slot_abort_external_changes()
void signal_new_file_model()
QString find_db_repository_dir()
void slot_show_userguide()
static MainWindow * findthis()
void slot_undo_allchanges()
void slot_model_rebuild()
bool m_batch_change_in_progress
void slot_edit_object_from_class_view(QModelIndex const &)
void slot_filter_table_textchange(const QString &)
void slot_filter_textchange(const QString &)
void signal_externalchanges_processed()
std::vector< dbe::tref > ProcessQuery(QString const &)
void signal_batch_change_stopped(const QList< QPair< QString, QString > > &)
void update_total_objects()
void reload_default_settings()
MainWindow(QMap< QString, QString > const &CommandLine, QWidget *parent=nullptr)
void slot_launch_preferences()
QSortFilterProxyModel this_filesort
void slot_show_information_about_dbe()
ObjectEditor(QWidget *parent=nullptr)
Preferences(QWidget *parent=0)
static void InitColorManagement()
TableTab(QWidget *parent=0)
Including Qt.
dbe::models::table * GetTableModel() const
dbe::models::tableselection * GetTableFilter() const
void setundoable(bool s=true) const
void setredoable(bool s=true) const
static cptr< datahandler > gethandler()
static t_undo_stack_cptr get_commands()
static bool is_database_loaded()
cptr< t_undo_stack > t_undo_stack_cptr
static std::list< std::string > uncommitted_files()
std::stack< t_internal_change, std::vector< t_internal_change > > t_internal_changes_stack
static void set_total_objects(int const i)
static void clear_commands()
static QString dbfullname()
static t_internal_changes_stack_cptr get_internal_change_stack()
static bool load(bool subscribeToChanges=true)
static std::list< std::string > save(QString const &)
static void setdbinfo(QString const &location, dbinfo const itype=dbinfo::oks)
static confaccessor & ref()
static QString db_implementation_name()
static QStringList inclusions(QStringList const &candidates, QStringList files={})
static dunedaq::conffwk::class_t definition(std::string const &cn, bool direct_only)
std::string class_name() const
static std::vector< configobject::tref > gets(std::string const &cname, std::string const &query="")
static configobject::tref get(dbe::cokey const &desc)
static messenger_proxy & ref()
QList< dbe::dref > * GetTableObjects()
QString get_class_name() const
bool BuildTableFromClass(const QString &ClassName, bool BuildSubClasses=false)
void SetFilterType(FilterType Filter)
virtual QVariant GetData(const int Column, int role=Qt::DisplayRole) const
char const *const dbe_lib_internal_version
char const *const dbe_lib_config_api_version
bool has_obj(std::string const &classname, std::string const &object_uid)
std::string const parse(ers::Issue const &)
inner::configobject::tref tref
config_object_description dref
void error(const Issue &issue)
modification request
Type of modification.
std::string uid
Object Identification.
char const *const dbe_lib_structure_version
Including QT Headers.
#define dbe_compiled_version
#define dbe_compiled_commit