From cfe8ddcbe6105eb3fecb13aebdec54731d9a9970 Mon Sep 17 00:00:00 2001 From: harlekin Date: Fri, 14 Jun 2002 12:55:56 +0000 Subject: got a bit further, dialog still not behaving right --- (limited to 'core') 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 @@ -27,12 +27,17 @@ ObexImpl::ObexImpl( ) 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 ) { @@ -129,16 +134,18 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) { 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 ) diff --git a/core/applets/obex/obexinc.ui b/core/applets/obex/obexinc.ui index 13d2767..4cc8056 100644 --- a/core/applets/obex/obexinc.ui +++ b/core/applets/obex/obexinc.ui @@ -1,7 +1,7 @@ ObexInc - QWidget + QDialog name ObexInc @@ -11,8 +11,8 @@ 0 0 - 204 - 254 + 208 + 248 @@ -23,13 +23,109 @@ QLayoutWidget name + Layout5 + + + geometry + + 90 + 100 + 79 + 68 + + + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + AppLabel + + + text + TextLabel1 + + + + QLabel + + name + FileLabel + + + text + Filename + + + alignment + AlignTop|AlignLeft + + + vAlign + + + + + + QLabel + + name + TextLabel1 + + + geometry + + 30 + 30 + 161 + 41 + + + + text + A file was beamed +to you. + + + + QLabel + + name + PixmapLabel + + + geometry + + 30 + 100 + 40 + 40 + + + + scaledContents + true + + + + QLayoutWidget + + name Layout4 geometry - 1 - 206 + 0 + 210 246 33 @@ -100,7 +196,7 @@ QPushButton name - RecjectButton + RejectButton text @@ -130,101 +226,5 @@ - - QLabel - - name - PixmapLabel - - - geometry - - 20 - 90 - 40 - 40 - - - - scaledContents - true - - - - QLayoutWidget - - name - Layout5 - - - geometry - - 80 - 90 - 79 - 68 - - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - AppLabel - - - text - TextLabel1 - - - - QLabel - - name - FileLabel - - - text - Filename - - - alignment - AlignTop|AlignLeft - - - vAlign - - - - - - QLabel - - name - TextLabel1 - - - geometry - - 20 - 20 - 161 - 41 - - - - text - A file was beamed -to you. - - -- cgit v0.9.0.2