|
@@ -12,7 +12,7 @@
|
12
|
12
|
#include "daterangeselector.h"
|
13
|
13
|
|
14
|
14
|
/*697:*/
|
15
|
|
-#line 117 "./daterangeselector.w"
|
|
15
|
+#line 115 "./daterangeselector.w"
|
16
|
16
|
|
17
|
17
|
CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
|
18
|
18
|
QWidget(parent,Qt::Popup),startDateSelector(new QCalendarWidget),
|
|
@@ -56,7 +56,7 @@ setLayout(outerLayout);
|
56
|
56
|
}
|
57
|
57
|
|
58
|
58
|
/*:697*//*698:*/
|
59
|
|
-#line 165 "./daterangeselector.w"
|
|
59
|
+#line 163 "./daterangeselector.w"
|
60
|
60
|
|
61
|
61
|
void CustomDateRangePopup::hideEvent(QHideEvent*)
|
62
|
62
|
{
|
|
@@ -64,7 +64,7 @@ emit hidingPopup();
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
/*:698*//*699:*/
|
67
|
|
-#line 174 "./daterangeselector.w"
|
|
67
|
+#line 172 "./daterangeselector.w"
|
68
|
68
|
|
69
|
69
|
void CustomDateRangePopup::applyRange()
|
70
|
70
|
{
|
|
@@ -79,7 +79,7 @@ hide();
|
79
|
79
|
}
|
80
|
80
|
|
81
|
81
|
/*:699*//*700:*/
|
82
|
|
-#line 191 "./daterangeselector.w"
|
|
82
|
+#line 189 "./daterangeselector.w"
|
83
|
83
|
|
84
|
84
|
void CustomDateRangePopup::validateRange()
|
85
|
85
|
{
|
|
@@ -97,7 +97,7 @@ applyButton->setEnabled(true);
|
97
|
97
|
#line 81 "./daterangeselector.w"
|
98
|
98
|
|
99
|
99
|
/*701:*/
|
100
|
|
-#line 209 "./daterangeselector.w"
|
|
100
|
+#line 207 "./daterangeselector.w"
|
101
|
101
|
|
102
|
102
|
DateRangeSelector::DateRangeSelector(QWidget*parent):
|
103
|
103
|
QWidget(parent),quickSelector(new QComboBox(this)),
|
|
@@ -109,7 +109,7 @@ QDate currentDate= QDate::currentDate();
|
109
|
109
|
|
110
|
110
|
QHBoxLayout*layout= new QHBoxLayout;
|
111
|
111
|
/*702:*/
|
112
|
|
-#line 238 "./daterangeselector.w"
|
|
112
|
+#line 236 "./daterangeselector.w"
|
113
|
113
|
|
114
|
114
|
quickSelector->addItem("Yesterday",QVariant(QStringList()<<
|
115
|
115
|
currentDate.addDays(-1).toString(Qt::ISODate)));
|
|
@@ -189,7 +189,7 @@ quickSelector->addItem("Lifetime");
|
189
|
189
|
quickSelector->addItem("Custom");
|
190
|
190
|
|
191
|
191
|
/*:702*/
|
192
|
|
-#line 219 "./daterangeselector.w"
|
|
192
|
+#line 217 "./daterangeselector.w"
|
193
|
193
|
|
194
|
194
|
QToolButton*customButton= new QToolButton;
|
195
|
195
|
customButton->setIcon(QIcon::fromTheme("office-calendar",
|
|
@@ -202,7 +202,7 @@ connect(customButton,SIGNAL(clicked()),this,SLOT(toggleCustom()));
|
202
|
202
|
}
|
203
|
203
|
|
204
|
204
|
/*:701*//*703:*/
|
205
|
|
-#line 321 "./daterangeselector.w"
|
|
205
|
+#line 319 "./daterangeselector.w"
|
206
|
206
|
|
207
|
207
|
void DateRangeSelector::updateRange(int index)
|
208
|
208
|
{
|
|
@@ -218,7 +218,7 @@ emit rangeUpdated(quickSelector->itemData(quickSelector->currentIndex()));
|
218
|
218
|
}
|
219
|
219
|
|
220
|
220
|
/*:703*//*704:*/
|
221
|
|
-#line 338 "./daterangeselector.w"
|
|
221
|
+#line 336 "./daterangeselector.w"
|
222
|
222
|
|
223
|
223
|
void DateRangeSelector::popupHidden()
|
224
|
224
|
{
|
|
@@ -228,7 +228,7 @@ quickSelector->setCurrentIndex(lastIndex);
|
228
|
228
|
}
|
229
|
229
|
|
230
|
230
|
/*:704*//*705:*/
|
231
|
|
-#line 349 "./daterangeselector.w"
|
|
231
|
+#line 347 "./daterangeselector.w"
|
232
|
232
|
|
233
|
233
|
void DateRangeSelector::setCustomRange(QVariant range)
|
234
|
234
|
{
|
|
@@ -239,7 +239,7 @@ quickSelector->setCurrentIndex(lastIndex);
|
239
|
239
|
}
|
240
|
240
|
|
241
|
241
|
/*:705*//*706:*/
|
242
|
|
-#line 364 "./daterangeselector.w"
|
|
242
|
+#line 362 "./daterangeselector.w"
|
243
|
243
|
|
244
|
244
|
void DateRangeSelector::toggleCustom()
|
245
|
245
|
{
|
|
@@ -280,7 +280,7 @@ customRangeSelector= NULL;
|
280
|
280
|
}
|
281
|
281
|
|
282
|
282
|
/*:706*//*707:*/
|
283
|
|
-#line 406 "./daterangeselector.w"
|
|
283
|
+#line 404 "./daterangeselector.w"
|
284
|
284
|
|
285
|
285
|
QVariant DateRangeSelector::currentRange()
|
286
|
286
|
{
|
|
@@ -288,7 +288,7 @@ return quickSelector->itemData(lastIndex);
|
288
|
288
|
}
|
289
|
289
|
|
290
|
290
|
/*:707*//*708:*/
|
291
|
|
-#line 414 "./daterangeselector.w"
|
|
291
|
+#line 412 "./daterangeselector.w"
|
292
|
292
|
|
293
|
293
|
void DateRangeSelector::setCurrentIndex(int index)
|
294
|
294
|
{
|
|
@@ -301,7 +301,7 @@ return quickSelector->currentIndex();
|
301
|
301
|
}
|
302
|
302
|
|
303
|
303
|
/*:708*//*709:*/
|
304
|
|
-#line 434 "./daterangeselector.w"
|
|
304
|
+#line 432 "./daterangeselector.w"
|
305
|
305
|
|
306
|
306
|
void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
|
307
|
307
|
{
|
|
@@ -310,7 +310,7 @@ QVariant(QStringList()<<startDate<<endDate));
|
310
|
310
|
}
|
311
|
311
|
|
312
|
312
|
/*:709*//*710:*/
|
313
|
|
-#line 444 "./daterangeselector.w"
|
|
313
|
+#line 442 "./daterangeselector.w"
|
314
|
314
|
|
315
|
315
|
void DateRangeSelector::removeIndex(int index)
|
316
|
316
|
{
|
|
@@ -321,10 +321,8 @@ quickSelector->removeItem(index);
|
321
|
321
|
#line 82 "./daterangeselector.w"
|
322
|
322
|
|
323
|
323
|
|
324
|
|
-#ifdef __unix__
|
325
|
|
-#ifndef __linux__
|
|
324
|
+#if __APPLE__
|
326
|
325
|
#include "moc_daterangeselector.cpp"
|
327
|
326
|
#endif
|
328
|
|
-#endif
|
329
|
327
|
|
330
|
328
|
/*:695*/
|