summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mailit/emailclient.cpp12
-rw-r--r--noncore/net/mailit/emaillistitem.cpp61
-rw-r--r--noncore/net/mailit/emaillistitem.h1
-rw-r--r--noncore/net/mailit/mailit.pro6
-rw-r--r--noncore/net/mailit/mailitwindow.h1
-rw-r--r--noncore/net/mailit/main.cpp10
-rw-r--r--noncore/net/opieftp/main.cpp15
-rw-r--r--noncore/net/opieftp/opieftp.cpp10
-rw-r--r--noncore/net/opieftp/opieftp.h3
-rw-r--r--noncore/net/opieftp/opieftp.pro4
-rw-r--r--noncore/net/opieirc/.cvsignore1
-rw-r--r--noncore/net/opieirc/main.cpp9
-rw-r--r--noncore/net/opieirc/mainwindow.h1
-rw-r--r--noncore/net/opieirc/opieirc.pro7
-rw-r--r--noncore/net/opietooth/blue-pin/blue-pin.pro6
-rw-r--r--noncore/net/opietooth/manager/.cvsignore4
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp17
-rw-r--r--noncore/net/opietooth/manager/bluebase.h4
-rw-r--r--noncore/net/opietooth/manager/bluetoothbase.ui100
-rw-r--r--noncore/net/opietooth/manager/main.cpp17
-rw-r--r--noncore/net/opietooth/manager/manager.pro14
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogbase.ui44
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp120
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogimpl.h39
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogitem.cpp54
-rw-r--r--noncore/net/opietooth/manager/rfcommassigndialogitem.h40
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.cpp114
-rw-r--r--noncore/net/opietooth/manager/rfcommconfhandler.h54
-rw-r--r--noncore/net/opietooth/manager/rfcommdialogitembase.ui216
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp21
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.h9
-rw-r--r--noncore/net/opietooth/manager/stdpopups.cpp2
-rw-r--r--noncore/net/ubrowser/main.cpp13
-rw-r--r--noncore/net/ubrowser/mainview.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.h3
-rw-r--r--noncore/net/ubrowser/ubrowser.pro4
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp12
-rw-r--r--noncore/unsupported/mailit/emaillistitem.cpp61
-rw-r--r--noncore/unsupported/mailit/emaillistitem.h1
-rw-r--r--noncore/unsupported/mailit/mailit.pro6
-rw-r--r--noncore/unsupported/mailit/mailitwindow.h1
-rw-r--r--noncore/unsupported/mailit/main.cpp10
42 files changed, 982 insertions, 147 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index 90664bb..8359acf 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -283,3 +283,3 @@ void EmailClient::sendQuedMail()
283 if (accountList.count() == 0) { 283 if (accountList.count() == 0) {
284 QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n"); 284 QMessageBox::warning(qApp->activeWindow(), tr("No account selected"), tr("You must create an account"), "OK\n");
285 return; 285 return;
@@ -323,4 +323,4 @@ void EmailClient::getNewMail() {
323 if (accountList.count() == 0) { 323 if (accountList.count() == 0) {
324 QMessageBox::warning(qApp->activeWindow(),"No account selected", 324 QMessageBox::warning(qApp->activeWindow(),tr("No account selected"),
325 "You must create an account", "OK\n"); 325 tr("You must create an account"), "OK\n");
326 return; 326 return;
@@ -787,3 +787,3 @@ void EmailClient::selectAccount(int id)
787 } else { 787 } else {
788 emit newCaption("Mailit ! No account defined"); 788 emit newCaption( tr("Mailit ! No account defined") );
789 } 789 }
@@ -827,3 +827,3 @@ void EmailClient::deleteAccount(int id)
827 newAccount = accountList.at(id); 827 newAccount = accountList.at(id);
828 message = "Delete account:\n" + newAccount->accountName; 828 message = tr("Delete account:\n") + newAccount->accountName;
829 switch( QMessageBox::warning( this, "Mailit", message, 829 switch( QMessageBox::warning( this, "Mailit", message,
@@ -848,3 +848,3 @@ void EmailClient::updateAccounts()
848 848
849 newAccountId = editAccountMenu->insertItem("New", this, 849 newAccountId = editAccountMenu->insertItem( tr("New"), this,
850 SLOT(editAccount(int)) ); 850 SLOT(editAccount(int)) );
diff --git a/noncore/net/mailit/emaillistitem.cpp b/noncore/net/mailit/emaillistitem.cpp
index fc9f766..a25f93a 100644
--- a/noncore/net/mailit/emaillistitem.cpp
+++ b/noncore/net/mailit/emaillistitem.cpp
@@ -40,3 +40,4 @@ EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox)
40 setText(1, mail.subject); 40 setText(1, mail.subject);
41 setText(2,mail.date); 41 // setText(2,mail.date);
42 setText(2,dateFromULCString(mail.date));
42 43
@@ -99 +100,59 @@ void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg,
99} 100}
101
102/*
103 * Converts an E-Mail date (ULC) RFC 2822 conform to a QDateTime.
104 * Returning a QString with formatting of "YYYY-MM-DD HH:MM:SS"
105 * (zodiac: This method was tested with more than 300 inbox mails,
106 * it didn't slow down the loading of mail-it.)
107 */
108QString EmailListItem::dateFromULCString( QString ulcDate )
109{
110 QString sTemp, sTime;
111 int iPos, iDay, iMon=1, iYear;
112
113 iPos=ulcDate.find(',');
114 if (iPos) { // it has a day-of-week
115 ulcDate=ulcDate.remove(0,++iPos); //.stripWhiteSpace();
116 }
117
118 QStringList dateEntries = QStringList::split(" ",ulcDate,FALSE);
119 QStringList::Iterator iter = dateEntries.begin();
120
121 // Get day as DD
122 iDay = (*iter++).toInt();
123
124 // Get month as string Mmm
125 sTemp = (*iter++);
126 if (sTemp =="Jan") {iMon=1;} else
127 if (sTemp =="Feb") {iMon=2;} else
128 if (sTemp =="Mar") {iMon=3;} else
129 if (sTemp =="Apr") {iMon=4;} else
130 if (sTemp =="May") {iMon=5;} else
131 if (sTemp =="Jun") {iMon=6;} else
132 if (sTemp =="Jul") {iMon=7;} else
133 if (sTemp =="Aug") {iMon=8;} else
134 if (sTemp =="Sep") {iMon=9;} else
135 if (sTemp =="Oct") {iMon=10;} else
136 if (sTemp =="Nov") {iMon=11;} else
137 if (sTemp =="Dec") {iMon=12;}
138
139 // Get year as YYYY or YY
140 iYear = (*iter++).toInt();
141
142 QDate date = QDate(iYear, iMon, iDay);
143
144 // Convert timestring into a QTime
145 QStringList timeEntries = QStringList::split(":",(*iter++),FALSE);
146 QStringList::Iterator iterTime = timeEntries.begin();
147 iYear=(*iterTime++).toInt(); // var reuse.. *cough*
148 iMon=(*iterTime++).toInt();
149 iDay=(*iterTime++).toInt();
150 QTime time = QTime(iYear,iMon,iDay);
151
152 return QString::number(date.year())+"-"
153 +QString::number(date.month()).rightJustify(2,'0')+"-"
154 +QString::number(date.day()).rightJustify(2,'0')+" "
155 +time.toString();
156}
157
158
diff --git a/noncore/net/mailit/emaillistitem.h b/noncore/net/mailit/emaillistitem.h
index 642932c..129a774 100644
--- a/noncore/net/mailit/emaillistitem.h
+++ b/noncore/net/mailit/emaillistitem.h
@@ -41,2 +41,3 @@ private:
41 bool selected; 41 bool selected;
42 QString dateFromULCString( QString ulc );
42}; 43};
diff --git a/noncore/net/mailit/mailit.pro b/noncore/net/mailit/mailit.pro
index 5e9a83a..0224886 100644
--- a/noncore/net/mailit/mailit.pro
+++ b/noncore/net/mailit/mailit.pro
@@ -1,4 +1,3 @@
1TEMPLATE = app
2TARGET = mailit 1TARGET = mailit
3CONFIG = qt warn_on release 2CONFIG = qt warn_on release quick-app
4HEADERS = emailclient.h \ 3HEADERS = emailclient.h \
@@ -39,5 +38,2 @@ LIBS += -lqpe -lopie
39# -lssl 38# -lssl
40MOC_DIR=qpeobj
41OBJECTS_DIR=qpeobj
42DESTDIR=$(OPIEDIR)/bin
43 39
diff --git a/noncore/net/mailit/mailitwindow.h b/noncore/net/mailit/mailitwindow.h
index e818d32..11e56b9 100644
--- a/noncore/net/mailit/mailitwindow.h
+++ b/noncore/net/mailit/mailitwindow.h
@@ -35,2 +35,3 @@ class MailItWindow: public QMainWindow
35public: 35public:
36 static QString appName() { return QString::fromLatin1("mailit"); }
36 MailItWindow(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 37 MailItWindow(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
diff --git a/noncore/net/mailit/main.cpp b/noncore/net/mailit/main.cpp
index 3a3e1fc..71f8877 100644
--- a/noncore/net/mailit/main.cpp
+++ b/noncore/net/mailit/main.cpp
@@ -22,8 +22,4 @@
22 22
23int main(int argc, char* argv[]) 23#include <opie/oapplicationfactory.h>
24{ 24
25 QPEApplication a( argc, argv ); 25OPIE_EXPORT_APP( OApplicationFactory<MailItWindow> ) \ No newline at end of file
26 MailItWindow mw(0, 0);
27 a.showMainDocumentWidget(&mw);
28 return a.exec();
29}
diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp
index 4f5a7d4..0217e41 100644
--- a/noncore/net/opieftp/main.cpp
+++ b/noncore/net/opieftp/main.cpp
@@ -12,16 +12,5 @@
12 ***************************************************************************/ 12 ***************************************************************************/
13#include <qpe/qpeapplication.h> 13#include <opie/oapplicationfactory.h>
14
15
16
17#include "opieftp.h" 14#include "opieftp.h"
18 15
19int main(int argc, char *argv[]) 16OPIE_EXPORT_APP( OApplicationFactory<OpieFtp> )
20{
21 QPEApplication a(argc, argv);
22
23 OpieFtp opieftp;
24 a.showMainWidget( &opieftp);
25 return a.exec();
26}
27
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 269449e..ee7d32f 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -59,4 +59,4 @@ static int log_progress(netbuf *, int xfered, void *)
59 59
60OpieFtp::OpieFtp( ) 60OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
61 : QMainWindow( ) 61 : QMainWindow( parent, name, fl )
62{ 62{
@@ -272,3 +272,3 @@ OpieFtp::OpieFtp( )
272 272
273 connectServerBtn = new QPushButton( "Connect", tab_3 , "ConnectButton" ); 273 connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" );
274 tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); 274 tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1);
@@ -277,3 +277,3 @@ OpieFtp::OpieFtp( )
277 277
278 newServerButton= new QPushButton( "Add", tab_3 , "NewServerButton" ); 278 newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" );
279 tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); 279 tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2);
@@ -282,3 +282,3 @@ OpieFtp::OpieFtp( )
282 QPushButton *deleteServerBtn; 282 QPushButton *deleteServerBtn;
283 deleteServerBtn = new QPushButton( "Delete", tab_3 , "OpenButton" ); 283 deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" );
284 tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); 284 tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3);
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index 9d5d211..7bd615a 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -49,5 +49,6 @@ class OpieFtp : public QMainWindow
49public: 49public:
50 OpieFtp( ); 50 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
51 ~OpieFtp(); 51 ~OpieFtp();
52 52
53 static QString appName() { return QString::fromLatin1("opieftp"); }
53 QTabWidget *TabWidget; 54 QTabWidget *TabWidget;
diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro
index ac16819..185c341 100644
--- a/noncore/net/opieftp/opieftp.pro
+++ b/noncore/net/opieftp/opieftp.pro
@@ -1,3 +1,2 @@
1TEMPLATE = app 1CONFIG += qt warn_on release quick-app
2CONFIG += qt warn_on release
3HEADERS = opieftp.h inputDialog.h 2HEADERS = opieftp.h inputDialog.h
@@ -5,3 +4,2 @@ SOURCES = opieftp.cpp inputDialog.cpp main.cpp
5TARGET = opieftp 4TARGET = opieftp
6DESTDIR = $(OPIEDIR)/bin
7INCLUDEPATH += $(OPIEDIR)/include 5INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/net/opieirc/.cvsignore b/noncore/net/opieirc/.cvsignore
index 39391f4..d5423d6 100644
--- a/noncore/net/opieirc/.cvsignore
+++ b/noncore/net/opieirc/.cvsignore
@@ -3 +3,2 @@ Makefile.in
3moc_*.cpp 3moc_*.cpp
4.moc \ No newline at end of file
diff --git a/noncore/net/opieirc/main.cpp b/noncore/net/opieirc/main.cpp
index 43e63af..39acfcc 100644
--- a/noncore/net/opieirc/main.cpp
+++ b/noncore/net/opieirc/main.cpp
@@ -3,8 +3,5 @@
3 3
4int main(int argc, char **argv) { 4#include <opie/oapplicationfactory.h>
5 QPEApplication a(argc, argv);
6 MainWindow mw;
7 a.showMainWidget(&mw);
8 return a.exec();
9}
10 5
6
7OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/noncore/net/opieirc/mainwindow.h b/noncore/net/opieirc/mainwindow.h
index bd1a9ce..0f60855 100644
--- a/noncore/net/opieirc/mainwindow.h
+++ b/noncore/net/opieirc/mainwindow.h
@@ -37,2 +37,3 @@ public:
37 void killTab(IRCTab *tab); 37 void killTab(IRCTab *tab);
38 static QString appName() { return QString::fromLatin1("opieirc"); }
38signals: 39signals:
diff --git a/noncore/net/opieirc/opieirc.pro b/noncore/net/opieirc/opieirc.pro
index 8b09e18..537f810 100644
--- a/noncore/net/opieirc/opieirc.pro
+++ b/noncore/net/opieirc/opieirc.pro
@@ -1,4 +1,2 @@
1 TEMPLATE= app 1 CONFIG = qt warn_on release quick-app
2 CONFIG = qt warn_on release
3 DESTDIR = $(OPIEDIR)/bin
4 HEADERS = ircchannel.h ircconnection.h \ 2 HEADERS = ircchannel.h ircconnection.h \
@@ -23,5 +21,4 @@ DEPENDPATH += $(OPIEDIR)/include
23LIBS += -lqpe -lopie 21LIBS += -lqpe -lopie
24TARGET = opieirc
25
26 22
23 TARGET= opieirc
27 24
diff --git a/noncore/net/opietooth/blue-pin/blue-pin.pro b/noncore/net/opietooth/blue-pin/blue-pin.pro
index 102a937..fbf9dbe 100644
--- a/noncore/net/opietooth/blue-pin/blue-pin.pro
+++ b/noncore/net/opietooth/blue-pin/blue-pin.pro
@@ -1,4 +1,2 @@
1TEMPLATE = app 1CONFIG = qt warn_on release quick-app
2#CONFIG = qt warn_on debug
3CONFIG = qt warn_on release
4HEADERS = pindlg.h 2HEADERS = pindlg.h
@@ -10,3 +8,2 @@ LIBS += -lqpe
10INTERFACES = pindlgbase.ui 8INTERFACES = pindlgbase.ui
11 DESTDIR = $(OPIEDIR)/bin
12TARGET = bluepin 9TARGET = bluepin
@@ -32,3 +29,2 @@ TRANSLATIONS = ../../../../i18n/de/bluepin.ts \
32 29
33
34include ( $(OPIEDIR)/include.pro ) 30include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/opietooth/manager/.cvsignore b/noncore/net/opietooth/manager/.cvsignore
index 3fb67fe..19c03a7 100644
--- a/noncore/net/opietooth/manager/.cvsignore
+++ b/noncore/net/opietooth/manager/.cvsignore
@@ -9 +9,5 @@ scandialog.cpp
9scandialog.h 9scandialog.h
10rfcommassigndialogbase.cpp
11rfcommassigndialogbase.h
12rfcommdialogitembase.cpp
13rfcommdialogitembase.h
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 54808fa..2e68984 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -22,2 +22,3 @@
22#include "btconnectionitem.h" 22#include "btconnectionitem.h"
23#include "rfcommassigndialogimpl.h"
23 24
@@ -61,2 +62,4 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
61 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); 62 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
63
64 connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) );
62 // not good since lib is async 65 // not good since lib is async
@@ -247,2 +250,16 @@ void BlueBase::applyConfigChanges() {
247/** 250/**
251 * Launch Rfcomm Bind dialog
252 *
253 */
254void BlueBase::rfcommDialog() {
255 RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
256
257 rfcommAssign.showMaximized();
258
259 if ( rfcommAssign.exec() == QDialog::Accepted ) {
260 rfcommAssign.saveConfig();
261 }
262}
263
264/**
248 * Add fresh found devices from scan dialog to the listing 265 * Add fresh found devices from scan dialog to the listing
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index 743062c..a8ab3db 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -43,2 +43,4 @@ namespace OpieTooth {
43 43
44 static QString appName() { return QString::fromLatin1("bluetooth-manager"); }
45
44 protected: 46 protected:
@@ -49,2 +51,3 @@ namespace OpieTooth {
49 51
52
50 private: 53 private:
@@ -91,2 +94,3 @@ namespace OpieTooth {
91 void addSignalStrength( const QString& mac, const QString& strengh ); 94 void addSignalStrength( const QString& mac, const QString& strengh );
95 void rfcommDialog();
92 96
diff --git a/noncore/net/opietooth/manager/bluetoothbase.ui b/noncore/net/opietooth/manager/bluetoothbase.ui
index 9ff970f..bb906a1 100644
--- a/noncore/net/opietooth/manager/bluetoothbase.ui
+++ b/noncore/net/opietooth/manager/bluetoothbase.ui
@@ -13,4 +13,4 @@
13 <y>0</y> 13 <y>0</y>
14 <width>224</width> 14 <width>258</width>
15 <height>320</height> 15 <height>407</height>
16 </rect> 16 </rect>
@@ -27,11 +27,2 @@
27 </property> 27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>0</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>0</number>
36 </property>
37 <widget> 28 <widget>
@@ -42,2 +33,11 @@
42 </property> 33 </property>
34 <property stdset="1">
35 <name>geometry</name>
36 <rect>
37 <x>1</x>
38 <y>1</y>
39 <width>245</width>
40 <height>289</height>
41 </rect>
42 </property>
43 <property> 43 <property>
@@ -205,3 +205,3 @@
205 <name>margin</name> 205 <name>margin</name>
206 <number>2</number> 206 <number>11</number>
207 </property> 207 </property>
@@ -209,3 +209,22 @@
209 <name>spacing</name> 209 <name>spacing</name>
210 <number>2</number> 210 <number>6</number>
211 </property>
212 <widget>
213 <class>QGroupBox</class>
214 <property stdset="1">
215 <name>name</name>
216 <cstring>GroupBox1</cstring>
217 </property>
218 <property stdset="1">
219 <name>title</name>
220 <string>Bluetooh Basic Config</string>
221 </property>
222 <vbox>
223 <property stdset="1">
224 <name>margin</name>
225 <number>11</number>
226 </property>
227 <property stdset="1">
228 <name>spacing</name>
229 <number>6</number>
211 </property> 230 </property>
@@ -215,3 +234,3 @@
215 <name>name</name> 234 <name>name</name>
216 <cstring>Layout2</cstring> 235 <cstring>Layout7</cstring>
217 </property> 236 </property>
@@ -227,2 +246,17 @@
227 <widget> 246 <widget>
247 <class>QLayoutWidget</class>
248 <property stdset="1">
249 <name>name</name>
250 <cstring>Layout6</cstring>
251 </property>
252 <vbox>
253 <property stdset="1">
254 <name>margin</name>
255 <number>0</number>
256 </property>
257 <property stdset="1">
258 <name>spacing</name>
259 <number>6</number>
260 </property>
261 <widget>
228 <class>QLabel</class> 262 <class>QLabel</class>
@@ -238,9 +272,13 @@
238 <widget> 272 <widget>
239 <class>QLineEdit</class> 273 <class>QLabel</class>
240 <property stdset="1"> 274 <property stdset="1">
241 <name>name</name> 275 <name>name</name>
242 <cstring>deviceNameLine</cstring> 276 <cstring>passkeyLabel</cstring>
277 </property>
278 <property stdset="1">
279 <name>text</name>
280 <string>Default Passkey</string>
243 </property> 281 </property>
244 </widget> 282 </widget>
245 </hbox> 283 </vbox>
246 </widget> 284 </widget>
@@ -250,5 +288,5 @@
250 <name>name</name> 288 <name>name</name>
251 <cstring>Layout3</cstring> 289 <cstring>Layout5</cstring>
252 </property> 290 </property>
253 <hbox> 291 <vbox>
254 <property stdset="1"> 292 <property stdset="1">
@@ -262,10 +300,6 @@
262 <widget> 300 <widget>
263 <class>QLabel</class> 301 <class>QLineEdit</class>
264 <property stdset="1"> 302 <property stdset="1">
265 <name>name</name> 303 <name>name</name>
266 <cstring>passkeyLabel</cstring> 304 <cstring>deviceNameLine</cstring>
267 </property>
268 <property stdset="1">
269 <name>text</name>
270 <string>Default Passkey</string>
271 </property> 305 </property>
@@ -283,2 +317,4 @@
283 </widget> 317 </widget>
318 </vbox>
319 </widget>
284 </hbox> 320 </hbox>
@@ -360,2 +396,15 @@
360 <widget> 396 <widget>
397 <class>QPushButton</class>
398 <property stdset="1">
399 <name>name</name>
400 <cstring>rfcommBindButton</cstring>
401 </property>
402 <property stdset="1">
403 <name>text</name>
404 <string>Rfcomm Bind Table</string>
405 </property>
406 </widget>
407 </vbox>
408 </widget>
409 <widget>
361 <class>QWidget</class> 410 <class>QWidget</class>
@@ -392,3 +441,2 @@
392 </widget> 441 </widget>
393 </vbox>
394</widget> 442</widget>
diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp
index a86e36d..82aeebd 100644
--- a/noncore/net/opietooth/manager/main.cpp
+++ b/noncore/net/opietooth/manager/main.cpp
@@ -21,18 +21,5 @@
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <opie/oapplicationfactory.h>
22 23
23 24OPIE_EXPORT_APP( OApplicationFactory<OpieTooth::BlueBase> )
24QPEApplication *BluetoothApp;
25
26int main( int argc, char ** argv ) {
27 QPEApplication a(argc, argv);
28 BluetoothApp=&a;
29
30 OpieTooth::BlueBase t;
31
32 // t.setCaption( OpieTooth::BlueBase::tr("Bluetooth Manager") );
33 a.showMainWidget(&t);
34
35 return a.exec();
36}
37
38 25
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro
index 9841740..6ff4ebb 100644
--- a/noncore/net/opietooth/manager/manager.pro
+++ b/noncore/net/opietooth/manager/manager.pro
@@ -1,4 +1,2 @@
1TEMPLATE = app 1CONFIG = qt warn_on release quick-app
2CONFIG = qt warn_on debug
3#CONFIG = qt warn_on release
4HEADERS = btconnectionitem.h btdeviceitem.h \ 2HEADERS = btconnectionitem.h btdeviceitem.h \
@@ -9,4 +7,5 @@ HEADERS = btconnectionitem.h btdeviceitem.h \
9 pppdialog.h obexdialog.h \ 7 pppdialog.h obexdialog.h \
8 rfcommassigndialogimpl.h rfcommassigndialogitem.h \
10 devicehandler.h rfcpopup.h obexpopup.h \ 9 devicehandler.h rfcpopup.h obexpopup.h \
11 rfcommhelper.h panpopup.h dunpopup.h 10 rfcommhelper.h panpopup.h dunpopup.h rfcommconfhandler.h
12 11
@@ -18,5 +17,6 @@ SOURCES = btconnectionitem.cpp btdeviceitem.cpp \
18 bticonloader.cpp pppdialog.cpp \ 17 bticonloader.cpp pppdialog.cpp \
18 rfcommassigndialogimpl.cpp rfcommassigndialogitem.cpp \
19 obexdialog.cpp devicehandler.cpp \ 19 obexdialog.cpp devicehandler.cpp \
20 rfcpopup.cpp obexpopup.cpp \ 20 rfcpopup.cpp obexpopup.cpp \
21 rfcommhelper.cpp panpopup.cpp dunpopup.cpp 21 rfcommhelper.cpp panpopup.cpp dunpopup.cpp rfcommconfhandler.cpp
22INCLUDEPATH += $(OPIEDIR)/include 22INCLUDEPATH += $(OPIEDIR)/include
@@ -25,4 +25,4 @@ DEPENDPATH += $(OPIEDIR)/include
25LIBS += -lqpe -lopietooth -lopie 25LIBS += -lqpe -lopietooth -lopie
26INTERFACES = bluetoothbase.ui devicedialog.ui 26INTERFACES = bluetoothbase.ui devicedialog.ui rfcommassigndialogbase.ui rfcommdialogitembase.ui
27DESTDIR = $(OPIEDIR)/bin 27
28TARGET = bluetooth-manager 28TARGET = bluetooth-manager
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogbase.ui b/noncore/net/opietooth/manager/rfcommassigndialogbase.ui
new file mode 100644
index 0000000..aefa698
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommassigndialogbase.ui
@@ -0,0 +1,44 @@
1<!DOCTYPE UI><UI>
2<class>RfcommAssignDialogBase</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>RfcommAssignDialogBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>444</width>
15 <height>343</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Rfcomm Bind</string>
21 </property>
22 <vbox>
23 <property stdset="1">
24 <name>margin</name>
25 <number>11</number>
26 </property>
27 <property stdset="1">
28 <name>spacing</name>
29 <number>6</number>
30 </property>
31 <widget>
32 <class>QLabel</class>
33 <property stdset="1">
34 <name>name</name>
35 <cstring>TextLabel1</cstring>
36 </property>
37 <property stdset="1">
38 <name>text</name>
39 <string>Bind device to a interface</string>
40 </property>
41 </widget>
42 </vbox>
43</widget>
44</UI>
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
new file mode 100644
index 0000000..b5cc074
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp
@@ -0,0 +1,120 @@
1
2#include "rfcommassigndialogimpl.h"
3#include "rfcommassigndialogitem.h"
4#include "rfcommconfhandler.h"
5
6#include <qpe/config.h>
7
8#include <qlayout.h>
9
10using namespace OpieTooth;
11
12// TODO: write only the file in bluebase?
13// muss rfcommd dann neu gestartet werden
14// sollte rfcomm bind all nicht eh default config sein ( polled das? - d.h. sobald nen gerät in der nähe ist bindet es?
15
16
17RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
18 : RfcommAssignDialogBase( parent, name, modal, fl ) {
19
20 m_range = 5;
21
22 m_scrollView = new QScrollView( this );
23 m_scrollView->setResizePolicy( QScrollView::AutoOneFit );
24 m_scrollView->setHScrollBarMode( QScrollView::AlwaysOff );
25
26 RfcommAssignDialogBaseLayout->addWidget( m_scrollView );
27
28 m_box = new QVBox( m_scrollView->viewport() );
29 m_scrollView->addChild( m_box );
30
31 confHandler = new RfCommConfHandler( "/etc/bluetooth/rfcomm.conf" );
32
33 loadConfig();
34}
35
36RfcommAssignDialog::~RfcommAssignDialog() {
37 if ( confHandler ) {
38 delete confHandler;
39 }
40}
41
42
43void RfcommAssignDialog::newDevice( const QString & mac ) {
44
45 for ( int i = 0 ; i < m_range; i++ ) {
46
47 QMap<QString, RfCommConfObject*>::Iterator it;
48 it = confHandler->foundEntries().find( QString("%1").arg( i ) );
49 // make sure that rfcommX is not assigned yet
50 if ( it == confHandler->foundEntries().end() ) {
51 QDialog dialog( this, "newdevice", true, WStyle_ContextHelp );
52 dialog.showMaximized();
53 RfcommDialogItem *newDev = new RfcommDialogItem( &dialog );
54 newDev->setIdent( i );
55 newDev->setMac( mac );
56
57 if ( dialog.exec() == QDialog::Accepted ) {
58 RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
59 m_itemList.insert( i , rfcomm );
60 rfcomm->setIdent( i );
61 rfcomm->setMac( mac );
62 rfcomm->setChannel( newDev->channel() );
63 rfcomm->setComment( newDev->comment() );
64 qDebug( "New device set up" );
65 }
66 }
67 }
68}
69
70void RfcommAssignDialog::loadConfig() {
71
72 //Config cfg( "bluetoothmanager-rfcommbind" );
73
74 for ( int i = 0 ; i < m_range; i++ ) {
75 // cfg.setGroup( QString("%1").arg( i ) );
76 RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box );
77 m_itemList.insert( i , rfcomm );
78 rfcomm->setIdent( i );
79 QMap<QString, RfCommConfObject*>::Iterator it;
80 it = confHandler->foundEntries().find( QString("%1").arg( i ) );
81 if ( it != confHandler->foundEntries().end() ) {
82 qDebug( "Found key in foundEntries() " );
83 rfcomm->setMac( it.data()->mac() );
84 rfcomm->setChannel( it.data()->channel() );
85 rfcomm->setComment( it.data()->comment() );
86 }
87 /* Use rfcomm.conf directly for now
88 * rfcomm->setMac( cfg.readEntry( "mac", "" ) );
89 * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) );
90 * rfcomm->setComment( cfg.readEntry( "comment", "" ) );
91 */
92 }
93}
94
95
96void RfcommAssignDialog::saveConfig() {
97
98 //Config cfg( "bluetoothmanager-rfcommbind" );
99
100 QMap< int, RfcommDialogItem*>::Iterator it;
101
102 QMap< QString, RfCommConfObject*> outMap;
103
104 for( it = m_itemList.begin(); it != m_itemList.end(); ++it ) {
105
106 //cfg.setGroup( QString("%1").arg( it.key() ) );
107 RfcommDialogItem *rfcomm = it.data();
108
109
110 outMap.insert( QString( "%1").arg( it.key() ), new RfCommConfObject( it.key(), rfcomm->mac(), rfcomm->channel(), rfcomm->comment() ) );
111
112
113 //cfg.writeEntry( "mac", rfcomm->mac() );
114 //cfg.writeEntry( "channel", rfcomm->channel() );
115 //cfg.writeEntry( "comment", rfcomm->comment() );
116 }
117
118 confHandler->save( outMap );
119
120}
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.h b/noncore/net/opietooth/manager/rfcommassigndialogimpl.h
new file mode 100644
index 0000000..9983632
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.h
@@ -0,0 +1,39 @@
1#ifndef RFCOMMASSIGN
2#define RFCOMMASSIGN
3
4#include "rfcommassigndialogbase.h"
5#include "rfcommassigndialogitem.h"
6#include "rfcommconfhandler.h"
7
8#include <qscrollview.h>
9#include <qmap.h>
10#include <qvbox.h>
11
12namespace OpieTooth {
13
14 class RfcommAssignDialog: public RfcommAssignDialogBase {
15
16 Q_OBJECT
17
18 public:
19
20 RfcommAssignDialog( QWidget* parent = 0, const char* name = 0,bool modal = 0, WFlags fl = 0 );
21 ~RfcommAssignDialog();
22
23 void loadConfig();
24 void saveConfig();
25
26 void newDevice( const QString & mac );
27
28 private:
29 QScrollView *m_scrollView;
30 // how many rfcomm devices are possible
31 int m_range;
32 QMap< int, RfcommDialogItem* > m_itemList;
33 QVBox *m_box;
34 RfCommConfHandler *confHandler;
35};
36
37}
38
39#endif
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
new file mode 100644
index 0000000..1e7130f
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommassigndialogitem.cpp
@@ -0,0 +1,54 @@
1
2#include "rfcommassigndialogitem.h"
3
4#include <qlineedit.h>
5#include <qcombobox.h>
6#include <qlabel.h>
7#include <qgroupbox.h>
8
9using namespace OpieTooth;
10
11
12RfcommDialogItem::RfcommDialogItem( QWidget* parent, const char* name, WFlags fl )
13 : RfcommDialogItemBase( parent, name, fl ) {
14
15}
16
17RfcommDialogItem::~RfcommDialogItem() {
18}
19
20
21int RfcommDialogItem::ident() {
22 return m_ident;
23}
24
25QString RfcommDialogItem::mac() {
26 return m_macAddress->text();
27}
28
29int RfcommDialogItem::channel() {
30 return m_channelDropdown->currentItem();
31}
32
33QString RfcommDialogItem::comment() {
34 return m_commentLine->text();
35}
36
37void RfcommDialogItem::setIdent( int ident ) {
38 m_ident = ident;
39 m_identLabel->setTitle( QString( "rfcomm%1").arg( ident ) );
40}
41
42void RfcommDialogItem::setMac( const QString &mac ) {
43 m_macAddress->setText( mac );
44}
45
46void RfcommDialogItem::setChannel( int channel ) {
47 m_channelDropdown->setCurrentItem( channel );
48}
49
50void RfcommDialogItem::setComment( const QString &comment ) {
51 m_commentLine->setText( comment );
52}
53
54
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogitem.h b/noncore/net/opietooth/manager/rfcommassigndialogitem.h
new file mode 100644
index 0000000..34a794f
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommassigndialogitem.h
@@ -0,0 +1,40 @@
1#ifndef RFCOMMDIALOGITEM
2#define RFCOMMDIALOGITEM
3
4#include "rfcommdialogitembase.h"
5
6#include <qwidget.h>
7
8namespace OpieTooth {
9
10 class RfcommDialogItem : public RfcommDialogItemBase {
11
12 Q_OBJECT
13
14 public:
15 RfcommDialogItem( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
16 ~RfcommDialogItem();
17
18 // number if the rfcomm device
19 int ident();
20 // devices mac address
21 QString mac();
22 int channel();
23 QString comment();
24
25 void setIdent( int ident );
26 void setMac( const QString& mac );
27 void setChannel( int channel );
28 void setComment( const QString& comment );
29
30 private:
31
32
33 int m_ident;
34
35};
36
37
38}
39
40#endif
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
new file mode 100644
index 0000000..20453e8
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp
@@ -0,0 +1,114 @@
1
2#include <qtextstream.h>
3
4#include "rfcommconfhandler.h"
5
6
7using namespace OpieTooth;
8
9// move to lib
10
11
12RfCommConfObject::RfCommConfObject( int number, QString mac, int channel, QString comment ) {
13 m_number = number;
14 m_mac = mac;
15 m_channel = channel;
16 m_comment = comment;
17 // m_foundEntries = 0;
18}
19
20void RfCommConfObject::setNumber( int number ) {
21 m_number = number;
22}
23
24void RfCommConfObject::setMac( QString mac ) {
25 m_mac = mac;
26}
27
28void RfCommConfObject::setChannel( int channel ) {
29 m_channel = channel;
30}
31
32void RfCommConfObject::setComment( QString comment ) {
33 m_comment = comment;
34}
35
36
37RfCommConfObject::~RfCommConfObject() {
38}
39
40
41RfCommConfHandler::RfCommConfHandler( const QString & filename ) {
42
43 m_filename = filename;
44 load();
45}
46
47RfCommConfHandler::~RfCommConfHandler() {
48
49}
50
51void RfCommConfHandler::save( QMap<QString, RfCommConfObject*> devices ) {
52
53 QFile rfCommConf( "/tmp/test" );
54 QTextStream outStream( &rfCommConf );
55 if ( rfCommConf.open( IO_WriteOnly ) ) {
56
57 QMap<QString, RfCommConfObject*>::Iterator it;
58 for( it = devices.begin(); it != devices.end(); ++it ) {
59 outStream << "rfcomm" + QString("%1").arg( it.data()->number() ) + " {\n";
60 outStream << " device " + it.data()->mac() + ";\n";
61 outStream << " channel " + QString( "%1" ).arg( it.data()->channel() ) + ";\n";
62 outStream << " comment \"" + it.data()->comment() + "\";\n";
63 outStream << "}\n\n";
64 }
65
66 rfCommConf.close();
67 }
68}
69
70
71QMap<QString, RfCommConfObject*> RfCommConfHandler::foundEntries() {
72 return m_foundEntries;
73}
74
75void RfCommConfHandler::load() {
76
77 QFile rfCommConf( m_filename );
78 if ( rfCommConf.open( IO_ReadOnly ) ) {
79
80 QStringList list;
81 QTextStream inStream( &rfCommConf );
82 list = QStringList::split( "\n", inStream.read() );
83
84 QString number;
85 QString mac;
86 QString channel;
87 QString comment;
88
89 for ( QStringList::Iterator line=list.begin(); line != list.end(); line++ ) {
90
91 QString tmpLine = ( *line ).stripWhiteSpace();
92
93 if ( tmpLine.startsWith("rfcomm") ) {
94 QString number = tmpLine.mid( 6,1 );
95 qDebug( tmpLine );
96 qDebug( "TEST " + number );
97 } else if ( tmpLine.startsWith( "}" ) ) {
98 m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) );
99 } else if ( tmpLine.startsWith( "device" ) ) {
100 mac = tmpLine.mid( 7, 17 );
101 qDebug( "mac" + mac );
102 } else if ( tmpLine.startsWith( "channel" ) ) {
103 channel = tmpLine.mid( 8, 1 );
104 qDebug ( "Channel :" + channel );
105 } else if ( tmpLine.startsWith( "comment" ) ) {
106 comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 );
107 qDebug( "Comment: " + comment );
108 }
109 }
110 rfCommConf.close();
111 }
112 save( m_foundEntries );
113 qDebug( QString( "ENTries: %1").arg( m_foundEntries.count() ) );
114}
diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.h b/noncore/net/opietooth/manager/rfcommconfhandler.h
new file mode 100644
index 0000000..e13c833
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommconfhandler.h
@@ -0,0 +1,54 @@
1#ifndef RFCOMMCONFHANDLER
2#define RFCOMMCONFHANDLER
3
4#include <qstring.h>
5#include <qfile.h>
6#include <qobject.h>
7#include <qmap.h>
8
9namespace OpieTooth {
10
11 class RfCommConfObject {
12
13 public:
14 RfCommConfObject( int number, QString mac, int channel, QString comment );
15 ~RfCommConfObject();
16
17 void setNumber( int number );
18 int number() { return m_number; };
19 void setMac( QString mac );
20 QString mac() { return m_mac; };
21 void setChannel( int channel );
22 int channel() { return m_channel; };
23 void setComment( QString comment );
24 QString comment() { return m_comment; };
25
26
27 private:
28 int m_number;
29 QString m_mac;
30 int m_channel;
31 QString m_comment;
32
33 };
34
35 class RfCommConfHandler {
36
37 public:
38 RfCommConfHandler( const QString & filename );
39 ~RfCommConfHandler();
40
41 void save( QMap<QString, RfCommConfObject*> devices );
42
43 QMap<QString, RfCommConfObject*> foundEntries();
44
45 private:
46 void load();
47
48 QString m_filename;
49 QMap<QString, RfCommConfObject*> m_foundEntries;
50 };
51
52}
53
54#endif
diff --git a/noncore/net/opietooth/manager/rfcommdialogitembase.ui b/noncore/net/opietooth/manager/rfcommdialogitembase.ui
new file mode 100644
index 0000000..dafca52
--- a/dev/null
+++ b/noncore/net/opietooth/manager/rfcommdialogitembase.ui
@@ -0,0 +1,216 @@
1<!DOCTYPE UI><UI>
2<class>RfcommDialogItemBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>RfcommDialogItemBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>345</width>
15 <height>95</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Form2</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>0</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>0</number>
36 </property>
37 <widget>
38 <class>QGroupBox</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>m_identLabel</cstring>
42 </property>
43 <property>
44 <name>layoutMargin</name>
45 </property>
46 <property>
47 <name>layoutSpacing</name>
48 </property>
49 <grid>
50 <property stdset="1">
51 <name>margin</name>
52 <number>5</number>
53 </property>
54 <property stdset="1">
55 <name>spacing</name>
56 <number>5</number>
57 </property>
58 <widget row="0" column="0" >
59 <class>QLayoutWidget</class>
60 <property stdset="1">
61 <name>name</name>
62 <cstring>Layout3</cstring>
63 </property>
64 <hbox>
65 <property stdset="1">
66 <name>margin</name>
67 <number>0</number>
68 </property>
69 <property stdset="1">
70 <name>spacing</name>
71 <number>6</number>
72 </property>
73 <widget>
74 <class>QLabel</class>
75 <property stdset="1">
76 <name>name</name>
77 <cstring>TextLabel4</cstring>
78 </property>
79 <property stdset="1">
80 <name>text</name>
81 <string>Mac</string>
82 </property>
83 </widget>
84 <widget>
85 <class>QLineEdit</class>
86 <property stdset="1">
87 <name>name</name>
88 <cstring>m_macAddress</cstring>
89 </property>
90 </widget>
91 <widget>
92 <class>QLabel</class>
93 <property stdset="1">
94 <name>name</name>
95 <cstring>TextLabel5</cstring>
96 </property>
97 <property stdset="1">
98 <name>text</name>
99 <string>Channel</string>
100 </property>
101 </widget>
102 <widget>
103 <class>QComboBox</class>
104 <item>
105 <property>
106 <name>text</name>
107 <string>0</string>
108 </property>
109 </item>
110 <item>
111 <property>
112 <name>text</name>
113 <string>1</string>
114 </property>
115 </item>
116 <item>
117 <property>
118 <name>text</name>
119 <string>2</string>
120 </property>
121 </item>
122 <item>
123 <property>
124 <name>text</name>
125 <string>3</string>
126 </property>
127 </item>
128 <item>
129 <property>
130 <name>text</name>
131 <string>4</string>
132 </property>
133 </item>
134 <item>
135 <property>
136 <name>text</name>
137 <string>5</string>
138 </property>
139 </item>
140 <item>
141 <property>
142 <name>text</name>
143 <string>6</string>
144 </property>
145 </item>
146 <item>
147 <property>
148 <name>text</name>
149 <string>7</string>
150 </property>
151 </item>
152 <item>
153 <property>
154 <name>text</name>
155 <string>8</string>
156 </property>
157 </item>
158 <item>
159 <property>
160 <name>text</name>
161 <string>9</string>
162 </property>
163 </item>
164 <item>
165 <property>
166 <name>text</name>
167 <string>10</string>
168 </property>
169 </item>
170 <property stdset="1">
171 <name>name</name>
172 <cstring>m_channelDropdown</cstring>
173 </property>
174 </widget>
175 </hbox>
176 </widget>
177 <widget row="1" column="0" >
178 <class>QLayoutWidget</class>
179 <property stdset="1">
180 <name>name</name>
181 <cstring>Layout4</cstring>
182 </property>
183 <hbox>
184 <property stdset="1">
185 <name>margin</name>
186 <number>0</number>
187 </property>
188 <property stdset="1">
189 <name>spacing</name>
190 <number>6</number>
191 </property>
192 <widget>
193 <class>QLabel</class>
194 <property stdset="1">
195 <name>name</name>
196 <cstring>TextLabel3</cstring>
197 </property>
198 <property stdset="1">
199 <name>text</name>
200 <string>Comment:</string>
201 </property>
202 </widget>
203 <widget>
204 <class>QLineEdit</class>
205 <property stdset="1">
206 <name>name</name>
207 <cstring>m_commentLine</cstring>
208 </property>
209 </widget>
210 </hbox>
211 </widget>
212 </grid>
213 </widget>
214 </vbox>
215</widget>
216</UI>
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp
index cc87b6c..d95f14b 100644
--- a/noncore/net/opietooth/manager/rfcpopup.cpp
+++ b/noncore/net/opietooth/manager/rfcpopup.cpp
@@ -5,2 +5,3 @@
5#include "rfcpopup.h" 5#include "rfcpopup.h"
6#include "rfcommassigndialogimpl.h"
6 7
@@ -11,3 +12,3 @@ using namespace OpieTooth;
11 */ 12 */
12RfcCommPopup::RfcCommPopup() 13RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
13 : QPopupMenu() { 14 : QPopupMenu() {
@@ -17,2 +18,5 @@ RfcCommPopup::RfcCommPopup()
17 18
19
20 m_item = item;
21
18 /* connect action */ 22 /* connect action */
@@ -35,6 +39,6 @@ RfcCommPopup::RfcCommPopup()
35 a = new QAction( ); 39 a = new QAction( );
36 a->setText("Foo"); 40 a->setText("Bind table");
37 a->addTo( this ); 41 a->addTo( this );
38 connect( a, SIGNAL( activated() ), 42 connect( a, SIGNAL( activated() ),
39 this, SLOT( slotFoo() ) ); 43 this, SLOT( slotBind() ) );
40 44
@@ -76,4 +80,11 @@ void RfcCommPopup::slotDisconnect() {
76 80
77void RfcCommPopup::slotFoo() { 81void RfcCommPopup::slotBind() {
78 qWarning("slotFoo"); 82 RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
83
84 rfcommAssign.showMaximized();
85 rfcommAssign.newDevice( m_item->mac() );
86
87 if ( rfcommAssign.exec() == QDialog::Accepted ) {
88 rfcommAssign.saveConfig();
89 }
79} 90}
diff --git a/noncore/net/opietooth/manager/rfcpopup.h b/noncore/net/opietooth/manager/rfcpopup.h
index c388f65..74b9117 100644
--- a/noncore/net/opietooth/manager/rfcpopup.h
+++ b/noncore/net/opietooth/manager/rfcpopup.h
@@ -6,2 +6,4 @@
6 6
7#include "btdeviceitem.h"
8
7namespace OpieTooth { 9namespace OpieTooth {
@@ -18,3 +20,3 @@ namespace OpieTooth {
18 public: 20 public:
19 RfcCommPopup(); 21 RfcCommPopup( OpieTooth::BTDeviceItem* );
20 ~RfcCommPopup(); 22 ~RfcCommPopup();
@@ -25,4 +27,5 @@ namespace OpieTooth {
25 QAction* m_dis; 27 QAction* m_dis;
26 QAction* m_foo; 28 QAction* m_bind;
27 QAction* m_bar; 29 QAction* m_bar;
30 OpieTooth::BTDeviceItem *m_item;
28 private slots: 31 private slots:
@@ -30,3 +33,3 @@ namespace OpieTooth {
30 void slotDisconnect(); 33 void slotDisconnect();
31 void slotFoo(); 34 void slotBind();
32 void slotBar(); 35 void slotBar();
diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp
index 38b8ee7..e1f8396 100644
--- a/noncore/net/opietooth/manager/stdpopups.cpp
+++ b/noncore/net/opietooth/manager/stdpopups.cpp
@@ -11,3 +11,3 @@ extern "C" {
11 QPopupMenu* newRfcComPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) { 11 QPopupMenu* newRfcComPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) {
12 return new OpieTooth::RfcCommPopup(/* servive, item*/ ); // fix spellin RfComm vs. RfcComm and paramaters 12 return new OpieTooth::RfcCommPopup(/* servive,*/ item ); // fix spellin RfComm vs. RfcComm and paramaters
13 //return 0l; 13 //return 0l;
diff --git a/noncore/net/ubrowser/main.cpp b/noncore/net/ubrowser/main.cpp
index e4a873d..0488cfd 100644
--- a/noncore/net/ubrowser/main.cpp
+++ b/noncore/net/ubrowser/main.cpp
@@ -20,10 +20,5 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21int main( int argc, char **argv ) 21#include <opie/oapplicationfactory.h>
22{ 22
23 QPEApplication a( argc, argv ); 23OPIE_EXPORT_APP( OApplicationFactory<MainView> )
24 MainView w; 24
25
26 //a.setMainWidget( &w );
27 a.showMainDocumentWidget( &w );
28 return a.exec();
29}
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp
index 9302f05..0d3f171 100644
--- a/noncore/net/ubrowser/mainview.cpp
+++ b/noncore/net/ubrowser/mainview.cpp
@@ -19,3 +19,3 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 19
20MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) 20MainView::MainView(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl)
21{ 21{
diff --git a/noncore/net/ubrowser/mainview.h b/noncore/net/ubrowser/mainview.h
index 20e2c70..cc63729 100644
--- a/noncore/net/ubrowser/mainview.h
+++ b/noncore/net/ubrowser/mainview.h
@@ -38,3 +38,4 @@ class MainView : public QMainWindow
38public: 38public:
39 MainView(QWidget *parent=0, const char *name=0); 39 static QString appName() { return QString::fromLatin1("ubrowser"); }
40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0);
40public slots: 41public slots:
diff --git a/noncore/net/ubrowser/ubrowser.pro b/noncore/net/ubrowser/ubrowser.pro
index a6943dd..ed00047 100644
--- a/noncore/net/ubrowser/ubrowser.pro
+++ b/noncore/net/ubrowser/ubrowser.pro
@@ -1,4 +1,2 @@
1 TEMPLATE=app 1 CONFIG +=qt warn_on release quick-app
2 CONFIG +=qt warn_on release
3 DESTDIR =../../../bin
4 HEADERS = mainview.h httpfactory.h 2 HEADERS = mainview.h httpfactory.h
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 90664bb..8359acf 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -283,3 +283,3 @@ void EmailClient::sendQuedMail()
283 if (accountList.count() == 0) { 283 if (accountList.count() == 0) {
284 QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n"); 284 QMessageBox::warning(qApp->activeWindow(), tr("No account selected"), tr("You must create an account"), "OK\n");
285 return; 285 return;
@@ -323,4 +323,4 @@ void EmailClient::getNewMail() {
323 if (accountList.count() == 0) { 323 if (accountList.count() == 0) {
324 QMessageBox::warning(qApp->activeWindow(),"No account selected", 324 QMessageBox::warning(qApp->activeWindow(),tr("No account selected"),
325 "You must create an account", "OK\n"); 325 tr("You must create an account"), "OK\n");
326 return; 326 return;
@@ -787,3 +787,3 @@ void EmailClient::selectAccount(int id)
787 } else { 787 } else {
788 emit newCaption("Mailit ! No account defined"); 788 emit newCaption( tr("Mailit ! No account defined") );
789 } 789 }
@@ -827,3 +827,3 @@ void EmailClient::deleteAccount(int id)
827 newAccount = accountList.at(id); 827 newAccount = accountList.at(id);
828 message = "Delete account:\n" + newAccount->accountName; 828 message = tr("Delete account:\n") + newAccount->accountName;
829 switch( QMessageBox::warning( this, "Mailit", message, 829 switch( QMessageBox::warning( this, "Mailit", message,
@@ -848,3 +848,3 @@ void EmailClient::updateAccounts()
848 848
849 newAccountId = editAccountMenu->insertItem("New", this, 849 newAccountId = editAccountMenu->insertItem( tr("New"), this,
850 SLOT(editAccount(int)) ); 850 SLOT(editAccount(int)) );
diff --git a/noncore/unsupported/mailit/emaillistitem.cpp b/noncore/unsupported/mailit/emaillistitem.cpp
index fc9f766..a25f93a 100644
--- a/noncore/unsupported/mailit/emaillistitem.cpp
+++ b/noncore/unsupported/mailit/emaillistitem.cpp
@@ -40,3 +40,4 @@ EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox)
40 setText(1, mail.subject); 40 setText(1, mail.subject);
41 setText(2,mail.date); 41 // setText(2,mail.date);
42 setText(2,dateFromULCString(mail.date));
42 43
@@ -99 +100,59 @@ void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg,
99} 100}
101
102/*
103 * Converts an E-Mail date (ULC) RFC 2822 conform to a QDateTime.
104 * Returning a QString with formatting of "YYYY-MM-DD HH:MM:SS"
105 * (zodiac: This method was tested with more than 300 inbox mails,
106 * it didn't slow down the loading of mail-it.)
107 */
108QString EmailListItem::dateFromULCString( QString ulcDate )
109{
110 QString sTemp, sTime;
111 int iPos, iDay, iMon=1, iYear;
112
113 iPos=ulcDate.find(',');
114 if (iPos) { // it has a day-of-week
115 ulcDate=ulcDate.remove(0,++iPos); //.stripWhiteSpace();
116 }
117
118 QStringList dateEntries = QStringList::split(" ",ulcDate,FALSE);
119 QStringList::Iterator iter = dateEntries.begin();
120
121 // Get day as DD
122 iDay = (*iter++).toInt();
123
124 // Get month as string Mmm
125 sTemp = (*iter++);
126 if (sTemp =="Jan") {iMon=1;} else
127 if (sTemp =="Feb") {iMon=2;} else
128 if (sTemp =="Mar") {iMon=3;} else
129 if (sTemp =="Apr") {iMon=4;} else
130 if (sTemp =="May") {iMon=5;} else
131 if (sTemp =="Jun") {iMon=6;} else
132 if (sTemp =="Jul") {iMon=7;} else
133 if (sTemp =="Aug") {iMon=8;} else
134 if (sTemp =="Sep") {iMon=9;} else
135 if (sTemp =="Oct") {iMon=10;} else
136 if (sTemp =="Nov") {iMon=11;} else
137 if (sTemp =="Dec") {iMon=12;}
138
139 // Get year as YYYY or YY
140 iYear = (*iter++).toInt();
141
142 QDate date = QDate(iYear, iMon, iDay);
143
144 // Convert timestring into a QTime
145 QStringList timeEntries = QStringList::split(":",(*iter++),FALSE);
146 QStringList::Iterator iterTime = timeEntries.begin();
147 iYear=(*iterTime++).toInt(); // var reuse.. *cough*
148 iMon=(*iterTime++).toInt();
149 iDay=(*iterTime++).toInt();
150 QTime time = QTime(iYear,iMon,iDay);
151
152 return QString::number(date.year())+"-"
153 +QString::number(date.month()).rightJustify(2,'0')+"-"
154 +QString::number(date.day()).rightJustify(2,'0')+" "
155 +time.toString();
156}
157
158
diff --git a/noncore/unsupported/mailit/emaillistitem.h b/noncore/unsupported/mailit/emaillistitem.h
index 642932c..129a774 100644
--- a/noncore/unsupported/mailit/emaillistitem.h
+++ b/noncore/unsupported/mailit/emaillistitem.h
@@ -41,2 +41,3 @@ private:
41 bool selected; 41 bool selected;
42 QString dateFromULCString( QString ulc );
42}; 43};
diff --git a/noncore/unsupported/mailit/mailit.pro b/noncore/unsupported/mailit/mailit.pro
index 5e9a83a..0224886 100644
--- a/noncore/unsupported/mailit/mailit.pro
+++ b/noncore/unsupported/mailit/mailit.pro
@@ -1,4 +1,3 @@
1TEMPLATE = app
2TARGET = mailit 1TARGET = mailit
3CONFIG = qt warn_on release 2CONFIG = qt warn_on release quick-app
4HEADERS = emailclient.h \ 3HEADERS = emailclient.h \
@@ -39,5 +38,2 @@ LIBS += -lqpe -lopie
39# -lssl 38# -lssl
40MOC_DIR=qpeobj
41OBJECTS_DIR=qpeobj
42DESTDIR=$(OPIEDIR)/bin
43 39
diff --git a/noncore/unsupported/mailit/mailitwindow.h b/noncore/unsupported/mailit/mailitwindow.h
index e818d32..11e56b9 100644
--- a/noncore/unsupported/mailit/mailitwindow.h
+++ b/noncore/unsupported/mailit/mailitwindow.h
@@ -35,2 +35,3 @@ class MailItWindow: public QMainWindow
35public: 35public:
36 static QString appName() { return QString::fromLatin1("mailit"); }
36 MailItWindow(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 37 MailItWindow(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
diff --git a/noncore/unsupported/mailit/main.cpp b/noncore/unsupported/mailit/main.cpp
index 3a3e1fc..71f8877 100644
--- a/noncore/unsupported/mailit/main.cpp
+++ b/noncore/unsupported/mailit/main.cpp
@@ -22,8 +22,4 @@
22 22
23int main(int argc, char* argv[]) 23#include <opie/oapplicationfactory.h>
24{ 24
25 QPEApplication a( argc, argv ); 25OPIE_EXPORT_APP( OApplicationFactory<MailItWindow> ) \ No newline at end of file
26 MailItWindow mw(0, 0);
27 a.showMainDocumentWidget(&mw);
28 return a.exec();
29}