Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
8a60b413
Commit
8a60b413
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs
#115
and
#116
parent
3cb7fc48
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cutecoin/gui/transactions_tab.py
+7
-3
7 additions, 3 deletions
src/cutecoin/gui/transactions_tab.py
src/cutecoin/models/txhistory.py
+1
-1
1 addition, 1 deletion
src/cutecoin/models/txhistory.py
with
8 additions
and
4 deletions
src/cutecoin/gui/transactions_tab.py
+
7
−
3
View file @
8a60b413
from
PyQt5.QtWidgets
import
QWidget
,
QAbstractItemView
,
QHeaderView
,
QDialog
,
\
QMenu
,
QAction
,
QApplication
,
QMessageBox
from
PyQt5.QtCore
import
Qt
,
QDateTime
,
QModelIndex
from
PyQt5.QtCore
import
Qt
,
QDateTime
,
QModelIndex
,
QTime
from
PyQt5.QtGui
import
QCursor
from
..gen_resources.transactions_tab_uic
import
Ui_transactionsTabWidget
from
..models.txhistory
import
HistoryTableModel
,
TxFilterProxyModel
...
...
@@ -130,8 +130,12 @@ QMessageBox.Ok | QMessageBox.Cancel)
def
dates_changed
(
self
):
logging
.
debug
(
"
Changed dates
"
)
if
self
.
table_history
.
model
():
ts_from
=
self
.
date_from
.
dateTime
().
toTime_t
()
ts_to
=
self
.
date_to
.
dateTime
().
toTime_t
()
qdate_from
=
self
.
date_from
qdate_from
.
setTime
(
QTime
(
0
,
0
,
0
))
qdate_to
=
self
.
date_to
qdate_to
.
setTime
(
QTime
(
0
,
0
,
0
))
ts_from
=
qdate_from
.
dateTime
().
toTime_t
()
ts_to
=
qdate_to
.
dateTime
().
toTime_t
()
self
.
table_history
.
model
().
set_period
(
ts_from
,
ts_to
)
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/models/txhistory.py
+
1
−
1
View file @
8a60b413
...
...
@@ -32,7 +32,7 @@ class TxFilterProxyModel(QSortFilterProxyModel):
def
filterAcceptsRow
(
self
,
sourceRow
,
sourceParent
):
def
in_period
(
date_ts
):
return
(
date_ts
in
range
(
self
.
ts_from
,
self
.
ts_to
))
return
date_ts
>=
self
.
ts_from
and
date_ts
<=
self
.
ts_to
date_col
=
self
.
sourceModel
().
column_types
.
index
(
'
date
'
)
source_index
=
self
.
sourceModel
().
index
(
sourceRow
,
date_col
)
date
=
self
.
sourceModel
().
data
(
source_index
,
Qt
.
DisplayRole
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment