summaryrefslogtreecommitdiffstats
path: root/src/compoundwidget.h
blob: f31816ad1caa0d1c39d58f7f5f7587e1dc887ce7 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/***************************************************************************
 *                                                                         *
 *   Copyright (C) 2005, 2006 by Kevin Gilbert                             *
 *   kev.gilbert@cdu.edu.au                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 *                                                                         *
 ***************************************************************************/
#ifndef _COMPOUNDWIDGET_H_
#define _COMPOUNDWIDGET_H_

#ifdef HAVE_CONFIG_H
#	include <config.h>
#endif

#include <ntqwidget.h>
#include "global.h"

//	forward class definitions
//	=========================

class TDEConfig;
class TQCheckBox;
class TQLineEdit;
class TQPushButton;
class TQSpinBox;

//	CompountWidget class definition
//	===============================

class CompoundWidget : public TQWidget
{	Q_OBJECT

	public:
		CompoundWidget( TQWidget* parent, const char* name = NULL );

		void finaliseInitialisation( );
		bool getOptions( bool& needRoot );
		void readProfile( TDEConfig* config );
		void saveProfile( TDEConfig* config );
		void setInitialValues( );

		bool    dataDirState( )        const { return m_dataDirState;        }
		TQString dataDirValue( )        const { return m_dataDirValue;        }
		bool    dataLengthState( )     const { return m_dataLengthState;     }
		int     dataLengthValue( )     const { return m_dataLengthValue;     }
		bool    decoyState( )          const { return m_decoyState;          }
		TQString decoyValue( )          const { return m_decoyValue;          }
		bool    debugLevelState( )     const { return m_debugLevelState;     }
		int     debugLevelValue( )     const { return m_debugLevelValue;     }
		bool    excludeState( )        const { return m_excludeState;        }
		TQString excludeValue( )        const { return m_excludeValue;        }
		bool    excludeFileState( )    const { return m_excludeFileState;    }
		TQString excludeFileValue( )    const { return m_excludeFileValue;    }
		bool    fragmentLevelState( )  const { return m_fragmentLevelState;  }
		int     fragmentLevelValue( )  const { return m_fragmentLevelValue;  }
		bool    interfaceState( )      const { return m_interfaceState;      }
		TQString interfaceValue( )      const { return m_interfaceValue;      }
		bool    maxSocketsState( )     const { return m_maxSocketsState;     }
		int     maxSocketsValue( )     const { return m_maxSocketsValue;     }
		bool    randomIPState( )       const { return m_randomIPState;       }
		int     randomIPValue( )       const { return m_randomIPValue;       }
		bool    sourceIPState( )       const { return m_sourceIPState;       }
		TQString sourceIPValue( )       const { return m_sourceIPValue;       }
		bool    sourcePortState( )     const { return m_sourcePortState;     }
		int     sourcePortValue( )     const { return m_sourcePortValue;     }
		bool    spoofMacState( )       const { return m_spoofMacState;       }
		TQString spoofMacValue( )       const { return m_spoofMacValue;       }
		bool    targetFileState( )     const { return m_targetFileState;     }
		TQString targetFileValue( )     const { return m_targetFileValue;     }
		bool    ttlState( )            const { return m_ttlState;            }
		int     ttlValue( )            const { return m_ttlValue;            }

	signals:
		void displayDocBook( const TQString& );
		void displayHelp( const TQString& );
		void displayUnknown( );
		void optionsDirty( );

