Diffstat (limited to 'noncore/settings/networksettings2/network') (more/less context) (show whitespace changes)
5 files changed, 202 insertions, 8 deletions
diff --git a/noncore/settings/networksettings2/network/networkGUI.ui b/noncore/settings/networksettings2/network/networkGUI.ui index 9115ec0..5f71f82 100644 --- a/noncore/settings/networksettings2/network/networkGUI.ui +++ b/noncore/settings/networksettings2/network/networkGUI.ui | |||
@@ -13,3 +13,3 @@ | |||
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>293</width> | 14 | <width>289</width> |
15 | <height>254</height> | 15 | <height>254</height> |
@@ -40,3 +40,3 @@ | |||
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>TabWidget11</cstring> | 41 | <cstring>MainTab_TAB</cstring> |
42 | </property> | 42 | </property> |
@@ -485,3 +485,3 @@ | |||
485 | <name>name</name> | 485 | <name>name</name> |
486 | <cstring>Tab_TB</cstring> | 486 | <cstring>Tab_TAB</cstring> |
487 | </property> | 487 | </property> |
@@ -1060,3 +1060,128 @@ | |||
1060 | </connection> | 1060 | </connection> |
1061 | <connection> | ||
1062 | <sender>AddPreUp_TB</sender> | ||
1063 | <signal>clicked()</signal> | ||
1064 | <receiver>NetworkGUI</receiver> | ||
1065 | <slot>SLOT_Add()</slot> | ||
1066 | </connection> | ||
1067 | <connection> | ||
1068 | <sender>DeletePreUp_TB</sender> | ||
1069 | <signal>clicked()</signal> | ||
1070 | <receiver>NetworkGUI</receiver> | ||
1071 | <slot>SLOT_Remove()</slot> | ||
1072 | </connection> | ||
1073 | <connection> | ||
1074 | <sender>UpPreUp_TB</sender> | ||
1075 | <signal>clicked()</signal> | ||
1076 | <receiver>NetworkGUI</receiver> | ||
1077 | <slot>SLOT_Up()</slot> | ||
1078 | </connection> | ||
1079 | <connection> | ||
1080 | <sender>DownPreUp_TB</sender> | ||
1081 | <signal>clicked()</signal> | ||
1082 | <receiver>NetworkGUI</receiver> | ||
1083 | <slot>SLOT_Down()</slot> | ||
1084 | </connection> | ||
1085 | <connection> | ||
1086 | <sender>AddPostUp_TB</sender> | ||
1087 | <signal>clicked()</signal> | ||
1088 | <receiver>NetworkGUI</receiver> | ||
1089 | <slot>SLOT_Add()</slot> | ||
1090 | </connection> | ||
1091 | <connection> | ||
1092 | <sender>DeletePostUp_TB</sender> | ||
1093 | <signal>clicked()</signal> | ||
1094 | <receiver>NetworkGUI</receiver> | ||
1095 | <slot>SLOT_Remove()</slot> | ||
1096 | </connection> | ||
1097 | <connection> | ||
1098 | <sender>UpPostUp_TB</sender> | ||
1099 | <signal>clicked()</signal> | ||
1100 | <receiver>NetworkGUI</receiver> | ||
1101 | <slot>SLOT_Up()</slot> | ||
1102 | </connection> | ||
1103 | <connection> | ||
1104 | <sender>DownPostUp_TB</sender> | ||
1105 | <signal>clicked()</signal> | ||
1106 | <receiver>NetworkGUI</receiver> | ||
1107 | <slot>SLOT_Down()</slot> | ||
1108 | </connection> | ||
1109 | <connection> | ||
1110 | <sender>AddPreDown_TB</sender> | ||
1111 | <signal>clicked()</signal> | ||
1112 | <receiver>NetworkGUI</receiver> | ||
1113 | <slot>SLOT_Add()</slot> | ||
1114 | </connection> | ||
1115 | <connection> | ||
1116 | <sender>DeletePreDown_TB</sender> | ||
1117 | <signal>clicked()</signal> | ||
1118 | <receiver>NetworkGUI</receiver> | ||
1119 | <slot>SLOT_Remove()</slot> | ||
1120 | </connection> | ||
1121 | <connection> | ||
1122 | <sender>UpPreDown_TB</sender> | ||
1123 | <signal>clicked()</signal> | ||
1124 | <receiver>NetworkGUI</receiver> | ||
1125 | <slot>SLOT_Up()</slot> | ||
1126 | </connection> | ||
1127 | <connection> | ||
1128 | <sender>DownPreDown_TB</sender> | ||
1129 | <signal>clicked()</signal> | ||
1130 | <receiver>NetworkGUI</receiver> | ||
1131 | <slot>SLOT_Down()</slot> | ||
1132 | </connection> | ||
1133 | <connection> | ||
1134 | <sender>AddPostDown_TB</sender> | ||
1135 | <signal>clicked()</signal> | ||
1136 | <receiver>NetworkGUI</receiver> | ||
1137 | <slot>SLOT_Add()</slot> | ||
1138 | </connection> | ||
1139 | <connection> | ||
1140 | <sender>DeletePostDown_TB</sender> | ||
1141 | <signal>clicked()</signal> | ||
1142 | <receiver>NetworkGUI</receiver> | ||
1143 | <slot>SLOT_Remove()</slot> | ||
1144 | </connection> | ||
1145 | <connection> | ||
1146 | <sender>UpPostDown_TB</sender> | ||
1147 | <signal>clicked()</signal> | ||
1148 | <receiver>NetworkGUI</receiver> | ||
1149 | <slot>SLOT_Up()</slot> | ||
1150 | </connection> | ||
1151 | <connection> | ||
1152 | <sender>DownPostDown_TB</sender> | ||
1153 | <signal>clicked()</signal> | ||
1154 | <receiver>NetworkGUI</receiver> | ||
1155 | <slot>SLOT_Down()</slot> | ||
1156 | </connection> | ||
1157 | <connection> | ||
1158 | <sender>PreUp_LB</sender> | ||
1159 | <signal>doubleClicked(QListBoxItem*)</signal> | ||
1160 | <receiver>NetworkGUI</receiver> | ||
1161 | <slot>SLOT_ShowCommand( QListBoxItem *)</slot> | ||
1162 | </connection> | ||
1163 | <connection> | ||
1164 | <sender>PreDown_LB</sender> | ||
1165 | <signal>doubleClicked(QListBoxItem*)</signal> | ||
1166 | <receiver>NetworkGUI</receiver> | ||
1167 | <slot>SLOT_ShowCommand( QListBoxItem *)</slot> | ||
1168 | </connection> | ||
1169 | <connection> | ||
1170 | <sender>PostDown_LB</sender> | ||
1171 | <signal>doubleClicked(QListBoxItem*)</signal> | ||
1172 | <receiver>NetworkGUI</receiver> | ||
1173 | <slot>SLOT_ShowCommand( QListBoxItem *)</slot> | ||
1174 | </connection> | ||
1175 | <connection> | ||
1176 | <sender>PostUp_LB</sender> | ||
1177 | <signal>doubleClicked(QListBoxItem*)</signal> | ||
1178 | <receiver>NetworkGUI</receiver> | ||
1179 | <slot>SLOT_ShowCommand( QListBoxItem *)</slot> | ||
1180 | </connection> | ||
1181 | <slot access="public">SLOT_Add()</slot> | ||
1182 | <slot access="public">SLOT_Down()</slot> | ||
1061 | <slot access="public">SLOT_NetmaskModified( const QString & )</slot> | 1183 | <slot access="public">SLOT_NetmaskModified( const QString & )</slot> |
1184 | <slot access="public">SLOT_Remove()</slot> | ||
1185 | <slot access="public">SLOT_Up()</slot> | ||
1186 | <slot access="public">SLOT_ShowCommand( QListBoxItem *)</slot> | ||
1062 | </connections> | 1187 | </connections> |
diff --git a/noncore/settings/networksettings2/network/network_NN.cpp b/noncore/settings/networksettings2/network/network_NN.cpp index d27d54a..b5989df 100644 --- a/noncore/settings/networksettings2/network/network_NN.cpp +++ b/noncore/settings/networksettings2/network/network_NN.cpp | |||
@@ -11,3 +11,3 @@ static const char * NetworkNeeds[] = | |||
11 | */ | 11 | */ |
12 | NetworkNetNode::NetworkNetNode() : ANetNode() { | 12 | NetworkNetNode::NetworkNetNode() : ANetNode(tr("IP Configuration")) { |
13 | } | 13 | } |
diff --git a/noncore/settings/networksettings2/network/network_NN.h b/noncore/settings/networksettings2/network/network_NN.h index 0f87e1b..6548c32 100644 --- a/noncore/settings/networksettings2/network/network_NN.h +++ b/noncore/settings/networksettings2/network/network_NN.h | |||
@@ -19,5 +19,2 @@ public: | |||
19 | 19 | ||
20 | virtual const QString nodeName() | ||
21 | { return tr("IP Configuration"); } | ||
22 | |||
23 | virtual const QString nodeDescription() ; | 20 | virtual const QString nodeDescription() ; |
diff --git a/noncore/settings/networksettings2/network/networkedit.cpp b/noncore/settings/networksettings2/network/networkedit.cpp index 182213b..05110d9 100644 --- a/noncore/settings/networksettings2/network/networkedit.cpp +++ b/noncore/settings/networksettings2/network/networkedit.cpp | |||
@@ -2,2 +2,3 @@ | |||
2 | #include <qcheckbox.h> | 2 | #include <qcheckbox.h> |
3 | #include <qtabwidget.h> | ||
3 | #include <qlineedit.h> | 4 | #include <qlineedit.h> |
@@ -112,3 +113,9 @@ bool NetworkEdit::updateList( QStringList & SL, QListBox * LB ) { | |||
112 | 113 | ||
113 | // check if at least ONE item in new list is NEW | 114 | if( NewSL.count() != SL.count() ) { |
115 | // less or more items | ||
116 | SL= NewSL; | ||
117 | return 1; | ||
118 | } | ||
119 | |||
120 | // Same size -> same content ? | ||
114 | Changed = 0; | 121 | Changed = 0; |
@@ -160 +167,58 @@ void NetworkEdit::SLOT_NetmaskModified( const QString & ) { | |||
160 | } | 167 | } |
168 | |||
169 | QListBox * NetworkEdit::getActiveLB( void ) { | ||
170 | switch( Tab_TAB->currentPageIndex() ) { | ||
171 | case 0 : | ||
172 | return PreUp_LB; | ||
173 | case 1 : | ||
174 | return PostUp_LB; | ||
175 | case 2 : | ||
176 | return PreDown_LB; | ||
177 | } | ||
178 | return PostDown_LB; | ||
179 | } | ||
180 | |||
181 | void NetworkEdit::SLOT_Add( void ) { | ||
182 | if( Command_LE->text().isEmpty() ) | ||
183 | return; | ||
184 | QListBox * LB = getActiveLB(); | ||
185 | |||
186 | LB->insertItem( Command_LE->text() ); | ||
187 | } | ||
188 | |||
189 | void NetworkEdit::SLOT_Remove( void ) { | ||
190 | QListBox * LB = getActiveLB(); | ||
191 | int i; | ||
192 | |||
193 | if( ( i = LB->currentItem() ) >= 0 ) { | ||
194 | LB->removeItem( i ); | ||
195 | } | ||
196 | } | ||
197 | |||
198 | void NetworkEdit::SLOT_Up( void ) { | ||
199 | QListBox * LB = getActiveLB(); | ||
200 | int i; | ||
201 | |||
202 | if( ( i = LB->currentItem() ) > 0 ) { | ||
203 | QListBoxItem * LBI = LB->item(i); | ||
204 | LB->takeItem( LBI ); | ||
205 | LB->insertItem( LBI, --i ); | ||
206 | LB->setCurrentItem( i ); | ||
207 | } | ||
208 | } | ||
209 | |||
210 | void NetworkEdit::SLOT_Down( void ) { | ||
211 | QListBox * LB = getActiveLB(); | ||
212 | int i; | ||
213 | |||
214 | if( ( i = LB->currentItem() ) >= 0 && (unsigned)(i+1) != LB->count() ) { | ||
215 | QListBoxItem * LBI = LB->item(i); | ||
216 | LB->takeItem( LBI ); | ||
217 | LB->insertItem( LBI, ++i ); | ||
218 | LB->setCurrentItem( i ); | ||
219 | } | ||
220 | } | ||
221 | |||
222 | void NetworkEdit::SLOT_ShowCommand( QListBoxItem * It ) { | ||
223 | Command_LE->setText( It->text() ); | ||
224 | } | ||
diff --git a/noncore/settings/networksettings2/network/networkedit.h b/noncore/settings/networksettings2/network/networkedit.h index 9ed4e84..adc20e0 100644 --- a/noncore/settings/networksettings2/network/networkedit.h +++ b/noncore/settings/networksettings2/network/networkedit.h | |||
@@ -3,2 +3,4 @@ | |||
3 | 3 | ||
4 | class QListBox; | ||
5 | |||
4 | class NetworkEdit : public NetworkGUI { | 6 | class NetworkEdit : public NetworkGUI { |
@@ -15,2 +17,7 @@ public slots : | |||
15 | void SLOT_NetmaskModified( const QString & S ); | 17 | void SLOT_NetmaskModified( const QString & S ); |
18 | void SLOT_ShowCommand( QListBoxItem * LBI ); | ||
19 | void SLOT_Add( void ); | ||
20 | void SLOT_Remove( void ); | ||
21 | void SLOT_Up( void ); | ||
22 | void SLOT_Down( void ); | ||
16 | 23 | ||
@@ -18,2 +25,3 @@ private : | |||
18 | 25 | ||
26 | QListBox * getActiveLB( void ); | ||
19 | bool updateList( QStringList &SL, QListBox * LB ); | 27 | bool updateList( QStringList &SL, QListBox * LB ); |