summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/obeximpl.cc19
-rw-r--r--core/applets/obex/obexinc.ui204
2 files changed, 115 insertions, 108 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
@@ -24,18 +24,23 @@ ObexImpl::ObexImpl( )
24 m_recvgui = new ObexInc(); 24 m_recvgui = new ObexInc();
25 m_chan = new QCopChannel("QPE/Obex" ); 25 m_chan = new QCopChannel("QPE/Obex" );
26 connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), 26 connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
27 this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); 27 this, SLOT(slotMessage(const QCString&, const QByteArray&) ) );
28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ), 28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ),
29 this, SLOT(slotReceivedFile(const QString& ) ) ); 29 this, SLOT(slotReceivedFile(const QString& ) ) );
30 connect((QObject*) m_recvgui->InsertButton, SIGNAL(clicked()),
31 m_recvgui, SLOT( accept() ));
32 connect((QObject*) m_recvgui->RejectButton, SIGNAL(clicked()),
33 m_recvgui, SLOT( reject() ));
30} 34}
31 35
32ObexImpl::~ObexImpl() { 36ObexImpl::~ObexImpl() {
33 delete m_obex; 37 delete m_obex;
34 delete m_chan; 38 delete m_chan;
35 delete m_sendgui; 39 delete m_sendgui;
40 delete m_recvgui;
36} 41}
37 42
38QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 43QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
39 *iface = 0; 44 *iface = 0;
40 if( uuid == IID_QUnknown ) 45 if( uuid == IID_QUnknown )
41 *iface = this; 46 *iface = this;
@@ -126,20 +131,22 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) {
126 } // now prompt and then add it 131 } // now prompt and then add it
127 132
128 m_recvgui->PixmapLabel->setPixmap(lnk.pixmap()); 133 m_recvgui->PixmapLabel->setPixmap(lnk.pixmap());
129 m_recvgui->AppLabel->setText(lnk.name()); 134 m_recvgui->AppLabel->setText(lnk.name());
130 m_recvgui->FileLabel->setText(fileName); 135 m_recvgui->FileLabel->setText(fileName);
131 m_recvgui->showMaximized(); 136 m_recvgui->showMaximized();
132 137 if( m_recvgui->exec() != -1 ) {
133 QCString str= "QPE/Application/"; 138 QCString str= "QPE/Application/";
134 str += exec.latin1(); 139 str += exec.latin1();
135 qWarning("channel %s", str.data() ); 140 qWarning("channel %s", str.data() );
136 QCopEnvelope e(str , "setDocument(QString)" ); 141 QCopEnvelope e(str , "setDocument(QString)" );
137 e << fileName; 142 e << fileName;
143 }
138 144
139} 145}
140 146
141 147
148
142Q_EXPORT_INTERFACE() 149Q_EXPORT_INTERFACE()
143{ 150{
144 Q_CREATE_INSTANCE( ObexImpl ) 151 Q_CREATE_INSTANCE( ObexImpl )
145} 152}
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,38 +1,134 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ObexInc</class> 2<class>ObexInc</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>ObexInc</cstring> 7 <cstring>ObexInc</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>204</width> 14 <width>208</width>
15 <height>254</height> 15 <height>248</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>OBEX Receiving</string> 20 <string>OBEX Receiving</string>
21 </property> 21 </property>
22 <widget> 22 <widget>
23 <class>QLayoutWidget</class> 23 <class>QLayoutWidget</class>
24 <property stdset="1"> 24 <property stdset="1">
25 <name>name</name> 25 <name>name</name>
26 <cstring>Layout5</cstring>
27 </property>
28 <property stdset="1">
29 <name>geometry</name>
30 <rect>
31 <x>90</x>
32 <y>100</y>
33 <width>79</width>
34 <height>68</height>
35 </rect>
36 </property>
37 <vbox>
38 <property stdset="1">
39 <name>margin</name>
40 <number>0</number>
41 </property>
42 <property stdset="1">
43 <name>spacing</name>
44 <number>6</number>
45 </property>
46 <widget>
47 <class>QLabel</class>
48 <property stdset="1">
49 <name>name</name>
50 <cstring>AppLabel</cstring>
51 </property>
52 <property stdset="1">
53 <name>text</name>
54 <string>TextLabel1</string>
55 </property>
56 </widget>
57 <widget>
58 <class>QLabel</class>
59 <property stdset="1">
60 <name>name</name>
61 <cstring>FileLabel</cstring>
62 </property>
63 <property stdset="1">
64 <name>text</name>
65 <string>Filename</string>
66 </property>
67 <property stdset="1">
68 <name>alignment</name>
69 <set>AlignTop|AlignLeft</set>
70 </property>
71 <property>
72 <name>vAlign</name>
73 </property>
74 </widget>
75 </vbox>
76 </widget>
77 <widget>
78 <class>QLabel</class>
79 <property stdset="1">
80 <name>name</name>
81 <cstring>TextLabel1</cstring>
82 </property>
83 <property stdset="1">
84 <name>geometry</name>
85 <rect>
86 <x>30</x>
87 <y>30</y>
88 <width>161</width>
89 <height>41</height>
90 </rect>
91 </property>
92 <property stdset="1">
93 <name>text</name>
94 <string>A file was beamed
95to you.</string>
96 </property>
97 </widget>
98 <widget>
99 <class>QLabel</class>
100 <property stdset="1">
101 <name>name</name>
102 <cstring>PixmapLabel</cstring>
103 </property>
104 <property stdset="1">
105 <name>geometry</name>
106 <rect>
107 <x>30</x>
108 <y>100</y>
109 <width>40</width>
110 <height>40</height>
111 </rect>
112 </property>
113 <property stdset="1">
114 <name>scaledContents</name>
115 <bool>true</bool>
116 </property>
117 </widget>
118 <widget>
119 <class>QLayoutWidget</class>
120 <property stdset="1">
121 <name>name</name>
26 <cstring>Layout4</cstring> 122 <cstring>Layout4</cstring>
27 </property> 123 </property>
28 <property stdset="1"> 124 <property stdset="1">
29 <name>geometry</name> 125 <name>geometry</name>
30 <rect> 126 <rect>
31 <x>1</x> 127 <x>0</x>
32 <y>206</y> 128 <y>210</y>
33 <width>246</width> 129 <width>246</width>
34 <height>33</height> 130 <height>33</height>
35 </rect> 131 </rect>
36 </property> 132 </property>
37 <hbox> 133 <hbox>
38 <property stdset="1"> 134 <property stdset="1">
@@ -97,13 +193,13 @@
97 </property> 193 </property>
98 </spacer> 194 </spacer>
99 <widget> 195 <widget>
100 <class>QPushButton</class> 196 <class>QPushButton</class>
101 <property stdset="1"> 197 <property stdset="1">
102 <name>name</name> 198 <name>name</name>
103 <cstring>RecjectButton</cstring> 199 <cstring>RejectButton</cstring>
104 </property> 200 </property>
105 <property stdset="1"> 201 <property stdset="1">
106 <name>text</name> 202 <name>text</name>
107 <string>Reject</string> 203 <string>Reject</string>
108 </property> 204 </property>
109 </widget> 205 </widget>
@@ -127,104 +223,8 @@
127 <height>20</height> 223 <height>20</height>
128 </size> 224 </size>
129 </property> 225 </property>
130 </spacer> 226 </spacer>
131 </hbox> 227 </hbox>
132 </widget> 228 </widget>
133 <widget>
134 <class>QLabel</class>
135 <property stdset="1">
136 <name>name</name>
137 <cstring>PixmapLabel</cstring>
138 </property>
139 <property stdset="1">
140 <name>geometry</name>
141 <rect>
142 <x>20</x>
143 <y>90</y>
144 <width>40</width>
145 <height>40</height>
146 </rect>
147 </property>
148 <property stdset="1">
149 <name>scaledContents</name>
150 <bool>true</bool>
151 </property>
152 </widget>
153 <widget>
154 <class>QLayoutWidget</class>
155 <property stdset="1">
156 <name>name</name>
157 <cstring>Layout5</cstring>
158 </property>
159 <property stdset="1">
160 <name>geometry</name>
161 <rect>
162 <x>80</x>
163 <y>90</y>
164 <width>79</width>
165 <height>68</height>
166 </rect>
167 </property>
168 <vbox>
169 <property stdset="1">
170 <name>margin</name>
171 <number>0</number>
172 </property>
173 <property stdset="1">
174 <name>spacing</name>
175 <number>6</number>
176 </property>
177 <widget>
178 <class>QLabel</class>
179 <property stdset="1">
180 <name>name</name>
181 <cstring>AppLabel</cstring>
182 </property>
183 <property stdset="1">
184 <name>text</name>
185 <string>TextLabel1</string>
186 </property>
187 </widget>
188 <widget>
189 <class>QLabel</class>
190 <property stdset="1">
191 <name>name</name>
192 <cstring>FileLabel</cstring>
193 </property>
194 <property stdset="1">
195 <name>text</name>
196 <string>Filename</string>
197 </property>
198 <property stdset="1">
199 <name>alignment</name>
200 <set>AlignTop|AlignLeft</set>
201 </property>
202 <property>
203 <name>vAlign</name>
204 </property>
205 </widget>
206 </vbox>
207 </widget>
208 <widget>
209 <class>QLabel</class>
210 <property stdset="1">
211 <name>name</name>
212 <cstring>TextLabel1</cstring>
213 </property>
214 <property stdset="1">
215 <name>geometry</name>
216 <rect>
217 <x>20</x>
218 <y>20</y>
219 <width>161</width>
220 <height>41</height>
221 </rect>
222 </property>
223 <property stdset="1">
224 <name>text</name>
225 <string>A file was beamed
226to you.</string>
227 </property>
228 </widget>
229</widget> 229</widget>
230</UI> 230</UI>