-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathstockstableview.h
50 lines (36 loc) · 1.07 KB
/
stockstableview.h
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
#ifndef STOCKSTABLEVIEW_H
#define STOCKSTABLEVIEW_H
#include <QWidget>
#include <QTableView>
#include <QMouseEvent>
#include "stockstablemodel.h"
#include "datamanager.h"
class StocksTableView : public QTableView
{
Q_OBJECT
public:
StocksTableView(QWidget *parent = 0);
~StocksTableView();
void setDataManager(DataManager *manager);
signals:
void stockActivated(Stock *stock);
void stockSelected(Stock *stock);
public slots:
void showCategory(quint32 categoryID);
void realTimeStatisticsDataUpdated();
// void allStocksLoaded();
private slots:
Stock * stockAt(const QPoint &pos);
void mouseDoubleClickEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void keyPressEvent(QKeyEvent *event);
private:
StocksTableModel *m_tableModel;
SortFilterProxyModel *m_sortFilterProxyModel;
DataManager *m_dataManager;
quint32 m_curCategoryID;
};
#endif // STOCKSTABLEVIEW_H