When user changes month or year in SearchBanner, A new date wasn't selected by default resulting in bad SQL query
This commit is contained in:
parent
d74ad570ad
commit
e9c677f5b2
|
@ -1,4 +1,4 @@
|
||||||
v0.4 (27/12/2012)
|
v0.4 (13/01/2013)
|
||||||
** User **
|
** User **
|
||||||
Add icons for low resolution
|
Add icons for low resolution
|
||||||
Sort categories using translated names
|
Sort categories using translated names
|
||||||
|
@ -9,6 +9,7 @@ v0.4 (27/12/2012)
|
||||||
|
|
||||||
** Bugs **
|
** Bugs **
|
||||||
Remove some bugs in GridAccount
|
Remove some bugs in GridAccount
|
||||||
|
When user changes month or year in SearchBanner, A new date wasn't selected by default resulting in bad SQL query
|
||||||
|
|
||||||
|
|
||||||
v0.3 (31/05/2012)
|
v0.3 (31/05/2012)
|
||||||
|
|
|
@ -42,6 +42,9 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
|
||||||
// _calendarFrom->setNavigationBarVisible(false);
|
// _calendarFrom->setNavigationBarVisible(false);
|
||||||
_calendarFrom->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
|
_calendarFrom->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
|
||||||
_calendarFrom->setMaximumSize(_calendarFrom->sizeHint());
|
_calendarFrom->setMaximumSize(_calendarFrom->sizeHint());
|
||||||
|
_calendarFrom->setSelectedDate(QDate::currentDate());
|
||||||
|
|
||||||
|
connect(_calendarFrom, SIGNAL(currentPageChanged(int, int)), this, SLOT(OnCalendarFromPageChanged(int, int)));
|
||||||
|
|
||||||
_calendarTo = new QCalendarWidget(this);
|
_calendarTo = new QCalendarWidget(this);
|
||||||
_calendarTo->setGridVisible(false);
|
_calendarTo->setGridVisible(false);
|
||||||
|
@ -49,7 +52,9 @@ SearchBanner::SearchBanner(KissCount* kiss, QFrame *parent, void* caller, OnButt
|
||||||
// _calendarTo->setNavigationBarVisible(false);
|
// _calendarTo->setNavigationBarVisible(false);
|
||||||
_calendarTo->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
|
_calendarTo->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);
|
||||||
_calendarTo->setMaximumSize(_calendarTo->sizeHint());
|
_calendarTo->setMaximumSize(_calendarTo->sizeHint());
|
||||||
|
_calendarTo->setSelectedDate(QDate::currentDate());
|
||||||
|
|
||||||
|
connect(_calendarTo, SIGNAL(currentPageChanged(int, int)), this, SLOT(OnCalendarToPageChanged(int, int)));
|
||||||
|
|
||||||
_description = new QLineEdit(this);
|
_description = new QLineEdit(this);
|
||||||
_description->setMinimumWidth(_description->width()*2);
|
_description->setMinimumWidth(_description->width()*2);
|
||||||
|
@ -122,6 +127,16 @@ SearchBanner::~SearchBanner()
|
||||||
if (_operations) delete _operations;
|
if (_operations) delete _operations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SearchBanner::OnCalendarFromPageChanged(int year, int month)
|
||||||
|
{
|
||||||
|
_calendarFrom->setSelectedDate(QDate(year, month, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SearchBanner::OnCalendarToPageChanged(int year, int month)
|
||||||
|
{
|
||||||
|
_calendarTo->setSelectedDate(QDate(year, month, 1));
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Operation> * SearchBanner::Search()
|
std::vector<Operation> * SearchBanner::Search()
|
||||||
{
|
{
|
||||||
QString *description=0;
|
QString *description=0;
|
||||||
|
|
|
@ -39,6 +39,8 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void OnEnter();
|
void OnEnter();
|
||||||
|
void OnCalendarFromPageChanged(int year, int month);
|
||||||
|
void OnCalendarToPageChanged(int year, int month);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KissCount* _kiss;
|
KissCount* _kiss;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user