Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/Opietooth.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp index 8ea3a48..2d4885c 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp | |||
@@ -101,24 +101,45 @@ public : | |||
101 | private : | 101 | private : |
102 | 102 | ||
103 | int LinkKey; | 103 | int LinkKey; |
104 | }; | 104 | }; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | // | 107 | // |
108 | // | 108 | // |
109 | // | 109 | // |
110 | // | 110 | // |
111 | // | 111 | // |
112 | 112 | ||
113 | OTSniffing::OTSniffing( QWidget * parent ) : OTSniffGUI( parent ) { | ||
114 | |||
115 | OT = OTGateway::getOTGateway(); | ||
116 | |||
117 | } | ||
118 | |||
119 | OTSniffing::~OTSniffing() { | ||
120 | } | ||
121 | |||
122 | void OTSniffing::SLOT_Trace( void ) { | ||
123 | } | ||
124 | |||
125 | void OTSniffing::SLOT_ClearLog( void ) { | ||
126 | } | ||
127 | |||
128 | // | ||
129 | // | ||
130 | // | ||
131 | // | ||
132 | // | ||
133 | |||
113 | OTPairing::OTPairing( QWidget * parent, OTIcons * _IC ) : | 134 | OTPairing::OTPairing( QWidget * parent, OTIcons * _IC ) : |
114 | OTPairingGUI( parent ) { | 135 | OTPairingGUI( parent ) { |
115 | 136 | ||
116 | OT = OTGateway::getOTGateway(); | 137 | OT = OTGateway::getOTGateway(); |
117 | Icons = (_IC ) ? _IC : new OTIcons(); | 138 | Icons = (_IC ) ? _IC : new OTIcons(); |
118 | MyIcons = (_IC == 0 ); | 139 | MyIcons = (_IC == 0 ); |
119 | 140 | ||
120 | // unpairing can only be done if bluetooth is disabled | 141 | // unpairing can only be done if bluetooth is disabled |
121 | Unpair_But->setEnabled( ! OT->isEnabled() ); | 142 | Unpair_But->setEnabled( ! OT->isEnabled() ); |
122 | if( ! OT->isEnabled() ) { | 143 | if( ! OT->isEnabled() ) { |
123 | Unpair_LBL->hide(); | 144 | Unpair_LBL->hide(); |
124 | } else { | 145 | } else { |
@@ -864,24 +885,25 @@ void OTManage::SLOT_SetRefreshTimer( int v ) { | |||
864 | OT->setRefreshTimer( v * 1000 ); | 885 | OT->setRefreshTimer( v * 1000 ); |
865 | } | 886 | } |
866 | 887 | ||
867 | // | 888 | // |
868 | // | 889 | // |
869 | // | 890 | // |
870 | // | 891 | // |
871 | // | 892 | // |
872 | 893 | ||
873 | OTMain::OTMain( QWidget * parent ) : OTMainGUI( parent ) { | 894 | OTMain::OTMain( QWidget * parent ) : OTMainGUI( parent ) { |
874 | 895 | ||
875 | Icons = new OTIcons(); | 896 | Icons = new OTIcons(); |
897 | SnifWindow = 0; | ||
876 | OT = OTGateway::getOTGateway(); | 898 | OT = OTGateway::getOTGateway(); |
877 | 899 | ||
878 | connect( OT, | 900 | connect( OT, |
879 | SIGNAL( deviceEnabled( bool ) ), | 901 | SIGNAL( deviceEnabled( bool ) ), |
880 | this, | 902 | this, |
881 | SLOT( SLOT_DeviceIsEnabled( bool ) ) | 903 | SLOT( SLOT_DeviceIsEnabled( bool ) ) |
882 | ); | 904 | ); |
883 | connect( OT, | 905 | connect( OT, |
884 | SIGNAL( driverListChanged() ), | 906 | SIGNAL( driverListChanged() ), |
885 | this, | 907 | this, |
886 | SLOT( SLOT_DriverListChanged() ) | 908 | SLOT( SLOT_DriverListChanged() ) |
887 | ); | 909 | ); |
@@ -994,12 +1016,22 @@ void OTMain::SLOT_StateChange( OTDriver * D, bool Up ) { | |||
994 | void OTMain::SLOT_Pairing( void ) { | 1016 | void OTMain::SLOT_Pairing( void ) { |
995 | QDialog * Dlg = new QDialog( this, 0, TRUE ); | 1017 | QDialog * Dlg = new QDialog( this, 0, TRUE ); |
996 | QVBoxLayout * V = new QVBoxLayout( Dlg ); | 1018 | QVBoxLayout * V = new QVBoxLayout( Dlg ); |
997 | OTPairing * Pair = new OTPairing( Dlg, Icons ); | 1019 | OTPairing * Pair = new OTPairing( Dlg, Icons ); |
998 | 1020 | ||
999 | V->addWidget( Pair ); | 1021 | V->addWidget( Pair ); |
1000 | Dlg->showMaximized(); | 1022 | Dlg->showMaximized(); |
1001 | Dlg->setCaption( tr("Manage pairing" ) ); | 1023 | Dlg->setCaption( tr("Manage pairing" ) ); |
1002 | Dlg->exec(); | 1024 | Dlg->exec(); |
1003 | 1025 | ||
1004 | delete Dlg; | 1026 | delete Dlg; |
1005 | } | 1027 | } |
1028 | |||
1029 | void OTMain::SLOT_Sniffing( void ) { | ||
1030 | |||
1031 | if( SnifWindow == 0 ) { | ||
1032 | SnifWindow = new OTSniffing( this ); | ||
1033 | } | ||
1034 | |||
1035 | SnifWindow->showMaximized(); | ||
1036 | SnifWindow->show(); | ||
1037 | } | ||