|
@ -22,7 +22,11 @@ HolidayDlg::HolidayDlg(QWidget *parent, Qt::WindowFlags f) : |
|
|
{ |
|
|
{ |
|
|
QVBoxLayout *middleLayout = new QVBoxLayout; |
|
|
QVBoxLayout *middleLayout = new QVBoxLayout; |
|
|
QHBoxLayout *mainLayout = new QHBoxLayout; |
|
|
QHBoxLayout *mainLayout = new QHBoxLayout; |
|
|
QCalendarWidget *cal = new QCalendarWidget(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_cal.setGridVisible(true); |
|
|
|
|
|
m_cal.setMinimumDate(QDate::currentDate()); |
|
|
|
|
|
m_cal.setDateEditEnabled(false); |
|
|
|
|
|
|
|
|
QSizePolicy *szPolicy = new QSizePolicy(QSizePolicy::Minimum, |
|
|
QSizePolicy *szPolicy = new QSizePolicy(QSizePolicy::Minimum, |
|
|
QSizePolicy::MinimumExpanding, |
|
|
QSizePolicy::MinimumExpanding, |
|
|
QSizePolicy::PushButton); |
|
|
QSizePolicy::PushButton); |
|
@ -42,14 +46,13 @@ HolidayDlg::HolidayDlg(QWidget *parent, Qt::WindowFlags f) : |
|
|
middleLayout->addWidget(ok_btn); |
|
|
middleLayout->addWidget(ok_btn); |
|
|
middleLayout->addWidget(cancel_btn); |
|
|
middleLayout->addWidget(cancel_btn); |
|
|
|
|
|
|
|
|
mainLayout->addWidget(cal); |
|
|
|
|
|
|
|
|
mainLayout->addWidget(&m_cal); |
|
|
mainLayout->addLayout(middleLayout); |
|
|
mainLayout->addLayout(middleLayout); |
|
|
|
|
|
|
|
|
connect(cal, SIGNAL(clicked(void)), this, SIGNAL(show_holiday_dlg(void))); |
|
|
|
|
|
connect(next_btn, SIGNAL(clicked(void)), cal, SLOT(showNextMonth(void))); |
|
|
|
|
|
connect(prev_btn, SIGNAL(clicked(void)), cal, SLOT(showPreviousMonth(void))); |
|
|
|
|
|
// connect(ok_btn, SIGNAL(clicked(void)), this, SIGNAL(closed(void)));
|
|
|
|
|
|
// connect(cancel_btn, SIGNAL(clicked(void)), this, SLOT(show_confirm_exit_dlg(void)));
|
|
|
|
|
|
|
|
|
connect(next_btn, SIGNAL(clicked(void)), &m_cal, SLOT(showNextMonth(void))); |
|
|
|
|
|
connect(prev_btn, SIGNAL(clicked(void)), &m_cal, SLOT(showPreviousMonth(void))); |
|
|
|
|
|
connect(ok_btn, SIGNAL(clicked(void)), this, SLOT(validate_holiday_mode(void))); |
|
|
|
|
|
connect(cancel_btn, SIGNAL(clicked(void)), this, SIGNAL(close_holiday_dlg(void))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this->setLayout(mainLayout); |
|
|
this->setLayout(mainLayout); |
|
@ -59,5 +62,11 @@ HolidayDlg::~HolidayDlg() |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void HolidayDlg::validate_holiday_mode(void) |
|
|
|
|
|
{ |
|
|
|
|
|
emit holiday_mode(m_cal.selectedDate()); |
|
|
|
|
|
emit close_holiday_dlg(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */ |
|
|
/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */ |
|
|
|
|
|
|