summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings.h
blob: eb475a3f6a0420d910f2152065ef13a9bfcfebe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "networksettingsGUI.h"
#include "resources.h"

class ANetNode;
class ANetNodeInstance;
class QTimer;
class QIconViewItem;

class NetworkSettingsData {

public :

      NetworkSettingsData( void );
      ~NetworkSettingsData( void );

      void loadSettings( void );
      QString saveSettings( void );

      QString generateSettings( bool Force = FALSE );

      bool isModified( void ) 
        { return IsModified; }
      void setModified( bool m ) 
        { IsModified = m; }

      void forceGeneration( bool m ) 
        { Force = m; }

private :

      bool IsModified;
      bool Force;

};

class NetworkSettings : public NetworkSettingsGUI {

      Q_OBJECT

public :

      NetworkSettings( QWidget *parent=0, 
                       const char *name=0, 
                       WFlags fl = 0 );
      ~NetworkSettings( void );

      static QString appName( void ) 
        { return QString::fromLatin1("networksettings"); }

      static void canStart( const char * Interface );
      static bool regenerate( void );

      bool isModified( void ) 
        { return NSD.isModified(); }
      void setModified( bool m ) 
        { NSD.setModified( m ); }

public slots :

      void SLOT_AddNode( void );
      void SLOT_DeleteNode( void );
      void SLOT_ShowNode( QIconViewItem * );
      void SLOT_EditNode( QIconViewItem * );
      void SLOT_CheckState( void );
      void SLOT_Enable( void );
      void SLOT_On( void );
      void SLOT_Connect( void );
      void SLOT_GenerateConfig( void );
      void SLOT_RefreshStates( void );

private :

      void updateProfileState( QIconViewItem * it );
      QTimer * UpdateTimer;
      NetworkSettingsData NSD;

};