summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-04-19 10:11:09 (UTC)
committer mickeyl <mickeyl>2005-04-19 10:11:09 (UTC)
commit9b8dd642c4b135070911c78bb5d31a7add7162ee (patch) (side-by-side diff)
tree1d0ac94b911609605403ef83ceda0f5052757e7a
parent16202ec32c1647b113fd7c06bc652bff32e6d6d2 (diff)
downloadopie-9b8dd642c4b135070911c78bb5d31a7add7162ee.zip
opie-9b8dd642c4b135070911c78bb5d31a7add7162ee.tar.gz
opie-9b8dd642c4b135070911c78bb5d31a7add7162ee.tar.bz2
This patch courtesy Gints Polis:
* gives possibility to enter numerical PIN with dialog buttons for keybordless PDA. * dialog run in full screen mode.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc12
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.h1
-rw-r--r--noncore/net/opietooth/blue-pin/pindlgbase.ui519
3 files changed, 466 insertions, 66 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc
index e40fe33..3db6095 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.cc
+++ b/noncore/net/opietooth/blue-pin/pindlg.cc
@@ -8,8 +8,9 @@
/* QT */
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlineedit.h>
+#include <qpushbutton.h>
/* STD */
#include <stdio.h>
@@ -31,9 +32,9 @@ PinDlg::PinDlg(QWidget* parent,
else
{
test( m_mac );
txtStatus->setText(makeTextFromArgs());
- QPEApplication::showDialog( this , true) ;
+ QPEApplication::showDialog( this , false) ;
}
}
PinDlg::~PinDlg()
@@ -93,8 +94,16 @@ QString PinDlg::makeMacFromArgs()
else
return qApp->argv()[2] ;
}
+void PinDlg::addnum()
+{
+ if( sender()->inherits( "QPushButton") ) {
+ const QPushButton* btn = static_cast<const QPushButton*> (sender());
+ lnePin->setText(lnePin->text() + btn->text());
+ }
+}
+
void PinDlg::accept()
{
if ( ckbPin->isChecked() )
{
@@ -106,4 +115,5 @@ 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 8623274..1817aa8 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.h
+++ b/noncore/net/opietooth/blue-pin/pindlg.h
@@ -27,7 +27,8 @@ namespace OpieTooth {
QString m_mac;
protected slots:
void accept();
+ void addnum();
};
};
diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui
index a79bb49..6586014 100644
--- a/noncore/net/opietooth/blue-pin/pindlgbase.ui
+++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI>
<class>PinDlgBase</class>
-<author>zecke</author>
+<author>gints</author>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
@@ -11,47 +11,49 @@
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>267</width>
- <height>161</height>
+ <width>196</width>
+ <height>175</height>
</rect>
</property>
<property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
<name>caption</name>
<string>Please enter pin</string>
</property>
- <grid>
<property stdset="1">
- <name>margin</name>
- <number>11</number>
+ <name>sizeGripEnabled</name>
+ <bool>false</bool>
</property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <property>
+ <name>layoutMargin</name>
</property>
- <widget row="0" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>txtStatus</cstring>
+ <property>
+ <name>layoutSpacing</name>
</property>
+ <vbox>
<property stdset="1">
- <name>text</name>
- <string></string>
+ <name>margin</name>
+ <number>5</number>
</property>
<property stdset="1">
- <name>textFormat</name>
- <enum>RichText</enum>
+ <name>spacing</name>
+ <number>2</number>
</property>
- </widget>
- <widget row="1" column="0" >
+ <widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout6</cstring>
+ <cstring>Layout9</cstring>
</property>
- <vbox>
+ <hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
@@ -62,20 +64,48 @@
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel3</cstring>
+ <cstring>txtStatus</cstring>
+ </property>
+ <property stdset="1">
+ <name>font</name>
+ <font>
+ </font>
</property>
<property stdset="1">
<name>text</name>
- <string>Please enter PIN:</string>
+ <string>Enter PIN:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</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>
+ </hbox>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout5</cstring>
+ <cstring>Layout8</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
@@ -84,149 +114,508 @@
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</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>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>lnePin</cstring>
</property>
<property stdset="1">
- <name>echoMode</name>
- <enum>Password</enum>
+ <name>frame</name>
+ <bool>true</bool>
</property>
</widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer4</cstring>
+ <cstring>Spacer3</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
- <enum>Fixed</enum>
+ <enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
- <width>21</width>
+ <width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- </hbox>
- </widget>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>ckbPin</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Save pin</string>
+ <string>Save</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
</property>
</widget>
- </vbox>
+ </hbox>
</widget>
- <widget row="2" column="0" >
+ <widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout7</cstring>
+ <cstring>Layout22</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>35</height>
+ </size>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>6</number>
+ <number>2</number>
</property>
- <spacer>
- <property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
<name>name</name>
- <cstring>Spacer1</cstring>
+ <cstring>bt1</cstring>
</property>
<property stdset="1">
- <name>orientation</name>
- <enum>Horizontal</enum>
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
</property>
<property stdset="1">
- <name>sizeType</name>
- <enum>Fixed</enum>
+ <name>text</name>
+ <string>1</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt2</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>2</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt3</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>3</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout22_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>35</height>
+ </size>
</property>
<property>
- <name>sizeHint</name>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt4</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
<size>
- <width>30</width>
- <height>20</height>
+ <width>60</width>
+ <height>25</height>
</size>
</property>
- </spacer>
+ <property stdset="1">
+ <name>text</name>
+ <string>4</string>
+ </property>
+ </widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton1</cstring>
+ <cstring>bt5</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
</property>
<property stdset="1">
<name>text</name>
- <string>&amp;Ok</string>
+ <string>5</string>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
- <cstring>PushButton2</cstring>
+ <cstring>bt6</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
</property>
<property stdset="1">
<name>text</name>
- <string>&amp;Cancel</string>
+ <string>6</string>
</property>
</widget>
- <spacer>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout22_2_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>35</height>
+ </size>
+ </property>
<property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
<name>name</name>
- <cstring>Spacer2</cstring>
+ <cstring>bt7</cstring>
</property>
<property stdset="1">
- <name>orientation</name>
- <enum>Horizontal</enum>
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
</property>
<property stdset="1">
- <name>sizeType</name>
- <enum>Fixed</enum>
+ <name>text</name>
+ <string>7</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt8</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>8</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt9</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>9</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout24</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>32767</width>
+ <height>35</height>
+ </size>
</property>
<property>
- <name>sizeHint</name>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PushButton1</cstring>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
<size>
- <width>16</width>
- <height>20</height>
+ <width>60</width>
+ <height>25</height>
</size>
</property>
- </spacer>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Ok</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>bt0</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>0</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>PushButton2</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>60</width>
+ <height>25</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
</hbox>
</widget>
- </grid>
+ </vbox>
</widget>
<connections>
<connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>Form1</receiver>
<slot>accept()</slot>
</connection>
<connection>
- <sender>PushButton2</sender>
+ <sender>bt0</sender>
<signal>clicked()</signal>
<receiver>Form1</receiver>
- <slot>reject()</slot>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt1</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt2</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt3</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt4</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt5</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt6</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt7</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt8</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
+ </connection>
+ <connection>
+ <sender>bt9</sender>
+ <signal>clicked()</signal>
+ <receiver>Form1</receiver>
+ <slot>addnum()</slot>
</connection>
+ <slot access="protected">addnum()</slot>
</connections>
+<tabstops>
+ <tabstop>lnePin</tabstop>
+ <tabstop>PushButton1</tabstop>
+ <tabstop>PushButton2</tabstop>
+ <tabstop>bt1</tabstop>
+ <tabstop>bt2</tabstop>
+ <tabstop>bt3</tabstop>
+ <tabstop>bt4</tabstop>
+ <tabstop>bt5</tabstop>
+ <tabstop>bt6</tabstop>
+ <tabstop>bt7</tabstop>
+ <tabstop>bt8</tabstop>
+ <tabstop>bt9</tabstop>
+ <tabstop>bt0</tabstop>
+</tabstops>
</UI>