Mercurial > hg > easyhg
changeset 617:2d5b831c1a0a
Added new functionality to limit the total number of items shown in the graph. For projects with a fairly high number of commits, makes every action is very slow.
Was added to the settings dialog to select a QDateEdit day from which the log is to be displayed.
author | Mikel <mikel.fernandez@bqreaders.com> |
---|---|
date | Tue, 24 Jul 2012 15:33:02 +0200 |
parents | 32b8f32f14a6 |
children | 7f1adcdc6cdc 0ef4ed400ced |
files | src/mainwindow.cpp src/settingsdialog.cpp src/settingsdialog.h |
diffstat | 3 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mainwindow.cpp Wed Jul 04 16:15:15 2012 +0100 +++ b/src/mainwindow.cpp Tue Jul 24 15:33:02 2012 +0200 @@ -357,8 +357,13 @@ void MainWindow::hgLog() { + QSettings settings; + settings.beginGroup("Presentation"); + QStringList params; params << "log"; + params << "--date"; + params << settings.value("datefrom", QDate(2000, 1, 1)).toDate().toString("yyyy-MM-dd") + " to " + QDate::currentDate().toString("yyyy-MM-dd"); params << "--template"; params << Changeset::getLogTemplate();
--- a/src/settingsdialog.cpp Wed Jul 04 16:15:15 2012 +0100 +++ b/src/settingsdialog.cpp Tue Jul 24 15:33:02 2012 +0200 @@ -27,6 +27,7 @@ #include <QFileDialog> #include <QMessageBox> #include <QTabWidget> +#include <QCalendarWidget> QString SettingsDialog::m_installPath; @@ -95,13 +96,18 @@ lookLayout->setColumnStretch(1, 20); #endif + lookLayout->addWidget(new QLabel(tr("History timeline from")), row, 0); + m_dateFrom = new QDateEdit(); + m_dateFrom->setCalendarPopup(true); + lookLayout->addWidget(m_dateFrom, row++, 1, Qt::AlignLeft); + lookLayout->addWidget(new QLabel(tr("Label the history timeline with")), row, 0); m_dateFormat = new QComboBox(); m_dateFormat->addItem(tr("Ages, for example \"5 weeks ago\"")); m_dateFormat->addItem(tr("Dates, for example \"2010-06-23\"")); lookLayout->addWidget(m_dateFormat, row++, 1, Qt::AlignLeft); - lookLayout->setColumnStretch(1, 20); + lookLayout->setColumnStretch(1, 10); lookLayout->setRowStretch(row, 20); @@ -431,6 +437,7 @@ m_workHistoryArrangement->setCurrentIndex(settings.value("workhistoryarrangement", 0).toInt()); #endif m_dateFormat->setCurrentIndex(settings.value("dateformat", 0).toInt()); + m_dateFrom->setDate(settings.value("datefrom", QDate(2000, 1, 1)).toDate()); settings.endGroup(); settings.beginGroup("Locations"); m_hgPathLabel->setText(settings.value("hgbinary").toString()); @@ -478,6 +485,11 @@ settings.setValue("dateformat", i); m_presentationChanged = true; } + if(settings.value("datefrom") != m_dateFrom->date()){ + settings.setValue("datefrom", m_dateFrom->date()); + m_presentationChanged = true; + } + settings.endGroup(); settings.beginGroup("Locations"); settings.setValue("hgbinary", m_hgPathLabel->text());
--- a/src/settingsdialog.h Wed Jul 04 16:15:15 2012 +0100 +++ b/src/settingsdialog.h Tue Jul 24 15:33:02 2012 +0200 @@ -25,6 +25,7 @@ #include <QCheckBox> #include <QComboBox> #include <QTabWidget> +#include <QDateEdit> class SettingsDialog : public QDialog { @@ -76,6 +77,9 @@ QCheckBox *m_showIconLabels; QCheckBox *m_showExtraText; QComboBox *m_dateFormat; + + QDateEdit *m_dateFrom; + #ifdef NOT_IMPLEMENTED_YET QComboBox *m_workHistoryArrangement; #endif