Advertisement
Guest User

srccoreActionExecutorh

a guest
Jun 4th, 2020
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. diff --git a/src/core/ActionExecutor.h b/src/core/ActionExecutor.h
  2. index a883d0bde..79ff4a143 100644
  3. --- a/src/core/ActionExecutor.h
  4. +++ b/src/core/ActionExecutor.h
  5. @@ -1,63 +1,66 @@
  6. /**************************************************************************
  7. -* Otter Browser: Web browser controlled by the user, not vice-versa.
  8. -* Copyright (C) 2017 - 2020 Michal Dutkiewicz aka Emdek <michal@emdek.pl>
  9. -*
  10. -* This program is free software: you can redistribute it and/or modify
  11. -* it under the terms of the GNU General Public License as published by
  12. -* the Free Software Foundation, either version 3 of the License, or
  13. -* (at your option) any later version.
  14. -*
  15. -* This program is distributed in the hope that it will be useful,
  16. -* but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. -* GNU General Public License for more details.
  19. -*
  20. -* You should have received a copy of the GNU General Public License
  21. -* along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. -*
  23. -**************************************************************************/
  24. + * Otter Browser: Web browser controlled by the user, not vice-versa.
  25. + * Copyright (C) 2017 - 2020 Michal Dutkiewicz aka Emdek <michal@emdek.pl>
  26. + *
  27. + * This program is free software: you can redistribute it and/or modify
  28. + * it under the terms of the GNU General Public License as published by
  29. + * the Free Software Foundation, either version 3 of the License, or
  30. + * (at your option) any later version.
  31. + *
  32. + * This program is distributed in the hope that it will be useful,
  33. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  35. + * GNU General Public License for more details.
  36. + *
  37. + * You should have received a copy of the GNU General Public License
  38. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  39. + *
  40. + **************************************************************************/
  41.  
  42. #ifndef OTTER_ACTIONEXECUTOR_H
  43. #define OTTER_ACTIONEXECUTOR_H
  44.  
  45. #include "ActionsManager.h"
  46. -
  47. #include <QtCore/QMetaMethod>
  48. #include <QtCore/QPointer>
  49.  
  50. -namespace Otter
  51. -{
  52. -
  53. -class ActionExecutor
  54. -{
  55. -public:
  56. - class Object final
  57. - {
  58. - public:
  59. - explicit Object();
  60. - explicit Object(QObject *object, ActionExecutor *executor);
  61. - Object(const Object &other);
  62. +namespace Otter {
  63. + class ActionExecutor {
  64. + public:
  65. + class Object final {
  66. + public: explicit Object();
  67. + explicit Object(QObject * object, ActionExecutor * executor);
  68. + Object(const Object & other);
  69.  
  70. - void connectSignals(const QObject *receiver, const QMetaMethod *actionsStateChangedMethod, const QMetaMethod *arbitraryActionsStateChangedMethod, const QMetaMethod *categorizedActionsStateChangedMethod);
  71. - void disconnectSignals(const QObject *receiver, const QMetaMethod *actionsStateChangedMethod, const QMetaMethod *arbitraryActionsStateChangedMethod, const QMetaMethod *categorizedActionsStateChangedMethod);
  72. - void triggerAction(int identifier, const QVariantMap &parameters = {}, ActionsManager::TriggerType trigger = ActionsManager::UnknownTrigger);
  73. - QObject* getObject() const;
  74. - Object& operator=(const Object &other);
  75. - ActionsManager::ActionDefinition::State getActionState(int identifier, const QVariantMap &parameters = {}) const;
  76. - bool isValid() const;
  77. + void connectSignals(const QObject * receiver,
  78. + const QMetaMethod * actionsStateChangedMethod,
  79. + const QMetaMethod * arbitraryActionsStateChangedMethod,
  80. + const QMetaMethod * categorizedActionsStateChangedMethod);
  81. + void disconnectSignals(const QObject * receiver,
  82. + const QMetaMethod * actionsStateChangedMethod,
  83. + const QMetaMethod * arbitraryActionsStateChangedMethod,
  84. + const QMetaMethod * categorizedActionsStateChangedMethod);
  85. + void triggerAction(int identifier,
  86. + const QVariantMap & parameters = {}, ActionsManager::TriggerType trigger = ActionsManager::UnknownTrigger);
  87. + QObject * getObject() const;
  88. + Object & operator = (const Object & other);
  89. + ActionsManager::ActionDefinition::State getActionState(int identifier,
  90. + const QVariantMap & parameters = {}) const;
  91. + bool isValid() const;
  92.  
  93. - private:
  94. - QPointer<QObject> m_object;
  95. - ActionExecutor *m_executor;
  96. - };
  97. + private: QPointer < QObject > m_object;
  98. + ActionExecutor * m_executor;
  99. + };
  100.  
  101. - explicit ActionExecutor();
  102. - virtual ~ActionExecutor();
  103. + explicit ActionExecutor();
  104. + virtual~ActionExecutor();
  105.  
  106. - virtual ActionsManager::ActionDefinition::State getActionState(int identifier, const QVariantMap &parameters = {}) const = 0;
  107. - virtual void triggerAction(int identifier, const QVariantMap &parameters = {}, ActionsManager::TriggerType trigger = ActionsManager::UnknownTrigger) = 0;
  108. - virtual bool isAboutToClose() const;
  109. -};
  110. + virtual ActionsManager::ActionDefinition::State getActionState(int identifier,
  111. + const QVariantMap & parameters = {}) const = 0;
  112. + virtual void triggerAction(int identifier,
  113. + const QVariantMap & parameters = {}, ActionsManager::TriggerType trigger = ActionsManager::UnknownTrigger) = 0;
  114. + virtual bool isAboutToClose() const;
  115. + };
  116.  
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement