// #cmakedefine QT_NO_UNDOCOMMAND
// #cmakedefine QT_NO_UNDOSTACK
// #cmakedefine QT_NO_VALIDATOR
+// #cmakedefine QT_NO_VECTOR4D
+// #cmakedefine QT_NO_WARNING_OUTPUT
// Misc
#cmakedefine QT_NO_USING_NAMESPACE
#cmakedefine QT_NO_UNDOGROUP
#cmakedefine QT_NO_UNDOVIEW
#cmakedefine QT_NO_VECTOR2D
-#cmakedefine QT_NO_VECTOR4D
-#cmakedefine QT_NO_WARNING_OUTPUT
#cmakedefine QT_NO_WHATSTHIS
#cmakedefine QT_NO_WHEELEVENT
#cmakedefine QT_NO_WIZARD
icon = defaultIcon;
item->setIcon(icon);
item->setToolTip(firstTooltip);
+#ifndef QT_NO_WHATSTHIS
item->setWhatsThis(firstTooltip);
+#endif // QT_NO_WHATSTHIS
// Used
const QWidgetList associatedDesignerWidgets = associatedWidgets(action);
const bool used = !associatedDesignerWidgets.empty();
QPushButton *updateButton = new QPushButton(tr("Refresh"));
const QString tooltip = tr("Scan for newly installed custom widget plugins.");
updateButton->setToolTip(tooltip);
+#ifndef QT_NO_WHATSTHIS
updateButton->setWhatsThis(tooltip);
+#endif // QT_NO_WHATSTHIS
connect(updateButton, SIGNAL(clicked()), this, SLOT(updateCustomWidgetPlugins()));
ui.buttonBox->addButton(updateButton, QDialogButtonBox::ActionRole);
}
QTreeWidgetItem *item = new QTreeWidgetItem(pluginItem);
item->setText(0, name);
item->setToolTip(0, toolTip);
+#ifndef QT_NO_WHATSTHIS
item->setWhatsThis(0, whatsThis);
+#endif // QT_NO_WHATSTHIS
item->setIcon(0, pluginIcon(icon));
}
case Qt::StatusTipPropertyRole:
item->setStatusTip(qvariant_cast<PropertySheetStringValue>(it.value()).value());
break;
+#ifndef QT_NO_WHATSTHIS
case Qt::WhatsThisPropertyRole:
item->setWhatsThis(qvariant_cast<PropertySheetStringValue>(it.value()).value());
break;
+#endif // QT_NO_WHATSTHIS
}
}
}
case Qt::StatusTipPropertyRole:
item->setStatusTip(column, qvariant_cast<PropertySheetStringValue>(it.value()).value());
break;
+#ifndef QT_NO_WHATSTHIS
case Qt::WhatsThisPropertyRole:
item->setWhatsThis(column, qvariant_cast<PropertySheetStringValue>(it.value()).value());
break;
+#endif // QT_NO_WHATSTHIS
}
}
}
m_pageToData[currentWidget].tooltip = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
break;
case PropertyCurrentTabWhatsThis:
+#ifndef QT_NO_WHATSTHIS
m_tabWidget->setTabWhatsThis(currentIndex, qvariant_cast<QString>(resolvePropertyValue(index, value)));
+#endif // QT_NO_WHATSTHIS
m_pageToData[currentWidget].whatsthis = qvariant_cast<qdesigner_internal::PropertySheetStringValue>(value);
break;
case PropertyTabWidgetNone:
The widget and its children are accessible via the \
variables <i>widget</i> and <i>childWidgets</i>, respectively.");
m_textEdit->setToolTip(textHelp);
+#ifndef QT_NO_WHATSTHIS
m_textEdit->setWhatsThis(textHelp);
+#endif // QT_NO_WHATSTHIS
m_textEdit->setMinimumSize(QSize(600, 400));
vboxLayout->addWidget(m_textEdit);
new QScriptHighlighter(m_textEdit->document());
item->button->setText(property->propertyName());
item->button->setToolTip(property->toolTip());
item->button->setStatusTip(property->statusTip());
+#ifndef QT_NO_WHATSTHIS
item->button->setWhatsThis(property->whatsThis());
+#endif // QT_NO_WHATSTHIS
item->button->setEnabled(property->isEnabled());
}
if (item->label) {
item->label->setText(property->propertyName());
item->label->setToolTip(property->toolTip());
item->label->setStatusTip(property->statusTip());
+#ifndef QT_NO_WHATSTHIS
item->label->setWhatsThis(property->whatsThis());
+#endif // QT_NO_WHATSTHIS
item->label->setEnabled(property->isEnabled());
}
if (item->widgetLabel) {
item->groupBox->setTitle(property->propertyName());
item->groupBox->setToolTip(property->toolTip());
item->groupBox->setStatusTip(property->statusTip());
+#ifndef QT_NO_WHATSTHIS
item->groupBox->setWhatsThis(property->whatsThis());
+#endif // QT_NO_WHATSTHIS
item->groupBox->setEnabled(property->isEnabled());
}
if (item->label) {
item->label->setText(property->propertyName());
item->label->setToolTip(property->toolTip());
item->label->setStatusTip(property->statusTip());
+#ifndef QT_NO_WHATSTHIS
item->label->setWhatsThis(property->whatsThis());
+#endif // QT_NO_WHATSTHIS
item->label->setEnabled(property->isEnabled());
}
if (item->widgetLabel) {
item->setFirstColumnSpanned(!property->hasValue());
item->setToolTip(0, property->propertyName());
item->setStatusTip(0, property->statusTip());
+#ifndef QT_NO_WHATSTHIS
item->setWhatsThis(0, property->whatsThis());
+#endif // QT_NO_WHATSTHIS
item->setText(0, property->propertyName());
bool wasEnabled = item->flags() & Qt::ItemIsEnabled;
bool isEnabled = wasEnabled;
// create a ColorButton's
buttonCentral = new ColorButton(ui->groupCentral);
buttonCentral->setToolTip(tr("Choose a color"));
+#ifndef QT_NO_WHATSTHIS
buttonCentral->setWhatsThis(tr("Choose a color for the selected central color role."));
+#endif // QT_NO_WHATSTHIS
ui->layoutCentral->addWidget(buttonCentral);
ui->labelCentral->setBuddy(buttonCentral);
buttonEffect = new ColorButton(ui->groupEffect);
buttonEffect->setToolTip(tr("Choose a color"));
+#ifndef QT_NO_WHATSTHIS
buttonEffect->setWhatsThis(tr("Choose a color for the selected effect color role."));
+#endif // QT_NO_WHATSTHIS
buttonEffect->setEnabled(false);
ui->layoutEffect->addWidget(buttonEffect);
ui->labelEffect->setBuddy(buttonEffect);
QString statusTip = QString("statusTip %0").arg(i);
item.setStatusTip(statusTip);
QCOMPARE(item.statusTip(), statusTip);
-
+
+#ifndef QT_NO_WHATSTHIS
QString whatsThis = QString("whatsThis %0").arg(i);
item.setWhatsThis(whatsThis);
QCOMPARE(item.whatsThis(), whatsThis);
+#endif // QT_NO_WHATSTHIS
QSize sizeHint(64*i, 48*i);
item.setSizeHint(sizeHint);
QCOMPARE(item.icon(), icon);
QCOMPARE(item.toolTip(), toolTip);
QCOMPARE(item.statusTip(), statusTip);
+#ifndef QT_NO_WHATSTHIS
QCOMPARE(item.whatsThis(), whatsThis);
+#endif // QT_NO_WHATSTHIS
QCOMPARE(item.sizeHint(), sizeHint);
QCOMPARE(item.font(), font);
QCOMPARE(item.textAlignment(), textAlignment);
QCOMPARE(qvariant_cast<QIcon>(item.data(Qt::DecorationRole)), icon);
QCOMPARE(qvariant_cast<QString>(item.data(Qt::ToolTipRole)), toolTip);
QCOMPARE(qvariant_cast<QString>(item.data(Qt::StatusTipRole)), statusTip);
+#ifndef QT_NO_WHATSTHIS
QCOMPARE(qvariant_cast<QString>(item.data(Qt::WhatsThisRole)), whatsThis);
+#endif // QT_NO_WHATSTHIS
QCOMPARE(qvariant_cast<QSize>(item.data(Qt::SizeHintRole)), sizeHint);
QCOMPARE(qvariant_cast<QFont>(item.data(Qt::FontRole)), font);
QCOMPARE(qvariant_cast<int>(item.data(Qt::TextAlignmentRole)), int(textAlignment));
item.setText(QLatin1String("text"));
item.setToolTip(QLatin1String("toolTip"));
item.setStatusTip(QLatin1String("statusTip"));
+#ifndef QT_NO_WHATSTHIS
item.setWhatsThis(QLatin1String("whatsThis"));
+#endif // QT_NO_WHATSTHIS
item.setSizeHint(QSize(64, 48));
item.setFont(QFont());
item.setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
QCOMPARE(streamedItem.text(), item.text());
QCOMPARE(streamedItem.toolTip(), item.toolTip());
QCOMPARE(streamedItem.statusTip(), item.statusTip());
+#ifndef QT_NO_WHATSTHIS
QCOMPARE(streamedItem.whatsThis(), item.whatsThis());
+#endif // QT_NO_WHATSTHIS
QCOMPARE(streamedItem.sizeHint(), item.sizeHint());
QCOMPARE(streamedItem.font(), item.font());
QCOMPARE(streamedItem.textAlignment(), item.textAlignment());
item.setText(QLatin1String("text"));
item.setToolTip(QLatin1String("toolTip"));
item.setStatusTip(QLatin1String("statusTip"));
+#ifndef QT_NO_WHATSTHIS
item.setWhatsThis(QLatin1String("whatsThis"));
+#endif // QT_NO_WHATSTHIS
item.setSizeHint(QSize(64, 48));
item.setFont(QFont());
item.setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter);
QCOMPARE(clone->text(), item.text());
QCOMPARE(clone->toolTip(), item.toolTip());
QCOMPARE(clone->statusTip(), item.statusTip());
+#ifndef QT_NO_WHATSTHIS
QCOMPARE(clone->whatsThis(), item.whatsThis());
+#endif // QT_NO_WHATSTHIS
QCOMPARE(clone->sizeHint(), item.sizeHint());
QCOMPARE(clone->font(), item.font());
QCOMPARE(clone->textAlignment(), item.textAlignment());