Mercurial > projects > qtd
diff examples/dialogs/standarddialogs/dialog.d @ 350:31520b2c0b3c
Removed dependency on parent trait and stringof
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Thu, 20 May 2010 15:49:08 +0300 |
parents | 4e31cbd9e20c |
children |
line wrap: on
line diff
--- a/examples/dialogs/standarddialogs/dialog.d Mon May 17 21:48:15 2010 +0300 +++ b/examples/dialogs/standarddialogs/dialog.d Thu May 20 15:49:08 2010 +0300 @@ -40,7 +40,6 @@ ****************************************************************************/ module dialog; - import qt.gui.QDialog; import qt.gui.QCheckBox; import qt.gui.QLabel; @@ -55,8 +54,7 @@ import qt.gui.QFileDialog; import qt.core.QFile; -import std.string; - +import std.string : format, join; string MESSAGE = tr("<p>Message boxes have a caption, a text, " "and any number of buttons, each with standard or custom texts." @@ -154,7 +152,7 @@ native = new QCheckBox(this); native.setText("Use native file dialog."); native.setChecked(true); - + version(windows) {} else { version(mac) {} else @@ -209,7 +207,7 @@ bool ok; int i = QInputDialog.getInt(this, tr("QInputgetInteger()"), tr("Percentage:"), 25, 0, 100, 1, ok); if (ok) - integerLabel.setText(format("%d", i)); + integerLabel.setText(format("%d", i)); } void slot_setDouble() @@ -218,7 +216,7 @@ double d = QInputDialog.getDouble(this, tr("QInputgetDouble()"), tr("Amount:"), 37.56, -10000, 10000, 2, ok); if (ok) - doubleLabel.setText(format("%g", d)); + doubleLabel.setText(format("%g", d)); } void slot_setItem() @@ -407,6 +405,6 @@ QErrorMessage errorMessageDialog; string openFilesPath; - + mixin Q_OBJECT; }