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;
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 /////
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();
QImage m_scopeImage;
+ QString m_widgetName;
+
bool initialDimensionUpdateDone;
void prodHUDThread();
void prodScopeThread();