Changeset View
Changeset View
Standalone View
Standalone View
src/context/applets/analyzer/plugin/BlockAnalyzer.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 43 | { | |||
---|---|---|---|---|---|
46 | Medium = 2, | 46 | Medium = 2, | ||
47 | Fast = 3, | 47 | Fast = 3, | ||
48 | VeryFast = 4 | 48 | VeryFast = 4 | ||
49 | }; | 49 | }; | ||
50 | Q_ENUM( FallSpeed ) | 50 | Q_ENUM( FallSpeed ) | ||
51 | 51 | | |||
52 | explicit BlockAnalyzer( QQuickItem *parent = Q_NULLPTR ); | 52 | explicit BlockAnalyzer( QQuickItem *parent = Q_NULLPTR ); | ||
53 | 53 | | |||
54 | Renderer* createRenderer() const Q_DECL_OVERRIDE; | 54 | Renderer* createRenderer() const override; | ||
55 | 55 | | |||
56 | FallSpeed fallSpeed() const { return m_fallSpeed; } | 56 | FallSpeed fallSpeed() const { return m_fallSpeed; } | ||
57 | void setFallSpeed( FallSpeed fallSpeed ); | 57 | void setFallSpeed( FallSpeed fallSpeed ); | ||
58 | int columnWidth() const { return m_columnWidth; } | 58 | int columnWidth() const { return m_columnWidth; } | ||
59 | void setColumnWidth( int columnWidth ); | 59 | void setColumnWidth( int columnWidth ); | ||
60 | bool showFadebars() const { return m_showFadebars; } | 60 | bool showFadebars() const { return m_showFadebars; } | ||
61 | void setShowFadebars( bool showFadebars ); | 61 | void setShowFadebars( bool showFadebars ); | ||
62 | 62 | | |||
63 | // Signed ints because most of what we compare them against are ints | 63 | // Signed ints because most of what we compare them against are ints | ||
64 | static const int BLOCK_HEIGHT = 2; | 64 | static const int BLOCK_HEIGHT = 2; | ||
65 | static const int FADE_SIZE = 90; | 65 | static const int FADE_SIZE = 90; | ||
66 | 66 | | |||
67 | signals: | 67 | signals: | ||
68 | void fallSpeedChanged(); | 68 | void fallSpeedChanged(); | ||
69 | void columnWidthChanged(); | 69 | void columnWidthChanged(); | ||
70 | void showFadebarsChanged( bool ); | 70 | void showFadebarsChanged( bool ); | ||
71 | void stepChanged( qreal ); | 71 | void stepChanged( qreal ); | ||
72 | void rowsChanged( int ); | 72 | void rowsChanged( int ); | ||
73 | void columnsChanged( int ); | 73 | void columnsChanged( int ); | ||
74 | void refreshRateChanged( qreal ); | 74 | void refreshRateChanged( qreal ); | ||
75 | 75 | | |||
76 | protected: | 76 | protected: | ||
77 | virtual void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) Q_DECL_OVERRIDE; | 77 | virtual void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) override; | ||
78 | virtual Analyzer::Worker* createWorker() const Q_DECL_OVERRIDE; | 78 | virtual Analyzer::Worker* createWorker() const override; | ||
79 | virtual void paletteChange( const QPalette& ); | 79 | virtual void paletteChange( const QPalette& ); | ||
80 | 80 | | |||
81 | void drawBackground( const QPalette &palette ); | 81 | void drawBackground( const QPalette &palette ); | ||
82 | void determineStep(); | 82 | void determineStep(); | ||
83 | 83 | | |||
84 | private: | 84 | private: | ||
85 | void newWindow( QQuickWindow *window ); | 85 | void newWindow( QQuickWindow *window ); | ||
86 | 86 | | |||
Show All 14 Lines |