Changeset View
Changeset View
Standalone View
Standalone View
krusader/Dialogs/packguibase.cpp
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 67 | { | |||
---|---|---|---|---|---|
102 | hbox_2->addWidget(TextLabel5); | 102 | hbox_2->addWidget(TextLabel5); | ||
103 | 103 | | |||
104 | dirData = new QLineEdit(this); | 104 | dirData = new QLineEdit(this); | ||
105 | hbox_2->addWidget(dirData); | 105 | hbox_2->addWidget(dirData); | ||
106 | 106 | | |||
107 | browseButton = new QToolButton(this); | 107 | browseButton = new QToolButton(this); | ||
108 | browseButton->setIcon(Icon("document-open")); | 108 | browseButton->setIcon(Icon("document-open")); | ||
109 | hbox_2->addWidget(browseButton); | 109 | hbox_2->addWidget(browseButton); | ||
110 | QSpacerItem* spacer = new QSpacerItem(48, 20, QSizePolicy::Fixed, QSizePolicy::Fixed); | 110 | auto* spacer = new QSpacerItem(48, 20, QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
111 | hbox_2->addItem(spacer); | 111 | hbox_2->addItem(spacer); | ||
112 | 112 | | |||
113 | grid->addLayout(hbox_2, 2, 0); | 113 | grid->addLayout(hbox_2, 2, 0); | ||
114 | 114 | | |||
115 | hbox_3 = new QHBoxLayout; | 115 | hbox_3 = new QHBoxLayout; | ||
116 | hbox_3->setSpacing(6); | 116 | hbox_3->setSpacing(6); | ||
117 | hbox_3->setContentsMargins(0, 0, 0, 0); | 117 | hbox_3->setContentsMargins(0, 0, 0, 0); | ||
118 | 118 | | |||
Show All 9 Lines | |||||
128 | 128 | | |||
129 | grid->addLayout(hbox_3, 0, 0); | 129 | grid->addLayout(hbox_3, 0, 0); | ||
130 | 130 | | |||
131 | 131 | | |||
132 | hbox_4 = new QHBoxLayout; | 132 | hbox_4 = new QHBoxLayout; | ||
133 | hbox_4->setSpacing(6); | 133 | hbox_4->setSpacing(6); | ||
134 | hbox_4->setContentsMargins(0, 0, 0, 0); | 134 | hbox_4->setContentsMargins(0, 0, 0, 0); | ||
135 | 135 | | |||
136 | QSpacerItem* spacer_3 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Expanding); | 136 | auto* spacer_3 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Expanding); | ||
137 | hbox_4->addItem(spacer_3); | 137 | hbox_4->addItem(spacer_3); | ||
138 | grid->addLayout(hbox_4, 3, 0); | 138 | grid->addLayout(hbox_4, 3, 0); | ||
139 | 139 | | |||
140 | advancedWidget = new QWidget(this); | 140 | advancedWidget = new QWidget(this); | ||
141 | 141 | | |||
142 | hbox_5 = new QGridLayout(advancedWidget); | 142 | hbox_5 = new QGridLayout(advancedWidget); | ||
143 | hbox_5->setSpacing(6); | 143 | hbox_5->setSpacing(6); | ||
144 | hbox_5->setContentsMargins(0, 0, 0, 0); | 144 | hbox_5->setContentsMargins(0, 0, 0, 0); | ||
145 | 145 | | |||
146 | 146 | | |||
147 | QVBoxLayout *compressLayout = new QVBoxLayout; | 147 | auto *compressLayout = new QVBoxLayout; | ||
148 | compressLayout->setSpacing(6); | 148 | compressLayout->setSpacing(6); | ||
149 | compressLayout->setContentsMargins(0, 0, 0, 0); | 149 | compressLayout->setContentsMargins(0, 0, 0, 0); | ||
150 | 150 | | |||
151 | multipleVolume = new QCheckBox(i18n("Multiple volume archive"), advancedWidget); | 151 | multipleVolume = new QCheckBox(i18n("Multiple volume archive"), advancedWidget); | ||
152 | connect(multipleVolume, SIGNAL(toggled(bool)), this, SLOT(checkConsistency())); | 152 | connect(multipleVolume, SIGNAL(toggled(bool)), this, SLOT(checkConsistency())); | ||
153 | compressLayout->addWidget(multipleVolume, 0, 0); | 153 | compressLayout->addWidget(multipleVolume, 0, nullptr); | ||
154 | 154 | | |||
155 | QHBoxLayout * volumeHbox = new QHBoxLayout; | 155 | auto * volumeHbox = new QHBoxLayout; | ||
156 | 156 | | |||
157 | QSpacerItem* spacer_5 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed); | 157 | auto* spacer_5 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
158 | volumeHbox->addItem(spacer_5); | 158 | volumeHbox->addItem(spacer_5); | ||
159 | 159 | | |||
160 | TextLabel7 = new QLabel(i18n("Size:"), advancedWidget); | 160 | TextLabel7 = new QLabel(i18n("Size:"), advancedWidget); | ||
161 | volumeHbox->addWidget(TextLabel7); | 161 | volumeHbox->addWidget(TextLabel7); | ||
162 | 162 | | |||
163 | volumeSpinBox = new QSpinBox(advancedWidget); | 163 | volumeSpinBox = new QSpinBox(advancedWidget); | ||
164 | volumeSpinBox->setMinimum(1); | 164 | volumeSpinBox->setMinimum(1); | ||
165 | volumeSpinBox->setMaximum(9999); | 165 | volumeSpinBox->setMaximum(9999); | ||
Show All 9 Lines | |||||
175 | 175 | | |||
176 | compressLayout->addLayout(volumeHbox); | 176 | compressLayout->addLayout(volumeHbox); | ||
177 | 177 | | |||
178 | int level = group.readEntry("Compression level", _defaultCompressionLevel); | 178 | int level = group.readEntry("Compression level", _defaultCompressionLevel); | ||
179 | setCompressionLevel = new QCheckBox(i18n("Set compression level"), advancedWidget); | 179 | setCompressionLevel = new QCheckBox(i18n("Set compression level"), advancedWidget); | ||
180 | if (level != _defaultCompressionLevel) | 180 | if (level != _defaultCompressionLevel) | ||
181 | setCompressionLevel->setChecked(true); | 181 | setCompressionLevel->setChecked(true); | ||
182 | connect(setCompressionLevel, SIGNAL(toggled(bool)), this, SLOT(checkConsistency())); | 182 | connect(setCompressionLevel, SIGNAL(toggled(bool)), this, SLOT(checkConsistency())); | ||
183 | compressLayout->addWidget(setCompressionLevel, 0, 0); | 183 | compressLayout->addWidget(setCompressionLevel, 0, nullptr); | ||
184 | 184 | | |||
185 | QHBoxLayout * sliderHbox = new QHBoxLayout; | 185 | auto * sliderHbox = new QHBoxLayout; | ||
186 | 186 | | |||
187 | QSpacerItem* spacer_6 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed); | 187 | auto* spacer_6 = new QSpacerItem(20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
188 | sliderHbox->addItem(spacer_6); | 188 | sliderHbox->addItem(spacer_6); | ||
189 | 189 | | |||
190 | QWidget * sliderVBoxWidget = new QWidget(advancedWidget); | 190 | QWidget * sliderVBoxWidget = new QWidget(advancedWidget); | ||
191 | QVBoxLayout *sliderVBox = new QVBoxLayout(sliderVBoxWidget); | 191 | auto *sliderVBox = new QVBoxLayout(sliderVBoxWidget); | ||
192 | 192 | | |||
193 | compressionSlider = new QSlider(Qt::Horizontal, sliderVBoxWidget); | 193 | compressionSlider = new QSlider(Qt::Horizontal, sliderVBoxWidget); | ||
194 | compressionSlider->setMinimum(1); | 194 | compressionSlider->setMinimum(1); | ||
195 | compressionSlider->setMaximum(9); | 195 | compressionSlider->setMaximum(9); | ||
196 | compressionSlider->setPageStep(1); | 196 | compressionSlider->setPageStep(1); | ||
197 | compressionSlider->setValue(level); | 197 | compressionSlider->setValue(level); | ||
198 | compressionSlider->setTickPosition(QSlider::TicksBelow); | 198 | compressionSlider->setTickPosition(QSlider::TicksBelow); | ||
199 | sliderVBox->addWidget(compressionSlider); | 199 | sliderVBox->addWidget(compressionSlider); | ||
200 | 200 | | |||
201 | QWidget * minmaxWidget = new QWidget(sliderVBoxWidget); | 201 | QWidget * minmaxWidget = new QWidget(sliderVBoxWidget); | ||
202 | sliderVBox->addWidget(minmaxWidget); | 202 | sliderVBox->addWidget(minmaxWidget); | ||
203 | 203 | | |||
204 | QHBoxLayout * minmaxHbox = new QHBoxLayout(minmaxWidget); | 204 | auto * minmaxHbox = new QHBoxLayout(minmaxWidget); | ||
205 | 205 | | |||
206 | minLabel = new QLabel(i18n("MIN"), minmaxWidget); | 206 | minLabel = new QLabel(i18n("MIN"), minmaxWidget); | ||
207 | maxLabel = new QLabel(i18n("MAX"), minmaxWidget); | 207 | maxLabel = new QLabel(i18n("MAX"), minmaxWidget); | ||
208 | maxLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | 208 | maxLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
209 | 209 | | |||
210 | minmaxHbox->addWidget(minLabel); | 210 | minmaxHbox->addWidget(minLabel); | ||
211 | minmaxHbox->addWidget(maxLabel); | 211 | minmaxHbox->addWidget(maxLabel); | ||
212 | 212 | | |||
213 | sliderHbox->addWidget(sliderVBoxWidget); | 213 | sliderHbox->addWidget(sliderVBoxWidget); | ||
214 | 214 | | |||
215 | compressLayout->addLayout(sliderHbox); | 215 | compressLayout->addLayout(sliderHbox); | ||
216 | 216 | | |||
217 | compressLayout->addStretch(0); | 217 | compressLayout->addStretch(0); | ||
218 | hbox_5->addLayout(compressLayout, 0, 0); | 218 | hbox_5->addLayout(compressLayout, 0, 0); | ||
219 | 219 | | |||
220 | QFrame *vline = new QFrame(advancedWidget); | 220 | QFrame *vline = new QFrame(advancedWidget); | ||
221 | vline->setFrameStyle(QFrame::VLine | QFrame::Sunken); | 221 | vline->setFrameStyle(QFrame::VLine | QFrame::Sunken); | ||
222 | vline->setMinimumWidth(20); | 222 | vline->setMinimumWidth(20); | ||
223 | hbox_5->addWidget(vline, 0, 1); | 223 | hbox_5->addWidget(vline, 0, 1); | ||
224 | 224 | | |||
225 | 225 | | |||
226 | QGridLayout * passwordGrid = new QGridLayout; | 226 | auto * passwordGrid = new QGridLayout; | ||
227 | passwordGrid->setSpacing(6); | 227 | passwordGrid->setSpacing(6); | ||
228 | passwordGrid->setContentsMargins(0, 0, 0, 0); | 228 | passwordGrid->setContentsMargins(0, 0, 0, 0); | ||
229 | 229 | | |||
230 | TextLabel4 = new QLabel(advancedWidget); | 230 | TextLabel4 = new QLabel(advancedWidget); | ||
231 | TextLabel4->setText(i18n("Password")); | 231 | TextLabel4->setText(i18n("Password")); | ||
232 | passwordGrid->addWidget(TextLabel4, 0, 0); | 232 | passwordGrid->addWidget(TextLabel4, 0, 0); | ||
233 | 233 | | |||
234 | password = new QLineEdit(advancedWidget); | 234 | password = new QLineEdit(advancedWidget); | ||
235 | password->setEchoMode(QLineEdit::Password); | 235 | password->setEchoMode(QLineEdit::Password); | ||
236 | connect(password, SIGNAL(textChanged(QString)), this, SLOT(checkConsistency())); | 236 | connect(password, SIGNAL(textChanged(QString)), this, SLOT(checkConsistency())); | ||
237 | 237 | | |||
238 | passwordGrid->addWidget(password, 0, 1); | 238 | passwordGrid->addWidget(password, 0, 1); | ||
239 | 239 | | |||
240 | TextLabel6 = new QLabel(advancedWidget); | 240 | TextLabel6 = new QLabel(advancedWidget); | ||
241 | TextLabel6->setText(i18n("Again")); | 241 | TextLabel6->setText(i18n("Again")); | ||
242 | passwordGrid->addWidget(TextLabel6, 1, 0); | 242 | passwordGrid->addWidget(TextLabel6, 1, 0); | ||
243 | 243 | | |||
244 | passwordAgain = new QLineEdit(advancedWidget); | 244 | passwordAgain = new QLineEdit(advancedWidget); | ||
245 | passwordAgain->setEchoMode(QLineEdit::Password); | 245 | passwordAgain->setEchoMode(QLineEdit::Password); | ||
246 | connect(passwordAgain, SIGNAL(textChanged(QString)), this, SLOT(checkConsistency())); | 246 | connect(passwordAgain, SIGNAL(textChanged(QString)), this, SLOT(checkConsistency())); | ||
247 | 247 | | |||
248 | passwordGrid->addWidget(passwordAgain, 1, 1); | 248 | passwordGrid->addWidget(passwordAgain, 1, 1); | ||
249 | 249 | | |||
250 | QHBoxLayout *consistencyHbox = new QHBoxLayout; | 250 | auto *consistencyHbox = new QHBoxLayout; | ||
251 | 251 | | |||
252 | QSpacerItem* spacer_cons = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Fixed); | 252 | auto* spacer_cons = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
253 | consistencyHbox->addItem(spacer_cons); | 253 | consistencyHbox->addItem(spacer_cons); | ||
254 | 254 | | |||
255 | passwordConsistencyLabel = new QLabel(advancedWidget); | 255 | passwordConsistencyLabel = new QLabel(advancedWidget); | ||
256 | consistencyHbox->addWidget(passwordConsistencyLabel); | 256 | consistencyHbox->addWidget(passwordConsistencyLabel); | ||
257 | passwordGrid->addLayout(consistencyHbox, 2, 0, 1, 2); | 257 | passwordGrid->addLayout(consistencyHbox, 2, 0, 1, 2); | ||
258 | 258 | | |||
259 | encryptHeaders = new QCheckBox(i18n("Encrypt headers"), advancedWidget); | 259 | encryptHeaders = new QCheckBox(i18n("Encrypt headers"), advancedWidget); | ||
260 | passwordGrid->addWidget(encryptHeaders, 3, 0, 1, 2); | 260 | passwordGrid->addWidget(encryptHeaders, 3, 0, 1, 2); | ||
261 | 261 | | |||
262 | QSpacerItem* spacer_psw = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Expanding); | 262 | auto* spacer_psw = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Expanding); | ||
263 | passwordGrid->addItem(spacer_psw, 4, 0); | 263 | passwordGrid->addItem(spacer_psw, 4, 0); | ||
264 | 264 | | |||
265 | hbox_5->addLayout(passwordGrid, 0, 2); | 265 | hbox_5->addLayout(passwordGrid, 0, 2); | ||
266 | 266 | | |||
267 | hbox_7 = new QHBoxLayout; | 267 | hbox_7 = new QHBoxLayout; | ||
268 | hbox_7->setSpacing(6); | 268 | hbox_7->setSpacing(6); | ||
269 | hbox_7->setContentsMargins(0, 0, 0, 0); | 269 | hbox_7->setContentsMargins(0, 0, 0, 0); | ||
270 | 270 | | |||
Show All 22 Lines | |||||
293 | hbox_6 = new QHBoxLayout; | 293 | hbox_6 = new QHBoxLayout; | ||
294 | hbox_6->setSpacing(6); | 294 | hbox_6->setSpacing(6); | ||
295 | hbox_6->setContentsMargins(0, 0, 0, 0); | 295 | hbox_6->setContentsMargins(0, 0, 0, 0); | ||
296 | 296 | | |||
297 | advancedButton = new QPushButton(this); | 297 | advancedButton = new QPushButton(this); | ||
298 | advancedButton->setText(i18n("&Advanced >>")); | 298 | advancedButton->setText(i18n("&Advanced >>")); | ||
299 | hbox_6->addWidget(advancedButton); | 299 | hbox_6->addWidget(advancedButton); | ||
300 | 300 | | |||
301 | QSpacerItem* spacer_2 = new QSpacerItem(140, 20, QSizePolicy::Expanding, QSizePolicy::Fixed); | 301 | auto* spacer_2 = new QSpacerItem(140, 20, QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
302 | hbox_6->addItem(spacer_2); | 302 | hbox_6->addItem(spacer_2); | ||
303 | 303 | | |||
304 | okButton = new QPushButton(this); | 304 | okButton = new QPushButton(this); | ||
305 | KStandardGuiItem::assign(okButton, KStandardGuiItem::Ok); | 305 | KStandardGuiItem::assign(okButton, KStandardGuiItem::Ok); | ||
306 | okButton->setDefault(true); | 306 | okButton->setDefault(true); | ||
307 | hbox_6->addWidget(okButton); | 307 | hbox_6->addWidget(okButton); | ||
308 | 308 | | |||
309 | cancelButton = new QPushButton(this); | 309 | cancelButton = new QPushButton(this); | ||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |