author | drw <drw> | 2004-02-22 17:12:28 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-22 17:12:28 (UTC) |
commit | f31e19e2d828dc6d8563b2540e45ee60184f91aa (patch) (side-by-side diff) | |
tree | b4f3e08ea04e9b3e5ad10cfe50f5af0f9531d357 | |
parent | 68bd0ee2c7806b8fb35caf796e1d623e3d1f6011 (diff) | |
download | opie-f31e19e2d828dc6d8563b2540e45ee60184f91aa.zip opie-f31e19e2d828dc6d8563b2540e45ee60184f91aa.tar.gz opie-f31e19e2d828dc6d8563b2540e45ee60184f91aa.tar.bz2 |
Autorotate Applet: libopie->libopie2
4 files changed, 4 insertions, 4 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index 35a11db..e7891c8 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp @@ -1,98 +1,98 @@ /* * copyright : (c) 2003 by Greg Gilbert * email : greg@treke.net * based on the cardmon applet by Max Reiss * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * *************************************************************************/ #include "autorotate.h" /* OPIE */ -#include <opie/odevice.h> +#include <opie2/odevice.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/resource.h> /* QT */ #include <qapplication.h> #include <qfile.h> #include <qcopchannel_qws.h> #include <qmessagebox.h> #include <qpainter.h> #include <qpixmap.h> #include <qimage.h> #include <qtimer.h> #include <qtextstream.h> using namespace Opie; AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) { setFixedWidth( AppLnk::smallIconSize() ); setFixedHeight( AppLnk::smallIconSize() ); enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) ); disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) ); repaint(true); popupMenu = 0; show(); } AutoRotate::~AutoRotate() { if (popupMenu) { delete popupMenu; } } void AutoRotate::mousePressEvent(QMouseEvent *) { QPopupMenu *menu = new QPopupMenu(this); menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 ); QPoint p = mapToGlobal(QPoint(0, 0)); QSize s = menu->sizeHint(); int opt = menu->exec(QPoint(p.x() + (width() / 2) - (s.width() / 2), p.y() - s.height()), 0); if (opt==1) { setRotateEnabled( !isRotateEnabled() ); repaint(true); } delete menu; } void AutoRotate::paintEvent(QPaintEvent *) { QPainter p(this); p.drawPixmap( 0, 0, isRotateEnabled()? enabledPm : disabledPm ); } void AutoRotate::setRotateEnabled(bool status) { Config cfg( "qpe" ); cfg.setGroup( "Appearance" ); cfg.writeEntry( "rotateEnabled", status ); } bool AutoRotate::isRotateEnabled() { Config cfg( "qpe" ); cfg.setGroup( "Appearance" ); bool res = cfg.readBoolEntry( "rotateEnabled" ); if (res ) qDebug("Enabled"); else qDebug("Disabled"); return res; } diff --git a/noncore/applets/autorotateapplet/autorotateapplet.pro b/noncore/applets/autorotateapplet/autorotateapplet.pro index 0b966b0..0ccbeba 100644 --- a/noncore/applets/autorotateapplet/autorotateapplet.pro +++ b/noncore/applets/autorotateapplet/autorotateapplet.pro @@ -1,13 +1,13 @@ TEMPLATE = lib CONFIG += qt plugin warn_on release HEADERS = autorotate.h autorotateimpl.h SOURCES = autorotate.cpp autorotateimpl.cpp TARGET = autorotateapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include ../launcher -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/noncore/applets/autorotateapplet/config.in b/noncore/applets/autorotateapplet/config.in index 0ddbd59..128d327 100644 --- a/noncore/applets/autorotateapplet/config.in +++ b/noncore/applets/autorotateapplet/config.in @@ -1,4 +1,4 @@ config AUTOROTATEAPPLET boolean "opie-autorotate applet ( disables screen rotation based on the orientation of the device)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/applets/autorotateapplet/opie-autorotate.control b/noncore/applets/autorotateapplet/opie-autorotate.control index 9e726e9..47d9805 100644 --- a/noncore/applets/autorotateapplet/opie-autorotate.control +++ b/noncore/applets/autorotateapplet/opie-autorotate.control @@ -1,11 +1,11 @@ Package: opie-autorotate Files: plugins/applets/libautorotateapplet.so* pics/autorotate/*.png Priority: optional Section: opie/applets Maintainer: Greg Gilbert <greg@treke.net> Architecture: arm -Depends: task-opie-minimal, libopie1 +Depends: task-opie-minimal, libopiecore2 Description: Automatic screen rotation applet Taskbar applet for enabled and disabling the automatic rotation of the screen based on your devices physical orientation/ Version: $QPE_VERSION$EXTRAVERSION |