Skip to content

Commit

Permalink
Merge pull request #34 from imubit/fix-date-selection-widget
Browse files Browse the repository at this point in the history
fix date selection widget
  • Loading branch information
cloud-rocket authored Aug 28, 2024
2 parents 50857e2 + 4d526a1 commit 5da3cb1
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/qt_data_extractor/design/copy-prompt.ui
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down Expand Up @@ -162,7 +162,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down
82 changes: 78 additions & 4 deletions src/qt_data_extractor/design/main-window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
</item>
<item>
<widget class="QComboBox" name="comboLeftConnection">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
Expand Down Expand Up @@ -141,7 +147,7 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down Expand Up @@ -505,14 +511,43 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="maximumDateTime">
<datetime>
<hour>12</hour>
<minute>59</minute>
<second>59</second>
<year>2050</year>
<month>12</month>
<day>31</day>
</datetime>
</property>
<property name="minimumDateTime">
<datetime>
<hour>0</hour>
<minute>0</minute>
<second>0</second>
<year>2000</year>
<month>1</month>
<day>1</day>
</datetime>
</property>
<property name="displayFormat">
<string notr="true">MM/dd/yyyy h:mm AP</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::LocalTime</enum>
</property>
</widget>
</item>
</layout>
Expand All @@ -538,14 +573,40 @@
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="maximumDateTime">
<datetime>
<hour>12</hour>
<minute>59</minute>
<second>59</second>
<year>2050</year>
<month>12</month>
<day>31</day>
</datetime>
</property>
<property name="minimumDateTime">
<datetime>
<hour>0</hour>
<minute>0</minute>
<second>0</second>
<year>2000</year>
<month>1</month>
<day>1</day>
</datetime>
</property>
<property name="displayFormat">
<string notr="true">MM/dd/yyyy h:mm AP</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
Expand All @@ -571,6 +632,12 @@
</item>
<item>
<widget class="QComboBox" name="comboSampleRate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Raw Data</string>
Expand Down Expand Up @@ -646,7 +713,14 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="comboArchiveDirectory"/>
<widget class="QComboBox" name="comboArchiveDirectory">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonSelectArchiveFile">
Expand Down
2 changes: 1 addition & 1 deletion src/qt_data_extractor/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def _refresh_current_connection_view(self, current_conn, conn_info=None):
if "time" in current_conn["supported_filters"]:
# now = QtCore.QDateTime.currentDateTime()
end_time = QtCore.QDateTime.currentDateTimeUtc()
start_time = end_time.addDays(-30)
start_time = end_time.addDays(-365)
self._w.dateTimeLeftFrom.setDateTime(start_time)
self._w.dateTimeLeftTo.setDateTime(end_time)
self._w.widgetLeftTimeFilter.show()
Expand Down

0 comments on commit 5da3cb1

Please sign in to comment.