SearchReplaceWidget.hpp
1 #pragma once
2 #include <State/Expression.hpp>
3 
4 #include <QContextMenuEvent>
5 #include <QDialog>
6 
7 #include <vector>
8 namespace score
9 {
10 struct GUIApplicationContext;
11 }
12 namespace Scenario
13 {
14 class SearchReplaceWidget : public QDialog
15 {
16 public:
18  void search();
19  void replace();
20  void setFindTarget(const QString& fTarget);
21  void setReplaceTarget(const QString& rTarget);
22 
23 private:
24  void replaceAddress(
25  State::Expression& expr, const State::Address& oldAddr,
26  const State::Address& newAddr);
27  QString getObjectName(const QObject* o);
28  const score::GUIApplicationContext& m_ctx;
29  State::Address m_oldAddress{};
30  State::Address m_newAddress{};
31  std::vector<QObject*> m_matches{};
32 };
33 
34 }
Definition: SearchReplaceWidget.hpp:15
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
The Address struct.
Definition: Address.hpp:58
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15