summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usb_NNI.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/usb/usb_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/usb/usb_NNI.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/usb/usb_NNI.cpp b/noncore/settings/networksettings2/usb/usb_NNI.cpp
new file mode 100644
index 0000000..4729416
--- a/dev/null
+++ b/noncore/settings/networksettings2/usb/usb_NNI.cpp
@@ -0,0 +1,46 @@
1#include <qpe/qpeapplication.h>
2#include "usbedit.h"
3#include "usb_NNI.h"
4#include "usb_NN.h"
5
6AUSB::AUSB( USBNetNode * PNN ) : ANetNodeInstance( PNN ) {
7
8 GUI = 0;
9 RT = 0;
10}
11
12void AUSB::setSpecificAttribute( QString & , QString & ) {
13}
14
15void AUSB::saveSpecificAttribute( QTextStream & ) {
16}
17
18
19QWidget * AUSB::edit( QWidget * parent ) {
20 GUI = new USBEdit( parent );
21 GUI->showData( Data );
22 return GUI;
23}
24
25QString AUSB::acceptable( void ) {
26 return ( GUI ) ? GUI->acceptable( ) : QString();
27}
28
29void AUSB::commit( void ) {
30 if( GUI && GUI->commit( Data ) ) {
31 setModified( 1 );
32 }
33}
34
35bool AUSB::generateDataForCommonFile( SystemFile & S, long DevNr ) {
36 AsDevice * Dev = runtime()->device();
37 QString NIC = Dev->genNic( DevNr );
38
39 if( S.name() == "interfaces" ) {
40 // generate mapping stanza for this interface
41 S << " pre-up " << QPEApplication::qpeDir() << "bin/setmacaddress.sh " << NIC << " || true" << endl;
42 }
43 return 0;
44}
45
46