Use DB date time field item delegate to imbue editing in log windows

This commit is contained in:
Bill Somerville
2019-12-08 18:37:35 +00:00
parent b6b8271a6d
commit 32c36f566d
4 changed files with 15 additions and 20 deletions
+2
View File
@@ -9,6 +9,7 @@
#include "item_delegates/FrequencyDelegate.hpp"
#include "item_delegates/ForeignKeyDelegate.hpp"
#include "item_delegates/CallsignDelegate.hpp"
#include "item_delegates/SQLiteDateTimeDelegate.hpp"
#include "pimpl_impl.hpp"
#include "ui_CabrilloLogWindow.h"
@@ -66,6 +67,7 @@ CabrilloLogWindow::CabrilloLogWindow (QSettings * settings, Configuration const
m_->ui_.log_table_view->setModel (&m_->format_model_);
set_log_view (m_->ui_.log_table_view);
m_->ui_.log_table_view->setItemDelegateForColumn (1, new FrequencyDelegate {this});
m_->ui_.log_table_view->setItemDelegateForColumn (3, new SQLiteDateTimeDelegate {this});
m_->ui_.log_table_view->setItemDelegateForColumn (4, new CallsignDelegate {this});
auto h_header = m_->ui_.log_table_view->horizontalHeader ();
h_header->moveSection (7, 1); // band to first column