summaryrefslogtreecommitdiff
authordrw <drw>2005-06-04 00:13:32 (UTC)
committer drw <drw>2005-06-04 00:13:32 (UTC)
commitc220c5e580c3cd0e16cf9a7c252a0f66b7034d02 (patch) (side-by-side diff)
treefeec669d11c40c6f66fef806e42df0fdad4f6d5d
parent0fcaa971ee658effa1dc36205df6dfbc43a6b0ad (diff)
downloadopie-c220c5e580c3cd0e16cf9a7c252a0f66b7034d02.zip
opie-c220c5e580c3cd0e16cf9a7c252a0f66b7034d02.tar.gz
opie-c220c5e580c3cd0e16cf9a7c252a0f66b7034d02.tar.bz2
Resource -> OResource, fix couple compile warnings and add .cvsignore files
Diffstat (more/less context) (show 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.cpp0
-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, 23 insertions, 11 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 @@
+Makefile*
+moc*
+.moc*
+.obj
+.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 @@
+Makefile*
+moc*
+.moc*
+.obj
+.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,37 +1,31 @@
#include "AnyLnk.h"
#include "KHUtil.h"
void AnyLnk::loadPixmap()
{
if(m_params.count() >= 3){
- QString& str = m_params[2];
- QImage image = Resource::loadImage(str);
- if(image.isNull() == false){
- const QSize& size = AppLnkManager::getIconSize();
- m_pixmap.convertFromImage(
- image.smoothScale(size.width(), size.height()) );
- }
+ m_pixmap = Opie::Core::OResource::loadPixmap( m_params[2], Opie::Core::OResource::SmallIcon );
}
}
void AnyLnk::parseText()
{
if(m_params.count() >= 2){
QString& str = m_params[1];
if(str != QString::null && str.length() > 0){
replaceKeyword(str);
replaceDate(str);
}
}
}
void AnyLnk::replaceText(QString& str, const QString& s1, const QString& s2)
{
int index = 0;
int idx;
int len = s1.length();
idx = str.find(s1, index);
for(;;){
idx = str.find(s1, index);
if(idx < 0) break;
str.replace(idx, len, s2);
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,38 +1,39 @@
#ifndef _ANYLNK_H_
#define _ANYLNK_H_
#include <time.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qclipboard.h>
#include <qtextcodec.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
+
+#include <opie2/oresource.h>
#include "AppLnkManager.h"
#include "ConfigEx.h"
class AnyLnk
{
public:
AnyLnk(){}
AnyLnk(const QStringList& params){
m_params = params;
loadPixmap();
}
virtual ~AnyLnk(){
}
virtual bool isValid() = 0;
virtual void execute() = 0;
virtual QString name() = 0;
virtual const QPixmap& pixmap() = 0;
protected:
QStringList m_params;
QPixmap m_pixmap;
virtual void loadPixmap();
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
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,35 +1,35 @@
#include "KeyHelperWidget.h"
#include "QSafeDataStream.h"
#include "KHUtil.h"
QWidget* g_Widget = NULL;
int g_level = 0;
static const char* _version_ = "1.2.2";
KeyHelperWidget::KeyHelperWidget(QWidget* parent, const char* name)
- : QLabel(parent, name),disabled(Resource::loadPixmap("zkb-disabled"))
+ : QLabel(parent, name),disabled(Opie::Core::OResource::loadPixmap("zkb-disabled"))
{
qDebug("KeyHelperWidget::KeyHelperWidget()");
g_Widget = this;
m_defHandler = NULL;
//m_reset = false;
m_reset = true;
m_useFilter = false;
m_pHelper = NULL;
m_status = false;
//unset();
initDebugLevel();
m_pHelper = new KeyHelper();
//qApp->installEventFilter(this);
connect(qwsServer,
SIGNAL(windowEvent(QWSWindow*, QWSServer::WindowEvent)),
this,
SLOT(windowEvent(QWSWindow*, QWSServer::WindowEvent)));
m_pChannel = new QCopChannel("QPE/KeyHelper", this);
connect(m_pChannel, SIGNAL(received(const QCString&, const QByteArray&)),
@@ -273,49 +273,49 @@ void MsgHandler(QtMsgType type, const char* msg)
syslog(LOG_LOCAL5|LOG_DEBUG,
"<2>%s", msg);
}
break;
case QtWarningMsg:
if(g_level >= 1){
syslog(LOG_LOCAL5|LOG_DEBUG,
"<1>%s", msg);
}
break;
default:
break;
}
}
void KeyHelperWidget::initDebugLevel()
{
ConfigEx& cfg = ConfigEx::getInstance("keyhelper");
cfg.setGroup("Global");
int level = cfg.readNumEntry("DebugLevel", 0);
setDebugLevel(level);
}
-void KeyHelperWidget::setDebugLevel(int level)
+void KeyHelperWidget::setDebugLevel(int /*level*/)
{
#ifdef QT_QWS_EBX
static bool noDebug = true;
g_level = level;
if(g_level > 0){
if(noDebug){
m_defHandler = qInstallMsgHandler(MsgHandler);
noDebug = false;
}
} else {
qInstallMsgHandler(m_defHandler);
noDebug = true;
}
#endif
}
void KeyHelperWidget::enable()
{
m_enable = true;
m_pHelper->enable();
//set();
QTimer::singleShot(0, this, SLOT(set()));
}
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,39 +1,39 @@
#ifndef _KEY_HELPER_WIDGET_H_
#define _KEY_HELPER_WIDGET_H_
#include <qwidget.h>
#include <qlabel.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <qaccel.h>
#include <opie2/otaskbarapplet.h>
#include <opie2/okeyfilter.h>
+#include <opie2/oresource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/global.h>
-#include <qpe/resource.h>
#include "KeyHelper.h"
#include "AppLnkManager.h"
#include "ConfigEx.h"
#include <syslog.h>
Q_EXPORT void MsgHandler(QtMsgType type, const char* msg);
class KeyHelperWidget : public QLabel
{
Q_OBJECT
public:
KeyHelperWidget(QWidget* parent = 0, const char* name=0);
~KeyHelperWidget();
static int position();
virtual bool eventFilter(QObject* o, QEvent* e);
public slots:
//void windowEvent(QWSWindow* w, QWSServer::WindowEvent e);
protected:
QCopChannel* m_pChannel;
QCopChannel* m_pSysChannel;
QPixmap disabled;
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 @@
+Makefile*
+moc*
+.moc*
+.obj
+.moc
+KHCWidgetBase.cpp
+KHCWidgetBase.h \ No newline at end of file