summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/plugin.cpp4
-rw-r--r--src/controls/plugin.pri4
-rw-r--r--src/controls/qquickaction.cpp (renamed from src/controls/qtaction.cpp)42
-rw-r--r--src/controls/qquickaction_p.h (renamed from src/controls/qtaction_p.h)12
-rw-r--r--src/controls/qtexclusivegroup.cpp8
-rw-r--r--src/controls/qtexclusivegroup_p.h8
-rw-r--r--src/controls/qtmenu.cpp1
-rw-r--r--src/controls/qtmenuitem.cpp12
-rw-r--r--src/controls/qtmenuitem_p.h18
9 files changed, 54 insertions, 55 deletions
diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp
index 9a0d341e..8af5349b 100644
--- a/src/controls/plugin.cpp
+++ b/src/controls/plugin.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qtaction_p.h"
+#include "qquickaction_p.h"
#include "qtexclusivegroup_p.h"
#include "qtmenu_p.h"
#include "qtmenubar_p.h"
@@ -86,7 +86,7 @@ public:
void QtQuickControlsPlugin::registerTypes(const char *uri)
{
- qmlRegisterType<QtAction>(uri, 1, 0, "Action");
+ qmlRegisterType<QQuickAction>(uri, 1, 0, "Action");
qmlRegisterType<QtExclusiveGroup>(uri, 1, 0, "ExclusiveGroup");
qmlRegisterType<QtMenu>(uri, 1, 0, "MenuPrivate");
qmlRegisterType<QtMenuBar>(uri, 1, 0, "MenuBarPrivate");
diff --git a/src/controls/plugin.pri b/src/controls/plugin.pri
index 466afcb3..20fc1f68 100644
--- a/src/controls/plugin.pri
+++ b/src/controls/plugin.pri
@@ -1,5 +1,5 @@
HEADERS += \
- $$PWD/qtaction_p.h \
+ $$PWD/qquickaction_p.h \
$$PWD/qtexclusivegroup_p.h \
$$PWD/qtmenu_p.h \
$$PWD/qtmenubar_p.h \
@@ -10,7 +10,7 @@ HEADERS += \
SOURCES += \
$$PWD/plugin.cpp \
- $$PWD/qtaction.cpp \
+ $$PWD/qquickaction.cpp \
$$PWD/qtexclusivegroup.cpp \
$$PWD/qtmenu.cpp \
$$PWD/qtmenubar.cpp \
diff --git a/src/controls/qtaction.cpp b/src/controls/qquickaction.cpp
index 1ed9a99c..eceac904 100644
--- a/src/controls/qtaction.cpp
+++ b/src/controls/qquickaction.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qtaction_p.h"
+#include "qquickaction_p.h"
#include "qtexclusivegroup_p.h"
#include <private/qguiapplication_p.h>
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Action
- \instantiates QtAction
+ \instantiates QQuickAction
\inqmlmodule QtQuick.Controls 1.0
\brief Action provides an abstract user interface action that can be bound to items
@@ -162,7 +162,7 @@ QT_BEGIN_NAMESPACE
This usually happens at the same time as \l triggered().
*/
-QtAction::QtAction(QObject *parent)
+QQuickAction::QQuickAction(QObject *parent)
: QObject(parent)
, m_enabled(true)
, m_checkable(false)
@@ -170,14 +170,14 @@ QtAction::QtAction(QObject *parent)
{
}
-QtAction::~QtAction()
+QQuickAction::~QQuickAction()
{
setShortcut(QString());
setMnemonicFromText(QString());
setExclusiveGroup(0);
}
-void QtAction::setText(const QString &text)
+void QQuickAction::setText(const QString &text)
{
if (text == m_text)
return;
@@ -194,12 +194,12 @@ bool qShortcutContextMatcher(QObject *, Qt::ShortcutContext)
return true;
}
-QString QtAction::shortcut() const
+QString QQuickAction::shortcut() const
{
return m_shortcut.toString(QKeySequence::NativeText);
}
-void QtAction::setShortcut(const QString &arg)
+void QQuickAction::setShortcut(const QString &arg)
{
QKeySequence sequence = QKeySequence::fromString(arg);
if (sequence == m_shortcut)
@@ -217,7 +217,7 @@ void QtAction::setShortcut(const QString &arg)
emit shortcutChanged(shortcut());
}
-void QtAction::setMnemonicFromText(const QString &text)
+void QQuickAction::setMnemonicFromText(const QString &text)
{
QKeySequence sequence = QKeySequence::mnemonic(text);
if (m_mnemonic == sequence)
@@ -234,7 +234,7 @@ void QtAction::setMnemonicFromText(const QString &text)
}
}
-void QtAction::setIconSource(const QUrl &iconSource)
+void QQuickAction::setIconSource(const QUrl &iconSource)
{
if (iconSource == m_iconSource)
return;
@@ -249,12 +249,12 @@ void QtAction::setIconSource(const QUrl &iconSource)
emit iconSourceChanged();
}
-QString QtAction::iconName() const
+QString QQuickAction::iconName() const
{
return m_iconName;
}
-void QtAction::setIconName(const QString &iconName)
+void QQuickAction::setIconName(const QString &iconName)
{
if (iconName == m_iconName)
return;
@@ -264,7 +264,7 @@ void QtAction::setIconName(const QString &iconName)
emit iconChanged();
}
-void QtAction::setTooltip(const QString &arg)
+void QQuickAction::setTooltip(const QString &arg)
{
if (m_tooltip != arg) {
m_tooltip = arg;
@@ -272,7 +272,7 @@ void QtAction::setTooltip(const QString &arg)
}
}
-void QtAction::setEnabled(bool e)
+void QQuickAction::setEnabled(bool e)
{
if (e == m_enabled)
return;
@@ -280,7 +280,7 @@ void QtAction::setEnabled(bool e)
emit enabledChanged();
}
-void QtAction::setCheckable(bool c)
+void QQuickAction::setCheckable(bool c)
{
if (c == m_checkable)
return;
@@ -294,7 +294,7 @@ void QtAction::setCheckable(bool c)
emit toggled(m_checkable);
}
-void QtAction::setChecked(bool c)
+void QQuickAction::setChecked(bool c)
{
if (c == m_checked)
return;
@@ -305,12 +305,12 @@ void QtAction::setChecked(bool c)
emit toggled(m_checked);
}
-QtExclusiveGroup *QtAction::exclusiveGroup() const
+QtExclusiveGroup *QQuickAction::exclusiveGroup() const
{
return m_exclusiveGroup.data();
}
-void QtAction::setExclusiveGroup(QtExclusiveGroup *eg)
+void QQuickAction::setExclusiveGroup(QtExclusiveGroup *eg)
{
if (m_exclusiveGroup == eg)
return;
@@ -324,7 +324,7 @@ void QtAction::setExclusiveGroup(QtExclusiveGroup *eg)
emit exclusiveGroupChanged();
}
-bool QtAction::event(QEvent *e)
+bool QQuickAction::event(QEvent *e)
{
if (!m_enabled)
return false;
@@ -335,10 +335,10 @@ bool QtAction::event(QEvent *e)
QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
Q_ASSERT_X(se->key() == m_shortcut || se->key() == m_mnemonic,
- "QtAction::event",
+ "QQuickAction::event",
"Received shortcut event from incorrect shortcut");
if (se->isAmbiguous()) {
- qWarning("QtAction::event: Ambiguous shortcut overload: %s", se->key().toString(QKeySequence::NativeText).toLatin1().constData());
+ qWarning("QQuickAction::event: Ambiguous shortcut overload: %s", se->key().toString(QKeySequence::NativeText).toLatin1().constData());
return false;
}
@@ -347,7 +347,7 @@ bool QtAction::event(QEvent *e)
return true;
}
-void QtAction::trigger()
+void QQuickAction::trigger()
{
if (!m_enabled)
return;
diff --git a/src/controls/qtaction_p.h b/src/controls/qquickaction_p.h
index afe74e44..65770d2b 100644
--- a/src/controls/qtaction_p.h
+++ b/src/controls/qquickaction_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QTACTION_H
-#define QTACTION_H
+#ifndef QQUICKACTION_H
+#define QQUICKACTION_H
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class QtExclusiveGroup;
-class QtAction : public QObject
+class QQuickAction : public QObject
{
Q_OBJECT
@@ -72,8 +72,8 @@ class QtAction : public QObject
#endif
public:
- explicit QtAction(QObject *parent = 0);
- ~QtAction();
+ explicit QQuickAction(QObject *parent = 0);
+ ~QQuickAction();
QString text() const { return m_text; }
void setText(const QString &text);
@@ -145,4 +145,4 @@ private:
QT_END_NAMESPACE
-#endif // QTACTION_H
+#endif // QQUICKACTION_H
diff --git a/src/controls/qtexclusivegroup.cpp b/src/controls/qtexclusivegroup.cpp
index 11f84dd5..9bf36d60 100644
--- a/src/controls/qtexclusivegroup.cpp
+++ b/src/controls/qtexclusivegroup.cpp
@@ -43,7 +43,7 @@
#include <qvariant.h>
#include <qdebug.h>
-#include "qtaction_p.h"
+#include "qquickaction_p.h"
#define CHECKED_PROPERTY "checked"
@@ -185,12 +185,12 @@ QtExclusiveGroup::QtExclusiveGroup(QObject *parent)
m_updateCurrentMethod = metaObject()->method(index);
}
-QQmlListProperty<QtAction> QtExclusiveGroup::actions()
+QQmlListProperty<QQuickAction> QtExclusiveGroup::actions()
{
- return QQmlListProperty<QtAction>(this, 0, &QtExclusiveGroup::append_actions, 0, 0, 0);
+ return QQmlListProperty<QQuickAction>(this, 0, &QtExclusiveGroup::append_actions, 0, 0, 0);
}
-void QtExclusiveGroup::append_actions(QQmlListProperty<QtAction> *list, QtAction *action)
+void QtExclusiveGroup::append_actions(QQmlListProperty<QQuickAction> *list, QQuickAction *action)
{
if (QtExclusiveGroup *eg = qobject_cast<QtExclusiveGroup *>(list->object))
action->setExclusiveGroup(eg);
diff --git a/src/controls/qtexclusivegroup_p.h b/src/controls/qtexclusivegroup_p.h
index 04109b06..e2127d37 100644
--- a/src/controls/qtexclusivegroup_p.h
+++ b/src/controls/qtexclusivegroup_p.h
@@ -48,14 +48,14 @@
QT_BEGIN_NAMESPACE
-class QtAction;
+class QQuickAction;
class QtExclusiveGroup : public QObject
{
Q_OBJECT
Q_PROPERTY(QObject *current READ current WRITE setCurrent NOTIFY currentChanged)
- Q_PROPERTY(QQmlListProperty<QtAction> __actions READ actions)
+ Q_PROPERTY(QQmlListProperty<QQuickAction> __actions READ actions)
Q_CLASSINFO("DefaultProperty", "__actions")
public:
@@ -64,7 +64,7 @@ public:
QObject *current() const { return m_current; }
void setCurrent(QObject * o);
- QQmlListProperty<QtAction> actions();
+ QQmlListProperty<QQuickAction> actions();
public Q_SLOTS:
void bindCheckable(QObject *o);
@@ -77,7 +77,7 @@ private Q_SLOTS:
void updateCurrent();
private:
- static void append_actions(QQmlListProperty<QtAction> *list, QtAction *action);
+ static void append_actions(QQmlListProperty<QQuickAction> *list, QQuickAction *action);
QObject * m_current;
QMetaMethod m_updateCurrentMethod;
diff --git a/src/controls/qtmenu.cpp b/src/controls/qtmenu.cpp
index cbedf732..0c0de48a 100644
--- a/src/controls/qtmenu.cpp
+++ b/src/controls/qtmenu.cpp
@@ -41,7 +41,6 @@
#include "qtmenu_p.h"
#include "qtmenuitemcontainer_p.h"
-#include "qtaction_p.h"
#include "qtmenupopupwindow_p.h"
#include <qdebug.h>
diff --git a/src/controls/qtmenuitem.cpp b/src/controls/qtmenuitem.cpp
index b82b25de..b74b8ac7 100644
--- a/src/controls/qtmenuitem.cpp
+++ b/src/controls/qtmenuitem.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qtmenuitem_p.h"
-#include "qtaction_p.h"
+#include "qquickaction_p.h"
#include "qtmenu_p.h"
#include "qtmenuitemcontainer_p.h"
@@ -151,7 +151,7 @@ QtMenuSeparator::QtMenuSeparator(QObject *parent)
}
QtMenuText::QtMenuText(QObject *parent)
- : QtMenuBase(parent), m_action(new QtAction(this))
+ : QtMenuBase(parent), m_action(new QQuickAction(this))
{
connect(m_action, SIGNAL(enabledChanged()), this, SLOT(updateEnabled()));
connect(m_action, SIGNAL(textChanged()), this, SLOT(updateText()));
@@ -419,7 +419,7 @@ void QtMenuItem::setParentMenu(QtMenu *parentMenu)
connect(this, SIGNAL(triggered()), parentMenu, SLOT(updateSelectedIndex()));
}
-void QtMenuItem::bindToAction(QtAction *action)
+void QtMenuItem::bindToAction(QQuickAction *action)
{
m_boundAction = action;
@@ -455,7 +455,7 @@ void QtMenuItem::unbindFromAction(QObject *o)
if (o == m_boundAction)
m_boundAction = 0;
- QtAction *action = qobject_cast<QtAction *>(o);
+ QQuickAction *action = qobject_cast<QQuickAction *>(o);
if (!action)
return;
@@ -474,14 +474,14 @@ void QtMenuItem::unbindFromAction(QObject *o)
disconnect(action, SIGNAL(iconSourceChanged()), this, SIGNAL(iconSourceChanged()));
}
-QtAction *QtMenuItem::action() const
+QQuickAction *QtMenuItem::action() const
{
if (m_boundAction)
return m_boundAction;
return QtMenuText::action();
}
-void QtMenuItem::setBoundAction(QtAction *a)
+void QtMenuItem::setBoundAction(QQuickAction *a)
{
if (a == m_boundAction)
return;
diff --git a/src/controls/qtmenuitem_p.h b/src/controls/qtmenuitem_p.h
index 4762d6e2..c78ac9e4 100644
--- a/src/controls/qtmenuitem_p.h
+++ b/src/controls/qtmenuitem_p.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
class QUrl;
class QPlatformMenuItem;
class QQuickItem;
-class QtAction;
+class QQuickAction;
class QtExclusiveGroup;
class QtMenu;
class QtMenuItemContainer;
@@ -160,7 +160,7 @@ public:
protected:
virtual QIcon icon() const;
- virtual QtAction *action() const { return m_action; }
+ virtual QQuickAction *action() const { return m_action; }
protected Q_SLOTS:
virtual void updateText();
@@ -168,7 +168,7 @@ protected Q_SLOTS:
void updateIcon();
private:
- QtAction *m_action;
+ QQuickAction *m_action;
};
class QtMenuItem: public QtMenuText
@@ -179,7 +179,7 @@ class QtMenuItem: public QtMenuText
Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled)
Q_PROPERTY(QtExclusiveGroup *exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup NOTIFY exclusiveGroupChanged)
Q_PROPERTY(QString shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged)
- Q_PROPERTY(QtAction *action READ boundAction WRITE setBoundAction NOTIFY actionChanged)
+ Q_PROPERTY(QQuickAction *action READ boundAction WRITE setBoundAction NOTIFY actionChanged)
public Q_SLOTS:
void trigger();
@@ -205,8 +205,8 @@ public:
QUrl iconSource() const;
QString iconName() const;
- QtAction *boundAction() { return m_boundAction; }
- void setBoundAction(QtAction *a);
+ QQuickAction *boundAction() { return m_boundAction; }
+ void setBoundAction(QQuickAction *a);
QString shortcut() const;
void setShortcut(const QString &shortcut);
@@ -225,15 +225,15 @@ public:
protected Q_SLOTS:
void updateShortcut();
void updateChecked();
- void bindToAction(QtAction *action);
+ void bindToAction(QQuickAction *action);
void unbindFromAction(QObject *action);
protected:
QIcon icon() const;
- QtAction *action() const;
+ QQuickAction *action() const;
private:
- QtAction *m_boundAction;
+ QQuickAction *m_boundAction;
};
QT_END_NAMESPACE