##// END OF EJS Templates
Updates headerData() method to return column width/size for role Qt::SizeHintRole
Updates headerData() method to return column width/size for role Qt::SizeHintRole

File last commit:

r178:274725519804
r257:14a68137a7a1
Show More
TimeWidget.cpp
29 lines | 789 B | text/x-c | CppLexer
Add the TimeWidget
r126 #include "TimeWidget/TimeWidget.h"
#include "ui_TimeWidget.h"
add TimeWidget connection
r178
Add the TimeWidget
r126 TimeWidget::TimeWidget(QWidget *parent) : QWidget{parent}, ui{new Ui::TimeWidget}
{
ui->setupUi(this);
add TimeWidget connection
r178
// Connection
connect(ui->startDateTimeEdit, &QDateTimeEdit::dateTimeChanged, this,
&TimeWidget::onTimeUpdateRequested);
connect(ui->endDateTimeEdit, &QDateTimeEdit::dateTimeChanged, this,
&TimeWidget::onTimeUpdateRequested);
Add the TimeWidget
r126 }
TimeWidget::~TimeWidget()
{
delete ui;
}
add TimeWidget connection
r178
void TimeWidget::onTimeUpdateRequested()
{
auto dateTime = SqpDateTime{
static_cast<double>(ui->startDateTimeEdit->dateTime().toMSecsSinceEpoch() / 1000.),
static_cast<double>(ui->endDateTimeEdit->dateTime().toMSecsSinceEpoch()) / 1000.};
emit timeUpdated(std::move(dateTime));
}