Merge branch 'master' of ssh://mercury.wipsl.com/var/git/irw
authorJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 19 May 2010 13:16:42 +0000 (16:16 +0300)
committerJari Jarvi <t7jaja00@students.oamk.fi>
Wed, 19 May 2010 13:16:42 +0000 (16:16 +0300)
src/mainwidget.cpp
src/mainwidget.h

index b938991..f1cce33 100644 (file)
@@ -1,6 +1,7 @@
 #include "mainwidget.h"
 
-#include <QtGui/qinputdialog.h>
+#include <QInputDialog>
+#include <QPainter>
 #include <QGridLayout>
 #include <QPushButton>
 
@@ -26,8 +27,18 @@ MainWidget::MainWidget (QWidget *parent)
     connect(buttons[5], SIGNAL(clicked(bool)), &irCtrl, SLOT(sendCmd5(bool)));
 
     this->setLayout(layout);
+    this->setAttribute(Qt::WA_TranslucentBackground);
 }
 
+ void MainWidget::paintEvent(QPaintEvent *event)
+ {
+     QPainter p(this);
+     p.setBrush(QColor(0, 0, 0, 128));
+     p.setPen(Qt::NoPen);
+     p.drawRoundRect(rect(), 10, 20);
+     p.end();
+ }
 void MainWidget::showSettingsDialog()
 {
     SettingsDlg dlg(this);
index d52cde0..526299d 100644 (file)
@@ -16,6 +16,9 @@ public:
 
 public slots:
     void showSettingsDialog();
+
+protected:
+    void paintEvent(QPaintEvent *event);
  
 private:
     static const int BUTTON_COUNT = 6;