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:
parent
610e04aa26
commit
3b7ba02324
|
@ -61,6 +61,16 @@ QDateTime LoadHistoryDialog::getFromDate()
|
||||||
return res;
|
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)
|
void LoadHistoryDialog::highlightDates(int year, int month)
|
||||||
{
|
{
|
||||||
History* history = Nexus::getProfile()->getHistory();
|
History* history = Nexus::getProfile()->getHistory();
|
||||||
|
|
|
@ -38,6 +38,8 @@ public:
|
||||||
~LoadHistoryDialog();
|
~LoadHistoryDialog();
|
||||||
|
|
||||||
QDateTime getFromDate();
|
QDateTime getFromDate();
|
||||||
|
void setTitle(const QString& title);
|
||||||
|
void setInfoLabel(const QString& info);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void highlightDates(int year, int month);
|
void highlightDates(int year, int month);
|
||||||
|
|
|
@ -133,6 +133,8 @@ void SearchSettingsForm::onChoiceDate()
|
||||||
{
|
{
|
||||||
isUpdate = true;
|
isUpdate = true;
|
||||||
LoadHistoryDialog dlg;
|
LoadHistoryDialog dlg;
|
||||||
|
dlg.setTitle(tr("Select Date Dialog"));
|
||||||
|
dlg.setInfoLabel(tr("Select a date"));
|
||||||
if (dlg.exec()) {
|
if (dlg.exec()) {
|
||||||
startDate = dlg.getFromDate().date();
|
startDate = dlg.getFromDate().date();
|
||||||
updateStartDateLabel();
|
updateStartDateLabel();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user