Changeset View
Changeset View
Standalone View
Standalone View
src/editors/datetimeedit.cpp
Show All 16 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to | ||
18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | 19 | * Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #include "datetimeedit.h" | 22 | #include "datetimeedit.h" | ||
23 | 23 | | |||
24 | #include "KPropertyEditorDataModel.h" | 24 | #include "KPropertyEditorDataModel.h" | ||
25 | #include "KPropertyWidgetsFactory.h" | ||||
25 | 26 | | |||
26 | #include <QLocale> | 27 | #include <QLocale> | ||
27 | 28 | | |||
28 | KPropertyDateTimeEditor::KPropertyDateTimeEditor(const KProperty* prop, QWidget* parent) | 29 | KPropertyDateTimeEditor::KPropertyDateTimeEditor(const KProperty* prop, QWidget* parent) | ||
29 | : QDateTimeEdit(parent) | 30 | : QDateTimeEdit(parent) | ||
30 | { | 31 | { | ||
31 | Q_UNUSED(prop); | 32 | Q_UNUSED(prop); | ||
32 | 33 | | |||
Show All 26 Lines | 59 | { | |||
59 | blockSignals(true); | 60 | blockSignals(true); | ||
60 | setDateTime(value.toDateTime()); | 61 | setDateTime(value.toDateTime()); | ||
61 | blockSignals(false); | 62 | blockSignals(false); | ||
62 | } | 63 | } | ||
63 | 64 | | |||
64 | void KPropertyDateTimeEditor::paintEvent(QPaintEvent* event) | 65 | void KPropertyDateTimeEditor::paintEvent(QPaintEvent* event) | ||
65 | { | 66 | { | ||
66 | QDateTimeEdit::paintEvent(event); | 67 | QDateTimeEdit::paintEvent(event); | ||
67 | KPropertyFactory::paintTopGridLine(this); | 68 | KPropertyWidgetsFactory::paintTopGridLine(this); | ||
68 | } | 69 | } | ||
69 | 70 | | |||
70 | 71 | | |||
71 | void KPropertyDateTimeEditor::onDateTimeChanged() | 72 | void KPropertyDateTimeEditor::onDateTimeChanged() | ||
72 | { | 73 | { | ||
73 | emit commitData(this); | 74 | emit commitData(this); | ||
74 | } | 75 | } | ||
75 | 76 | | |||
Show All 25 Lines |