summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/cable
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/cable') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/cable/cable_NN.cpp14
-rw-r--r--noncore/settings/networksettings2/cable/cable_NN.h7
-rw-r--r--noncore/settings/networksettings2/cable/cable_NNI.cpp7
-rw-r--r--noncore/settings/networksettings2/cable/cable_NNI.h5
4 files changed, 16 insertions, 17 deletions
diff --git a/noncore/settings/networksettings2/cable/cable_NN.cpp b/noncore/settings/networksettings2/cable/cable_NN.cpp
index 6f62772..a6be4d5 100644
--- a/noncore/settings/networksettings2/cable/cable_NN.cpp
+++ b/noncore/settings/networksettings2/cable/cable_NN.cpp
@@ -32,35 +32,23 @@ const char ** CableNetNode::needs( void ) {
32 return CableNeeds; 32 return CableNeeds;
33} 33}
34 34
35const char * CableNetNode::provides( void ) { 35const char * CableNetNode::provides( void ) {
36 return "line"; 36 return "line";
37} 37}
38 38
39bool CableNetNode::generateProperFilesFor( 39bool CableNetNode::generateProperFilesFor(
40 ANetNodeInstance * ) { 40 ANetNodeInstance * ) {
41 return 1; 41 return 1;
42} 42}
43 43
44bool CableNetNode::hasDataFor( const QString &, bool ) {
45 return 0;
46}
47
48bool CableNetNode::generateDataForCommonFile(
49 SystemFile & ,
50 long ,
51 ANetNodeInstance * ) {
52 return 1;
53}
54
55bool CableNetNode::generateDeviceDataForCommonFile( 44bool CableNetNode::generateDeviceDataForCommonFile(
56 SystemFile & , 45 SystemFile & ,
57 long , 46 long ) {
58 ANetNodeInstance * ) {
59 return 1; 47 return 1;
60} 48}
61 49
62extern "C" { 50extern "C" {
63void create_plugin( QList<ANetNode> & PNN ) { 51void create_plugin( QList<ANetNode> & PNN ) {
64 PNN.append( new CableNetNode() ); 52 PNN.append( new CableNetNode() );
65} 53}
66} 54}
diff --git a/noncore/settings/networksettings2/cable/cable_NN.h b/noncore/settings/networksettings2/cable/cable_NN.h
index 3875af6..83b98e0 100644
--- a/noncore/settings/networksettings2/cable/cable_NN.h
+++ b/noncore/settings/networksettings2/cable/cable_NN.h
@@ -19,28 +19,27 @@ public:
19 19
20 virtual const QString nodeName() 20 virtual const QString nodeName()
21 { return tr("Cable Connection"); } 21 { return tr("Cable Connection"); }
22 22
23 virtual const QString nodeDescription() ; 23 virtual const QString nodeDescription() ;
24 24
25 virtual ANetNodeInstance * createInstance( void ); 25 virtual ANetNodeInstance * createInstance( void );
26 26
27 virtual const char ** needs( void ); 27 virtual const char ** needs( void );
28 virtual const char * provides( void ); 28 virtual const char * provides( void );
29 29
30 virtual bool generateProperFilesFor( ANetNodeInstance * NNI ); 30 virtual bool generateProperFilesFor( ANetNodeInstance * NNI );
31 virtual bool hasDataFor( const QString & S, bool DS ); 31 virtual bool hasDataFor( const QString & )
32 virtual bool generateDataForCommonFile( 32 { return 0; }
33 SystemFile & SF, long DevNr, ANetNodeInstance * NNI );
34 virtual bool generateDeviceDataForCommonFile( 33 virtual bool generateDeviceDataForCommonFile(
35 SystemFile & SF, long DevNr, ANetNodeInstance * NNI ); 34 SystemFile & SF, long DevNr);
36 35
37private: 36private:
38 37
39}; 38};
40 39
41extern "C" 40extern "C"
42{ 41{
43 void create_plugin( QList<ANetNode> & PNN ); 42 void create_plugin( QList<ANetNode> & PNN );
44}; 43};
45 44
46#endif 45#endif
diff --git a/noncore/settings/networksettings2/cable/cable_NNI.cpp b/noncore/settings/networksettings2/cable/cable_NNI.cpp
index d26afd1..ca21135 100644
--- a/noncore/settings/networksettings2/cable/cable_NNI.cpp
+++ b/noncore/settings/networksettings2/cable/cable_NNI.cpp
@@ -55,12 +55,19 @@ QWidget * ACable::edit( QWidget * parent ) {
55 return GUI; 55 return GUI;
56} 56}
57 57
58QString ACable::acceptable( void ) { 58QString ACable::acceptable( void ) {
59 return ( GUI ) ? GUI->acceptable( ) : QString(); 59 return ( GUI ) ? GUI->acceptable( ) : QString();
60} 60}
61 61
62void ACable::commit( void ) { 62void ACable::commit( void ) {
63 if( GUI && GUI->commit( Data ) ) { 63 if( GUI && GUI->commit( Data ) ) {
64 setModified( 1 ); 64 setModified( 1 );
65 } 65 }
66} 66}
67
68bool ACable::generateDataForCommonFile(
69 SystemFile & ,
70 long ) {
71 return 1;
72}
73
diff --git a/noncore/settings/networksettings2/cable/cable_NNI.h b/noncore/settings/networksettings2/cable/cable_NNI.h
index 0654a5d..bf3e292 100644
--- a/noncore/settings/networksettings2/cable/cable_NNI.h
+++ b/noncore/settings/networksettings2/cable/cable_NNI.h
@@ -18,24 +18,29 @@ public :
18 QString acceptable( void ); 18 QString acceptable( void );
19 void commit( void ); 19 void commit( void );
20 20
21 RuntimeInfo * runtime( void ) 21 RuntimeInfo * runtime( void )
22 { if( RT == 0 ) 22 { if( RT == 0 )
23 RT = new CableRun( this, Data ); 23 RT = new CableRun( this, Data );
24 return RT; 24 return RT;
25 } 25 }
26 26
27 virtual void * data( void ) 27 virtual void * data( void )
28 { return (void *)&Data; } 28 { return (void *)&Data; }
29 29
30 virtual bool hasDataFor( const QString & )
31 { return 0; }
32 virtual bool generateDataForCommonFile(
33 SystemFile & SF, long DevNr );
34
30protected : 35protected :
31 36
32 virtual void setSpecificAttribute( QString & Attr, QString & Value ); 37 virtual void setSpecificAttribute( QString & Attr, QString & Value );
33 virtual void saveSpecificAttribute( QTextStream & TS ); 38 virtual void saveSpecificAttribute( QTextStream & TS );
34 39
35private : 40private :
36 41
37 CableEdit * GUI; 42 CableEdit * GUI;
38 CableData_t Data; 43 CableData_t Data;
39 CableRun * RT; 44 CableRun * RT;
40 45
41}; 46};