summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/bend/bend.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/bend/bend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/bend/bend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/mail2/bend/bend.cpp b/noncore/unsupported/mail2/bend/bend.cpp
index ab6eb45..4ded402 100644
--- a/noncore/unsupported/mail2/bend/bend.cpp
+++ b/noncore/unsupported/mail2/bend/bend.cpp
@@ -1,60 +1,60 @@
1#include <qlayout.h> 1#include <qlayout.h>
2#include <qpixmap.h> 2#include <qpixmap.h>
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qsound.h> 4#include <qsound.h>
5#include <qtimer.h> 5#include <qtimer.h>
6#include <qdir.h> 6#include <qdir.h>
7 7
8#include <qpe/qcopenvelope_qws.h> 8#include <qpe/qcopenvelope_qws.h>
9#include <qpe/resource.h> 9#include <qpe/resource.h>
10#include <qpe/config.h> 10#include <qpe/config.h>
11 11
12#include <opie/odevice.h> 12#include <opie2/odevice.h>
13 13
14#include "imapresponse.h" 14#include "imapresponse.h"
15#include "imaphandler.h" 15#include "imaphandler.h"
16#include "configfile.h" 16#include "configfile.h"
17#include "bend.h" 17#include "bend.h"
18 18
19using namespace Opie; 19using namespace Opie;
20 20
21BenD::BenD(QWidget *parent, const char *name, WFlags fl) 21BenD::BenD(QWidget *parent, const char *name, WFlags fl)
22 : QButton(parent, name, fl) 22 : QButton(parent, name, fl)
23{ 23{
24 _config = new Config("mail"); 24 _config = new Config("mail");
25 _config->setGroup("Settings"); 25 _config->setGroup("Settings");
26 26
27 QVBoxLayout *layout = new QVBoxLayout(this); 27 QVBoxLayout *layout = new QVBoxLayout(this);
28 layout->addItem(new QSpacerItem(0,0)); 28 layout->addItem(new QSpacerItem(0,0));
29 29
30 QLabel *pixmap = new QLabel(this); 30 QLabel *pixmap = new QLabel(this);
31 pixmap->setPixmap(Resource::loadPixmap("mail/mailchecker")); 31 pixmap->setPixmap(Resource::loadPixmap("mail/mailchecker"));
32 layout->addWidget(pixmap); 32 layout->addWidget(pixmap);
33 33
34 layout->addItem(new QSpacerItem(0,0)); 34 layout->addItem(new QSpacerItem(0,0));
35 35
36 hide(); 36 hide();
37 37
38 connect(this, SIGNAL(clicked()), SLOT(slotClicked())); 38 connect(this, SIGNAL(clicked()), SLOT(slotClicked()));
39 39
40 if (!_config->readBoolEntry("Disabled", false)) { 40 if (!_config->readBoolEntry("Disabled", false)) {
41 _intervalMs = _config->readNumEntry("CheckEvery", 5) * 60000; 41 _intervalMs = _config->readNumEntry("CheckEvery", 5) * 60000;
42 _intervalTimer = new QTimer(); 42 _intervalTimer = new QTimer();
43 _intervalTimer->start(_intervalMs); 43 _intervalTimer->start(_intervalMs);
44 connect(_intervalTimer, SIGNAL(timeout()), SLOT(slotCheck())); 44 connect(_intervalTimer, SIGNAL(timeout()), SLOT(slotCheck()));
45 45
46 QTimer::singleShot(0, this, SLOT(slotCheck())); 46 QTimer::singleShot(0, this, SLOT(slotCheck()));
47 } 47 }
48} 48}
49 49
50void BenD::drawButton(QPainter *) { } 50void BenD::drawButton(QPainter *) { }
51void BenD::drawButtonText(QPainter *) { } 51void BenD::drawButtonText(QPainter *) { }
52 52
53void BenD::slotClicked() 53void BenD::slotClicked()
54{ 54{
55 QCopEnvelope e("QPE/System", "execute(QString)"); 55 QCopEnvelope e("QPE/System", "execute(QString)");
56 e << QString("mail"); 56 e << QString("mail");
57 57
58 ODevice *device = ODevice::inst(); 58 ODevice *device = ODevice::inst();
59 if ( !device-> ledList ( ). isEmpty ( )) { 59 if ( !device-> ledList ( ). isEmpty ( )) {
60 OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0]; 60 OLed led = ( device-> ledList ( ). contains ( Led_Mail )) ? Led_Mail : device-> ledList ( ) [0];