projects
/
yandex-traffic
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
618fd6e
)
Move implementation out of header
author
Max Lapan
<max.lapan@gmail.com>
Tue, 9 Mar 2010 17:10:54 +0000
(20:10 +0300)
committer
Max Lapan
<max.lapan@gmail.com>
Tue, 9 Mar 2010 17:10:54 +0000
(20:10 +0300)
mainwidget.cpp
patch
|
blob
|
history
mainwidget.hpp
patch
|
blob
|
history
diff --git
a/mainwidget.cpp
b/mainwidget.cpp
index
f6363a6
..
5e14ef9
100644
(file)
--- a/
mainwidget.cpp
+++ b/
mainwidget.cpp
@@
-29,3
+29,15
@@
QSize MainWidget::sizeHint() const
{
return QWidget::sizeHint () + QSize (20, 0);
}
{
return QWidget::sizeHint () + QSize (20, 0);
}
+
+
+void MainWidget::paintEvent(QPaintEvent *event)
+{
+ QPainter p(this);
+ p.setBrush(QColor(0, 0, 0, 128));
+ p.setPen(Qt::NoPen);
+ p.drawRoundedRect(rect(), 10, 10);
+ p.end();
+
+ QWidget::paintEvent(event);
+}
diff --git
a/mainwidget.hpp
b/mainwidget.hpp
index
4e29b66
..
65f64ab
100644
(file)
--- a/
mainwidget.hpp
+++ b/
mainwidget.hpp
@@
-24,16
+24,7
@@
public:
QSize sizeHint () const;
protected:
QSize sizeHint () const;
protected:
- void paintEvent(QPaintEvent *event)
- {
- QPainter p(this);
- p.setBrush(QColor(0, 0, 0, 128));
- p.setPen(Qt::NoPen);
- p.drawRoundedRect(rect(), 10, 10);
- p.end();
-
- QWidget::paintEvent(event);
- }
+ void paintEvent (QPaintEvent *event);
};
#endif /* __MAINWIDGET_H__ */
};
#endif /* __MAINWIDGET_H__ */