Mercurial > projects > qtd
comparison examples/draganddrop/dropsite/dropsitewindow.d @ 374:681af90e1d53
Removed debug writelns. Fixed build script.
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Thu, 08 Jul 2010 22:21:56 +0300 |
parents | a032df77b6ab |
children |
comparison
equal
deleted
inserted
replaced
373:1f189d0ceab4 | 374:681af90e1d53 |
---|---|
49 import qt.gui.QPushButton; | 49 import qt.gui.QPushButton; |
50 import qt.gui.QVBoxLayout; | 50 import qt.gui.QVBoxLayout; |
51 import qt.gui.QDialogButtonBox; | 51 import qt.gui.QDialogButtonBox; |
52 | 52 |
53 import droparea; | 53 import droparea; |
54 | |
55 | |
56 import std.stdio; //TODO: remove | |
57 | |
58 | 54 |
59 class DropSiteWindow : public QWidget | 55 class DropSiteWindow : public QWidget |
60 { | 56 { |
61 public: | 57 public: |
62 | 58 |
109 if (!mimeData) | 105 if (!mimeData) |
110 return; | 106 return; |
111 | 107 |
112 foreach (string format; mimeData.formats()) { | 108 foreach (string format; mimeData.formats()) { |
113 | 109 |
114 writeln("Point 1"); | |
115 QTableWidgetItem formatItem = new QTableWidgetItem(format); | 110 QTableWidgetItem formatItem = new QTableWidgetItem(format); |
116 formatItem.setFlags(Qt.ItemIsEnabled); | 111 formatItem.setFlags(Qt.ItemIsEnabled); |
117 formatItem.setTextAlignment(Qt.AlignTop | Qt.AlignLeft); | 112 formatItem.setTextAlignment(Qt.AlignTop | Qt.AlignLeft); |
118 | 113 |
119 string text; | 114 string text; |
134 text ~= hex ~ " "; | 129 text ~= hex ~ " "; |
135 } | 130 } |
136 } | 131 } |
137 | 132 |
138 int row = formatsTable.rowCount(); | 133 int row = formatsTable.rowCount(); |
134 | |
139 formatsTable.insertRow(row); | 135 formatsTable.insertRow(row); |
140 | |
141 writeln("Point 2"); | |
142 formatsTable.setItem(row, 0, new QTableWidgetItem(format)); | 136 formatsTable.setItem(row, 0, new QTableWidgetItem(format)); |
143 writeln("Point 3"); | |
144 formatsTable.setItem(row, 1, new QTableWidgetItem(text)); | 137 formatsTable.setItem(row, 1, new QTableWidgetItem(text)); |
145 } | 138 } |
146 | 139 |
147 formatsTable.resizeColumnToContents(0); | 140 formatsTable.resizeColumnToContents(0); |
148 } | 141 } |
149 | 142 |
150 ~this() | |
151 { | |
152 writeln("deleting dropsitewindow"); | |
153 } | |
154 | |
155 private: | 143 private: |
156 | 144 |
157 DropArea dropArea; | 145 DropArea dropArea; |
158 QLabel abstractLabel; | 146 QLabel abstractLabel; |
159 QTableWidget formatsTable; | 147 QTableWidget formatsTable; |