30#include <QProgressDialog>
36#include <QDesktopServices>
38#include <QApplication>
39#include <QItemDelegate>
44#include <boost/scope_exit.hpp>
49 class DummyEditorDelegate :
public QItemDelegate {
51 void setModelData(QWidget * , QAbstractItemModel * ,
const QModelIndex & )
const override {}
56 : QMainWindow ( parent ),
78 QCoreApplication::setOrganizationName(
"dunedaq");
79 QCoreApplication::setApplicationName(
"dbe_main");
86 OpenDB->setEnabled(
false);
89 CreateDatabase->setEnabled(
false);
90 Commit->setEnabled(
false);
92 QMessageBox::information(
this,
94 QString(
"The configuration is opened in archival/detached mode.")
95 .append(
"\nYou can browse or modify objects, but changes cannot be saved or commited."));
104 tableholder->addTab (
new TableTab ( tableholder ),
"Table View" );
105 tableholder->removeTab ( 0 );
107 QPushButton * addtab_button =
new QPushButton (
"+" );
108 tableholder->setCornerWidget ( addtab_button, Qt::TopLeftCorner );
109 connect ( addtab_button, SIGNAL ( clicked() ),
this, SLOT (
slot_add_tab() ) );
111 tableholder->setTabsClosable (
true );
112 connect ( tableholder, SIGNAL ( tabCloseRequested (
int ) ),
this,
118 tableholder->addTab (
new TableTab ( tableholder ),
"Table View" );
119 tableholder->setCurrentIndex ( tableholder->count()-1 );
125 if ( i == -1 || ( ( tableholder->count() == 1 ) && i == 0 ) )
130 QWidget * Widget = tableholder->widget ( i );
132 tableholder->removeTab ( i );
143 setWindowTitle (
"DUNE DAQ Configuration Database Editor (DBE)" );
146 SearchLineTable->hide();
147 SearchLineTable->setClearButtonEnabled(
true);
148 SearchTreeLine->setClearButtonEnabled(
true);
149 CaseSensitiveCheckBoxTable->hide();
150 tableholder->removeTab ( 1 );
153 HelpMenu->setEnabled (
false );
156 Commit->setEnabled (
false );
157 UndoAction->setEnabled (
true );
158 RedoAction->setEnabled (
true );
161 SearchBox->setFocusPolicy ( Qt::ClickFocus );
164 TreeView->setWhatsThis (
"This view shows the classes and objects of the database" );
165 FileView->setWhatsThis (
"This view shows the file structure of the database" );
166 UndoView->setWhatsThis (
"This view shows the commands in the Undo Command stack" );
168 CommittedTable->setHorizontalHeaderLabels(QStringList() <<
"File" <<
"Comment" <<
"Date");
169 CommittedTable->setAlternatingRowColors(
true);
170 CommittedTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
171 CommittedTable->horizontalHeader()->setDefaultSectionSize(250);
172 CommittedTable->setWordWrap(
true);
173 CommittedTable->setTextElideMode(Qt::ElideRight);
174 CommittedTable->setItemDelegate(
new DummyEditorDelegate());
177 InfoWidget->setCurrentIndex (0);
184 connect ( Exit, SIGNAL ( triggered() ),
this, SLOT ( close() ) );
186 connect ( UndoAction, SIGNAL ( triggered() ), UndoView->stack(), SLOT ( undo() ) );
187 connect ( RedoAction, SIGNAL ( triggered() ), UndoView->stack(), SLOT ( redo() ) );
190 connect ( BatchChangeTable, SIGNAL ( triggered() ),
this,
193 connect ( DisplayClassView, SIGNAL ( triggered (
bool ) ), TreeDockWidget,
194 SLOT ( setVisible (
bool ) ) );
195 connect ( DisplayTableView, SIGNAL ( triggered (
bool ) ), TableGroupBox,
196 SLOT ( setVisible (
bool ) ) );
197 connect ( DisplayMessages, SIGNAL ( triggered (
bool ) ), InfoDockWidget,
198 SLOT ( setVisible (
bool ) ) );
199 connect ( DisplayToolbar, SIGNAL ( triggered (
bool ) ), MainToolBar,
200 SLOT ( setVisible (
bool ) ) );
202 connect ( TreeDockWidget, SIGNAL ( visibilityChanged (
bool ) ), DisplayTableView,
203 SLOT ( setChecked (
bool ) ) );
204 connect ( InfoDockWidget , SIGNAL ( visibilityChanged (
bool ) ), DisplayMessages,
205 SLOT ( setChecked (
bool ) ) );
206 connect ( MainToolBar , SIGNAL ( visibilityChanged (
bool ) ), DisplayToolbar,
207 SLOT ( setChecked (
bool ) ) );
210 connect ( LoadDefaultSettings, SIGNAL ( triggered() ),
this,
212 connect ( CreateDatabase, SIGNAL ( triggered() ),
this, SLOT (
slot_create_newdb() ) );
215 connect ( WhatThisAction, SIGNAL ( triggered() ),
this, SLOT (
slot_whatisthis() ) );
219 connect ( TreeView, SIGNAL ( activated ( QModelIndex ) ),
this,
222 connect( &
confaccessor::ref(), SIGNAL(db_committed(
const std::list<std::string>&,
const std::string&)),
this,
237 connect( &
confaccessor::ref(), SIGNAL(db_committed(
const std::list<std::string>&,
const std::string&)),
this,
258 connect ( SearchBox, SIGNAL ( currentIndexChanged(
int) ),
this,
260 connect ( SearchTreeLine, SIGNAL ( textChanged (
const QString & ) ),
this,
262 connect ( SearchTreeLine, SIGNAL ( textEdited (
const QString & ) ),
this,
264 connect ( SearchTreeLine, SIGNAL ( returnPressed() ),
this, SLOT (
slot_filter_query() ) );
265 connect ( SearchLineTable, SIGNAL ( textChanged (
const QString & ) ),
this,
267 connect ( CaseSensitiveCheckBoxTree, SIGNAL ( clicked (
bool ) ),
this,
272 connect ( information_about_dbe, SIGNAL ( triggered() ),
this,
278 SIGNAL ( signal_debug ( QString
const, QString
const ) ),
this,
282 SIGNAL ( signal_info ( QString
const, QString
const ) ),
this,
286 SIGNAL ( signal_note ( QString
const, QString
const ) ),
this,
290 SIGNAL ( signal_warn ( QString
const, QString
const ) ),
this,
294 SIGNAL ( signal_error ( QString
const, QString
const ) ),
this,
298 SIGNAL ( signal_fail ( QString
const, QString
const ) ),
this,
308 {
"Class Name",
"# Objects" };
321 connect (
this_classes, SIGNAL ( ObjectFile ( QString ) ),
328 TreeView->setSortingEnabled (
true );
329 TreeView->resizeColumnToContents ( 0 );
330 TreeView->resizeColumnToContents ( 1 );
333 SLOT ( ToggleEmptyClasses (
bool ) ) );
335 connect ( ShowDerivedObjects, SIGNAL ( toggled (
bool ) ),
this_classes,
336 SLOT ( ToggleAbstractClassesSelectable (
bool ) ) );
344 SearchLineTable->clear();
345 SearchLineTable->show();
346 SearchLineTable->setProperty (
"placeholderText", QVariant ( QString (
"Table Filter" ) ) );
347 CaseSensitiveCheckBoxTable->show();
359 if (
dynamic_cast<ObjectNode *
> ( tree_node ) )
368 QString
const cname = tree_node->
GetData ( 0 ).toString();
373 if ( not cinfo.
p_abstract or ShowDerivedObjects->isChecked() )
375 if (
TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->currentWidget() ) )
377 CurrentTab->CreateModels();
379 CustomDelegate * CurrentDelegate = CurrentTab->GetTableDelegate();
382 connect ( CurrentView, SIGNAL ( OpenEditor (
tref ) ),
this,
384 connect ( CurrentDelegate, SIGNAL ( CreateObjectEditorSignal (
tref ) ),
this,
387 if (
dynamic_cast<ClassNode *
> ( tree_node ) )
389 BOOST_SCOPE_EXIT(CurrentTabModel)
391 emit CurrentTabModel->layoutChanged();
395 emit CurrentTabModel->layoutAboutToBeChanged();
399 tableholder->setTabText ( tableholder->currentIndex(), cname );
400 CurrentTab->ResetTableView();
403 CurrentTab->ResizeHeaders();
424 FileView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
425 FileView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
426 FileView->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
427 FileView->horizontalHeader()->setSectionResizeMode(3, QHeaderView::ResizeToContents);
446 int DialogResult = SaveDialog->exec();
453 if (!message.isEmpty()) {
454 QMessageBox::warning ( 0,
"Save database", message );
469 if ( not modified.empty() )
473 for ( std::string
const & f : modified )
478 INFO (
"List of modified files committed to the database ",
"Program execution success",
483 WARN (
"Changes where committed successfully but list of modified files could not be retrieved",
484 "Unexpected program execution" );
488 catch ( dunedaq::conffwk::Exception
const & e )
496 catch (daq::dbe::CouldNotCommitChanges
const& exc)
498 std::string reason{exc.what()};
499 auto cause = exc.cause();
500 while (cause !=
nullptr) {
501 reason = cause->what();
502 cause = cause->cause();
504 WARN (
"The changes could not be committed",
507 "\n\nTry fixing includes from File Info window")
532 catch ( dunedaq::conffwk::Exception
const & e )
548 catch ( dunedaq::conffwk::Exception
const & e )
557 bool WidgetFound =
false;
558 QString ObjectEditorName = QString (
"%1@%2" ).arg ( Object.
UID().c_str() ).arg (
561 for ( QWidget * Editor : QApplication::allWidgets() )
565 if ( Widget !=
nullptr )
567 if ( ( Widget->objectName() ).compare ( ObjectEditorName ) == 0 )
570 Widget->setVisible (
true );
587 Batch->setWindowModality ( Qt::WindowModal );
592 ERROR (
"Database must have been loaded",
"No database loaded" );
600 ERROR (
"Database must have been loaded",
"No database loaded" );
605 TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->currentWidget() );
610 std::vector<dref> TableObject;
612 if ( !CurrentTab || !CurrentTableModel )
614 ERROR (
"Table cannot be processed",
"Table is empty" );
620 ERROR (
"Table cannot be processed",
"Table is empty" );
624 QString Filter = SearchLineTable->text();
628 if ( Filter.isEmpty() )
630 TableObject.push_back ( Object );
634 QString ObjectString = QString::fromStdString ( Object.UID() );
636 if ( ObjectString.contains ( Filter, Qt::CaseInsensitive ) )
638 TableObject.push_back ( Object );
646 TableObject,
nullptr );
647 Batch->setWindowModality ( Qt::WindowModal );
659 QSettings defaults(
":theme/DBE_Default_User_Settings.conf",
660 QSettings::NativeFormat);
672 for(
const QString& j : incs) {
686 CreateDatabaseW->show();
687 connect ( CreateDatabaseW, SIGNAL ( CanLoadDatabase (
const QString & ) ),
this,
693 if ( !DatabaseName.isEmpty() )
695 QFileInfo DatabaseFile = QFileInfo ( DatabaseName );
697 if ( DatabaseFile.exists() )
699 QString Path = QString ( DatabaseFile.absoluteFilePath() );
717 WARN (
"File not found during database load",
"File does not exist",
"\n\n Filename:",
718 DatabaseFile.fileName().toStdString() );
723 ERROR (
"Database load error",
"File was not selected" );
731 QMessageBox MessageBox;
733 "Do you really wish to abandon the current database and load a new one ?" );
734 MessageBox.setStandardButtons ( QMessageBox::Yes | QMessageBox::Cancel );
735 MessageBox.setDefaultButton ( QMessageBox::Cancel );
736 int UserOption = MessageBox.exec();
738 switch ( UserOption )
741 case QMessageBox::Yes:
744 case QMessageBox::Cancel:
766 connect(
this, SIGNAL(
signal_db_loaded()), &loop, SLOT(quit()), Qt::QueuedConnection);
771 std::unique_ptr<QProgressDialog> progress_bar;
773 progress_bar.reset(
new QProgressDialog(
"Loading Configuration...", QString(), 0, 0,
this ));
774 progress_bar->setWindowModality ( Qt::WindowModal );
775 progress_bar->show();
778 BOOST_SCOPE_EXIT(
void)
780 QApplication::restoreOverrideCursor();
784 QApplication::setOverrideCursor ( QCursor ( Qt::WaitCursor ) );
787 for ( QWidget * widget : QApplication::allWidgets() )
800 std::future<bool> waiter = std::async ( alreadyLoaded ? std::launch::deferred : std::launch::async, [
this]
810 loop.exec(QEventLoop::ExcludeUserInputEvents);
825 for (
int i = 0; i < tableholder->count(); i++ )
827 TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->widget ( i ) );
833 FileView->setModel ( NULL );
838 settings.beginGroup (
"MainWindow-layout" );
839 if (settings.contains(
"size")) {
840 resize ( settings.value (
"size" ).toSize() );
842 if (settings.contains(
"pos")) {
843 move ( settings.value (
"pos" ).toPoint() );
845 if (settings.contains(
"TableView")) {
846 DisplayTableView->setChecked ( settings.value (
"TableView" ).toBool() );
848 if (settings.contains(
"ClassView")) {
849 DisplayClassView->setChecked ( settings.value (
"ClassView" ).toBool() );
851 if (settings.contains(
"Messages")) {
852 DisplayMessages->setChecked ( settings.value (
"Messages" ).toBool() );
854 if (settings.contains(
"geometry")) {
855 restoreGeometry ( settings.value (
"geometry" ).toByteArray() );
857 if (settings.contains(
"state")) {
858 restoreState ( settings.value (
"state" ).toByteArray() );
862 settings.beginGroup (
"MainWindow-checkboxes" );
863 if (settings.contains(
"tree-case-sensitive")) {
864 CaseSensitiveCheckBoxTree->setChecked (
865 settings.value (
"tree-case-sensitive" ).toBool() );
867 if (settings.contains(
"table-case-sensitive")) {
868 CaseSensitiveCheckBoxTable->setChecked (
869 settings.value (
"table-case-sensitive" ).toBool() );
878 QSettings Settings(
"dunedaq",
"dbe_main");
879 Settings.beginGroup (
"MainWindow-layout" );
880 Settings.setValue (
"size", size() );
881 Settings.setValue (
"pos", pos() );
882 Settings.setValue (
"TableView", DisplayTableView->isChecked() );
883 Settings.setValue (
"ClassView", DisplayClassView->isChecked() );
885 Settings.setValue (
"Messages", DisplayMessages->isChecked() );
886 Settings.setValue (
"geometry", saveGeometry() );
887 Settings.setValue (
"state", saveState() );
890 Settings.beginGroup (
"MainWindow-checkboxes" );
891 Settings.setValue (
"tree-case-sensitive", CaseSensitiveCheckBoxTree->isChecked() );
892 Settings.setValue (
"table-case-sensitive", CaseSensitiveCheckBoxTable->isChecked() );
898 if ( !opts.isEmpty() )
903 QString FileName = opts.value (
"f" );
904 QString RdbFileName = opts.value (
"r" );
905 QString RoksFileName = opts.value (
"o" );
906 QString HashVersion = opts.value (
"v" );
908 if ( !FileName.isEmpty() )
910 FileToLoad = FileName;
913 if ( !HashVersion.isEmpty() )
915 ::setenv(
"TDAQ_DB_VERSION", QString(
"hash:").append(HashVersion).toStdString().c_str(), 1);
916 ::setenv(
"OKS_GIT_PROTOCOL",
"http", 1);
920 else if ( !RdbFileName.isEmpty() )
922 FileToLoad = RdbFileName;
925 else if ( !RoksFileName.isEmpty() )
927 FileToLoad = RoksFileName;
931 if ( not FileToLoad.isEmpty() )
933 dbopen ( FileToLoad, LoadConfig );
1110 QWhatsThis::enterWhatsThisMode();
1115 static QString
const title (
"About DBE" );
1116 static QString
const msg = QString().
1117 append (
"DBE is an editor to work with OKS and RDB backends that manages most of the hard work for you in editing the configuration database\n" ).
1118 append (
"\n\nMaintained :\t\tC&C Working group \n\t\t\t(atlas-tdaq-cc-wg@cern.ch)" ).
1120 append (
"\nLibraries version:\t" ).
1127 QMessageBox::about (
this, title, msg );
1132 QDesktopServices::openUrl ( QUrl (
"https://atlasdaq.cern.ch/dbe/" ) );
1137 InfoWidget->setCurrentIndex ( InfoWidget->indexOf ( CommitedTab ) );
1142 UndoView->stack()->setIndex ( 0 );
1147 if ( CaseSensitiveCheckBoxTree->isChecked() )
1149 Qt::CaseSensitive );
1164 for (
int i = 0; i < tableholder->count(); i++ )
1166 TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->widget ( i ) );
1172 FileView->setModel ( NULL );
1184 if ( SearchBox->currentIndex() == 2 )
1206 QString Tmp = SearchTreeLine->text();
1207 if ( SearchBox->currentIndex() == 1 )
1224 TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->currentWidget() );
1230 if ( TableFilter ==
nullptr )
1237 if ( CaseSensitiveCheckBoxTable->isChecked() )
1238 TableFilter->setFilterCaseSensitivity (
1239 Qt::CaseSensitive );
1242 TableFilter->setFilterCaseSensitivity ( Qt::CaseInsensitive );
1245 TableFilter->setFilterRegExp ( FilterText );
1252 int IndexOfCurrentTab = tableholder->currentIndex();
1255 std::vector<QModelIndex> idxs;
1257 for(
int i = 0; i < tableholder->count(); ++i) {
1262 if(!TableClassName.isEmpty()) {
1264 if(NodeClass !=
nullptr) {
1273 while(tableholder->count() != 0) {
1274 tableholder->widget(0)->deleteLater();
1275 tableholder->removeTab(0);
1282 for(
const auto& idx : idxs) {
1288 tableholder->setCurrentIndex ( IndexOfCurrentTab );
1297 total += data.toInt();
1299 TotalObjectsLabel->setText (
1300 QString (
"Total Objects: %1" ).arg ( total ) );
1309 foreach ( QWidget * widget, QApplication::allWidgets() ) widget->close();
1321 if ( not Tmp.isEmpty() )
1323 QString
const Query = QString (
"(this (object-id \".*%1.*\" ~=))" ).arg ( Tmp );
1327 std::vector<dbe::tref> result;
1330 std::vector<std::string >> () )
1333 cname, Query.toStdString() );
1335 result.insert ( result.end(), class_matching_objects.begin(),
1336 class_matching_objects.end() );
1341 catch ( dunedaq::conffwk::Exception
const & ex )
1354 if ( Target == SearchBox->lineEdit() && Event->type() == QEvent::MouseButtonRelease )
1356 if ( !SearchBox->lineEdit()->hasSelectedText() )
1358 SearchBox->lineEdit()->selectAll();
1370 foreach ( QWidget * widget, QApplication::allWidgets() )
1375 if ( ObjectEditorInstance )
1385 if ( ObjectCreatorInstance )
1387 OK = ObjectCreatorInstance->
CanClose();
1399 if ( undo_stack->isClean() )
1401 if ( undo_stack->count() == 0 )
1414 QMessageBox::question (
1418 "There are unsaved changes.\n\nDo you want to save and commit them to the DB?\n" ),
1419 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
1420 QMessageBox::Save );
1422 if ( ret == QMessageBox::Discard )
1427 else if ( ret == QMessageBox::Save )
1431 else if ( ret == QMessageBox::Cancel )
1459 BOOST_SCOPE_EXIT(
void)
1461 QApplication::restoreOverrideCursor();
1463 BOOST_SCOPE_EXIT_END
1465 QApplication::setOverrideCursor(Qt::WaitCursor);
1482 QFileDialog FileDialog (
this, tr (
"Open File" ),
".", tr (
"XML files (*.xml)" ) );
1483 FileDialog.setAcceptMode ( QFileDialog::AcceptOpen );
1484 FileDialog.setFileMode ( QFileDialog::ExistingFile );
1485 FileDialog.setViewMode ( QFileDialog::Detail );
1487 if ( FileDialog.exec() )
1489 QStringList FilesSelected = FileDialog.selectedFiles();
1491 if ( FilesSelected.size() )
1493 QString DatabasePath = FilesSelected.value ( 0 );
1512 auto user_confirmation = [] ( QString
const & msg )
1514 QMessageBox ExternalMessageBox;
1515 ExternalMessageBox.setText ( msg );
1516 ExternalMessageBox.setStandardButtons ( QMessageBox::Yes | QMessageBox::No );
1517 ExternalMessageBox.setDefaultButton ( QMessageBox::Yes );
1518 return ExternalMessageBox.exec() == QMessageBox::Yes;
1523 auto rewind_stack = [&undo_stack] ()
1525 std::vector<bool > commands_original_undo_state;
1531 for (
int i = 0; i < undo_stack->count(); ++i )
1537 commands_original_undo_state.push_back ( Command->undoable() );
1538 Command->setundoable (
false );
1544 undo_stack->setIndex ( 0 );
1548 auto cmdstate = commands_original_undo_state.begin();
1550 for (
int i = 0; i != undo_stack->count(); ++i )
1556 Command->setundoable ( *cmdstate++ );
1563 for ( QWidget * widget : QApplication::allWidgets() )
1572 if ( undo_stack->count() != 0 )
1574 const QString msg = QString(
"External changes to the database have been applied. Do you want to replay your changes on top? ")
1575 + QString(
" Otherwise any local change will be lost.\n");
1576 if ( user_confirmation ( msg ) )
1584 while ( not internal_changes->empty() )
1586 internal_changes_reverse_copy.push ( internal_changes->top() );
1587 internal_changes->pop();
1591 for (
int i = 0; i < undo_stack->count(); ++i )
1594 internal_changes_reverse_copy.pop();
1595 internal_changes->push ( Change );
1641 catch ( dunedaq::conffwk::Exception
const & e )
1643 WARN (
"Object reference could not be changed",
1649 WARN (
"Unknown exception during object modification",
"s",
1650 "\n\nFor object with UID:", Change.
uid.c_str(),
"of class:",
1660 INFO (
"Database reloaded due external changes",
"Database consistency enforcement" );
1678 QWidgetList allwidgets = QApplication::topLevelWidgets();
1680 QWidgetList::iterator it = allwidgets.begin();
1681 MainWindow * main_win = qobject_cast<MainWindow *> ( *it );
1683 for ( ; it != allwidgets.end() and main_win ==
nullptr; ++it )
1685 main_win = qobject_cast<MainWindow *> ( *it );
1702 const int MAX_MESSAGE_LENGTH = 500;
1706 const QMessageBox::Icon& icon) {
1707 QMessageBox mb(
this);
1709 mb.setWindowTitle(title);
1710 mb.setStandardButtons(QMessageBox::Ok);
1711 if(msg.length() > MAX_MESSAGE_LENGTH) {
1712 QString&& truncated_msg = msg.left(MAX_MESSAGE_LENGTH);
1713 truncated_msg.append(
"...");
1714 mb.setText(
"<b>The message has been truncated because it is too long, look at the details for the full message</b>");
1715 mb.setInformativeText(truncated_msg);
1716 mb.setDetailedText(msg);
1775 std::vector<dbe::dref> objects;
1776 for(
const auto& o : objs) {
1789 for (
int i = 0; i < tableholder->count(); i++ )
1791 TableTab * CurrentTab =
dynamic_cast<TableTab *
> ( tableholder->widget ( i ) );
1795 m->objectsUpdated(objects);
1810 if(uncommittedFiles.empty() ==
true) {
1811 Commit->setEnabled(
false);
1812 Commit->setToolTip(
"There is nothing to commit");
1814 Commit->setEnabled(
true);
1817 for(
const std::string& f : uncommittedFiles) {
1818 l +=
" " + f +
"\n";
1821 Commit->setToolTip(QString::fromStdString(
"Commit changes.\nHere are the uncommitted files:\n" + l));
1827 Commit->setEnabled(
false);
1832 for(
const std::string& f : files) {
1833 CommittedTable->insertRow(0);
1834 CommittedTable->setItem(0, 0,
new QTableWidgetItem(QString::fromStdString(f)));
1835 CommittedTable->setItem(0, 1,
new QTableWidgetItem(QString::fromStdString(msg)));
1836 CommittedTable->setItem(0, 2,
new QTableWidgetItem(QDate::currentDate().toString() +
" " + QTime::currentTime().toString()));
1839 CommittedTable->resizeColumnsToContents();
char const *const dbe_lib_core_version
Including DBE.
QString GetCommitMessage() const
static void parse_all_objects()
static QString check_file_includes(const QString &file)
static void show_file_info(const QString &filename)
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()
static void InitColorManagement()
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