Random changes
authorTorste Aikio <zokier@zokier.laptop>
Thu, 20 May 2010 06:22:07 +0000 (09:22 +0300)
committerTorste Aikio <zokier@zokier.laptop>
Thu, 20 May 2010 06:22:07 +0000 (09:22 +0300)
src/irctrl.cpp
src/irctrl.h
src/mainwidget.cpp
src/settingsdlg.cpp

index 079c633..4e098c8 100644 (file)
@@ -1,7 +1,14 @@
 #include "irctrl.h"
+#include <cstdlib>
 
 IrCtrl::IrCtrl()
 {
+    std::system("./lircctl start");
+}
+
+IrCtrl::~IrCtrl()
+{
+    std::system("./lircctl stop");
 }
 
 void IrCtrl::setRemoteName(const QString &newRemoteName)
index 13ef634..ed20e57 100644 (file)
@@ -9,6 +9,7 @@ class IrCtrl : public QObject
     Q_OBJECT
 public:
     IrCtrl();
+    ~IrCtrl();
 
     void setRemoteName(const QString &newRemoteName);
 
index 7a22c08..9c2436f 100644 (file)
@@ -21,15 +21,6 @@ MainWidget::MainWidget (QWidget *parent)
         "/usr/share/icons/hicolor/48x48/hildon/statusarea_volume_mute.png"
     };
 
-    char *buttonTitles[] = {
-        "Vol Up",
-        "Vol Down",
-        "Ch Up",
-        "Ch Down",
-        "Power Off",
-        "Mute"
-    };
-
     for (int i = 0; i < BUTTON_COUNT; ++i)
     {
         QToolButton *button = new QToolButton(this);
@@ -52,7 +43,7 @@ MainWidget::MainWidget (QWidget *parent)
     this->setAttribute(Qt::WA_TranslucentBackground);
 }
 
- void MainWidget::paintEvent(QPaintEvent *event)
+ void MainWidget::paintEvent(QPaintEvent*)
  {
      QPainter p(this);
      p.setBrush(QColor(0, 0, 0, 128));
index 031aaec..e5ff772 100644 (file)
@@ -7,8 +7,16 @@
 SettingsDlg::SettingsDlg(QWidget *parent)
     : QDialog(parent)
 {
+    this->setWindowTitle(tr("Settings"));
     layout = new QHBoxLayout(this);
-    layout->addWidget(new QLabel("foo"));
+
+    alphabetList = new QListWidget(this);
+    for (char c = 'a'; c <= 'z'; ++c)
+    {
+        alphabetList.addItem(QString(c));
+    }
+    layout->addWidget(alphabetList);
+    
     layout->addWidget(new QLabel("bar"));
     layout->addWidget(new QLabel("baz"));
     this->setLayout(layout);