annotate examples/draganddrop/dropsite/dropsitewindow.d @ 372:a032df77b6ab

Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
author Max Samukha <maxter@spambox.com>
date Thu, 08 Jul 2010 17:19:05 +0300
parents 31520b2c0b3c
children 681af90e1d53
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
1 /****************************************************************************
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
2 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
4 ** Contact: Qt Software Information (qt-info@nokia.com)
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
5 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
6 ** This file is part of the examples of the Qt Toolkit.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
7 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
8 ** $QT_BEGIN_LICENSE:LGPL$
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
9 ** Commercial Usage
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
10 ** Licensees holding valid Qt Commercial licenses may use this file in
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
11 ** accordance with the Qt Commercial License Agreement provided with the
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
12 ** Software or, alternatively, in accordance with the terms contained in
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
13 ** a written agreement between you and Nokia.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
14 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
15 ** GNU Lesser General Public License Usage
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
16 ** Alternatively, this file may be used under the terms of the GNU Lesser
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
17 ** General Public License version 2.1 as published by the Free Software
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
18 ** Foundation and appearing in the file LICENSE.LGPL included in the
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
19 ** packaging of this file. Please review the following information to
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
20 ** ensure the GNU Lesser General Public License version 2.1 requirements
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
21 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
22 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
23 ** In addition, as a special exception, Nokia gives you certain
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
24 ** additional rights. These rights are described in the Nokia Qt LGPL
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
26 ** package.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
27 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
28 ** GNU General Public License Usage
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
29 ** Alternatively, this file may be used under the terms of the GNU
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
30 ** General Public License version 3.0 as published by the Free Software
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
31 ** Foundation and appearing in the file LICENSE.GPL included in the
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
32 ** packaging of this file. Please review the following information to
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
33 ** ensure the GNU General Public License version 3.0 requirements will be
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
34 ** met: http://www.gnu.org/copyleft/gpl.html.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
35 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
36 ** If you are unsure which license is appropriate for your use, please
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
37 ** contact the sales department at qt-sales@nokia.com.
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
38 ** $QT_END_LICENSE$
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
39 **
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
40 ****************************************************************************/
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
41
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
42 module dropsitewindow;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
43
350
31520b2c0b3c Removed dependency on parent trait and stringof
Max Samukha <maxter@spambox.com>
parents: 323
diff changeset
44 import std.string : format, strip, toupper;
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
45
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
46 import qt.gui.QWidget;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
47 import qt.gui.QLabel;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
48 import qt.gui.QTableWidget;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
49 import qt.gui.QPushButton;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
50 import qt.gui.QVBoxLayout;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
51 import qt.gui.QDialogButtonBox;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
52
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
53 import droparea;
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
54
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
55
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
56 import std.stdio; //TODO: remove
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
57
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
58
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
59 class DropSiteWindow : public QWidget
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
60 {
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
61 public:
350
31520b2c0b3c Removed dependency on parent trait and stringof
Max Samukha <maxter@spambox.com>
parents: 323
diff changeset
62
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
63 this()
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
64 {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
65 abstractLabel = new QLabel(tr("This example accepts drags from other "
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
66 "applications and displays the MIME types "
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
67 "provided by the drag object."));
350
31520b2c0b3c Removed dependency on parent trait and stringof
Max Samukha <maxter@spambox.com>
parents: 323
diff changeset
68
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
69 abstractLabel.setWordWrap(true);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
70 abstractLabel.adjustSize();
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
71
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
72 dropArea = new DropArea;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
73 connect(dropArea, "changed", this, "updateFormatsTable");
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
74
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
75 string[] labels;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
76 labels ~= tr("Format");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
77 labels ~= tr("Content");
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
78
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
79 formatsTable = new QTableWidget;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
80 formatsTable.setColumnCount(2);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
81 formatsTable.setEditTriggers(QAbstractItemView.NoEditTriggers);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
82 formatsTable.setHorizontalHeaderLabels(labels.toQList());
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
83 formatsTable.horizontalHeader().setStretchLastSection(true);
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
84
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
85 clearButton = new QPushButton(tr("Clear"));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
86 quitButton = new QPushButton(tr("Quit"));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
87
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
88 buttonBox = new QDialogButtonBox;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
89 buttonBox.addButton(clearButton, QDialogButtonBox.ActionRole);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
90 buttonBox.addButton(quitButton, QDialogButtonBox.RejectRole);
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
91
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
92 connect(quitButton, "pressed", this, "close");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
93 connect(clearButton, "pressed", dropArea, "clearArea");
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
94
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
95 QVBoxLayout mainLayout = new QVBoxLayout;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
96 mainLayout.addWidget(abstractLabel);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
97 mainLayout.addWidget(dropArea);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
98 mainLayout.addWidget(formatsTable);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
99 mainLayout.addWidget(buttonBox);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
100 setLayout(mainLayout);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
101
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
102 setWindowTitle(tr("Drop Site"));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
103 setMinimumSize(350, 500);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
104 }
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
105
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
106 void slot_updateFormatsTable(QMimeData mimeData)
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
107 {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
108 formatsTable.setRowCount(0);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
109 if (!mimeData)
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
110 return;
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
111
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
112 foreach (string format; mimeData.formats()) {
21
e747af2e6b46 temporary(?) fix for dropsite example
eldar
parents: 19
diff changeset
113
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
114 writeln("Point 1");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
115 QTableWidgetItem formatItem = new QTableWidgetItem(format);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
116 formatItem.setFlags(Qt.ItemIsEnabled);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
117 formatItem.setTextAlignment(Qt.AlignTop | Qt.AlignLeft);
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
118
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
119 string text;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
120 if (format == "text/plain") {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
121 text = strip(mimeData.text());
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
122 } else if (format == "text/html") {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
123 text = strip(mimeData.html());
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
124 } else if (format == "text/uri-list") {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
125 auto urlList = mimeData.urls();
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
126 for (int i = 0; i < urlList.length && i < 32; ++i) {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
127 string url = urlList[i].path();
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
128 text ~= url ~ " ";
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
129 }
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
130 } else {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
131 QByteArray data = mimeData.data(format);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
132 for (int i = 0; i < data.size() && i < 32; ++i) {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
133 string hex = toupper(std.string.format("%x", data.at(i)));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
134 text ~= hex ~ " ";
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
135 }
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
136 }
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
137
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
138 int row = formatsTable.rowCount();
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
139 formatsTable.insertRow(row);
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
140
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
141 writeln("Point 2");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
142 formatsTable.setItem(row, 0, new QTableWidgetItem(format));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
143 writeln("Point 3");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
144 formatsTable.setItem(row, 1, new QTableWidgetItem(text));
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
145 }
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
146
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
147 formatsTable.resizeColumnToContents(0);
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
148 }
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
149
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
150 ~this()
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
151 {
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
152 writeln("deleting dropsitewindow");
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
153 }
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
154
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
155 private:
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
156
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
157 DropArea dropArea;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
158 QLabel abstractLabel;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
159 QTableWidget formatsTable;
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
160
372
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
161 QPushButton clearButton;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
162 QPushButton quitButton;
a032df77b6ab Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
Max Samukha <maxter@spambox.com>
parents: 350
diff changeset
163 QDialogButtonBox buttonBox;
350
31520b2c0b3c Removed dependency on parent trait and stringof
Max Samukha <maxter@spambox.com>
parents: 323
diff changeset
164
323
7a3c43424dca make all examples compile with new signals/slots
eldar_ins@eldar-laptop
parents: 282
diff changeset
165 mixin Q_OBJECT;
19
d54443f1ce1e add dropsite example
mandel
parents:
diff changeset
166 }