summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/keyhelper/.cvsignore5
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/.cvsignore5
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.cpp8
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.h3
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.cpp2
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp4
-rw-r--r--noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.h2
-rw-r--r--noncore/applets/keyhelper/keyhelperconf/.cvsignore7
8 files changed, 24 insertions, 12 deletions
diff --git a/noncore/applets/keyhelper/.cvsignore b/noncore/applets/keyhelper/.cvsignore
new file mode 100644
index 0000000..9f2b524
--- a/dev/null
+++ b/noncore/applets/keyhelper/.cvsignore
@@ -0,0 +1,5 @@
1Makefile*
2moc*
3.moc*
4.obj
5.moc
diff --git a/noncore/applets/keyhelper/keyhelperapplet/.cvsignore b/noncore/applets/keyhelper/keyhelperapplet/.cvsignore
new file mode 100644
index 0000000..9f2b524
--- a/dev/null
+++ b/noncore/applets/keyhelper/keyhelperapplet/.cvsignore
@@ -0,0 +1,5 @@
1Makefile*
2moc*
3.moc*
4.obj
5.moc
diff --git a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.cpp b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.cpp
index 3c2298e..fc02862 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.cpp
+++ b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.cpp
@@ -1,29 +1,23 @@
1#include "AnyLnk.h" 1#include "AnyLnk.h"
2#include "KHUtil.h" 2#include "KHUtil.h"
3 3
4void AnyLnk::loadPixmap() 4void AnyLnk::loadPixmap()
5{ 5{
6 if(m_params.count() >= 3){ 6 if(m_params.count() >= 3){
7 QString& str = m_params[2]; 7 m_pixmap = Opie::Core::OResource::loadPixmap( m_params[2], Opie::Core::OResource::SmallIcon );
8 QImage image = Resource::loadImage(str);
9 if(image.isNull() == false){
10 const QSize& size = AppLnkManager::getIconSize();
11 m_pixmap.convertFromImage(
12 image.smoothScale(size.width(), size.height()) );
13 }
14 } 8 }
15} 9}
16 10
17void AnyLnk::parseText() 11void AnyLnk::parseText()
18{ 12{
19 if(m_params.count() >= 2){ 13 if(m_params.count() >= 2){
20 QString& str = m_params[1]; 14 QString& str = m_params[1];
21 if(str != QString::null && str.length() > 0){ 15 if(str != QString::null && str.length() > 0){
22 replaceKeyword(str); 16 replaceKeyword(str);
23 replaceDate(str); 17 replaceDate(str);
24 } 18 }
25 } 19 }
26} 20}
27 21
28void AnyLnk::replaceText(QString& str, const QString& s1, const QString& s2) 22void AnyLnk::replaceText(QString& str, const QString& s1, const QString& s2)
29{ 23{
diff --git a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.h b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.h
index 9853942..d170e6d 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.h
+++ b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AnyLnk.h
@@ -1,30 +1,31 @@
1#ifndef _ANYLNK_H_ 1#ifndef _ANYLNK_H_
2#define _ANYLNK_H_ 2#define _ANYLNK_H_
3 3
4#include <time.h> 4#include <time.h>
5 5
6#include <qstring.h> 6#include <qstring.h>
7#include <qstringlist.h> 7#include <qstringlist.h>
8#include <qpixmap.h> 8#include <qpixmap.h>
9#include <qimage.h> 9#include <qimage.h>
10#include <qclipboard.h> 10#include <qclipboard.h>
11#include <qtextcodec.h> 11#include <qtextcodec.h>
12 12
13#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
14#include <qpe/resource.h> 14
15#include <opie2/oresource.h>
15 16
16#include "AppLnkManager.h" 17#include "AppLnkManager.h"
17#include "ConfigEx.h" 18#include "ConfigEx.h"
18 19
19class AnyLnk 20class AnyLnk
20{ 21{
21public: 22public:
22 AnyLnk(){} 23 AnyLnk(){}
23 AnyLnk(const QStringList& params){ 24 AnyLnk(const QStringList& params){
24 m_params = params; 25 m_params = params;
25 loadPixmap(); 26 loadPixmap();
26 } 27 }
27 virtual ~AnyLnk(){ 28 virtual ~AnyLnk(){
28 } 29 }
29 virtual bool isValid() = 0; 30 virtual bool isValid() = 0;
30 virtual void execute() = 0; 31 virtual void execute() = 0;
diff --git a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.cpp b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.cpp
index 1c3dbfe..dc6dd77 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.cpp
+++ b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.cpp
@@ -27,17 +27,17 @@ public:
27 m_pLnk->execute(m_params[1]); 27 m_pLnk->execute(m_params[1]);
28 } 28 }
29 virtual QString name() { 29 virtual QString name() {
30 return(m_pLnk->name()); 30 return(m_pLnk->name());
31 } 31 }
32 virtual const QPixmap& pixmap(){ 32 virtual const QPixmap& pixmap(){
33 if(m_pixmap.isNull()){ 33 if(m_pixmap.isNull()){
34 return(m_pLnk->pixmap()); 34 return(m_pLnk->pixmap());
35 } else { 35 } else {
36 return(m_pixmap); 36 return(m_pixmap);
37 } 37 }
38 } 38 }
39protected: 39protected:
40 AppLnk* m_pLnk; 40 AppLnk* m_pLnk;
41}; 41};
42 42
43#endif /* _APPLNK_WRAPPER_H_ */ \ No newline at end of file 43#endif /* _APPLNK_WRAPPER_H_ */
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
index 7beb511..9fac51b 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
+++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.cpp
@@ -1,27 +1,27 @@
1#include "KeyHelperWidget.h" 1#include "KeyHelperWidget.h"
2#include "QSafeDataStream.h" 2#include "QSafeDataStream.h"
3#include "KHUtil.h" 3#include "KHUtil.h"
4 4
5QWidget* g_Widget = NULL; 5QWidget* g_Widget = NULL;
6int g_level = 0; 6int g_level = 0;
7 7
8static const char* _version_ = "1.2.2"; 8static const char* _version_ = "1.2.2";
9 9
10KeyHelperWidget::KeyHelperWidget(QWidget* parent, const char* name) 10KeyHelperWidget::KeyHelperWidget(QWidget* parent, const char* name)
11 : QLabel(parent, name),disabled(Resource::loadPixmap("zkb-disabled")) 11 : QLabel(parent, name),disabled(Opie::Core::OResource::loadPixmap("zkb-disabled"))
12{ 12{
13 qDebug("KeyHelperWidget::KeyHelperWidget()"); 13 qDebug("KeyHelperWidget::KeyHelperWidget()");
14 g_Widget = this; 14 g_Widget = this;
15 m_defHandler = NULL; 15 m_defHandler = NULL;
16 //m_reset = false; 16 //m_reset = false;
17 m_reset = true; 17 m_reset = true;
18 m_useFilter = false; 18 m_useFilter = false;
19 m_pHelper = NULL; 19 m_pHelper = NULL;
20 m_status = false; 20 m_status = false;
21 21
22 //unset(); 22 //unset();
23 initDebugLevel(); 23 initDebugLevel();
24 24
25 m_pHelper = new KeyHelper(); 25 m_pHelper = new KeyHelper();
26 26
27 //qApp->installEventFilter(this); 27 //qApp->installEventFilter(this);
@@ -281,33 +281,33 @@ void MsgHandler(QtMsgType type, const char* msg)
281 } 281 }
282 break; 282 break;
283 default: 283 default:
284 break; 284 break;
285 } 285 }
286} 286}
287 287
288void KeyHelperWidget::initDebugLevel() 288void KeyHelperWidget::initDebugLevel()
289{ 289{
290 ConfigEx& cfg = ConfigEx::getInstance("keyhelper"); 290 ConfigEx& cfg = ConfigEx::getInstance("keyhelper");
291 cfg.setGroup("Global"); 291 cfg.setGroup("Global");
292 292
293 int level = cfg.readNumEntry("DebugLevel", 0); 293 int level = cfg.readNumEntry("DebugLevel", 0);
294 setDebugLevel(level); 294 setDebugLevel(level);
295} 295}
296 296
297void KeyHelperWidget::setDebugLevel(int level) 297void KeyHelperWidget::setDebugLevel(int /*level*/)
298{ 298{
299#ifdef QT_QWS_EBX 299#ifdef QT_QWS_EBX
300 static bool noDebug = true; 300 static bool noDebug = true;
301 g_level = level; 301 g_level = level;
302 if(g_level > 0){ 302 if(g_level > 0){
303 if(noDebug){ 303 if(noDebug){
304 m_defHandler = qInstallMsgHandler(MsgHandler); 304 m_defHandler = qInstallMsgHandler(MsgHandler);
305 noDebug = false; 305 noDebug = false;
306 } 306 }
307 } else { 307 } else {
308 qInstallMsgHandler(m_defHandler); 308 qInstallMsgHandler(m_defHandler);
309 noDebug = true; 309 noDebug = true;
310 } 310 }
311#endif 311#endif
312} 312}
313 313
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.h b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.h
index 4798c5c..0901081 100644
--- a/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.h
+++ b/noncore/applets/keyhelper/keyhelperapplet/applet/KeyHelperWidget.h
@@ -1,31 +1,31 @@
1#ifndef _KEY_HELPER_WIDGET_H_ 1#ifndef _KEY_HELPER_WIDGET_H_
2#define _KEY_HELPER_WIDGET_H_ 2#define _KEY_HELPER_WIDGET_H_
3 3
4#include <qwidget.h> 4#include <qwidget.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qpixmap.h> 6#include <qpixmap.h>
7#include <qtimer.h> 7#include <qtimer.h>
8#include <qaccel.h> 8#include <qaccel.h>
9#include <opie2/otaskbarapplet.h> 9#include <opie2/otaskbarapplet.h>
10#include <opie2/okeyfilter.h> 10#include <opie2/okeyfilter.h>
11#include <opie2/oresource.h>
11 12
12#include <qpe/qcopenvelope_qws.h> 13#include <qpe/qcopenvelope_qws.h>
13#include <qpe/qpeapplication.h> 14#include <qpe/qpeapplication.h>
14#include <qpe/global.h> 15#include <qpe/global.h>
15#include <qpe/resource.h>
16#include "KeyHelper.h" 16#include "KeyHelper.h"
17#include "AppLnkManager.h" 17#include "AppLnkManager.h"
18#include "ConfigEx.h" 18#include "ConfigEx.h"
19 19
20#include <syslog.h> 20#include <syslog.h>
21 21
22Q_EXPORT void MsgHandler(QtMsgType type, const char* msg); 22Q_EXPORT void MsgHandler(QtMsgType type, const char* msg);
23 23
24class KeyHelperWidget : public QLabel 24class KeyHelperWidget : public QLabel
25{ 25{
26 Q_OBJECT 26 Q_OBJECT
27public: 27public:
28 KeyHelperWidget(QWidget* parent = 0, const char* name=0); 28 KeyHelperWidget(QWidget* parent = 0, const char* name=0);
29 ~KeyHelperWidget(); 29 ~KeyHelperWidget();
30 static int position(); 30 static int position();
31 31
diff --git a/noncore/applets/keyhelper/keyhelperconf/.cvsignore b/noncore/applets/keyhelper/keyhelperconf/.cvsignore
new file mode 100644
index 0000000..f4d9255
--- a/dev/null
+++ b/noncore/applets/keyhelper/keyhelperconf/.cvsignore
@@ -0,0 +1,7 @@
1Makefile*
2moc*
3.moc*
4.obj
5.moc
6KHCWidgetBase.cpp
7KHCWidgetBase.h \ No newline at end of file