Browse Source

feat: add functions for change title and info in LoadHistoryDialog

reviewable/pr5191/r1
TriKriSta 7 years ago
parent
commit
3b7ba02324
  1. 10
      src/widget/form/loadhistorydialog.cpp
  2. 2
      src/widget/form/loadhistorydialog.h
  3. 2
      src/widget/form/searchsettingsform.cpp

10
src/widget/form/loadhistorydialog.cpp

@ -61,6 +61,16 @@ QDateTime LoadHistoryDialog::getFromDate() @@ -61,6 +61,16 @@ QDateTime LoadHistoryDialog::getFromDate()
return res;
}
void LoadHistoryDialog::setTitle(const QString& title)
{
setWindowTitle(title);
}
void LoadHistoryDialog::setInfoLabel(const QString& info)
{
ui->fromLabel->setText(info);
}
void LoadHistoryDialog::highlightDates(int year, int month)
{
History* history = Nexus::getProfile()->getHistory();

2
src/widget/form/loadhistorydialog.h

@ -38,6 +38,8 @@ public: @@ -38,6 +38,8 @@ public:
~LoadHistoryDialog();
QDateTime getFromDate();
void setTitle(const QString& title);
void setInfoLabel(const QString& info);
public slots:
void highlightDates(int year, int month);

2
src/widget/form/searchsettingsform.cpp

@ -133,6 +133,8 @@ void SearchSettingsForm::onChoiceDate() @@ -133,6 +133,8 @@ void SearchSettingsForm::onChoiceDate()
{
isUpdate = true;
LoadHistoryDialog dlg;
dlg.setTitle(tr("Select Date Dialog"));
dlg.setInfoLabel(tr("Select a date"));
if (dlg.exec()) {
startDate = dlg.getFromDate().date();
updateStartDateLabel();

Loading…
Cancel
Save