41 |
41 |
42 #ifndef BROWSERWINDOW_H |
42 #ifndef BROWSERWINDOW_H |
43 #define BROWSERWINDOW_H |
43 #define BROWSERWINDOW_H |
44 |
44 |
45 #include <QWidget> |
45 #include <QWidget> |
46 class QTimeLine; |
46 class QPropertyAnimation; |
47 class QUrl; |
47 class QUrl; |
48 |
48 |
49 class BrowserView; |
49 class BrowserView; |
50 class HomeView; |
50 class HomeView; |
51 |
51 |
52 class BrowserWindow : public QWidget |
52 class BrowserWindow : public QWidget |
53 { |
53 { |
54 Q_OBJECT |
54 Q_OBJECT |
|
55 Q_PROPERTY(qreal slideValue READ slideValue WRITE setSlideValue) |
55 |
56 |
56 public: |
57 public: |
57 BrowserWindow(); |
58 BrowserWindow(); |
58 |
59 |
59 private slots: |
60 private slots: |
60 void initialize(); |
|
61 void navigate(const QUrl &url); |
61 void navigate(const QUrl &url); |
62 void gotoAddress(const QString &address); |
62 void gotoAddress(const QString &address); |
|
63 void animationFinished(); |
63 |
64 |
64 public slots: |
65 public slots: |
65 void showBrowserView(); |
66 void showBrowserView(); |
66 void showHomeView(); |
67 void showHomeView(); |
67 void slide(int); |
|
68 |
68 |
69 protected: |
69 protected: |
70 void keyReleaseEvent(QKeyEvent *event); |
70 void keyReleaseEvent(QKeyEvent *event); |
71 void resizeEvent(QResizeEvent *event); |
71 void resizeEvent(QResizeEvent *event); |
72 |
72 |
73 private: |
73 private: |
|
74 void setSlideValue(qreal); |
|
75 qreal slideValue() const; |
|
76 |
|
77 QWidget *m_slidingSurface; |
74 HomeView *m_homeView; |
78 HomeView *m_homeView; |
75 BrowserView *m_browserView; |
79 BrowserView *m_browserView; |
76 QTimeLine *m_timeLine; |
80 QPropertyAnimation *m_animation; |
77 }; |
81 }; |
78 |
82 |
79 #endif // BROWSERWINDOW_H |
83 #endif // BROWSERWINDOW_H |