summaryrefslogtreecommitdiff
path: root/noncore/graphics
Side-by-side diff
Diffstat (limited to 'noncore/graphics') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp5
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp8
-rw-r--r--noncore/graphics/opie-eye/phunk_view.pro2
-rw-r--r--noncore/graphics/opie-eye/slave/slavereciever.cpp11
-rw-r--r--noncore/graphics/opie-eye/slave/slavereciever.h2
5 files changed, 20 insertions, 8 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 38a621e..729b64f 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -92,9 +92,9 @@ namespace {
PIconView::PIconView( QWidget* wid, Config* cfg )
: QVBox( wid ), m_cfg( cfg )
{
{
-// QCopEnvelope( "QPE/Application/opie-eye_slave", "foo()" );
+ QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" );
}
m_path = QDir::homeDirPath();
QHBox *hbox = new QHBox( this );
@@ -121,8 +121,11 @@ PIconView::PIconView( QWidget* wid, Config* cfg )
slotViewChanged( m_views->currentItem() );
}
PIconView::~PIconView() {
+ {
+ QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" );
+ }
}
void PIconView::slotDirUp() {
QDir dir( m_path );
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 0a2fcab..ea765d1 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -12,10 +12,10 @@
#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/ir.h>
-#include <opie/oapplicationfactory.h>
-#include <opie/otabwidget.h>
+#include <opie2/oapplicationfactory.h>
+#include <opie2/otabwidget.h>
#include <iface/ifaceinfo.h>
#include <iface/dirview.h>
@@ -23,9 +23,9 @@
#include "filesystem.h"
#include "mainwindow.h"
-OPIE_EXPORT_APP( OApplicationFactory<PMainWindow> )
+OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow> )
PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
: QMainWindow( wid, name, style ), m_cfg("phunkview")
{
@@ -83,9 +83,9 @@ void PMainWindow::slotConfig() {
QDialog dlg(this, 0, true);
dlg.setCaption( tr("Phunk View - Config" ) );
QHBoxLayout *lay = new QHBoxLayout(&dlg);
- OTabWidget *wid = new OTabWidget(&dlg );
+ Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg );
lay->addWidget( wid );
ViewMap *vM = viewMap();
ViewMap::Iterator _it = vM->begin();
QMap<PDirView*, QWidget*> lst;
diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro
index 21178ee..0bb5679 100644
--- a/noncore/graphics/opie-eye/phunk_view.pro
+++ b/noncore/graphics/opie-eye/phunk_view.pro
@@ -28,7 +28,7 @@ INCLUDEPATH += . $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie
+LIBS += -lqpe -lopieui2
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/graphics/opie-eye/slave/slavereciever.cpp b/noncore/graphics/opie-eye/slave/slavereciever.cpp
index c8e33d4..bbbbb30 100644
--- a/noncore/graphics/opie-eye/slave/slavereciever.cpp
+++ b/noncore/graphics/opie-eye/slave/slavereciever.cpp
@@ -56,9 +56,9 @@ SlaveObjects* slaveObjects() {
return _slaveObj;
}
SlaveReciever::SlaveReciever( QObject* par)
- : QObject( par )
+ : QObject( par ), m_refs( 0 )
{
m_inf = new QTimer(this);
connect(m_inf,SIGNAL(timeout()),
this, SLOT(slotImageInfo()));
@@ -119,17 +119,24 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar)
for(PixmapList::Iterator it = list.begin(); it != list.end(); ++it ) {
qWarning( "Got %d %d " + (*it).file, (*it).width , (*it).height );
m_inPix.append(*it);
}
+ }else if ( string == "refUp()" ) {
+ m_refs++;
+ }else if ( string == "refDown()" ) {
+ m_refs--;
}
if (!m_inf->isActive() && !m_inList.isEmpty() )
m_inf->start(5);
if (!m_pix->isActive() && !m_inPix.isEmpty() )
m_pix->start(5);
- QPEApplication::setKeepRunning();
+ if ( m_refs )
+ QPEApplication::setKeepRunning();
+ else
+ qApp->quit();
}
PixmapList SlaveReciever::outPix()const {
diff --git a/noncore/graphics/opie-eye/slave/slavereciever.h b/noncore/graphics/opie-eye/slave/slavereciever.h
index 214bfc6..b5aaccf 100644
--- a/noncore/graphics/opie-eye/slave/slavereciever.h
+++ b/noncore/graphics/opie-eye/slave/slavereciever.h
@@ -51,8 +51,10 @@ private slots:
private:
QTimer *m_inf, *m_pix, *m_out;
StringList m_inList, m_outList;
PixmapList m_inPix, m_outPix;
+private:
+ int m_refs;
};
#endif