equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the tools applications of the Qt Toolkit. |
7 ** This file is part of the tools applications of the Qt Toolkit. |
8 ** |
8 ** |
1156 */ |
1156 */ |
1157 QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtProperty *property, |
1157 QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtProperty *property, |
1158 QWidget *parent) |
1158 QWidget *parent) |
1159 { |
1159 { |
1160 QDateEdit *editor = d_ptr->createEditor(property, parent); |
1160 QDateEdit *editor = d_ptr->createEditor(property, parent); |
|
1161 editor->setDisplayFormat(QtPropertyBrowserUtils::dateFormat()); |
1161 editor->setCalendarPopup(true); |
1162 editor->setCalendarPopup(true); |
1162 editor->setDateRange(manager->minimum(property), manager->maximum(property)); |
1163 editor->setDateRange(manager->minimum(property), manager->maximum(property)); |
1163 editor->setDate(manager->value(property)); |
1164 editor->setDate(manager->value(property)); |
1164 |
1165 |
1165 connect(editor, SIGNAL(dateChanged(QDate)), |
1166 connect(editor, SIGNAL(dateChanged(QDate)), |
1270 */ |
1271 */ |
1271 QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtProperty *property, |
1272 QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtProperty *property, |
1272 QWidget *parent) |
1273 QWidget *parent) |
1273 { |
1274 { |
1274 QTimeEdit *editor = d_ptr->createEditor(property, parent); |
1275 QTimeEdit *editor = d_ptr->createEditor(property, parent); |
|
1276 editor->setDisplayFormat(QtPropertyBrowserUtils::timeFormat()); |
1275 editor->setTime(manager->value(property)); |
1277 editor->setTime(manager->value(property)); |
1276 |
1278 |
1277 connect(editor, SIGNAL(timeChanged(QTime)), |
1279 connect(editor, SIGNAL(timeChanged(QTime)), |
1278 this, SLOT(slotSetValue(QTime))); |
1280 this, SLOT(slotSetValue(QTime))); |
1279 connect(editor, SIGNAL(destroyed(QObject*)), |
1281 connect(editor, SIGNAL(destroyed(QObject*)), |
1383 */ |
1385 */ |
1384 QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, |
1386 QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, |
1385 QtProperty *property, QWidget *parent) |
1387 QtProperty *property, QWidget *parent) |
1386 { |
1388 { |
1387 QDateTimeEdit *editor = d_ptr->createEditor(property, parent); |
1389 QDateTimeEdit *editor = d_ptr->createEditor(property, parent); |
|
1390 editor->setDisplayFormat(QtPropertyBrowserUtils::dateTimeFormat()); |
1388 editor->setDateTime(manager->value(property)); |
1391 editor->setDateTime(manager->value(property)); |
1389 |
1392 |
1390 connect(editor, SIGNAL(dateTimeChanged(QDateTime)), |
1393 connect(editor, SIGNAL(dateTimeChanged(QDateTime)), |
1391 this, SLOT(slotSetValue(QDateTime))); |
1394 this, SLOT(slotSetValue(QDateTime))); |
1392 connect(editor, SIGNAL(destroyed(QObject*)), |
1395 connect(editor, SIGNAL(destroyed(QObject*)), |