Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

daterangeselector.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*638:*/
  2. #line 30 "./daterangeselector.w"
  3. #include <QComboBox>
  4. #include <QPushButton>
  5. #include <QCalendarWidget>
  6. #ifndef TypicaDateRangeSelectorHeader
  7. #define TypicaDateRangeSelectorHeader
  8. /*640:*/
  9. #line 87 "./daterangeselector.w"
  10. class CustomDateRangePopup:public QWidget
  11. {
  12. Q_OBJECT
  13. public:
  14. CustomDateRangePopup(QWidget*parent= NULL);
  15. public slots:
  16. void applyRange();
  17. signals:
  18. void hidingPopup();
  19. protected:
  20. virtual void hideEvent(QHideEvent*event);
  21. private slots:
  22. void validateRange();
  23. private:
  24. QCalendarWidget*startDateSelector;
  25. QCalendarWidget*endDateSelector;
  26. QPushButton*applyButton;
  27. };
  28. /*:640*/
  29. #line 39 "./daterangeselector.w"
  30. class DateRangeSelector:public QWidget
  31. {
  32. Q_OBJECT
  33. public:
  34. DateRangeSelector(QWidget*parent= NULL);
  35. void setCustomRange(QVariant range);
  36. Q_INVOKABLE QVariant currentRange();
  37. public slots:
  38. void setCurrentIndex(int index);
  39. void setLifetimeRange(QString startDate,QString endDate);
  40. void removeIndex(int index);
  41. signals:
  42. void rangeUpdated(QVariant);
  43. private slots:
  44. void toggleCustom();
  45. void popupHidden();
  46. void updateRange(int index);
  47. private:
  48. QComboBox*quickSelector;
  49. CustomDateRangePopup*customRangeSelector;
  50. int lastIndex;
  51. };
  52. #endif
  53. /*:638*/