Mercurial > projects > qtd
comparison examples/dialogs/standarddialogs/dialog.d @ 339:4e31cbd9e20c
fix enumeration problems. requires patched dmd
author | Eldar Insafutdinov |
---|---|
date | Sun, 09 May 2010 00:52:49 +0100 |
parents | 7a3c43424dca |
children | 31520b2c0b3c |
comparison
equal
deleted
inserted
replaced
338:e65f08f6262b | 339:4e31cbd9e20c |
---|---|
234 | 234 |
235 void slot_setText() | 235 void slot_setText() |
236 { | 236 { |
237 bool ok; | 237 bool ok; |
238 string text = QInputDialog.getText(this, tr("QInputgetText()"), | 238 string text = QInputDialog.getText(this, tr("QInputgetText()"), |
239 tr("User name:"), QLineEdit_EchoMode.Normal, | 239 tr("User name:"), QLineEdit.EchoMode.Normal, |
240 QDir.home().dirName(), ok); | 240 QDir.home().dirName(), ok); |
241 if (ok && text.length) | 241 if (ok && text.length) |
242 textLabel.setText(text); | 242 textLabel.setText(text); |
243 } | 243 } |
244 | 244 |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 void slot_setExistingDirectory() | 265 void slot_setExistingDirectory() |
266 { | 266 { |
267 int options = QFileDialog_Option.DontResolveSymlinks | QFileDialog_Option.ShowDirsOnly; | 267 int options = QFileDialog.Option.DontResolveSymlinks | QFileDialog.Option.ShowDirsOnly; |
268 if (!native.isChecked()) | 268 if (!native.isChecked()) |
269 options |= QFileDialog_Option.DontUseNativeDialog; | 269 options |= QFileDialog.Option.DontUseNativeDialog; |
270 string directory = QFileDialog.getExistingDirectory(this, | 270 string directory = QFileDialog.getExistingDirectory(this, |
271 tr("QFilegetExistingDirectory()"), | 271 tr("QFilegetExistingDirectory()"), |
272 directoryLabel.text(), | 272 directoryLabel.text(), |
273 options); | 273 options); |
274 if (directory.length) | 274 if (directory.length) |
277 | 277 |
278 void slot_setOpenFileName() | 278 void slot_setOpenFileName() |
279 { | 279 { |
280 int options; | 280 int options; |
281 if (!native.isChecked()) | 281 if (!native.isChecked()) |
282 options |= QFileDialog_Option.DontUseNativeDialog; | 282 options |= QFileDialog.Option.DontUseNativeDialog; |
283 string selectedFilter; | 283 string selectedFilter; |
284 string fileName = QFileDialog.getOpenFileName(this, | 284 string fileName = QFileDialog.getOpenFileName(this, |
285 tr("QFilegetOpenFileName()"), | 285 tr("QFilegetOpenFileName()"), |
286 openFileNameLabel.text(), | 286 openFileNameLabel.text(), |
287 tr("All Files (*);;Text Files (*.txt)"), | 287 tr("All Files (*);;Text Files (*.txt)"), |
293 | 293 |
294 void slot_setOpenFileNames() | 294 void slot_setOpenFileNames() |
295 { | 295 { |
296 int options; | 296 int options; |
297 if (!native.isChecked()) | 297 if (!native.isChecked()) |
298 options |= QFileDialog_Option.DontUseNativeDialog; | 298 options |= QFileDialog.Option.DontUseNativeDialog; |
299 string selectedFilter; | 299 string selectedFilter; |
300 auto files = QFileDialog.getOpenFileNames( | 300 auto files = QFileDialog.getOpenFileNames( |
301 this, tr("QFilegetOpenFileNames()"), | 301 this, tr("QFilegetOpenFileNames()"), |
302 openFilesPath, | 302 openFilesPath, |
303 tr("All Files (*);;Text Files (*.txt)"), | 303 tr("All Files (*);;Text Files (*.txt)"), |
311 | 311 |
312 void slot_setSaveFileName() | 312 void slot_setSaveFileName() |
313 { | 313 { |
314 int options; | 314 int options; |
315 if (!native.isChecked()) | 315 if (!native.isChecked()) |
316 options |= QFileDialog_Option.DontUseNativeDialog; | 316 options |= QFileDialog.Option.DontUseNativeDialog; |
317 string selectedFilter; | 317 string selectedFilter; |
318 string fileName = QFileDialog.getSaveFileName(this, | 318 string fileName = QFileDialog.getSaveFileName(this, |
319 tr("QFilegetSaveFileName()"), | 319 tr("QFilegetSaveFileName()"), |
320 saveFileNameLabel.text(), | 320 saveFileNameLabel.text(), |
321 tr("All Files (*);;Text Files (*.txt)"), | 321 tr("All Files (*);;Text Files (*.txt)"), |