]> git.sesse.net Git - kdenlive/blobdiff - src/abstractscopewidget.h
Add animation feature to Slideshow Clip.
[kdenlive] / src / abstractscopewidget.h
index 029274e6425d46b18bd970e61fe422a198f4cae8..11074b664fa3dc899a0572932636521a5a04f1fa 100644 (file)
@@ -68,6 +68,10 @@ public:
     virtual ~AbstractScopeWidget(); // Must be virtual because of inheritance, to avoid memory leaks
     QPalette m_scopePalette;
 
+    /** Initializes widget settings (reads configuration).
+      Has to be called in the implementing object. */
+    void init();
+
     ///// Unimplemented /////
 
     virtual QString widgetName() const = 0;
@@ -113,6 +117,15 @@ protected:
     int m_accelFactorScope;
     int m_accelFactorBackground;
 
+    /** Reads the widget's configuration.
+        Can be extended in the implementing subclass (make sure to run readConfig as well). */
+    virtual void readConfig();
+    /** Writes the widget configuration.
+        Implementing widgets have to implement an own method and run it in their destructor. */
+    void writeConfig();
+    /** Identifier for the widget's configuration. */
+    QString configName();
+
 
     ///// Unimplemented Methods /////
 
@@ -149,13 +162,13 @@ protected:
 
     void mouseReleaseEvent(QMouseEvent *);
     void paintEvent(QPaintEvent *);
-    void raise();
     void resizeEvent(QResizeEvent *);
-    void showEvent(QShowEvent *);
+    void showEvent(QShowEvent *); // Called when the widget is activated via the Menu entry
+    //    void raise(); // Called only when  manually calling the event -> useless
 
 protected slots:
     /** Forces an update of all layers. */
-    void forceUpdate();
+    void forceUpdate(bool doUpdate = true);
     void forceUpdateHUD();
     void forceUpdateScope();
     void forceUpdateBackground();
@@ -195,6 +208,8 @@ private:
 
     QImage m_scopeImage;
 
+    QString m_widgetName;
+
     bool initialDimensionUpdateDone;
     void prodHUDThread();
     void prodScopeThread();