Mercurial > projects > qtd
comparison examples/mainwindows/dockwidgets/mainwindow.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 | 7a3c43424dca |
children |
comparison
equal
deleted
inserted
replaced
349:925386e0e780 | 350:31520b2c0b3c |
---|---|
54 import qt.gui.QStatusBar; | 54 import qt.gui.QStatusBar; |
55 import qt.gui.QFont; | 55 import qt.gui.QFont; |
56 import qt.gui.QIcon; | 56 import qt.gui.QIcon; |
57 import qt.core.QDate; | 57 import qt.core.QDate; |
58 | 58 |
59 version(Tango) | 59 import std.string : split; |
60 import tango.text.Util; | |
61 else | |
62 import std.string; | |
63 | 60 |
64 class MainWindow : public QMainWindow | 61 class MainWindow : public QMainWindow |
65 { | 62 { |
66 // Q_OBJECT | 63 // Q_OBJECT |
67 | 64 |
159 | 156 |
160 void slot_insertCustomer(string customer) | 157 void slot_insertCustomer(string customer) |
161 { | 158 { |
162 if (customer == "") | 159 if (customer == "") |
163 return; | 160 return; |
164 | 161 |
165 string[] customerList = customer.split(", "); | 162 string[] customerList = customer.split(", "); |
166 auto document = textEdit.document(); | 163 auto document = textEdit.document(); |
167 QTextCursor cursor = document.find("NAME"); | 164 QTextCursor cursor = document.find("NAME"); |
168 if (!cursor.isNull) { | 165 if (!cursor.isNull) { |
169 cursor.beginEditBlock(); | 166 cursor.beginEditBlock(); |
346 QAction printAct; | 343 QAction printAct; |
347 QAction undoAct; | 344 QAction undoAct; |
348 QAction aboutAct; | 345 QAction aboutAct; |
349 QAction aboutQtAct; | 346 QAction aboutQtAct; |
350 QAction quitAct; | 347 QAction quitAct; |
351 | 348 |
352 mixin Q_OBJECT; | 349 mixin Q_OBJECT; |
353 } | 350 } |