-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathHistoryView.h
More file actions
52 lines (39 loc) · 1.22 KB
/
HistoryView.h
File metadata and controls
52 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: The Monero Project
#ifndef FEATHER_HISTORYVIEW_H
#define FEATHER_HISTORYVIEW_H
#include <QKeyEvent>
#include <QTreeView>
#include <QActionGroup>
#include "TransactionHistoryModel.h"
#include "TransactionHistoryProxyModel.h"
class HistoryView : public QTreeView
{
Q_OBJECT
public:
explicit HistoryView(QWidget* parent = nullptr);
void setHistoryModel(TransactionHistoryProxyModel *model);
void setSearchMode(bool mode);
QByteArray viewState() const;
bool setViewState(const QByteArray& state);
QModelIndex getCurrentIndex();
TransactionHistoryModel* sourceModel();
QMenu* getMenu();
private slots:
void showHeaderMenu(const QPoint& position);
void toggleColumnVisibility(QAction* action);
void showFullTxid(bool enabled);
void fitColumnsToWindow();
void fitColumnsToContents();
void resetViewToDefaults();
protected:
void keyPressEvent(QKeyEvent *event);
private:
TransactionHistoryProxyModel* m_model;
bool m_inSearchMode = false;
bool m_columnsNeedRelayout = true;
bool m_showTxidColumn = false;
QMenu* m_headerMenu;
QActionGroup* m_columnActions;
};
#endif //FEATHER_HISTORYVIEW_H