X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fabstractscopewidget.h;h=11074b664fa3dc899a0572932636521a5a04f1fa;hb=e3b4bf11679a3a195be8896f465b1616581f1fb3;hp=029274e6425d46b18bd970e61fe422a198f4cae8;hpb=b0f6605e9873b48ed942fee2583fbc3429a282e3;p=kdenlive diff --git a/src/abstractscopewidget.h b/src/abstractscopewidget.h index 029274e6..11074b66 100644 --- a/src/abstractscopewidget.h +++ b/src/abstractscopewidget.h @@ -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();