author | harlekin <harlekin> | 2002-06-14 12:55:56 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-14 12:55:56 (UTC) |
commit | cfe8ddcbe6105eb3fecb13aebdec54731d9a9970 (patch) (side-by-side diff) | |
tree | 85ce16c14ecc4f5b9017b3e978517526510531ac /core/applets/obex/obeximpl.cc | |
parent | 21742ad6d7b1b4d1bc00ca5025a4134d080924c1 (diff) | |
download | opie-cfe8ddcbe6105eb3fecb13aebdec54731d9a9970.zip opie-cfe8ddcbe6105eb3fecb13aebdec54731d9a9970.tar.gz opie-cfe8ddcbe6105eb3fecb13aebdec54731d9a9970.tar.bz2 |
got a bit further, dialog still not behaving right
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/obex/obeximpl.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc index da47e5b..eb0e67b 100644 --- a/core/applets/obex/obeximpl.cc +++ b/core/applets/obex/obeximpl.cc @@ -18,30 +18,35 @@ using namespace OpieObex; ObexImpl::ObexImpl( ) : QObject() { // register to a channel qWarning( "c'tor" ); m_obex = new Obex(this, "obex"); m_sendgui = new ObexDlg(); m_recvgui = new ObexInc(); m_chan = new QCopChannel("QPE/Obex" ); connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); connect(m_obex, SIGNAL(receivedFile(const QString& ) ), this, SLOT(slotReceivedFile(const QString& ) ) ); + connect((QObject*) m_recvgui->InsertButton, SIGNAL(clicked()), + m_recvgui, SLOT( accept() )); + connect((QObject*) m_recvgui->RejectButton, SIGNAL(clicked()), + m_recvgui, SLOT( reject() )); } ObexImpl::~ObexImpl() { delete m_obex; delete m_chan; delete m_sendgui; + delete m_recvgui; } QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if( uuid == IID_QUnknown ) *iface = this; else if( uuid == IID_ObexInterface ) *iface = this; qWarning("query" ); if(*iface ) (*iface)->addRef(); @@ -120,26 +125,28 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) { qWarning("empty"); if ( fileName.right(4) == ".vcf" ) exec = "addressbook"; else if ( fileName.right(4) == ".vcs" ) { exec = "datebook"; } } // now prompt and then add it m_recvgui->PixmapLabel->setPixmap(lnk.pixmap()); m_recvgui->AppLabel->setText(lnk.name()); m_recvgui->FileLabel->setText(fileName); m_recvgui->showMaximized(); - - QCString str= "QPE/Application/"; - str += exec.latin1(); - qWarning("channel %s", str.data() ); - QCopEnvelope e(str , "setDocument(QString)" ); - e << fileName; + if( m_recvgui->exec() != -1 ) { + QCString str= "QPE/Application/"; + str += exec.latin1(); + qWarning("channel %s", str.data() ); + QCopEnvelope e(str , "setDocument(QString)" ); + e << fileName; + } } + Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( ObexImpl ) } |