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 ** |
45 #include <QtGui/QHBoxLayout> |
45 #include <QtGui/QHBoxLayout> |
46 #include <QtGui/QMouseEvent> |
46 #include <QtGui/QMouseEvent> |
47 #include <QtGui/QCheckBox> |
47 #include <QtGui/QCheckBox> |
48 #include <QtGui/QLineEdit> |
48 #include <QtGui/QLineEdit> |
49 #include <QtGui/QMenu> |
49 #include <QtGui/QMenu> |
|
50 #include <QtCore/QLocale> |
50 |
51 |
51 QT_BEGIN_NAMESPACE |
52 QT_BEGIN_NAMESPACE |
52 |
53 |
53 QtCursorDatabase::QtCursorDatabase() |
54 QtCursorDatabase::QtCursorDatabase() |
54 { |
55 { |
206 return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, QApplication::UnicodeUTF8) |
207 return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, QApplication::UnicodeUTF8) |
207 .arg(f.family()) |
208 .arg(f.family()) |
208 .arg(f.pointSize()); |
209 .arg(f.pointSize()); |
209 } |
210 } |
210 |
211 |
|
212 QString QtPropertyBrowserUtils::dateFormat() |
|
213 { |
|
214 QLocale loc; |
|
215 return loc.dateFormat(QLocale::ShortFormat); |
|
216 } |
|
217 |
|
218 QString QtPropertyBrowserUtils::timeFormat() |
|
219 { |
|
220 QLocale loc; |
|
221 // ShortFormat is missing seconds on UNIX. |
|
222 return loc.timeFormat(QLocale::LongFormat); |
|
223 } |
|
224 |
|
225 QString QtPropertyBrowserUtils::dateTimeFormat() |
|
226 { |
|
227 QString format = dateFormat(); |
|
228 format += QLatin1Char(' '); |
|
229 format += timeFormat(); |
|
230 return format; |
|
231 } |
211 |
232 |
212 QtBoolEdit::QtBoolEdit(QWidget *parent) : |
233 QtBoolEdit::QtBoolEdit(QWidget *parent) : |
213 QWidget(parent), |
234 QWidget(parent), |
214 m_checkBox(new QCheckBox(this)), |
235 m_checkBox(new QCheckBox(this)), |
215 m_textVisible(true) |
236 m_textVisible(true) |