diff options
author | Roopesh Chander <roop@forwardbias.in> | 2009-10-22 19:45:35 +0530 |
---|---|---|
committer | Roopesh Chander <roop@forwardbias.in> | 2009-10-22 19:47:27 +0530 |
commit | 4e0a0c2817da9889547afc490369176ae4fefc93 (patch) | |
tree | 8ff729f3f3ac4a36bde142611ea54f4ec4238346 /webview.h | |
parent | aafe787b3b69465ff923283c2003bbbec7dc8e95 (diff) |
create a toolbar for the add/cancel buttons and show it after you select the scraps
Diffstat (limited to 'webview.h')
-rw-r--r-- | webview.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -3,19 +3,26 @@ #include <QGraphicsWebView> #include <QGraphicsSceneMouseEvent> +#include <QPushButton> #include <QKeyEvent> #include <QPainter> #include <QWebPage> +#include "graphicstoolbar.h" class WebView : public QGraphicsWebView { Q_OBJECT public: - WebView(QGraphicsItem * parent = 0); + WebView(QGraphicsScene *scene, QGraphicsItem * parent = 0); bool scrapSelectionEnabled() const; + void createAddScrapToolbar(); + void showAddScrapToolbar(); + void hideAddScrapToolbar(); public slots: void setScrapSelectionEnabled(bool enabled); + void unselectScrap(); + // void addScrap(); protected: void hoverMoveEvent(QGraphicsSceneHoverEvent* event); @@ -24,9 +31,13 @@ protected: void paint(QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget* widget = 0); private: + QGraphicsScene *m_scene; bool m_scrapSelectionEnabled; QRect m_scrapRect; bool m_scrapSelected; + + GraphicsToolBar *m_addScrapToolbar; + QPushButton *m_addButton, *m_cancelButton; }; #endif // WEBVIEW_H |