author | mickeyl <mickeyl> | 2004-05-13 21:56:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-13 21:56:23 (UTC) |
commit | f005863ac3e3106f3da9fd337ab0a20da0cd4b83 (patch) (unidiff) | |
tree | b633e278659c87b7bc964bb5ea80d46131798960 /noncore/graphics/drawpad/drawpad.h | |
parent | 6841da6429d864d5554c5a16e87c2755fe96343b (diff) | |
download | opie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.zip opie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.tar.gz opie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.tar.bz2 |
BUGFIX for 1314: Fix page initialization on first start of drawpad.
Problem was caused by a race condition. Developers: If you have todo
initializations which depend on the widget layout being finished,
_don't_ do this in the widget constructor but in a callback from the mainloop,
i.e. via QTimer::singleShot( 10, this, SLOT( myInitialization() ) );
Diffstat (limited to 'noncore/graphics/drawpad/drawpad.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h index ba9e47d..63d3057 100644 --- a/noncore/graphics/drawpad/drawpad.h +++ b/noncore/graphics/drawpad/drawpad.h | |||
@@ -20,51 +20,52 @@ | |||
20 | class DrawPadCanvas; | 20 | class DrawPadCanvas; |
21 | class Tool; | 21 | class Tool; |
22 | 22 | ||
23 | class QAction; | 23 | class QAction; |
24 | class QColor; | 24 | class QColor; |
25 | class QSpinBox; | 25 | class QSpinBox; |
26 | class QToolButton; | 26 | class QToolButton; |
27 | class QWidgetStack; | 27 | class QWidgetStack; |
28 | 28 | ||
29 | class DrawPad : public QMainWindow | 29 | class DrawPad : public QMainWindow |
30 | { | 30 | { |
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | 32 | ||
33 | public: | 33 | public: |
34 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); | 34 | DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); |
35 | ~DrawPad(); | 35 | ~DrawPad(); |
36 | 36 | ||
37 | static QString appName() { return QString::fromLatin1("drawpad"); } | 37 | static QString appName() { return QString::fromLatin1("drawpad"); } |
38 | 38 | ||
39 | Tool* tool() { return m_pTool; } | 39 | Tool* tool() { return m_pTool; } |
40 | QPen pen() { return m_pen; } | 40 | QPen pen() { return m_pen; } |
41 | QBrush brush() { return m_brush; } | 41 | QBrush brush() { return m_brush; } |
42 | 42 | ||
43 | bool antiAliasing(); | 43 | bool antiAliasing(); |
44 | void finishStartup(); | ||
45 | 44 | ||
46 | private slots: | 45 | private slots: |
46 | void finishStartup(); | ||
47 | |||
47 | void newPage(); | 48 | void newPage(); |
48 | void clearPage(); | 49 | void clearPage(); |
49 | void deletePage(); | 50 | void deletePage(); |
50 | 51 | ||
51 | void slotAppMessage( const QCString&, const QByteArray& ); | 52 | void slotAppMessage( const QCString&, const QByteArray& ); |
52 | 53 | ||
53 | void setPointTool(); | 54 | void setPointTool(); |
54 | void setLineTool(); | 55 | void setLineTool(); |
55 | void setRectangleTool(); | 56 | void setRectangleTool(); |
56 | void setFilledRectangleTool(); | 57 | void setFilledRectangleTool(); |
57 | void setEllipseTool(); | 58 | void setEllipseTool(); |
58 | void setFilledEllipseTool(); | 59 | void setFilledEllipseTool(); |
59 | void setTextTool(); | 60 | void setTextTool(); |
60 | void setFillTool(); | 61 | void setFillTool(); |
61 | void setEraseTool(); | 62 | void setEraseTool(); |
62 | 63 | ||
63 | void changePenWidth(int value); | 64 | void changePenWidth(int value); |
64 | void changePenColor(const QColor& color); | 65 | void changePenColor(const QColor& color); |
65 | void changeBrushColor(const QColor& color); | 66 | void changeBrushColor(const QColor& color); |
66 | 67 | ||
67 | void updateView(); | 68 | void updateView(); |
68 | 69 | ||
69 | void deleteAll(); | 70 | void deleteAll(); |
70 | void importPage(); | 71 | void importPage(); |