1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat: add functions for change title and info in LoadHistoryDialog

This commit is contained in:
TriKriSta 2018-06-24 21:20:49 +03:00
parent 610e04aa26
commit 3b7ba02324
3 changed files with 14 additions and 0 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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();