forked from bnufree/Hq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
qindexwidget.h
64 lines (54 loc) · 1.56 KB
/
qindexwidget.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef QINDEXWIDGET_H
#define QINDEXWIDGET_H
#include <QStackedWidget>
//#include "dbservices/sharedata.h"
#include "qindexframe.h"
#include "data_structure/sharedata.h"
#include <QTimer>
#include <QResizeEvent>
#if 0
class QIndexWidget : public QStackedWidget
{
Q_OBJECT
public:
explicit QIndexWidget(QWidget *parent = 0);
~QIndexWidget();
void resizeEvent(QResizeEvent *e);
signals:
public slots:
void updateData(const ShareDataList& list);
void updateData(const ShareHsgtList &list);
void insertWidget(const QString& code);
void switchWidget();
void insertWidget(QWidget* w);
void insertWidget(const QWidgetList& list);
private:
QMap<QString, QWidget*> mIndexWidgetMap;
QTimer* mSwitchTimer;
};
#else
class QHqIndexThread;
class QIndexWidget : public QWidget
{
Q_OBJECT
public:
explicit QIndexWidget(QWidget *parent = 0);
~QIndexWidget();
void resizeEvent(QResizeEvent *e);
signals:
public slots:
void updateData(const ShareDataList& list, qint64 time);
void updateData(const ShareHsgtList &list);
void insertWidget(const QString& code);
void switchWidget();
void updateIndexDataList(const QList<IndexFrameData>& list);
private:
QIndexFrame* frameOfData(const IndexFrameData& data);
private:
QTimer* mSwitchTimer;
int mMaxDisplayFrameCount;
QList<QIndexFrame*> mWidgetList;
QHqIndexThread* mIndexThread;
};
#endif
#endif // QINDEXWIDGET_H