summaryrefslogtreecommitdiff
path: root/core/applets/screenshotapplet
Side-by-side diff
Diffstat (limited to 'core/applets/screenshotapplet') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/screenshotapplet/config.in2
-rw-r--r--core/applets/screenshotapplet/inputDialog.cpp3
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp7
3 files changed, 6 insertions, 6 deletions
diff --git a/core/applets/screenshotapplet/config.in b/core/applets/screenshotapplet/config.in
index cafd470..98f2b61 100644
--- a/core/applets/screenshotapplet/config.in
+++ b/core/applets/screenshotapplet/config.in
@@ -1,4 +1,4 @@
config SCREENSHOTAPPLET
boolean "opie-screenshotapplet (create images from your current display)"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
+ depends ( LIBQPE || LIBQPE-X11 )
diff --git a/core/applets/screenshotapplet/inputDialog.cpp b/core/applets/screenshotapplet/inputDialog.cpp
index 73ec773..ce03ec0 100644
--- a/core/applets/screenshotapplet/inputDialog.cpp
+++ b/core/applets/screenshotapplet/inputDialog.cpp
@@ -1,64 +1,65 @@
/****************************************************************************
** Form implementation generated from reading ui file 'inputDialog.ui'
**
** Created: Sat Mar 2 07:55:03 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "inputDialog.h"
#include <qpe/resource.h>
#include <opie2/ofiledialog.h>
#include <qlineedit.h>
#include <qpushbutton.h>
+using namespace Opie::Ui;
InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "InputDialog" );
resize( 234, 115);
setMaximumSize( QSize( 240, 40));
setCaption( tr(name ) );
QPushButton *browserButton;
browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
browserButton->setGeometry( QRect( 205, 10, 22, 22));
connect( browserButton, SIGNAL(released()),this,SLOT(browse()));
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
}
/*
* Destroys the object and frees any allocated resources
*/
InputDialog::~InputDialog()
{
inputText= LineEdit1->text();
}
void InputDialog::browse() {
MimeTypes types;
QStringList audio, video, all;
audio << "audio/*";
audio << "playlist/plain";
audio << "audio/x-mpegurl";
video << "video/*";
video << "playlist/plain";
all += audio;
all += video;
types.insert("All Media Files", all );
types.insert("Audio", audio );
types.insert("Video", video );
- QString str = Opie::OFileDialog::getOpenFileName( 1,"/","", types, 0 );
+ QString str = Opie::Ui::OFileDialog::getOpenFileName( 1,"/","", types, 0 );
LineEdit1->setText(str);
}
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 20e1c9b..9aa012a 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -18,48 +18,49 @@
/* OPIE */
#include <opie2/otaskbarapplet.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
/* QT */
#include <qlineedit.h>
#include <qdir.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qpainter.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qcheckbox.h>
#include <qmessagebox.h>
/* STD */
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
/* XPM */
+using namespace Opie::Ui;
static char * snapshot_xpm[] = {
"32 32 177 2",
" c None",
". c #042045",
"+ c #0D2B47",
"@ c #0E325E",
"# c #0D2E50",
"$ c #0A1C32",
"% c #0F3A69",
"& c #164680",
"* c #165EAE",
"= c #134D89",
"- c #0A3A6E",
"; c #031024",
"> c #031B36",
", c #1A5EA3",
"' c #1862B1",
") c #1866B9",
"! c #0F5AAC",
"~ c #0F56A8",
"{ c #0C4C96",
"] c #030918",
"^ c #060206",
"/ c #20242C",
@@ -515,29 +516,27 @@ void ScreenshotApplet::mousePressEvent( QMouseEvent *)
// so we check the position against the screen width and correct the difference if needed
int screenWidth = qApp->desktop()->width();
int windowPosX = curPos. x ( ) - ( sc-> sizeHint ( ). width ( ) - width ( )) / 2 ;
int ZwindowPosX, XwindowPosX;
// the window would be placed beyond the screen wich doesn't look tooo good
if ( (windowPosX + sc-> sizeHint ( ). width ( )) > screenWidth ) {
XwindowPosX = windowPosX + sc-> sizeHint ( ). width ( ) - screenWidth;
ZwindowPosX = windowPosX - XwindowPosX - 1;
} else {
ZwindowPosX = windowPosX;
}
sc-> move ( ZwindowPosX, curPos. y ( ) - sc-> sizeHint ( ). height ( ) );
sc-> show ( );
}
void ScreenshotApplet::paintEvent( QPaintEvent* )
{
QPainter p ( this );
p.drawPixmap( 0,0, m_icon );
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ScreenshotApplet> );
-}
+
+EXPORT_OPIE_APPLET_v1( ScreenshotApplet )