aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/extended/lineedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/extended/lineedit.cpp')
-rw-r--r--examples/qml/referenceexamples/extended/lineedit.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/examples/qml/referenceexamples/extended/lineedit.cpp b/examples/qml/referenceexamples/extended/lineedit.cpp
deleted file mode 100644
index 802f47ef03..0000000000
--- a/examples/qml/referenceexamples/extended/lineedit.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-#include "lineedit.h"
-#include <qqml.h>
-
-LineEditExtension::LineEditExtension(QObject *object)
-: QObject(object), m_lineedit(qobject_cast<QLineEdit *>(object))
-{
-}
-
-int LineEditExtension::leftMargin() const
-{
- return m_lineedit->textMargins().left();
-}
-
-void LineEditExtension::setLeftMargin(int l)
-{
- QMargins m = m_lineedit->textMargins();
- if (m.left() != l) {
- m.setLeft(l);
- m_lineedit->setTextMargins(m);
- emit marginsChanged();
- }
-}
-
-int LineEditExtension::rightMargin() const
-{
- return m_lineedit->textMargins().right();
-}
-
-void LineEditExtension::setRightMargin(int r)
-{
- QMargins m = m_lineedit->textMargins();
- if (m.right() != r) {
- m.setRight(r);
- m_lineedit->setTextMargins(m);
- emit marginsChanged();
- }
-}
-
-int LineEditExtension::topMargin() const
-{
- return m_lineedit->textMargins().top();
-}
-
-void LineEditExtension::setTopMargin(int t)
-{
- QMargins m = m_lineedit->textMargins();
- if (m.top() != t) {
- m.setTop(t);
- m_lineedit->setTextMargins(m);
- emit marginsChanged();
- }
-}
-
-int LineEditExtension::bottomMargin() const
-{
- return m_lineedit->textMargins().bottom();
-}
-
-void LineEditExtension::setBottomMargin(int b)
-{
- QMargins m = m_lineedit->textMargins();
- if (m.bottom() != b) {
- m.setBottom(b);
- m_lineedit->setTextMargins(m);
- emit marginsChanged();
- }
-}
-
-