Diffstat (limited to 'noncore/net/opietooth/blue-pin') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/blue-pin/main.cc | 9 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.h | 9 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlgbase.ui | 56 |
4 files changed, 20 insertions, 80 deletions
diff --git a/noncore/net/opietooth/blue-pin/main.cc b/noncore/net/opietooth/blue-pin/main.cc index dbe5b41..90d42e0 100644 --- a/noncore/net/opietooth/blue-pin/main.cc +++ b/noncore/net/opietooth/blue-pin/main.cc @@ -8,4 +8,9 @@ #include "pindlg.h" -using namespace Opie::Core; -OPIE_EXPORT_APP( OApplicationFactory<OpieTooth::PinDlg> ) +int main(int argc, char *argv[]) { + QPEApplication oapp(argc, argv); + + OpieTooth::PinDlg dlg; + return oapp.exec(); +} + diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 96be1e5..e40fe33 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc @@ -16,16 +16,4 @@ using namespace OpieTooth; -PinDlg::PinDlg( const QString& status, - const QString& mac, QWidget* parent, - const char* name ) - : PinDlgBase( parent, name, WType_Modal ) -{ - m_mac = mac; - test( mac ); - txtStatus->setText(status); - if(!m_mac.isEmpty()) - QPEApplication::showDialog( this ); -} - PinDlg::PinDlg(QWidget* parent, const char* name, @@ -39,5 +27,5 @@ PinDlg::PinDlg(QWidget* parent, // can't obtain MAC printf("ERR\n"); - qApp->quit(); + ::exit(0); } else @@ -45,5 +33,5 @@ PinDlg::PinDlg(QWidget* parent, test( m_mac ); txtStatus->setText(makeTextFromArgs()); - QPEApplication::showDialog( this ) ; + QPEApplication::showDialog( this , true) ; } } @@ -69,10 +57,5 @@ void PinDlg::test( const QString& mac ) cfg.setGroup(mac); lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); - if ( !lnePin->text().isEmpty() ) - { - //QTimer::singleShot(100, this, SLOT(accept() ) ); - } } - } @@ -101,5 +84,5 @@ QString PinDlg::makeTextFromArgs() } else - return QString(); + return QString::null; } @@ -107,5 +90,5 @@ QString PinDlg::makeMacFromArgs() { if(qApp->argc() < 3) - return QString(); + return QString::null; else return qApp->argv()[2] ; @@ -123,3 +106,4 @@ void PinDlg::accept() QDialog::accept(); qApp->quit(); + ::exit(0); } diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h index 5f7dc55..8623274 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.h +++ b/noncore/net/opietooth/blue-pin/pindlg.h @@ -11,12 +11,5 @@ namespace OpieTooth { public: - PinDlg(const QString& text="", - const QString& mac="", - QWidget* parent = 0, - const char* name= 0 ); - - PinDlg(QWidget* parent, - const char* name, - Qt::WFlags f ); + PinDlg(QWidget* parent = 0,const char* name = 0, Qt::WFlags f = 0); ~PinDlg(); diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui index 6784de7..a79bb49 100644 --- a/noncore/net/opietooth/blue-pin/pindlgbase.ui +++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui @@ -13,6 +13,6 @@ <x>0</x> <y>0</y> - <width>254</width> - <height>245</height> + <width>267</width> + <height>161</height> </rect> </property> @@ -21,5 +21,5 @@ <string>Please enter pin</string> </property> - <vbox> + <grid> <property stdset="1"> <name>margin</name> @@ -30,26 +30,5 @@ <number>6</number> </property> - <spacer> - <property> - <name>name</name> - <cstring>Spacer4_2</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget> + <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> @@ -66,5 +45,5 @@ </property> </widget> - <widget> + <widget row="1" column="0" > <class>QLayoutWidget</class> <property stdset="1"> @@ -154,26 +133,5 @@ </vbox> </widget> - <spacer> - <property> - <name>name</name> - <cstring>Spacer5</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> - </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> - </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget> + <widget row="2" column="0" > <class>QLayoutWidget</class> <property stdset="1"> @@ -256,5 +214,5 @@ </hbox> </widget> - </vbox> + </grid> </widget> <connections> |