diff view/View.h @ 797:edada332c374 tonioni

Add an experimental cancel button to view progress bars
author Chris Cannam
date Fri, 13 Jun 2014 17:39:01 +0100
parents 9fd1bdf214dd
children 40c6c9344ff6
line wrap: on
line diff
--- a/view/View.h	Fri Jun 13 15:29:06 2014 +0100
+++ b/view/View.h	Fri Jun 13 17:39:01 2014 +0100
@@ -29,6 +29,8 @@
 class Layer;
 class ViewPropertyContainer;
 
+class QPushButton;
+
 #include <map>
 #include <set>
 
@@ -309,6 +311,8 @@
     virtual void overlayModeChanged();
     virtual void zoomWheelsEnabledChanged();
 
+    virtual void cancelClicked();
+
     virtual void progressCheckStalledTimerElapsed();
 
 protected:
@@ -373,16 +377,8 @@
     mutable LayerList m_lastScrollableBackLayers;
     mutable LayerList m_lastNonScrollableBackLayers;
 
-    class LayerProgressBar : public QProgressBar {
-    public:
-	LayerProgressBar(QWidget *parent);
-	virtual QString text() const { return m_text; }
-	virtual void setText(QString text) { m_text = text; }
-    protected:
-	QString m_text;
-    };
-
     struct ProgressBarRec {
+        QPushButton *cancel;
         QProgressBar *bar;
         int lastCheck;
         QTimer *checkTimer;