summaryrefslogtreecommitdiffstats
path: root/webview.h
diff options
context:
space:
mode:
authorRoopesh Chander <roop@forwardbias.in>2009-10-22 19:45:35 +0530
committerRoopesh Chander <roop@forwardbias.in>2009-10-22 19:47:27 +0530
commit4e0a0c2817da9889547afc490369176ae4fefc93 (patch)
tree8ff729f3f3ac4a36bde142611ea54f4ec4238346 /webview.h
parentaafe787b3b69465ff923283c2003bbbec7dc8e95 (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.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/webview.h b/webview.h
index f0a19c2..e836fc2 100644
--- a/webview.h
+++ b/webview.h
@@ -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