summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/resources.h
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/resources.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/resources.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/resources.h b/noncore/settings/networksettings2/networksettings2/resources.h
index 3048fb3..7050f10 100644
--- a/noncore/settings/networksettings2/networksettings2/resources.h
+++ b/noncore/settings/networksettings2/networksettings2/resources.h
@@ -34,65 +34,65 @@ public :
34 QArray<char *> EnvList; 34 QArray<char *> EnvList;
35}; 35};
36 36
37typedef QDict<NetNode_t> Name2NetNode_t; 37typedef QDict<NetNode_t> Name2NetNode_t;
38typedef QDict<ANetNodeInstance > Name2Instance_t; 38typedef QDict<ANetNodeInstance > Name2Instance_t;
39typedef QDict<NodeCollection> Name2Connection_t; 39typedef QDict<NodeCollection> Name2Connection_t;
40typedef QDict<SystemFile> Name2SystemFile_t; 40typedef QDict<SystemFile> Name2SystemFile_t;
41 41
42class TheNSResources { 42class TheNSResources {
43 43
44public : 44public :
45 45
46 TheNSResources( void ); 46 TheNSResources( void );
47 ~TheNSResources( ); 47 ~TheNSResources( );
48 48
49 System & system() 49 System & system()
50 { return *TheSystem; } 50 { return *TheSystem; }
51 51
52 QPixmap getPixmap( const QString & Name ); 52 QPixmap getPixmap( const QString & Name );
53 53
54 Name2NetNode_t & netNodes( void ) 54 Name2NetNode_t & netNodes( void )
55 { return AllNodeTypes; } 55 { return AllNodeTypes; }
56 bool netNodeExists( const QString & X ) 56 bool netNodeExists( const QString & X )
57 { return AllNodeTypes.find(X)!=0; } 57 { return AllNodeTypes.find(X)!=0; }
58 ANetNode * findNetNode( const QString & N )
59 { NetNode_t * NNT = AllNodeTypes.find(N);
60 return (NNT) ? NNT->NetNode : 0;
61 }
58 62
59 Name2SystemFile_t & systemFiles( void ) 63 Name2SystemFile_t & systemFiles( void )
60 { return SystemFiles; } 64 { return SystemFiles; }
61 void addSystemFile( SystemFile * SF ) 65 void addSystemFile( SystemFile * SF )
62 { SystemFiles.insert( SF->name(), SF ); } 66 { SystemFiles.insert( SF->name(), SF ); }
63 67
64 ANetNodeInstance * createNodeInstance( const QString & S ) 68 ANetNodeInstance * createNodeInstance( const QString & S )
65 { ANetNodeInstance * NNI = 0; 69 { ANetNodeInstance * NNI = 0;
66 NetNode_t * NNT = AllNodeTypes[S]; 70 NetNode_t * NNT = AllNodeTypes[S];
67 ANetNode * NN;
68 if( ! NNT ) { 71 if( ! NNT ) {
69 NN = FakeNode = 72 return 0;
70 ( FakeNode ) ? FakeNode : new FakeNetNode();
71 } else {
72 NN = NNT->NetNode;
73 } 73 }
74 NNI = NN->createInstance(); 74 NNI = NNT->NetNode->createInstance();
75 NNI->initialize(); 75 NNI->initialize();
76 return NNI; 76 return NNI;
77 } 77 }
78 78
79 Name2Instance_t & netNodeInstances( void ) 79 Name2Instance_t & netNodeInstances( void )
80 { return AllNodes; } 80 { return AllNodes; }
81 void addNodeInstance( ANetNodeInstance * I ) 81 void addNodeInstance( ANetNodeInstance * I )
82 { AllNodes.insert( I->nodeName(), I ); } 82 { AllNodes.insert( I->nodeName(), I ); }
83 void removeNodeInstance( const QString & N ) 83 void removeNodeInstance( const QString & N )
84 { AllNodes.remove( N );} 84 { AllNodes.remove( N );}
85 ANetNodeInstance * findNodeInstance( const QString & S ) 85 ANetNodeInstance * findNodeInstance( const QString & S )
86 { return (AllNodes.find(S)!=0) ? AllNodes[S] : 0; } 86 { return (AllNodes.find(S)!=0) ? AllNodes[S] : 0; }
87 87
88 const QString & netNode2Name( const char * Type ); 88 const QString & netNode2Name( const char * Type );
89 const QString & netNode2Description( const char * Type ); 89 const QString & netNode2Description( const char * Type );
90 90
91 void renumberConnections( void ); 91 void renumberConnections( void );
92 void addConnection( NodeCollection * NC ); 92 void addConnection( NodeCollection * NC );
93 void removeConnection( const QString & N ); 93 void removeConnection( const QString & N );
94 NodeCollection * findConnection( const QString & N ); 94 NodeCollection * findConnection( const QString & N );
95 Name2Connection_t & connections( void ) 95 Name2Connection_t & connections( void )
96 { return ConnectionsMap; } 96 { return ConnectionsMap; }
97 97
98 CurrentQPEUser & currentUser( void ) 98 CurrentQPEUser & currentUser( void )