	private slots:
		void slotDataDirButtonClicked( );
		void slotDataDirCheckBoxClicked( );
		void slotDataLengthCheckBoxClicked( );
		void slotDebugLevelCheckBoxClicked( );
		void slotDecoyButtonClicked( );
		void slotDecoyCheckBoxClicked( );
		void slotExcludeButtonClicked( );
		void slotExcludeCheckBoxClicked( );
		void slotExcludeFileButtonClicked( );
		void slotExcludeFileCheckBoxClicked( );
		void slotFragmentLevelCheckBoxClicked( );
		void slotInterfaceButtonClicked( );
		void slotInterfaceCheckBoxClicked( );
		void slotMaxSocketsCheckBoxClicked( );
		void slotRandomIPCheckBoxClicked( );
		void slotSourceIPButtonClicked( );
		void slotSourceIPCheckBoxClicked( );
		void slotSourcePortCheckBoxClicked( );
		void slotSpoofMACButtonClicked( );
		void slotSpoofMacCheckBoxClicked( );
		void slotTargetFileButtonClicked( );
		void slotTargetFileCheckBoxClicked( );
		void slotTTLCheckBoxClicked( );
		void slotWhatsThisClicked( );

	private:
		void createLayout( );

		TQPushButton* m_dataDirButton;
		TQCheckBox*   m_dataDirCheckBox;
		TQLineEdit*   m_dataDirLineEdit;
		bool         m_dataDirState;
		TQString      m_dataDirValue;
		TQCheckBox*   m_dataLengthCheckBox;
		TQSpinBox*    m_dataLengthSpinBox;
		bool         m_dataLengthState;
		int          m_dataLengthValue;
		TQPushButton* m_decoyButton;
		TQCheckBox*   m_decoyCheckBox;
		TQLineEdit*   m_decoyLineEdit;
		bool         m_decoyState;
		TQString      m_decoyValue;
		TQCheckBox*   m_debugLevelCheckBox;
		TQSpinBox*    m_debugLevelSpinBox;
		bool         m_debugLevelState;
		int          m_debugLevelValue;
		TQPushButton* m_excludeButton;
		TQCheckBox*   m_excludeCheckBox;
		TQLineEdit*   m_excludeLineEdit;
		bool         m_excludeState;
		TQString      m_excludeValue;
		TQPushButton* m_excludeFileButton;
		TQCheckBox*   m_excludeFileCheckBox;
		TQLineEdit*   m_excludeFileLineEdit;
		bool         m_excludeFileState;
		TQString      m_excludeFileValue;
		TQCheckBox*   m_fragmentLevelCheckBox;
		TQSpinBox*    m_fragmentLevelSpinBox;
		bool         m_fragmentLevelState;
		int          m_fragmentLevelValue;
		TQPushButton* m_interfaceButton;
		TQCheckBox*   m_interfaceCheckBox;
		TQLineEdit*   m_interfaceLineEdit;
		bool         m_interfaceState;
		TQString      m_interfaceValue;
		TQCheckBox*   m_maxSocketsCheckBox;
		TQSpinBox*    m_maxSocketsSpinBox;
		bool         m_maxSocketsState;
		int          m_maxSocketsValue;
		TQCheckBox*   m_randomIPCheckBox;
		TQSpinBox*    m_randomIPSpinBox;
		bool         m_randomIPState;
		int          m_randomIPValue;
		TQPushButton* m_sourceIPButton;
		TQCheckBox*   m_sourceIPCheckBox;
		TQLineEdit*   m_sourceIPLineEdit;
		bool         m_sourceIPState;
		TQString      m_sourceIPValue;
		TQCheckBox*   m_sourcePortCheckBox;
		TQSpinBox*    m_sourcePortSpinBox;
		bool         m_sourcePortState;
		int          m_sourcePortValue;
		TQPushButton* m_spoofMacButton;
		TQCheckBox*   m_spoofMacCheckBox;
		TQLineEdit*   m_spoofMacLineEdit;
		bool         m_spoofMacState;
		TQString      m_spoofMacValue;
		TQPushButton* m_targetFileButton;
		TQCheckBox*   m_targetFileCheckBox;
		TQLineEdit*   m_targetFileLineEdit;
		bool         m_targetFileState;
		TQString      m_targetFileValue;
		TQCheckBox*   m_ttlCheckBox;
		TQSpinBox*    m_ttlSpinBox;
		bool         m_ttlState;
		int          m_ttlValue;
};

#endif	// _COMPOUNDWIDGET_H_