Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/netnode.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.h b/noncore/settings/networksettings2/networksettings2/netnode.h index 6ec9ef6..27d54f8 100644 --- a/noncore/settings/networksettings2/networksettings2/netnode.h +++ b/noncore/settings/networksettings2/networksettings2/netnode.h | |||
@@ -69,21 +69,18 @@ typedef enum Action { | |||
69 | class ANetNode : public QObject{ | 69 | class ANetNode : public QObject{ |
70 | 70 | ||
71 | public: | 71 | public: |
72 | 72 | ||
73 | typedef QArray<ANetNode *> NetNodeList; | 73 | typedef QArray<ANetNode *> NetNodeList; |
74 | 74 | ||
75 | ANetNode(){}; | 75 | ANetNode( const char * Name ) : QObject( 0, Name ) {} |
76 | virtual ~ANetNode(){}; | 76 | virtual ~ANetNode(){}; |
77 | 77 | ||
78 | // pixmap needed for this NetNode | 78 | // pixmap needed for this NetNode |
79 | virtual const QString pixmapName() = 0; | 79 | virtual const QString pixmapName() = 0; |
80 | 80 | ||
81 | // name of this NetNode | ||
82 | virtual const QString nodeName() = 0; | ||
83 | |||
84 | // description for this NetNode | 81 | // description for this NetNode |
85 | virtual const QString nodeDescription() = 0; | 82 | virtual const QString nodeDescription() = 0; |
86 | 83 | ||
87 | // create a blank instance of a net node | 84 | // create a blank instance of a net node |
88 | virtual ANetNodeInstance * createInstance( void ) = 0; | 85 | virtual ANetNodeInstance * createInstance( void ) = 0; |
89 | 86 | ||
@@ -181,17 +178,12 @@ public: | |||
181 | // return true if node isntance is NEW and not loaded | 178 | // return true if node isntance is NEW and not loaded |
182 | void setNew( bool IsN ) | 179 | void setNew( bool IsN ) |
183 | { IsNew = IsN; } | 180 | { IsNew = IsN; } |
184 | bool isNew( void ) | 181 | bool isNew( void ) |
185 | { return IsNew; } | 182 | { return IsNew; } |
186 | 183 | ||
187 | // return logical name of this instance | ||
188 | QString & nodeName( void ) | ||
189 | { return NodeName; } | ||
190 | void setNodeName( const QString & S ) | ||
191 | { NodeName = S; } | ||
192 | // return description for this instance | 184 | // return description for this instance |
193 | QString & description( void ) | 185 | QString & description( void ) |
194 | { return Description; } | 186 | { return Description; } |
195 | void setDescription( const QString & S ) | 187 | void setDescription( const QString & S ) |
196 | { Description = S; } | 188 | { Description = S; } |
197 | 189 | ||
@@ -222,13 +214,12 @@ protected : | |||
222 | virtual void setSpecificAttribute( QString & , QString & ) = 0; | 214 | virtual void setSpecificAttribute( QString & , QString & ) = 0; |
223 | virtual void saveSpecificAttribute( QTextStream & ) = 0; | 215 | virtual void saveSpecificAttribute( QTextStream & ) = 0; |
224 | 216 | ||
225 | ANetNode * NodeType; | 217 | ANetNode * NodeType; |
226 | // connection to which this node belongs to | 218 | // connection to which this node belongs to |
227 | NodeCollection * Connection; | 219 | NodeCollection * Connection; |
228 | QString NodeName; | ||
229 | QString Description; | 220 | QString Description; |
230 | bool IsModified; | 221 | bool IsModified; |
231 | bool IsNew; | 222 | bool IsNew; |
232 | 223 | ||
233 | static long InstanceCounter; | 224 | static long InstanceCounter; |
234 | }; | 225 | }; |
@@ -253,12 +244,14 @@ public : | |||
253 | { return 0; } | 244 | { return 0; } |
254 | 245 | ||
255 | // does this node handles this interface e.g.eth0 | 246 | // does this node handles this interface e.g.eth0 |
256 | // recurse deeper if this node cannot answer that question | 247 | // recurse deeper if this node cannot answer that question |
257 | virtual bool handlesInterface( const QString & ) | 248 | virtual bool handlesInterface( const QString & ) |
258 | { return 0; } | 249 | { return 0; } |
250 | virtual bool handlesInterface( const InterfaceInfo & ) | ||
251 | { return 0; } | ||
259 | virtual InterfaceInfo * assignedInterface( void ); | 252 | virtual InterfaceInfo * assignedInterface( void ); |
260 | virtual AsDevice * device( void ); | 253 | virtual AsDevice * device( void ); |
261 | 254 | ||
262 | ANetNodeInstance * netNode() | 255 | ANetNodeInstance * netNode() |
263 | { return NNI; } | 256 | { return NNI; } |
264 | NodeCollection * connection() | 257 | NodeCollection * connection() |