author | korovkin <korovkin> | 2006-03-20 21:46:03 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-03-20 21:46:03 (UTC) |
commit | 14e09a10bff58fac21c14f3171bd0979b2fdbe17 (patch) (unidiff) | |
tree | 5ade4e83f386b4f93d86183e879b7f08a21a2ef9 | |
parent | 74546adb68bd3f17a75003671407c4a4e6b09e73 (diff) | |
download | opie-14e09a10bff58fac21c14f3171bd0979b2fdbe17.zip opie-14e09a10bff58fac21c14f3171bd0979b2fdbe17.tar.gz opie-14e09a10bff58fac21c14f3171bd0979b2fdbe17.tar.bz2 |
Quick fix: made dialog boxes fit into the 240x320 screen.
3 files changed, 26 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogbase.ui b/noncore/net/opietooth/manager/rfcommassigndialogbase.ui index ac574a7..04bda8f 100644 --- a/noncore/net/opietooth/manager/rfcommassigndialogbase.ui +++ b/noncore/net/opietooth/manager/rfcommassigndialogbase.ui | |||
@@ -1,44 +1,64 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>RfcommAssignDialogBase</class> | 2 | <class>RfcommAssignDialogBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>RfcommAssignDialogBase</cstring> | 7 | <cstring>RfcommAssignDialogBase</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>289</width> | 14 | <width>361</width> |
15 | <height>343</height> | 15 | <height>343</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>sizePolicy</name> | ||
20 | <sizepolicy> | ||
21 | <hsizetype>7</hsizetype> | ||
22 | <vsizetype>7</vsizetype> | ||
23 | </sizepolicy> | ||
24 | </property> | ||
25 | <property stdset="1"> | ||
19 | <name>caption</name> | 26 | <name>caption</name> |
20 | <string>Rfcomm Bind</string> | 27 | <string>Rfcomm Bind</string> |
21 | </property> | 28 | </property> |
29 | <property> | ||
30 | <name>layoutMargin</name> | ||
31 | </property> | ||
32 | <property> | ||
33 | <name>layoutSpacing</name> | ||
34 | </property> | ||
22 | <vbox> | 35 | <vbox> |
23 | <property stdset="1"> | 36 | <property stdset="1"> |
24 | <name>margin</name> | 37 | <name>margin</name> |
25 | <number>11</number> | 38 | <number>4</number> |
26 | </property> | 39 | </property> |
27 | <property stdset="1"> | 40 | <property stdset="1"> |
28 | <name>spacing</name> | 41 | <name>spacing</name> |
29 | <number>6</number> | 42 | <number>4</number> |
30 | </property> | 43 | </property> |
31 | <widget> | 44 | <widget> |
32 | <class>QLabel</class> | 45 | <class>QLabel</class> |
33 | <property stdset="1"> | 46 | <property stdset="1"> |
34 | <name>name</name> | 47 | <name>name</name> |
35 | <cstring>TextLabel1</cstring> | 48 | <cstring>TextLabel1</cstring> |
36 | </property> | 49 | </property> |
37 | <property stdset="1"> | 50 | <property stdset="1"> |
51 | <name>sizePolicy</name> | ||
52 | <sizepolicy> | ||
53 | <hsizetype>7</hsizetype> | ||
54 | <vsizetype>7</vsizetype> | ||
55 | </sizepolicy> | ||
56 | </property> | ||
57 | <property stdset="1"> | ||
38 | <name>text</name> | 58 | <name>text</name> |
39 | <string>Bind device to a interface</string> | 59 | <string>Bind device to a interface</string> |
40 | </property> | 60 | </property> |
41 | </widget> | 61 | </widget> |
42 | </vbox> | 62 | </vbox> |
43 | </widget> | 63 | </widget> |
44 | </UI> | 64 | </UI> |
diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp index 3fe2ea6..be720b8 100644 --- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp +++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp | |||
@@ -39,48 +39,50 @@ RfcommAssignDialog::RfcommAssignDialog( QWidget* parent, const char* name, bool | |||
39 | loadConfig(); | 39 | loadConfig(); |
40 | } | 40 | } |
41 | 41 | ||
42 | RfcommAssignDialog::~RfcommAssignDialog() | 42 | RfcommAssignDialog::~RfcommAssignDialog() |
43 | { | 43 | { |
44 | if ( confHandler ) | 44 | if ( confHandler ) |
45 | { | 45 | { |
46 | delete confHandler; | 46 | delete confHandler; |
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | void RfcommAssignDialog::newDevice( const QString & mac ) | 51 | void RfcommAssignDialog::newDevice( const QString & mac ) |
52 | { | 52 | { |
53 | 53 | ||
54 | for ( int i = 0 ; i < m_range; i++ ) | 54 | for ( int i = 0 ; i < m_range; i++ ) |
55 | { | 55 | { |
56 | 56 | ||
57 | QMap<QString, RfCommConfObject*>::Iterator it; | 57 | QMap<QString, RfCommConfObject*>::Iterator it; |
58 | it = confHandler->foundEntries().find( QString("%1").arg( i ) ); | 58 | it = confHandler->foundEntries().find( QString("%1").arg( i ) ); |
59 | // make sure that rfcommX is not assigned yet | 59 | // make sure that rfcommX is not assigned yet |
60 | if ( it == confHandler->foundEntries().end() ) | 60 | if ( it == confHandler->foundEntries().end() ) |
61 | { | 61 | { |
62 | QDialog dialog( this, "newdevice", true, WStyle_ContextHelp ); | 62 | QDialog dialog( this, "newdevice", true, WStyle_ContextHelp ); |
63 | dialog.setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, | ||
64 | (QSizePolicy::SizeType)7, sizePolicy().hasHeightForWidth())); | ||
63 | 65 | ||
64 | RfcommDialogItem *newDev = new RfcommDialogItem( &dialog ); | 66 | RfcommDialogItem *newDev = new RfcommDialogItem( &dialog ); |
65 | newDev->setIdent( i ); | 67 | newDev->setIdent( i ); |
66 | newDev->setMac( mac ); | 68 | newDev->setMac( mac ); |
67 | 69 | ||
68 | if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted ) | 70 | if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted ) |
69 | { | 71 | { |
70 | RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box ); | 72 | RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box ); |
71 | m_itemList.insert( i , rfcomm ); | 73 | m_itemList.insert( i , rfcomm ); |
72 | rfcomm->setIdent( i ); | 74 | rfcomm->setIdent( i ); |
73 | rfcomm->setMac( mac ); | 75 | rfcomm->setMac( mac ); |
74 | rfcomm->setChannel( newDev->channel() ); | 76 | rfcomm->setChannel( newDev->channel() ); |
75 | rfcomm->setComment( newDev->comment() ); | 77 | rfcomm->setComment( newDev->comment() ); |
76 | odebug << "New device set up" << oendl; | 78 | odebug << "New device set up" << oendl; |
77 | } | 79 | } |
78 | } | 80 | } |
79 | } | 81 | } |
80 | } | 82 | } |
81 | 83 | ||
82 | void RfcommAssignDialog::loadConfig() | 84 | void RfcommAssignDialog::loadConfig() |
83 | { | 85 | { |
84 | 86 | ||
85 | //Config cfg( "bluetoothmanager-rfcommbind" ); | 87 | //Config cfg( "bluetoothmanager-rfcommbind" ); |
86 | 88 | ||
diff --git a/noncore/net/opietooth/manager/rfcommdialogitembase.ui b/noncore/net/opietooth/manager/rfcommdialogitembase.ui index f9817df..dd8f121 100644 --- a/noncore/net/opietooth/manager/rfcommdialogitembase.ui +++ b/noncore/net/opietooth/manager/rfcommdialogitembase.ui | |||
@@ -1,38 +1,38 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>RfcommDialogItemBase</class> | 2 | <class>RfcommDialogItemBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>RfcommDialogItemBase</cstring> | 7 | <cstring>RfcommDialogItemBase</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>289</width> | 14 | <width>239</width> |
15 | <height>95</height> | 15 | <height>95</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>Form2</string> | 20 | <string>Form2</string> |
21 | </property> | 21 | </property> |
22 | <vbox> | 22 | <vbox> |
23 | <property stdset="1"> | 23 | <property stdset="1"> |
24 | <name>margin</name> | 24 | <name>margin</name> |
25 | <number>0</number> | 25 | <number>0</number> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>spacing</name> | 28 | <name>spacing</name> |
29 | <number>0</number> | 29 | <number>0</number> |
30 | </property> | 30 | </property> |
31 | <widget> | 31 | <widget> |
32 | <class>QGroupBox</class> | 32 | <class>QGroupBox</class> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>name</name> | 34 | <name>name</name> |
35 | <cstring>m_identLabel</cstring> | 35 | <cstring>m_identLabel</cstring> |
36 | </property> | 36 | </property> |
37 | <property stdset="1"> | 37 | <property stdset="1"> |
38 | <name>title</name> | 38 | <name>title</name> |